comparison layer/TimeValueLayer.h @ 437:755243c67f59

* Add vertical zoom and pan to time-value layer. Still some defects, particularly in logarithmic mode. Now need to get this in note layer as well! * Some fixes to log colouring in segmentation mode of time-value layer.
author Chris Cannam
date Fri, 24 Oct 2008 14:52:40 +0000
parents e1a9e478b7f2
children b3140e9e0665
comparison
equal deleted inserted replaced
436:1e0744b2cebe 437:755243c67f59
115 115
116 virtual bool getValueExtents(float &min, float &max, 116 virtual bool getValueExtents(float &min, float &max,
117 bool &logarithmic, QString &unit) const; 117 bool &logarithmic, QString &unit) const;
118 118
119 virtual bool getDisplayExtents(float &min, float &max) const; 119 virtual bool getDisplayExtents(float &min, float &max) const;
120 virtual bool setDisplayExtents(float min, float max);
121
122 virtual int getVerticalZoomSteps(int &defaultStep) const;
123 virtual int getCurrentVerticalZoomStep() const;
124 virtual void setVerticalZoomStep(int);
125 virtual RangeMapper *getNewVerticalZoomRangeMapper() const;
120 126
121 virtual void toXml(QTextStream &stream, QString indent = "", 127 virtual void toXml(QTextStream &stream, QString indent = "",
122 QString extraAttributes = "") const; 128 QString extraAttributes = "") const;
123 129
124 void setProperties(const QXmlAttributes &attributes); 130 void setProperties(const QXmlAttributes &attributes);
141 SparseTimeValueModel::EditCommand *m_editingCommand; 147 SparseTimeValueModel::EditCommand *m_editingCommand;
142 int m_colourMap; 148 int m_colourMap;
143 PlotStyle m_plotStyle; 149 PlotStyle m_plotStyle;
144 VerticalScale m_verticalScale; 150 VerticalScale m_verticalScale;
145 151
152 mutable float m_scaleMinimum;
153 mutable float m_scaleMaximum;
154
146 void finish(SparseTimeValueModel::EditCommand *command) { 155 void finish(SparseTimeValueModel::EditCommand *command) {
147 Command *c = command->finish(); 156 Command *c = command->finish();
148 if (c) CommandHistory::getInstance()->addCommand(c, false); 157 if (c) CommandHistory::getInstance()->addCommand(c, false);
149 } 158 }
150 }; 159 };