diff 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
line wrap: on
line diff
--- a/layer/Colour3DPlotLayer.h	Thu Oct 05 15:39:23 2006 +0000
+++ b/layer/Colour3DPlotLayer.h	Fri Oct 06 16:53:25 2006 +0000
@@ -68,19 +68,24 @@
 
     virtual bool getValueExtents(float &, float &, bool &, QString &) const { return false; }
 
-    virtual QString getPropertyLabel(const PropertyName &) const { return ""; }
-/*
     virtual PropertyList getProperties() const;
     virtual PropertyType getPropertyType(const PropertyName &) const;
+    virtual QString getPropertyLabel(const PropertyName &) const;
+    virtual QString getPropertyGroupName(const PropertyName &) const;
     virtual int getPropertyRangeAndValue(const PropertyName &,
-					   int *min, int *max) const;
+                                         int *min, int *max) const;
     virtual QString getPropertyValueLabel(const PropertyName &,
 					  int value) const;
     virtual void setProperty(const PropertyName &, int value);
-*/
 
     void setProperties(const QXmlAttributes &) { }
     
+    //!!! harmonize with spectrogram
+    enum ColourScale { LinearScale, AbsoluteScale, MeterScale, dBScale };
+
+    void setColourScale(ColourScale);
+    ColourScale getColourScale() const { return m_colourScale; }
+
 protected slots:
     void cacheInvalid();
     void cacheInvalid(size_t startFrame, size_t endFrame);
@@ -90,6 +95,9 @@
     
     mutable QImage *m_cache;
 
+    ColourScale m_colourScale;
+
+    virtual int getColourScaleWidth(QPainter &) const;
     virtual void paintDense(View *v, QPainter &paint, QRect rect) const;
 };