comparison layer/Colour3DPlotLayer.h @ 159:c1fb771b7646

* Various improvements to colour 3d plot layer, particularly for large and/or dense plots. Still a work in progress
author Chris Cannam
date Fri, 06 Oct 2006 16:53:25 +0000
parents b32282fefccd
children 42118892f428
comparison
equal deleted inserted replaced
158:9c3a4b42d8f8 159:c1fb771b7646
66 66
67 virtual int getCompletion(View *) const { return m_model->getCompletion(); } 67 virtual int getCompletion(View *) const { return m_model->getCompletion(); }
68 68
69 virtual bool getValueExtents(float &, float &, bool &, QString &) const { return false; } 69 virtual bool getValueExtents(float &, float &, bool &, QString &) const { return false; }
70 70
71 virtual QString getPropertyLabel(const PropertyName &) const { return ""; }
72 /*
73 virtual PropertyList getProperties() const; 71 virtual PropertyList getProperties() const;
74 virtual PropertyType getPropertyType(const PropertyName &) const; 72 virtual PropertyType getPropertyType(const PropertyName &) const;
73 virtual QString getPropertyLabel(const PropertyName &) const;
74 virtual QString getPropertyGroupName(const PropertyName &) const;
75 virtual int getPropertyRangeAndValue(const PropertyName &, 75 virtual int getPropertyRangeAndValue(const PropertyName &,
76 int *min, int *max) const; 76 int *min, int *max) const;
77 virtual QString getPropertyValueLabel(const PropertyName &, 77 virtual QString getPropertyValueLabel(const PropertyName &,
78 int value) const; 78 int value) const;
79 virtual void setProperty(const PropertyName &, int value); 79 virtual void setProperty(const PropertyName &, int value);
80 */
81 80
82 void setProperties(const QXmlAttributes &) { } 81 void setProperties(const QXmlAttributes &) { }
83 82
83 //!!! harmonize with spectrogram
84 enum ColourScale { LinearScale, AbsoluteScale, MeterScale, dBScale };
85
86 void setColourScale(ColourScale);
87 ColourScale getColourScale() const { return m_colourScale; }
88
84 protected slots: 89 protected slots:
85 void cacheInvalid(); 90 void cacheInvalid();
86 void cacheInvalid(size_t startFrame, size_t endFrame); 91 void cacheInvalid(size_t startFrame, size_t endFrame);
87 92
88 protected: 93 protected:
89 const DenseThreeDimensionalModel *m_model; // I do not own this 94 const DenseThreeDimensionalModel *m_model; // I do not own this
90 95
91 mutable QImage *m_cache; 96 mutable QImage *m_cache;
92 97
98 ColourScale m_colourScale;
99
100 virtual int getColourScaleWidth(QPainter &) const;
93 virtual void paintDense(View *v, QPainter &paint, QRect rect) const; 101 virtual void paintDense(View *v, QPainter &paint, QRect rect) const;
94 }; 102 };
95 103
96 #endif 104 #endif