diff layer/TimeValueLayer.h @ 287:cd2492c5fe45

* Add SingleColourLayer to manage colours for layers that have a single predominant colour (i.e. most of them).
author Chris Cannam
date Thu, 12 Jul 2007 16:14:59 +0000
parents e175ade2d6b0
children ea37c229a578
line wrap: on
line diff
--- a/layer/TimeValueLayer.h	Wed Jul 11 20:46:37 2007 +0000
+++ b/layer/TimeValueLayer.h	Thu Jul 12 16:14:59 2007 +0000
@@ -16,7 +16,7 @@
 #ifndef _TIME_VALUE_LAYER_H_
 #define _TIME_VALUE_LAYER_H_
 
-#include "Layer.h"
+#include "SingleColourLayer.h"
 #include "data/model/SparseTimeValueModel.h"
 
 #include <QObject>
@@ -25,7 +25,7 @@
 class View;
 class QPainter;
 
-class TimeValueLayer : public Layer
+class TimeValueLayer : public SingleColourLayer
 {
     Q_OBJECT
 
@@ -74,9 +74,6 @@
 					  int value) const;
     virtual void setProperty(const PropertyName &, int value);
 
-    void setBaseColour(QColor);
-    QColor getBaseColour() const { return m_colour; }
-
     void setFillColourMap(int);
     int getFillColourMap() const { return m_colourMap; }
 
@@ -130,12 +127,13 @@
 
     SparseTimeValueModel::PointList getLocalPoints(View *v, int) const;
 
+    virtual int getDefaultColourHint(bool dark, bool &impose);
+
     SparseTimeValueModel *m_model;
     bool m_editing;
     SparseTimeValueModel::Point m_originalPoint;
     SparseTimeValueModel::Point m_editingPoint;
     SparseTimeValueModel::EditCommand *m_editingCommand;
-    QColor m_colour;
     int m_colourMap;
     PlotStyle m_plotStyle;
     VerticalScale m_verticalScale;