13#ifndef __PLUGIN_API_PART_H__
14#define __PLUGIN_API_PART_H__
16#include "scoreelement.h"
17#include "libmscore/part.h"
30class InstrumentListProperty :
public QQmlListProperty<Instrument> {
32 InstrumentListProperty(Part* p);
34 static int count(QQmlListProperty<Instrument>* l);
35 static Instrument* at(QQmlListProperty<Instrument>* l,
int i);
44 Q_PROPERTY(
int startTrack READ startTrack)
45 Q_PROPERTY(
int endTrack READ endTrack)
95 Part(
Ms::
Part* p =
nullptr, Ownership o = Ownership::SCORE)
98 Ms::Part* part() {
return toPart(e); }
99 const Ms::Part* part()
const {
return toPart(e); }
101 int startTrack()
const {
return part()->startTrack(); }
102 int endTrack()
const {
return part()->endTrack(); }
103 QString
instrumentId()
const {
return part()->instrument()->instrumentId(); }
104 int harmonyCount()
const {
return part()->harmonyCount(); }
106 bool hasTabStaff()
const {
return part()->hasTabStaff(); }
107 bool hasDrumStaff()
const {
return part()->hasDrumStaff(); }
108 int lyricCount()
const {
return part()->lyricCount(); }
109 int midiChannel()
const {
return part()->midiChannel(); }
110 int midiProgram()
const {
return part()->midiProgram(); }
111 QString
longName()
const {
return part()->longName(); }
112 QString
shortName()
const {
return part()->shortName(); }
113 QString
partName()
const {
return part()->partName(); }
114 bool show()
const {
return part()->show(); }
115 void setShow(
bool val) { set(Pid::VISIBLE, val); }
Definition instrument.h:207
bool hasTabStaff
Whether it is a tablature staff.
Definition part.h:61
Q_INVOKABLE Ms::PluginAPI::Instrument * instrumentAtTick(int tick)
Finds an instrument that is active in this part at the given tick.
Definition part.cpp:72
int lyricCount
The number of lyrics syllables.
Definition part.h:63
QQmlListProperty< Ms::PluginAPI::Instrument > instruments
List of instruments in this part.
Definition part.h:91
bool hasDrumStaff
Whether it is a percussion staff.
Definition part.h:57
bool show
Whether part is shown or hidden.
Definition part.h:85
QString partName
The name of the current part of music.
Definition part.h:81
bool hasPitchedStaff
Whether it is a 'normal' staff with notes.
Definition part.h:59
int midiChannel
One of 16 music channels that can be assigned an instrument.
Definition part.h:65
QString instrumentId
The string identifier (MusicXML Sound ID) for the first instrument in this part.
Definition part.h:53
QString longName
The long name for the current instrument.
Definition part.h:71
int harmonyCount
The number of Chord Symbols.
Definition part.h:55
QString shortName
The short name for the current instrument.
Definition part.h:75
int midiProgram
One of the 128 different instruments in General MIDI.
Definition part.h:67
Main class of the plugins framework. Named as MuseScore in QML.
Definition qmlpluginapi.h:62
Base class for most of object wrappers exposed to QML.
Definition scoreelement.h:42
Contains items exposed to the QML plugins framework.
Definition cursor.cpp:31