comparison layer/TimeValueLayer.h @ 706:97ea68f62c1f imaf_enc

Merge from default branch
author Chris Cannam
date Thu, 05 Dec 2013 09:47:02 +0000
parents 084f65094203
children 1d526ba11a24
comparison
equal deleted inserted replaced
678:26c5f7fd4807 706:97ea68f62c1f
15 15
16 #ifndef _TIME_VALUE_LAYER_H_ 16 #ifndef _TIME_VALUE_LAYER_H_
17 #define _TIME_VALUE_LAYER_H_ 17 #define _TIME_VALUE_LAYER_H_
18 18
19 #include "SingleColourLayer.h" 19 #include "SingleColourLayer.h"
20 #include "VerticalScaleLayer.h"
21 #include "ColourScaleLayer.h"
22
20 #include "data/model/SparseTimeValueModel.h" 23 #include "data/model/SparseTimeValueModel.h"
21 24
22 #include <QObject> 25 #include <QObject>
23 #include <QColor> 26 #include <QColor>
24 27
25 class View; 28 class View;
26 class QPainter; 29 class QPainter;
27 30
28 class TimeValueLayer : public SingleColourLayer 31 class TimeValueLayer : public SingleColourLayer,
32 public VerticalScaleLayer,
33 public ColourScaleLayer
29 { 34 {
30 Q_OBJECT 35 Q_OBJECT
31 36
32 public: 37 public:
33 TimeValueLayer(); 38 TimeValueLayer();
147 } else { 152 } else {
148 return ColourDistinguishes; 153 return ColourDistinguishes;
149 } 154 }
150 } 155 }
151 156
157 /// VerticalScaleLayer and ColourScaleLayer methods
158 virtual int getYForValue(View *, float value) const;
159 virtual float getValueForY(View *, int y) const;
160 virtual QString getScaleUnits() const;
161 virtual QColor getColourForValue(View *v, float value) const;
162
152 protected: 163 protected:
153 void getScaleExtents(View *, float &min, float &max, bool &log) const; 164 void getScaleExtents(View *, float &min, float &max, bool &log) const;
154 int getYForValue(View *, float value) const;
155 float getValueForY(View *, int y) const;
156 QColor getColourForValue(View *v, float value) const;
157 bool shouldAutoAlign() const; 165 bool shouldAutoAlign() const;
158 166
159 SparseTimeValueModel::PointList getLocalPoints(View *v, int) const; 167 SparseTimeValueModel::PointList getLocalPoints(View *v, int) const;
160 168
161 virtual int getDefaultColourHint(bool dark, bool &impose); 169 virtual int getDefaultColourHint(bool dark, bool &impose);