Mercurial > hg > svgui
comparison layer/TimeValueLayer.h @ 101:0f36cdf407a6 sv1-v0.9rc1
* Make vertical scale alignment modes work in note layer as well as time-value
layer, and several significant fixes to it
* Make it possible to draw notes properly on the note layer
* Show units (and frequencies etc in note layer's case) in the time-value and
note layer description boxes
* Minor fix to item edit dialog layout
* Some minor menu rearrangement
* Comment out a lot of debug output
* Add SV website and reference URLs to Help menu, and add code to (attempt to)
open them in the user's preferred browser
author | Chris Cannam |
---|---|
date | Fri, 12 May 2006 14:40:43 +0000 |
parents | 4b98bda7e94d |
children | 999ae0f7d10c |
comparison
equal
deleted
inserted
replaced
100:0db5e7492ce8 | 101:0f36cdf407a6 |
---|---|
86 | 86 |
87 void setPlotStyle(PlotStyle style); | 87 void setPlotStyle(PlotStyle style); |
88 PlotStyle getPlotStyle() const { return m_plotStyle; } | 88 PlotStyle getPlotStyle() const { return m_plotStyle; } |
89 | 89 |
90 enum VerticalScale { | 90 enum VerticalScale { |
91 AutoAlignScale, | |
91 LinearScale, | 92 LinearScale, |
92 LogScale, | 93 LogScale, |
93 PlusMinusOneScale, | 94 PlusMinusOneScale |
94 FrequencyScale | |
95 }; | 95 }; |
96 | 96 |
97 void setVerticalScale(VerticalScale scale); | 97 void setVerticalScale(VerticalScale scale); |
98 VerticalScale getVerticalScale() const { return m_verticalScale; } | 98 VerticalScale getVerticalScale() const { return m_verticalScale; } |
99 | 99 |
105 | 105 |
106 virtual bool needsTextLabelHeight() const { | 106 virtual bool needsTextLabelHeight() const { |
107 return m_plotStyle == PlotSegmentation && m_model->hasTextLabels(); | 107 return m_plotStyle == PlotSegmentation && m_model->hasTextLabels(); |
108 } | 108 } |
109 | 109 |
110 virtual bool getValueExtents(float &min, float &max, QString &unit) const; | 110 virtual bool getValueExtents(float &min, float &max, |
111 bool &logarithmic, QString &unit) const; | |
112 | |
113 virtual bool getDisplayExtents(float &min, float &max) const; | |
111 | 114 |
112 virtual QString toXmlString(QString indent = "", | 115 virtual QString toXmlString(QString indent = "", |
113 QString extraAttributes = "") const; | 116 QString extraAttributes = "") const; |
114 | 117 |
115 void setProperties(const QXmlAttributes &attributes); | 118 void setProperties(const QXmlAttributes &attributes); |
116 | 119 |
117 protected: | 120 protected: |
121 void getScaleExtents(View *, float &min, float &max, bool &log) const; | |
118 int getYForValue(View *, float value) const; | 122 int getYForValue(View *, float value) const; |
119 float getValueForY(View *, int y) const; | 123 float getValueForY(View *, int y) const; |
120 | 124 QColor getColourForValue(View *v, float value) const; |
121 QColor getColourForValue(float value) const; | |
122 | 125 |
123 SparseTimeValueModel::PointList getLocalPoints(View *v, int) const; | 126 SparseTimeValueModel::PointList getLocalPoints(View *v, int) const; |
124 | 127 |
125 SparseTimeValueModel *m_model; | 128 SparseTimeValueModel *m_model; |
126 bool m_editing; | 129 bool m_editing; |