46 Q_PROPERTY(
int track READ
track WRITE setTrack)
50 Q_PROPERTY(
int voice READ
voice WRITE setVoice)
90 Ms::Score* _score =
nullptr;
95 Ms::Segment* _segment =
nullptr;
100 void setScore(Ms::Score* s);
104 Cursor(Ms::Score* s =
nullptr);
108 void setScore(
Score* s);
110 int track()
const {
return _track; }
111 void setTrack(
int v);
114 void setStaffIdx(
int v);
117 void setVoice(
int v);
119 int filter()
const {
return int(_filter); }
120 void setFilter(
int f) { _filter =
SegmentType(f); }
130 int qmlKeySignature();
135 Q_INVOKABLE
bool next();
139 Q_INVOKABLE
void addNote(
int pitch);
Definition: elements.h:430
Cursor can be used by plugins to manipulate the score.
Definition: cursor.h:43
qreal tempo
Tempo at current tick, read only.
Definition: cursor.h:67
Ms::PluginAPI::Segment * segment
Current segment, read only.
Definition: cursor.h:77
Q_INVOKABLE void addNote(int pitch)
Adds a note to the current cursor position.
Definition: cursor.cpp:211
RewindMode
Definition: cursor.h:82
@ SELECTION_START
Rewind to the start of a selection.
Definition: cursor.h:84
@ SELECTION_END
Rewind to the end of a selection.
Definition: cursor.h:85
@ SCORE_START
Rewind to the start of a score.
Definition: cursor.h:83
Q_INVOKABLE bool next()
Move the cursor to the next segment.
Definition: cursor.cpp:128
Q_INVOKABLE bool nextMeasure()
Move the cursor to the first segment of the next measure.
Definition: cursor.cpp:147
Q_INVOKABLE void rewind(RewindMode mode)
Rewind cursor to a certain position.
Definition: cursor.cpp:85
Ms::PluginAPI::Score * score
Associated score.
Definition: cursor.h:72
double time
Time at tick position, read only.
Definition: cursor.h:64
Ms::PluginAPI::Measure * measure
Current measure, read only.
Definition: cursor.h:79
Ms::PluginAPI::Element * element
Current element at track, read only.
Definition: cursor.h:75
int voice
Current voice (track % 4)
Definition: cursor.h:50
int keySignature
Key signature of current staff at tick pos.
Definition: cursor.h:70
Q_INVOKABLE void setDuration(int z, int n)
Set duration of the notes added by the cursor.
Definition: cursor.cpp:233
int tick
MIDI tick position, read only.
Definition: cursor.h:62
Q_INVOKABLE void add(Ms::PluginAPI::Element *)
Adds the given element to a score at this cursor's position.
Definition: cursor.cpp:167
int track
Current track.
Definition: cursor.h:46
int staffIdx
Current staff (track / 4)
Definition: cursor.h:48
int filter
Segment type filter, a bitmask from PluginAPI::PluginAPI::Segment values.
Definition: cursor.h:59
Definition: elements.h:69
Definition: elements.h:534
Definition: elements.h:352
Main class of the plugins framework. Named as MuseScore in QML.
Definition: qmlpluginapi.h:55
Definition: elements.h:474
Definition: cursor.cpp:29
SegmentType
Definition: types.h:332