comparison layer/NoteLayer.h @ 1459:42c87368287c

Merge from branch single-point
author Chris Cannam
date Fri, 17 May 2019 10:02:52 +0100
parents f792a5001d80
children 696e569ff21b
comparison
equal deleted inserted replaced
1441:8d5bf4ab98ef 1459:42c87368287c
140 void getScaleExtents(LayerGeometryProvider *, double &min, double &max, bool &log) const; 140 void getScaleExtents(LayerGeometryProvider *, double &min, double &max, bool &log) const;
141 bool shouldConvertMIDIToHz() const; 141 bool shouldConvertMIDIToHz() const;
142 142
143 int getDefaultColourHint(bool dark, bool &impose) override; 143 int getDefaultColourHint(bool dark, bool &impose) override;
144 144
145 NoteModel::PointList getLocalPoints(LayerGeometryProvider *v, int) const; 145 EventVector getLocalPoints(LayerGeometryProvider *v, int) const;
146 146
147 bool getPointToDrag(LayerGeometryProvider *v, int x, int y, NoteModel::Point &) const; 147 bool getPointToDrag(LayerGeometryProvider *v, int x, int y, Event &) const;
148 148
149 NoteModel *m_model; 149 NoteModel *m_model;
150 bool m_editing; 150 bool m_editing;
151 int m_dragPointX; 151 int m_dragPointX;
152 int m_dragPointY; 152 int m_dragPointY;
153 int m_dragStartX; 153 int m_dragStartX;
154 int m_dragStartY; 154 int m_dragStartY;
155 NoteModel::Point m_originalPoint; 155 Event m_originalPoint;
156 NoteModel::Point m_editingPoint; 156 Event m_editingPoint;
157 NoteModel::EditCommand *m_editingCommand; 157 ChangeEventsCommand *m_editingCommand;
158 bool m_editIsOpen; 158 bool m_editIsOpen;
159 VerticalScale m_verticalScale; 159 VerticalScale m_verticalScale;
160 160
161 typedef std::set<NoteModel::Point, NoteModel::Point::Comparator> NoteSet; 161 typedef std::set<Event> NoteSet;
162 NoteSet m_pendingNoteOns; 162 NoteSet m_pendingNoteOns;
163 163
164 mutable double m_scaleMinimum; 164 mutable double m_scaleMinimum;
165 mutable double m_scaleMaximum; 165 mutable double m_scaleMaximum;
166 166
167 bool shouldAutoAlign() const; 167 bool shouldAutoAlign() const;
168 168
169 void finish(NoteModel::EditCommand *command) { 169 void finish(ChangeEventsCommand *command) {
170 Command *c = command->finish(); 170 Command *c = command->finish();
171 if (c) CommandHistory::getInstance()->addCommand(c, false); 171 if (c) CommandHistory::getInstance()->addCommand(c, false);
172 } 172 }
173 }; 173 };
174 174