comparison layer/FlexiNoteLayer.h @ 754:efbb6b8f943b tony_integration

Merge from branch tonioni
author Chris Cannam
date Mon, 31 Mar 2014 13:00:42 +0100
parents 03423269a9d0
children 09e2677e34e7
comparison
equal deleted inserted replaced
744:b6dc57688c72 754:efbb6b8f943b
26 #include <QObject> 26 #include <QObject>
27 #include <QColor> 27 #include <QColor>
28 28
29 class View; 29 class View;
30 class QPainter; 30 class QPainter;
31 31 class SparseTimeValueModel;
32 32
33 class FlexiNoteLayer : public SingleColourLayer, 33 class FlexiNoteLayer : public SingleColourLayer,
34 public VerticalScaleLayer 34 public VerticalScaleLayer
35 { 35 {
36 Q_OBJECT 36 Q_OBJECT
75 virtual void deleteSelection(Selection s); 75 virtual void deleteSelection(Selection s);
76 76
77 virtual void copy(View *v, Selection s, Clipboard &to); 77 virtual void copy(View *v, Selection s, Clipboard &to);
78 virtual bool paste(View *v, const Clipboard &from, int frameOffset, 78 virtual bool paste(View *v, const Clipboard &from, int frameOffset,
79 bool interactive); 79 bool interactive);
80
81 void splitNotesAt(View *v, int frame);
82 void snapSelectedNotesToPitchTrack(View *v, Selection s);
83 void mergeNotes(View *v, Selection s, bool inclusive);
80 84
81 virtual const Model *getModel() const { return m_model; } 85 virtual const Model *getModel() const { return m_model; }
82 void setModel(FlexiNoteModel *model); 86 void setModel(FlexiNoteModel *model);
83 87
84 virtual PropertyList getProperties() const; 88 virtual PropertyList getProperties() const;
167 FlexiNoteModel::PointList getLocalPoints(View *v, int) const; 171 FlexiNoteModel::PointList getLocalPoints(View *v, int) const;
168 172
169 bool getPointToDrag(View *v, int x, int y, FlexiNoteModel::Point &) const; 173 bool getPointToDrag(View *v, int x, int y, FlexiNoteModel::Point &) const;
170 bool getNoteToEdit(View *v, int x, int y, FlexiNoteModel::Point &) const; 174 bool getNoteToEdit(View *v, int x, int y, FlexiNoteModel::Point &) const;
171 void getRelativeMousePosition(View *v, FlexiNoteModel::Point &note, int x, int y, bool &closeToLeft, bool &closeToRight, bool &closeToTop, bool &closeToBottom) const; 175 void getRelativeMousePosition(View *v, FlexiNoteModel::Point &note, int x, int y, bool &closeToLeft, bool &closeToRight, bool &closeToTop, bool &closeToBottom) const;
172 void updateNoteValue(View *v, FlexiNoteModel::Point &note) const; 176 SparseTimeValueModel *getAssociatedPitchModel(View *v) const;
177 bool updateNoteValue(View *v, FlexiNoteModel::Point &note) const;
173 178
174 FlexiNoteModel *m_model; 179 FlexiNoteModel *m_model;
175 bool m_editing; 180 bool m_editing;
176 bool m_intelligentActions; 181 bool m_intelligentActions;
177 int m_dragPointX; 182 int m_dragPointX;