comparison layer/NoteLayer.h @ 439:681542f0c8c5

* Add vertical zoom/pan to note layer as well (when not in auto-align or MIDI scale modes)
author Chris Cannam
date Fri, 24 Oct 2008 16:43:59 +0000
parents e1a9e478b7f2
children efe0f232685f
comparison
equal deleted inserted replaced
438:76cd1c89eb06 439:681542f0c8c5
93 93
94 virtual bool getValueExtents(float &min, float &max, 94 virtual bool getValueExtents(float &min, float &max,
95 bool &log, QString &unit) const; 95 bool &log, QString &unit) const;
96 96
97 virtual bool getDisplayExtents(float &min, float &max) const; 97 virtual bool getDisplayExtents(float &min, float &max) const;
98 virtual bool setDisplayExtents(float min, float max);
99
100 virtual int getVerticalZoomSteps(int &defaultStep) const;
101 virtual int getCurrentVerticalZoomStep() const;
102 virtual void setVerticalZoomStep(int);
103 virtual RangeMapper *getNewVerticalZoomRangeMapper() const;
98 104
99 virtual void toXml(QTextStream &stream, QString indent = "", 105 virtual void toXml(QTextStream &stream, QString indent = "",
100 QString extraAttributes = "") const; 106 QString extraAttributes = "") const;
101 107
102 void setProperties(const QXmlAttributes &attributes); 108 void setProperties(const QXmlAttributes &attributes);
116 NoteModel::Point m_originalPoint; 122 NoteModel::Point m_originalPoint;
117 NoteModel::Point m_editingPoint; 123 NoteModel::Point m_editingPoint;
118 NoteModel::EditCommand *m_editingCommand; 124 NoteModel::EditCommand *m_editingCommand;
119 VerticalScale m_verticalScale; 125 VerticalScale m_verticalScale;
120 126
127 mutable float m_scaleMinimum;
128 mutable float m_scaleMaximum;
129
130 bool shouldAutoAlign() const;
131
121 void finish(NoteModel::EditCommand *command) { 132 void finish(NoteModel::EditCommand *command) {
122 Command *c = command->finish(); 133 Command *c = command->finish();
123 if (c) CommandHistory::getInstance()->addCommand(c, false); 134 if (c) CommandHistory::getInstance()->addCommand(c, false);
124 } 135 }
125 }; 136 };