MuseScore Plugins  3.2.2
Plugins API for MuseScore
Public Member Functions | Properties | List of all members
Score Class Reference
Inheritance diagram for Score:
Inheritance graph
[legend]
Collaboration diagram for Score:
Collaboration graph
[legend]

Public Member Functions

Q_INVOKABLE QString metaTag (const QString &tag) const
 Returns as a string the metatag named tag.
 
Q_INVOKABLE void setMetaTag (const QString &tag, const QString &val)
 Sets the metatag named tag to val.
 
Q_INVOKABLE void appendMeasures (int n)
 Appends a number of measures to this score.
 
Q_INVOKABLE void addText (const QString &type, const QString &text)
 Adds a header text to the score. More...
 
Q_INVOKABLE Ms::PluginAPI::CursornewCursor ()
 Creates and returns a cursor to be used to navigate in the score.
 
Q_INVOKABLE Ms::PluginAPI::SegmentfirstSegment ()
 
Q_INVOKABLE QString extractLyrics ()
 
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...
 

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::Excerptexcerpts
 List of the excerpts (linked parts) (read only)
 
Ms::PluginAPI::Measure firstMeasure
 First measure of the score (read only)
 
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)
 
Ms::PluginAPI::Measure lastMeasureMM
 Last multimeasure rest measure of the score (read only). More...
 
Ms::PluginAPI::Segment lastSegment
 Last score segment (read only)
 
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)
 
int npages
 Number of pages (read only)
 
int nstaves
 Number of staves (read only)
 
int ntracks
 Number of tracks (nstaves * 4) (read only)
 
QQmlListProperty< Ms::PluginAPI::Partparts
 The list of parts.
 
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)
 
QString mscoreRevision
 MuseScore revision the score has been last saved with (includes autosave) (read only)
 
- Properties inherited from ScoreElement
int type
 Type of this element. More...
 
QString name
 Name of this element's type, not localized. More...
 

Member Function Documentation

◆ addText()

void addText ( const QString &  type,
const QString &  txt 
)

Adds a header text to the score.

Parameters
typeOne of the following values:
  • "title"
  • "subtitle"
  • "composer"
  • "lyricist"
  • Any other value corresponds to default text style.
txtText to be added.

◆ endCmd()

Q_INVOKABLE void endCmd ( bool  rollback = false)
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.

Parameters
rollbackIf true, reverts all the changes made since the last startCmd() invocation.

◆ startCmd()

Q_INVOKABLE void startCmd ( )
inline

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.

Property Documentation

◆ composer

QString composer
read

Composer of the score, as taken from the score properties (read only).


Since
MuseScore 3.2

◆ duration

int duration
read

Duration of score in seconds (read only).


Since
MuseScore 3.2

◆ firstMeasureMM

Measure * firstMeasureMM
read

First multimeasure rest measure of the score (read only).


Since
MuseScore 3.2

◆ harmonyCount

int harmonyCount
read

Number of harmony items (chord symbols) in the score (read only).


Since
MuseScore 3.2

◆ hasHarmonies

bool hasHarmonies
read

Whether score has harmonies (chord symbols) (read only).


Since
MuseScore 3.2

◆ hasLyrics

bool hasLyrics
read

Whether score has lyrics (read only).


Since
MuseScore 3.2

◆ keysig

int keysig
read

Key signature at the start of the score, in number of accidentals, negative for flats, postitive for sharps (read only).


Since
MuseScore 3.2

◆ lastMeasureMM

Measure * lastMeasureMM
read

Last multimeasure rest measure of the score (read only).


Since
MuseScore 3.2

◆ lyricCount

int lyricCount
read

Number of lyrics items (syllables) in the score (read only).


Since
MuseScore 3.2

◆ lyricist

QString lyricist
read

Lyricist of score, as taken from the score properties.


Since
MuseScore 3.2

◆ scoreName

QString scoreName
readwrite

Name of the score, without path leading to it and extension.


Since
MuseScore 3.2

◆ title

QString title
read

Title of score, as taken from the score properties' workTitle (read only).


Since
MuseScore 3.2

The documentation for this class was generated from the following files: