MuseScore  3.4
Music composition and notation
Classes | Namespaces | Macros | Functions
elements.h File Reference
#include "scoreelement.h"
#include "libmscore/element.h"
#include "libmscore/chord.h"
#include "libmscore/lyrics.h"
#include "libmscore/measure.h"
#include "libmscore/note.h"
#include "libmscore/notedot.h"
#include "libmscore/segment.h"
#include "libmscore/accidental.h"
#include "libmscore/musescoreCore.h"
#include "libmscore/score.h"
#include "libmscore/undo.h"
#include "playevent.h"
#include "libmscore/types.h"
Include dependency graph for elements.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Ms::PluginAPI::Element
 
class  Ms::PluginAPI::Note
 
class  Ms::PluginAPI::Chord
 
class  Ms::PluginAPI::Segment
 
class  Ms::PluginAPI::Measure
 

Namespaces

 Ms
 
 
 Ms::PluginAPI
 Contains items exposed to the QML plugins framework.
 

Macros

#define API_PROPERTY(name, pid)
 
#define API_PROPERTY_T(type, name, pid)
 API_PROPERTY flavor which allows to define the property type. More...
 
#define API_PROPERTY_READ_ONLY(name, pid)
 
#define API_PROPERTY_READ_ONLY_T(type, name, pid)
 

Functions

Tie * Ms::PluginAPI::tieWrap (Ms::Tie *tie)
 
Element * Ms::PluginAPI::wrap (Ms::Element *e, Ownership own)
 Wraps Ms::Element choosing the correct wrapper type at runtime based on the actual element type. More...
 

Macro Definition Documentation

◆ API_PROPERTY

#define API_PROPERTY (   name,
  pid 
)
Value:
Q_PROPERTY(QVariant name READ get_##name WRITE set_##name) \
QVariant get_##name() const { return get(Ms::Pid::pid); } \
void set_##name(QVariant val) { set(Ms::Pid::pid, val); }

◆ API_PROPERTY_READ_ONLY

#define API_PROPERTY_READ_ONLY (   name,
  pid 
)
Value:
Q_PROPERTY(QVariant name READ get_##name) \
QVariant get_##name() const { return get(Ms::Pid::pid); }

◆ API_PROPERTY_READ_ONLY_T

#define API_PROPERTY_READ_ONLY_T (   type,
  name,
  pid 
)
Value:
Q_PROPERTY(type name READ get_##name) \
type get_##name() const { return get(Ms::Pid::pid).value<type>(); } \

◆ API_PROPERTY_T

#define API_PROPERTY_T (   type,
  name,
  pid 
)
Value:
Q_PROPERTY(type name READ get_##name WRITE set_##name) \
type get_##name() const { return get(Ms::Pid::pid).value<type>(); } \
void set_##name(type val) { set(Ms::Pid::pid, QVariant::fromValue(val)); }

API_PROPERTY flavor which allows to define the property type.

Can be used if it is known that this property is always valid for this type, otherwise this macro won't allow an undefined value to be exposed to QML in case of invalid property.