diff layer/TimeValueLayer.h @ 699:1a1448f7beb2

Pull out colour scale drawing as well
author Chris Cannam
date Wed, 04 Dec 2013 13:11:23 +0000
parents ad7623c39396
children 084f65094203
line wrap: on
line diff
--- a/layer/TimeValueLayer.h	Wed Dec 04 11:35:08 2013 +0000
+++ b/layer/TimeValueLayer.h	Wed Dec 04 13:11:23 2013 +0000
@@ -18,6 +18,8 @@
 
 #include "SingleColourLayer.h"
 #include "VerticalScaleLayer.h"
+#include "ColourScaleLayer.h"
+
 #include "data/model/SparseTimeValueModel.h"
 
 #include <QObject>
@@ -26,7 +28,9 @@
 class View;
 class QPainter;
 
-class TimeValueLayer : public SingleColourLayer, public VerticalScaleLayer
+class TimeValueLayer : public SingleColourLayer, 
+                       public VerticalScaleLayer, 
+                       public ColourScaleLayer
 {
     Q_OBJECT
 
@@ -150,14 +154,14 @@
         }
     }
 
-    /// VerticalScaleLayer methods
+    /// VerticalScaleLayer and ColourScaleLayer methods
     virtual void getScaleExtents(View *, float &min, float &max, bool &log) const;
     virtual int getYForValue(View *, float value) const;
     virtual float getValueForY(View *, int y) const;
     virtual QString getScaleUnits() const;
+    virtual QColor getColourForValue(View *v, float value) const;
 
 protected:
-    QColor getColourForValue(View *v, float value) const;
     bool shouldAutoAlign() const;
 
     SparseTimeValueModel::PointList getLocalPoints(View *v, int) const;