Mercurial > hg > svgui
comparison 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 |
comparison
equal
deleted
inserted
replaced
696:e77b1673e17e | 702:ceb9a2992d96 |
---|---|
17 #define _FLEXINOTE_LAYER_H_ | 17 #define _FLEXINOTE_LAYER_H_ |
18 | 18 |
19 #define NOTE_HEIGHT 16 | 19 #define NOTE_HEIGHT 16 |
20 | 20 |
21 #include "SingleColourLayer.h" | 21 #include "SingleColourLayer.h" |
22 #include "VerticalScaleLayer.h" | |
23 | |
22 #include "data/model/FlexiNoteModel.h" | 24 #include "data/model/FlexiNoteModel.h" |
23 | 25 |
24 #include <QObject> | 26 #include <QObject> |
25 #include <QColor> | 27 #include <QColor> |
26 | 28 |
27 class View; | 29 class View; |
28 class QPainter; | 30 class QPainter; |
29 | 31 |
30 class FlexiNoteLayer : public SingleColourLayer | 32 |
33 class FlexiNoteLayer : public SingleColourLayer, | |
34 public VerticalScaleLayer | |
31 { | 35 { |
32 Q_OBJECT | 36 Q_OBJECT |
33 | 37 |
34 public: | 38 public: |
35 FlexiNoteLayer(); | 39 FlexiNoteLayer(); |
147 | 151 |
148 void setProperties(const QXmlAttributes &attributes); | 152 void setProperties(const QXmlAttributes &attributes); |
149 | 153 |
150 void setVerticalRangeToNoteRange(View *v); | 154 void setVerticalRangeToNoteRange(View *v); |
151 | 155 |
156 /// VerticalScaleLayer methods | |
157 virtual int getYForValue(View *v, float value) const; | |
158 virtual float getValueForY(View *v, int y) const; | |
159 virtual QString getScaleUnits() const; | |
160 | |
152 protected: | 161 protected: |
153 void getScaleExtents(View *, float &min, float &max, bool &log) const; | 162 void getScaleExtents(View *, float &min, float &max, bool &log) const; |
154 int getYForValue(View *v, float value) const; | |
155 float getValueForY(View *v, int y) const; | |
156 bool shouldConvertMIDIToHz() const; | 163 bool shouldConvertMIDIToHz() const; |
157 | 164 |
158 virtual int getDefaultColourHint(bool dark, bool &impose); | 165 virtual int getDefaultColourHint(bool dark, bool &impose); |
159 | 166 |
160 FlexiNoteModel::PointList getLocalPoints(View *v, int) const; | 167 FlexiNoteModel::PointList getLocalPoints(View *v, int) const; |