Mercurial > hg > svgui
diff layer/TimeValueLayer.h @ 698:ad7623c39396
Pull out log and linear vertical scales into their own classes, make some improvements to log numbering
author | Chris Cannam |
---|---|
date | Wed, 04 Dec 2013 11:35:08 +0000 |
parents | 156a120345ae |
children | 1a1448f7beb2 |
line wrap: on
line diff
--- a/layer/TimeValueLayer.h Wed Dec 04 12:17:44 2013 +0000 +++ b/layer/TimeValueLayer.h Wed Dec 04 11:35:08 2013 +0000 @@ -17,6 +17,7 @@ #define _TIME_VALUE_LAYER_H_ #include "SingleColourLayer.h" +#include "VerticalScaleLayer.h" #include "data/model/SparseTimeValueModel.h" #include <QObject> @@ -25,7 +26,7 @@ class View; class QPainter; -class TimeValueLayer : public SingleColourLayer +class TimeValueLayer : public SingleColourLayer, public VerticalScaleLayer { Q_OBJECT @@ -149,10 +150,13 @@ } } + /// VerticalScaleLayer 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; + protected: - void getScaleExtents(View *, float &min, float &max, bool &log) const; - int getYForValue(View *, float value) const; - float getValueForY(View *, int y) const; QColor getColourForValue(View *v, float value) const; bool shouldAutoAlign() const;