13 #ifndef __PLUGIN_API_ELEMENTS_H__ 14 #define __PLUGIN_API_ELEMENTS_H__ 45 #define API_PROPERTY(name, pid) \ 46 Q_PROPERTY(QVariant name READ get_##name WRITE set_##name) \ 47 QVariant get_##name() const { return get(Ms::Pid::pid); } \ 48 void set_##name(QVariant val) { set(Ms::Pid::pid, val); } 56 #define API_PROPERTY_T(type, name, pid) \ 57 Q_PROPERTY(type name READ get_##name WRITE set_##name) \ 58 type get_##name() const { return get(Ms::Pid::pid).value<type>(); } \ 59 void set_##name(type val) { set(Ms::Pid::pid, QVariant::fromValue(val)); } 61 #define API_PROPERTY_READ_ONLY(name, pid) \ 62 Q_PROPERTY(QVariant name READ get_##name) \ 63 QVariant get_##name() const { return get(Ms::Pid::pid); } 66 #define API_PROPERTY_READ_ONLY_T(type, name, pid) \ 67 Q_PROPERTY(type name READ get_##name) \ 68 type get_##name() const { return get(Ms::Pid::pid).value<type>(); } \ 458 Q_PROPERTY(
int tpc READ
tpc WRITE setTpc)
474 int tpc()
const {
return note()->tpc(); }
475 void setTpc(
int val);
483 QQmlListProperty<Element>
dots() {
return wrapContainerProperty<Element>(
this, note()->dots()); }
484 QQmlListProperty<Element>
elements() {
return wrapContainerProperty<Element>(
this, note()->el()); }
516 Q_PROPERTY(QQmlListProperty<Ms::PluginAPI::Chord> graceNotes READ graceNotes)
538 QQmlListProperty<Chord>
graceNotes() {
return wrapContainerProperty<Chord>(
this, chord()->graceNotes()); }
539 QQmlListProperty<Note>
notes() {
return wrapContainerProperty<Note>(
this, chord()->notes()); }
540 QQmlListProperty<Element>
lyrics() {
return wrapContainerProperty<Element>(
this, chord()->lyrics()); }
571 Q_PROPERTY(QQmlListProperty<Ms::PluginAPI::Element> annotations READ annotations)
599 Q_PROPERTY(
int tick READ tick)
610 int tick()
const {
return segment()->tick().ticks(); }
618 QQmlListProperty<Element>
annotations() {
return wrapContainerProperty<Element>(
this, segment()->annotations()); }
664 QQmlListProperty<Element>
elements() {
return wrapContainerProperty<Element>(
this, measure()->el()); }
669 #undef API_PROPERTY_T 670 #undef API_PROPERTY_READ_ONLY 671 #undef API_PROPERTY_READ_ONLY_T Wrapper * wrap(T *t, Ownership own=Ownership::SCORE)
Definition: scoreelement.h:97
QVariant noStem
Definition: elements.h:150
QVariant role
Definition: elements.h:276
QVariant boxHeight
Definition: elements.h:184
Measure * prevMeasure()
Definition: elements.h:661
Definition: elements.h:631
Definition of class Accidental.
QVariant dashGapLen
Definition: elements.h:289
const Ms::Measure * measure() const
Definition: elements.h:656
QVariant singleNoteDynamics
Definition: elements.h:222
QVariant playbackVoice3
Definition: elements.h:293
const Ms::Segment * segment() const
Definition: elements.h:608
QVariant systemFlag
Definition: elements.h:328
Segment * prevInMeasure()
Definition: elements.h:617
QVariant distribute
Definition: elements.h:153
QVariant bracketType
Definition: elements.h:177
QVariant frameBgColor
Definition: elements.h:325
QVariant volta_ending
Definition: elements.h:270
QVariant barlineSpanTo
Definition: elements.h:161
Ms::NoteType noteType()
Definition: elements.h:545
QVariant staffLines
Definition: elements.h:298
QVariant glissType
Definition: elements.h:236
QVariant mag
Definition: elements.h:272
QVariant headGroup
Notehead group, one of PluginAPI::PluginAPI::NoteHeadGroup values.
Definition: elements.h:146
QVariant numberType
Definition: elements.h:176
QVariant fbprefix
Definition: elements.h:209
QVariant showCourtesy
Definition: elements.h:138
QVariant timesigStretch
Definition: elements.h:250
QVariant fretFrets
Definition: elements.h:280
Base class for most of object wrappers exposed to QML.
Definition: scoreelement.h:42
QVariant fretOffset
Definition: elements.h:282
QVariant hairpinType
Definition: elements.h:218
QVariant staffNoteheadScheme
Definition: elements.h:304
QVariant vibratoType
Definition: elements.h:216
QVariant fbdigit
Definition: elements.h:210
QVariant space
Definition: elements.h:203
Definition: noteevent.h:25
QVariant play
Definition: elements.h:173
QVariant text
Definition: elements.h:198
QVariant lineWidth
Definition: elements.h:243
QVariant rightMargin
Definition: elements.h:189
QVariant measureNumberMode
Definition: elements.h:235
QVariant fbcontinuationline
Definition: elements.h:212
Definition of undo-releated classes and structs.
QVariant staffGenKeysig
Definition: elements.h:307
QVariant line
Definition: elements.h:140
QVariant frameType
Definition: elements.h:320
QColor color
Element color.
Definition: elements.h:133
Ms::NoteType noteType()
Definition: elements.h:491
QVariant userLen
Definition: elements.h:202
QVariant hairpinHeight
Definition: elements.h:219
QVariant beamNoSlope
Definition: elements.h:201
Ms::SegmentType segmentType() const
Definition: elements.h:612
QVariant endHookHeight
Definition: elements.h:349
QVariant staffGenClef
Definition: elements.h:305
QVariant staffMove
Definition: elements.h:266
Definition: elements.h:565
QVariant bottomGap
Definition: elements.h:187
QVariant playbackVoice2
Definition: elements.h:292
QVariant align
Definition: elements.h:327
QVariant tempoFollowText
Definition: elements.h:205
QVariant staffGenTimesig
Definition: elements.h:306
QVariant repeatCount
Definition: elements.h:257
Ms::PluginAPI::Note * lastTiedNote()
Definition: elements.h:481
QVariant slurUoff3
Definition: elements.h:264
Definition of Score class.
QVariant continueFontStyle
Definition: elements.h:343
QVariant timesigActual
Definition: elements.h:175
one measure in a system
Definition: measure.h:65
QVariant topMargin
Definition: elements.h:190
QVariant veloChange
Definition: elements.h:221
QVariant gap
Definition: elements.h:285
Measure * nextMeasure()
Definition: elements.h:662
QVariant staffShowBarlines
Definition: elements.h:301
Segment * prevInScore()
Definition: elements.h:616
bool selected
Definition: elements.h:127
qreal offsetY() const
Definition: elements.h:359
QVariant normalNotes
Definition: elements.h:178
QVariant endFontFace
Definition: elements.h:350
AccidentalType
Definition: types.h:152
QVariant staffBarlineSpan
Definition: elements.h:310
QVariant lineType
Definition: elements.h:139
QVariant lineVisible
Definition: elements.h:271
QVariant small
Definition: elements.h:137
QVariant beginFontFace
Definition: elements.h:334
QVariant beginTextPlace
Definition: elements.h:331
QVariant fixedLine
Definition: elements.h:142
Base class of score layout elements.
Definition: element.h:158
QVariant createSystemHeader
Definition: elements.h:297
QVariant subStyle
Definition: elements.h:316
QVariant noOffset
Definition: elements.h:259
Definition: elements.h:75
QQmlListProperty< Element > annotations()
Definition: elements.h:618
Ms::PluginAPI::Tie * tieForward() const
Definition: elements.h:478
QVariant lineStyle
Definition: elements.h:241
Ms::ScoreElement *const e
Definition: scoreelement.h:60
QVariant sizeSpatiumDependent
Definition: elements.h:326
QVariant label
Definition: elements.h:231
#define API_PROPERTY_READ_ONLY(name, pid)
Definition: elements.h:61
QVariant staffStemless
Definition: elements.h:303
QVariant barlineSpanFrom
Definition: elements.h:160
QVariant articulationAnchor
Definition: elements.h:147
QVariant boxWidth
Definition: elements.h:185
QVariant staffYoffset
Definition: elements.h:308
QVariant continueTextOffset
Definition: elements.h:344
virtual const QPointF pos() const
Definition: element.h:230
QVariant trillType
Definition: elements.h:215
QVariant beginFontSize
Definition: elements.h:335
QVariant fret
Definition: elements.h:170
QVariant hairpinCircledTip
Definition: elements.h:217
QVariant endText
Definition: elements.h:345
QVariant staffBarlineSpanFrom
Definition: elements.h:311
QVariant dotPosition
Definition: elements.h:155
Element(Ms::Element *e=nullptr, Ownership own=Ownership::PLUGIN)
Definition: elements.h:372
QVariant playbackVoice1
Definition: elements.h:291
QVariant irregular
Definition: elements.h:260
QVariant frameWidth
Definition: elements.h:321
QVariant beamMode
Definition: elements.h:200
QVariant slurDirection
Definition: elements.h:151
QVariant numeratorString
Definition: elements.h:207
QVariant spannerTrack2
Definition: elements.h:254
QVariant jumpTo
Definition: elements.h:228
QVariant fixed
Definition: elements.h:141
PlayEventType
Determines whether oranaments are automatically generated when playing a score and whether the PlayEv...
Definition: types.h:489
Definition: inspectorAmbitus.cpp:21
QVariant tempo
Definition: elements.h:204
QVariant lassoPos
Definition: elements.h:244
Ms::Chord * chord()
Definition: elements.h:535
Segment * lastSegment()
Definition: elements.h:659
Ms::PluginAPI::Tie * tieBack() const
Definition: elements.h:477
void setOffsetY(qreal offY)
Definition: elements.cpp:34
QVariant fbsuffix
Definition: elements.h:211
Tie * tieWrap(Ms::Tie *tie)
Definition: tie.cpp:34
QVariant lyricTicks
Definition: elements.h:269
#define API_PROPERTY_T(type, name, pid)
API_PROPERTY flavor which allows to define the property type.
Definition: elements.h:56
QVariant staffUserdist
Definition: elements.h:309
QVariant breakMmr
Definition: elements.h:256
QVariant fontStyle
Definition: elements.h:319
QVariant sizeIsSpatium
Definition: elements.h:197
QVariant duration
Definition: elements.h:274
Ms::Measure * measure()
Definition: elements.h:655
QVariant slurUoff1
Definition: elements.h:262
int z
Stacking order of this element.
Definition: elements.h:136
QVariant beginFontStyle
Definition: elements.h:336
QVariant glissText
Definition: elements.h:237
Ms::PlayEventType playEventType()
Definition: elements.h:546
Definition: playevent.h:32
virtual Q_INVOKABLE QString subtypeName() const
Definition: element.cpp:154
QVariant headType
Notehead type, one of PluginAPI::PluginAPI::NoteHeadType values.
Definition: elements.h:144
Ms::PluginAPI::Element * parent() const
Definition: elements.h:366
QVariant posAbove
Definition: elements.h:354
QVariant frameRound
Definition: elements.h:323
Provides access to internal Ms::Tie objects.
Definition: tie.h:28
QVariant inameLayoutPosition
Definition: elements.h:315
QVariant markerType
Definition: elements.h:232
QVariant subtype
Definition: elements.h:126
QVariant mirrorHead
Definition: elements.h:154
QVariant leftMargin
Definition: elements.h:188
QVariant hairpinContHeight
Definition: elements.h:220
QVariant beginTextAlign
Definition: elements.h:330
Ownership
Definition: scoreelement.h:32
QVariant frameFgColor
Definition: elements.h:324
qreal posY() const
Definition: elements.h:364
QVariant stepOffset
Definition: elements.h:300
QVariant spannerTicks
Definition: elements.h:253
QVariant arpUserLen1
Definition: elements.h:233
QVariant direction
Definition: elements.h:148
QVariant ornamentStyle
Definition: elements.h:247
int tpc() const
Definition: elements.h:474
QVariant playUntil
Definition: elements.h:229
QVariant staffShowLedgerlines
Definition: elements.h:302
QVariant veloChangeMethod
Definition: elements.h:223
QVariant verse
Definition: elements.h:267
QVariant groups
Definition: elements.h:240
QVariant timesig
Definition: elements.h:248
const Ms::Element * element() const
Returns the underlying Ms::Element.
Definition: elements.h:378
Q_INVOKABLE Ms::PluginAPI::Element * clone() const
Definition: elements.h:383
QVariant symbol
Definition: elements.h:295
QVariant continueTextPlace
Definition: elements.h:340
SegmentType
Definition: types.h:333
const Ms::Chord * chord() const
Definition: elements.h:536
QVariant veloChangeSpeed
Definition: elements.h:224
QVariant p2
Definition: elements.h:181
QVariant beginHookHeight
Definition: elements.h:333
QQmlListProperty< PlayEvent > playEvents()
Definition: elements.h:485
QVariant beginTextOffset
Definition: elements.h:337
const Ms::Note * note() const
Definition: elements.h:472
QVariant placement
Definition: elements.h:226
Element * accidental()
Definition: elements.h:487
QVariant tuning
Definition: elements.h:156
QVariant size
Definition: elements.h:194
QVariant scale
Definition: elements.h:195
QVariant layoutBreakType
Definition: elements.h:192
int tick() const
Definition: elements.h:610
QVariant beginHookType
Definition: elements.h:332
bool autoplace
Whether this element participates in autoplacement.
Definition: elements.h:287
Definition of class Measure.
QVariant endFontStyle
Definition: elements.h:352
qreal posX() const
Definition: elements.h:363
QVariant lineDistance
Definition: elements.h:299
QVariant stemDirection
Definition: elements.h:149
Q_INVOKABLE QString subtypeName() const
Definition: elements.h:385
void setAccidentalType(Ms::AccidentalType t)
Definition: elements.h:490
Segment * firstSegment()
Definition: elements.h:658
QVariant actualNotes
Definition: elements.h:179
QVariant fretNumPos
Definition: elements.h:283
Definition: aeolus.cpp:26
QVariant growLeft
Definition: elements.h:182
QQmlListProperty< Element > elements()
Definition: elements.h:664
QVariant timesigGlobal
Definition: elements.h:249
QVariant bottomMargin
Definition: elements.h:191
QVariant continueFontSize
Definition: elements.h:342
#define API_PROPERTY(name, pid)
Definition: elements.h:45
QVariant fontFace
Definition: elements.h:317
QQmlListProperty< Element > elements()
Definition: elements.h:484
Q_INVOKABLE Ms::PluginAPI::PlayEvent * createPlayEvent()
Creates a PlayEvent object for use in Javascript.
Definition: elements.h:499
QVariant bracketSpan
Definition: elements.h:313
QVariant userOff2
Definition: elements.h:255
NoteType
Definition: types.h:255
QVariant lassoSize
Definition: elements.h:245
QVariant bracketColumn
Definition: elements.h:314
qreal offsetX() const
Definition: elements.h:358
QVariant endHookType
Definition: elements.h:348
QVariant diagonal
Definition: elements.h:239
QVariant lockAspectRatio
Definition: elements.h:196
QVariant beamPos
Definition: elements.h:199
Definition: inspectorAmbitus.cpp:21
QPointF offset
Offset from a reference position in spatium units.
Definition: elements.h:169
QVariant anchor
Definition: elements.h:261
QVariant barlineSpan
Definition: elements.h:159
a Tie has a Note as startElement/endElement
Definition: tie.h:60
QVariant staffBarlineSpanTo
Definition: elements.h:312
#define API_PROPERTY_READ_ONLY_T(type, name, pid)
Definition: elements.h:66
QVariant framePadding
Definition: elements.h:322
QVariant useDrumset
Definition: elements.h:273
Graphic representation of a chord.
Definition: chord.h:55
QVariant continueTextAlign
Definition: elements.h:339
QVariant systemBracket
Definition: elements.h:284
QVariant continueText
Definition: elements.h:338
Main class of the plugins framework. Named as MuseScore in QML.
Definition: qmlpluginapi.h:54
const QPointF & offset() const
Definition: element.h:245
QVariant topGap
Definition: elements.h:186
Definition of classes Note and NoteHead.
Definition of classes Chord, HelpLine and NoteList.
QVariant pause
Definition: elements.h:157
Element * wrap(Ms::Element *e, Ownership own)
Wraps Ms::Element choosing the correct wrapper type at runtime based on the actual element type...
Definition: elements.cpp:247
QVariant p1
Definition: elements.h:180
QVariant velocity
Definition: elements.h:227
QVariant endTextPlace
Definition: elements.h:347
QVariant syllabic
Definition: elements.h:268
QVariant playRepeats
Definition: elements.h:296
QVariant timesigType
Definition: elements.h:251
QVariant continueAt
Definition: elements.h:230
QVariant lineColor
Definition: elements.h:242
QVariant barlineType
Definition: elements.h:158
Q_INVOKABLE QString _name() const
Deprecated: same as ScoreElement::name. Left for compatibility purposes.
Definition: elements.h:387
QVariant autoscale
Definition: elements.h:193
int tpc(int idx, int pitch, int opt)
Definition: pitchspelling.cpp:539
int track
Definition: elements.h:277
QVariant fretStrings
Definition: elements.h:279
Segment * nextInScore()
Definition: elements.h:614
QVariant dynamicRange
Definition: elements.h:225
QmlPlayEventsListAccess wrapPlayEventsContainerProperty(QObject *obj, NoteEventList &c)
Definition: playevent.h:115
QVariant slurUoff4
Definition: elements.h:265
QQmlListProperty< Element > dots()
Definition: elements.h:483
Definition: editdrumset.cpp:32
Graphic representation of a note.
Definition: note.h:212
Ms::AccidentalType accidentalType()
Definition: elements.h:489
Ms::Note * note()
Definition: elements.h:471
QVariant denominatorString
Definition: elements.h:208
Ms::PluginAPI::Note * firstTiedNote()
Definition: elements.h:480
ElementType
Definition: types.h:34
QVariant glissandoStyle
Definition: elements.h:278
QVariant beginText
Definition: elements.h:329
QVariant ghost
Definition: elements.h:172
QVariant growRight
Definition: elements.h:183
Definition: elements.h:514
qreal spatium() const
Definition: element.cpp:130
QVariant timesigNominal
Definition: elements.h:174
Segment * nextInMeasure()
Definition: elements.h:615
Ms::Segment * segment()
Definition: elements.h:607
QVariant durationType
Definition: elements.h:275
QQmlListProperty< Note > notes()
Definition: elements.h:539
QVariant timeStretch
Definition: elements.h:246
Ms::Element * element()
Returns the underlying Ms::Element.
Definition: elements.h:377
QVariant numbersOnly
Definition: elements.h:214
QQmlListProperty< Element > lyrics()
Definition: elements.h:540
QVariant ottavaType
Definition: elements.h:213
bool generated
Definition: elements.h:128
QVariant playbackVoice4
Definition: elements.h:294
QVariant continueFontFace
Definition: elements.h:341
int voice
Definition: elements.h:355
QVariant accidentalBracket
Definition: elements.h:206
Definition: inspectorAmbitus.cpp:22
void setOffsetX(qreal offX)
Definition: elements.cpp:24
QVariant userStretch
Definition: elements.h:258
QQmlListProperty< Chord > graceNotes()
Definition: elements.h:538
QVariant fontSize
Definition: elements.h:318
QVariant slurUoff2
Definition: elements.h:263
bool visible
Definition: elements.h:134
QVariant leadingSpace
Definition: elements.h:152
QVariant dashLineLen
Definition: elements.h:288
QVariant endTextOffset
Definition: elements.h:353
QVariant glissShowText
Definition: elements.h:238
QVariant arpUserLen2
Definition: elements.h:234
Definition: elements.h:395
QVariant spannerTick
Definition: elements.h:252
QVariant endFontSize
Definition: elements.h:351
QVariant position
Definition: elements.h:356
QVariant endTextAlign
Definition: elements.h:346