Mercurial > hg > svgui
diff layer/Colour3DPlotLayer.h @ 197:6b023411087b
* Work on harmonising colour and scale ranges between types of layer
* Add normalize options to colour 3d plot layer
author | Chris Cannam |
---|---|
date | Thu, 01 Feb 2007 14:31:28 +0000 |
parents | 57c2350a8c40 |
children | 34bbbcb3c01f |
line wrap: on
line diff
--- a/layer/Colour3DPlotLayer.h Wed Jan 31 12:13:47 2007 +0000 +++ b/layer/Colour3DPlotLayer.h Thu Feb 01 14:31:28 2007 +0000 @@ -79,17 +79,27 @@ virtual QString getPropertyValueLabel(const PropertyName &, int value) const; virtual void setProperty(const PropertyName &, int value); - - void setProperties(const QXmlAttributes &) { } + virtual void setProperties(const QXmlAttributes &); - //!!! harmonize with spectrogram - enum ColourScale { LinearScale, AbsoluteScale, MeterScale, dBScale }; + enum ColourScale { LinearScale, LogScale, PlusMinusOneScale }; void setColourScale(ColourScale); ColourScale getColourScale() const { return m_colourScale; } + void setColourMap(int map); + int getColourMap() const; + + void setNormalizeColumns(bool n); + bool getNormalizeColumns() const; + + void setNormalizeVisibleArea(bool n); + bool getNormalizeVisibleArea() const; + virtual const Model *getSliceableModel() const { return m_model; } + virtual QString toXmlString(QString indent = "", + QString extraAttributes = "") const; + protected slots: void cacheInvalid(); void cacheInvalid(size_t startFrame, size_t endFrame); @@ -98,10 +108,17 @@ const DenseThreeDimensionalModel *m_model; // I do not own this mutable QImage *m_cache; + mutable size_t m_cacheStart; ColourScale m_colourScale; + int m_colourMap; + bool m_normalizeColumns; + bool m_normalizeVisibleArea; + + void getColumn(size_t col, DenseThreeDimensionalModel::Column &) const; virtual int getColourScaleWidth(QPainter &) const; + virtual void fillCache(size_t firstBin, size_t lastBin) const; virtual void paintDense(View *v, QPainter &paint, QRect rect) const; };