Mercurial > hg > svgui
diff layer/FlexiNoteLayer.h @ 702:ceb9a2992d96 tonioni
Merge from default branch
author | Chris Cannam |
---|---|
date | Wed, 04 Dec 2013 13:46:29 +0000 |
parents | layer/NoteLayer.h@084f65094203 layer/NoteLayer.h@ad12e428785b |
children | d50f91fe374e |
line wrap: on
line diff
--- a/layer/FlexiNoteLayer.h Wed Dec 04 11:35:08 2013 +0000 +++ b/layer/FlexiNoteLayer.h Wed Dec 04 13:46:29 2013 +0000 @@ -19,6 +19,8 @@ #define NOTE_HEIGHT 16 #include "SingleColourLayer.h" +#include "VerticalScaleLayer.h" + #include "data/model/FlexiNoteModel.h" #include <QObject> @@ -27,7 +29,9 @@ class View; class QPainter; -class FlexiNoteLayer : public SingleColourLayer + +class FlexiNoteLayer : public SingleColourLayer, + public VerticalScaleLayer { Q_OBJECT @@ -149,10 +153,13 @@ void setVerticalRangeToNoteRange(View *v); + /// VerticalScaleLayer methods + virtual int getYForValue(View *v, float value) const; + virtual float getValueForY(View *v, int y) const; + virtual QString getScaleUnits() const; + protected: void getScaleExtents(View *, float &min, float &max, bool &log) const; - int getYForValue(View *v, float value) const; - float getValueForY(View *v, int y) const; bool shouldConvertMIDIToHz() const; virtual int getDefaultColourHint(bool dark, bool &impose);