96 Q_PROPERTY(
int stringNumber READ inputStateString WRITE setInputStateString)
122 Ms::Score* _score =
nullptr;
125 std::unique_ptr<InputState> is;
131 void setScore(Ms::Score* s);
132 Ms::Element* currentElement()
const;
134 InputState& inputState();
135 const InputState& inputState()
const {
return const_cast<Cursor*
>(
this)->inputState(); }
138 void setSegment(Ms::Segment* seg);
140 int inputStateString()
const;
141 void setInputStateString(
int);
145 Cursor(Ms::Score* s =
nullptr);
149 void setScore(
Score* s);
152 void setTrack(
int v);
155 void setStaffIdx(
int v);
158 void setVoice(
int v);
160 int filter()
const {
return int(_filter); }
161 void setFilter(
int f) { _filter =
SegmentType(f); }
174 int qmlKeySignature();
180 Q_INVOKABLE
bool next();
182 Q_INVOKABLE
bool prev();
185 Q_INVOKABLE
void addNote(
int pitch,
bool addToChord =
false);
Definition: elements.h:775
Q_INVOKABLE bool next()
Move the cursor to the next segment.
Definition: cursor.cpp:199
double time
Time at tick position, read only.
Definition: cursor.h:74
int stringNumber
A physical string number where this cursor currently at.
Definition: cursor.h:96
Definition: elements.h:709
Q_INVOKABLE void rewind(RewindMode mode)
Rewind cursor to a certain position.
Definition: cursor.cpp:116
Q_INVOKABLE void setDuration(int z, int n)
Set duration of the notes added by the cursor.
Definition: cursor.cpp:507
Input state of cursor is synchronized with score input state.
Definition: cursor.h:109
Ms::PluginAPI::Element element
Current element at track, read only.
Definition: cursor.h:85
Definition: elements.h:85
int track
Current track.
Definition: cursor.h:56
Ms::PluginAPI::Segment segment
Current segment, read only.
Definition: cursor.h:87
Input state of cursor is independent of score input state (default)
Definition: cursor.h:108
Cursor can be used by plugins to manipulate the score.
Definition: cursor.h:53
Q_INVOKABLE void addRest()
Adds a rest to the current cursor position.
Definition: cursor.cpp:400
RewindMode
Definition: cursor.h:99
Definition: cursor.cpp:30
int keySignature
Key signature of current staff at tick pos.
Definition: cursor.h:80
int voice
Current voice (track % 4)
Definition: cursor.h:60
Ms::PluginAPI::Measure measure
Current measure, read only.
Definition: cursor.h:89
Rewind to the end of a selection.
Definition: cursor.h:102
SegmentType
Definition: types.h:424
Rewind to the start of a selection.
Definition: cursor.h:101
Q_INVOKABLE void add(Ms::PluginAPI::Element *)
Adds the given element to a score at this cursor's position.
Definition: cursor.cpp:236
int filter
Segment type filter, a bitmask from PluginAPI::PluginAPI::Segment values.
Definition: cursor.h:69
Q_INVOKABLE void addTuplet(Ms::PluginAPI::FractionWrapper *ratio, Ms::PluginAPI::FractionWrapper *duration)
Adds a tuplet to the current cursor position.
Definition: cursor.cpp:445
int tick
MIDI tick position, read only.
Definition: cursor.h:72
Rewind to the start of a score.
Definition: cursor.h:100
Q_INVOKABLE bool nextMeasure()
Move the cursor to the first segment of the next measure.
Definition: cursor.cpp:216
Main class of the plugins framework. Named as MuseScore in QML.
Definition: qmlpluginapi.h:62
Ms::PluginAPI::Score score
Associated score.
Definition: cursor.h:82
Q_INVOKABLE void addNote(int pitch, bool addToChord=false)
Adds a note to the current cursor position.
Definition: cursor.cpp:376
InputStateMode inputStateMode
Behavior of input state (position, notes duration etc.) of this cursor with respect to input state of...
Definition: cursor.h:111
int staffIdx
Current staff (track / 4)
Definition: cursor.h:58
Q_INVOKABLE void rewindToTick(int tick)
Rewind cursor to a position defined by tick.
Definition: cursor.cpp:161
qreal tempo
Tempo at current tick, read only.
Definition: cursor.h:77
InputStateMode
Definition: cursor.h:107
Fraction object available to QML plugins.
Definition: fraction.h:32
Q_INVOKABLE bool prev()
Move the cursor to the previous segment.
Definition: cursor.cpp:184