MuseScore
3.4
Music composition and notation
|
#include <score.h>
Public Member Functions | |
Score (Ms::Score *s=nullptr, Ownership o=Ownership::SCORE) | |
Ms::Score * | score () |
const Ms::Score * | score () const |
QString | composer () |
int | duration () |
int | harmonyCount () |
bool | hasHarmonies () |
bool | hasLyrics () |
int | keysig () |
int | lyricCount () |
QString | lyricist () |
QString | title () |
Ms::PluginAPI::Selection * | selection () |
Q_INVOKABLE QString | metaTag (const QString &tag) const |
Returns as a string the metatag named tag . More... | |
Q_INVOKABLE void | setMetaTag (const QString &tag, const QString &val) |
Sets the metatag named tag to val . More... | |
Q_INVOKABLE void | appendMeasures (int n) |
Appends a number of measures to this score. More... | |
Q_INVOKABLE void | addText (const QString &type, const QString &text) |
Adds a header text to the score. More... | |
Q_INVOKABLE Ms::PluginAPI::Cursor * | newCursor () |
Creates and returns a cursor to be used to navigate in the score. More... | |
Q_INVOKABLE Ms::PluginAPI::Segment * | firstSegment () |
Segment * | lastSegment () |
Measure * | firstMeasure () |
Measure * | firstMeasureMM () |
Measure * | lastMeasure () |
Measure * | lastMeasureMM () |
QString | name () const |
void | setName (const QString &name) |
Q_INVOKABLE QString | extractLyrics () |
int | nmeasures () const |
int | npages () const |
int | nstaves () const |
int | ntracks () const |
Q_INVOKABLE void | startCmd () |
For "dock" type plugins: to be used before score modifications to make them undoable. More... | |
Q_INVOKABLE void | endCmd (bool rollback=false) |
For "dock" type plugins: to be used after score modifications to make them undoable. More... | |
Q_INVOKABLE void | createPlayEvents () |
Create PlayEvents for all notes based on ornamentation. More... | |
QString | mscoreVersion () |
QString | mscoreRevision () |
QQmlListProperty< Part > | parts () |
QQmlListProperty< Excerpt > | excerpts () |
Public Member Functions inherited from Ms::PluginAPI::ScoreElement | |
ScoreElement (Ms::ScoreElement *_e=nullptr, Ownership own=Ownership::PLUGIN) | |
ScoreElement (const ScoreElement &)=delete | |
ScoreElement & | operator= (const ScoreElement &)=delete |
virtual | ~ScoreElement () |
Ownership | ownership () const |
void | setOwnership (Ownership o) |
Ms::ScoreElement * | element () |
const Ms::ScoreElement * | element () const |
QString | name () const |
int | type () const |
QVariant | get (Ms::Pid pid) const |
void | set (Ms::Pid pid, QVariant val) |
Q_INVOKABLE QString | userName () const |
Human-readable element type name. More... | |
Q_INVOKABLE bool | is (Ms::PluginAPI::ScoreElement *other) |
Checks whether two variables represent the same object. More... | |
Properties | |
QString | composer |
Composer of the score, as taken from the score properties (read only). More... | |
int | duration |
Duration of score in seconds (read only). More... | |
QQmlListProperty< Ms::PluginAPI::Excerpt > | excerpts |
List of the excerpts (linked parts) (read only) More... | |
Ms::PluginAPI::Measure | firstMeasure |
First measure of the score (read only) More... | |
Ms::PluginAPI::Measure | firstMeasureMM |
First multimeasure rest measure of the score (read only). More... | |
int | harmonyCount |
Number of harmony items (chord symbols) in the score (read only). More... | |
bool | hasHarmonies |
Whether score has harmonies (chord symbols) (read only). More... | |
bool | hasLyrics |
Whether score has lyrics (read only). More... | |
int | keysig |
Key signature at the start of the score, in number of accidentals, negative for flats, postitive for sharps (read only). More... | |
Ms::PluginAPI::Measure | lastMeasure |
Last measure of the score (read only) More... | |
Ms::PluginAPI::Measure | lastMeasureMM |
Last multimeasure rest measure of the score (read only). More... | |
Ms::PluginAPI::Segment | lastSegment |
Last score segment (read only) More... | |
int | lyricCount |
Number of lyrics items (syllables) in the score (read only). More... | |
QString | scoreName |
Name of the score, without path leading to it and extension. More... | |
int | nmeasures |
Number of measures (read only) More... | |
int | npages |
Number of pages (read only) More... | |
int | nstaves |
Number of staves (read only) More... | |
int | ntracks |
Number of tracks (nstaves * 4) (read only) More... | |
QQmlListProperty< Ms::PluginAPI::Part > | parts |
The list of parts. More... | |
QString | lyricist |
Lyricist of score, as taken from the score properties. More... | |
QString | title |
Title of score, as taken from the score properties' workTitle (read only). More... | |
QString | mscoreVersion |
MuseScore version the score has been last saved with (includes autosave) (read only) More... | |
QString | mscoreRevision |
MuseScore revision the score has been last saved with (includes autosave) (read only) More... | |
Ms::PluginAPI::Selection | selection |
Current selections for the score. More... | |
Properties inherited from Ms::PluginAPI::ScoreElement | |
int | type |
Type of this element. More... | |
QString | name |
Name of this element's type, not localized. More... | |
Additional Inherited Members | |
Protected Attributes inherited from Ms::PluginAPI::ScoreElement | |
Ms::ScoreElement *const | e |
Related Functions inherited from Ms::PluginAPI::ScoreElement | |
template<class Wrapper , class T > | |
Wrapper * | wrap (T *t, Ownership own=Ownership::SCORE) |
|
inline |
void Ms::PluginAPI::Score::addText | ( | const QString & | type, |
const QString & | txt | ||
) |
Adds a header text to the score.
type | One of the following values:
|
txt | Text to be added. |
|
inline |
Appends a number of measures to this score.
|
inline |
|
inline |
|
inline |
|
inline |
For "dock" type plugins: to be used after score modifications to make them undoable.
Ends an undoable command. Should be used at least once by "dock" type plugins in case they modify the score.
rollback | If true, reverts all the changes made since the last startCmd() invocation. |
|
inline |
|
inline |
Measure* Ms::PluginAPI::Score::firstMeasure | ( | ) |
Measure* Ms::PluginAPI::Score::firstMeasureMM | ( | ) |
Segment * Ms::PluginAPI::Score::firstSegment | ( | ) |
|
inline |
|
inline |
|
inline |
|
inline |
Measure* Ms::PluginAPI::Score::lastMeasure | ( | ) |
Measure* Ms::PluginAPI::Score::lastMeasureMM | ( | ) |
Segment* Ms::PluginAPI::Score::lastSegment | ( | ) |
|
inline |
|
inline |
|
inline |
Returns as a string the metatag named tag
.
|
inline |
|
inline |
|
inline |
Cursor * Ms::PluginAPI::Score::newCursor | ( | ) |
Creates and returns a cursor to be used to navigate in the score.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Sets the metatag named tag
to val
.
|
inline |
void Ms::PluginAPI::Score::startCmd | ( | ) |
For "dock" type plugins: to be used before score modifications to make them undoable.
Starts an undoable command. Must be accompanied by a corresponding endCmd() call. Should be used at least once by "dock" type plugins in case they modify the score.
|
inline |
|
read |
|
read |
|
read |
List of the excerpts (linked parts) (read only)
|
read |
First measure of the score (read only)
|
read |
|
read |
|
read |
|
read |
|
read |
Key signature at the start of the score, in number of accidentals, negative for flats, postitive for sharps (read only).
|
read |
Last measure of the score (read only)
|
read |
|
read |
Last score segment (read only)
|
read |
|
read |
|
read |
MuseScore revision the score has been last saved with (includes autosave) (read only)
|
read |
MuseScore version the score has been last saved with (includes autosave) (read only)
|
read |
Number of measures (read only)
|
read |
Number of pages (read only)
|
read |
Number of staves (read only)
|
read |
Number of tracks (nstaves * 4) (read only)
|
read |
The list of parts.
|
readwrite |
|
read |
Current selections for the score.
|
read |