MuseScore  3.4
Music composition and notation
Public Member Functions | Protected Attributes | Properties | Private Attributes | Related Functions | List of all members
Ms::PluginAPI::ScoreElement Class Reference

Base class for most of object wrappers exposed to QML. More...

#include <scoreelement.h>

Inheritance diagram for Ms::PluginAPI::ScoreElement:
Inheritance graph
[legend]
Collaboration diagram for Ms::PluginAPI::ScoreElement:
Collaboration graph
[legend]

Public Member Functions

 ScoreElement (Ms::ScoreElement *_e=nullptr, Ownership own=Ownership::PLUGIN)
 
 ScoreElement (const ScoreElement &)=delete
 
ScoreElementoperator= (const ScoreElement &)=delete
 
virtual ~ScoreElement ()
 
Ownership ownership () const
 
void setOwnership (Ownership o)
 
Ms::ScoreElementelement ()
 
const Ms::ScoreElementelement () 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...
 

Protected Attributes

Ms::ScoreElement *const e
 

Properties

int type
 Type of this element. More...
 
QString name
 Name of this element's type, not localized. More...
 

Private Attributes

Ownership _ownership
 

Related Functions

(Note that these are not member functions.)

template<class Wrapper , class T >
Wrapper * wrap (T *t, Ownership own=Ownership::SCORE)
 

Detailed Description

Base class for most of object wrappers exposed to QML.

Constructor & Destructor Documentation

◆ ScoreElement() [1/2]

Ms::PluginAPI::ScoreElement::ScoreElement ( Ms::ScoreElement _e = nullptr,
Ownership  own = Ownership::PLUGIN 
)
inline

◆ ScoreElement() [2/2]

Ms::PluginAPI::ScoreElement::ScoreElement ( const ScoreElement )
delete

◆ ~ScoreElement()

Ms::PluginAPI::ScoreElement::~ScoreElement ( )
virtual

Member Function Documentation

◆ element() [1/2]

Ms::ScoreElement* Ms::PluginAPI::ScoreElement::element ( )
inline

◆ element() [2/2]

const Ms::ScoreElement* Ms::PluginAPI::ScoreElement::element ( ) const
inline

◆ get()

QVariant Ms::PluginAPI::ScoreElement::get ( Ms::Pid  pid) const

◆ is()

Q_INVOKABLE bool Ms::PluginAPI::ScoreElement::is ( Ms::PluginAPI::ScoreElement other)
inline

Checks whether two variables represent the same object.

Since
MuseScore 3.3

◆ name()

QString Ms::PluginAPI::ScoreElement::name ( ) const

◆ operator=()

ScoreElement& Ms::PluginAPI::ScoreElement::operator= ( const ScoreElement )
delete

◆ ownership()

Ownership Ms::PluginAPI::ScoreElement::ownership ( ) const
inline

◆ set()

void Ms::PluginAPI::ScoreElement::set ( Ms::Pid  pid,
QVariant  val 
)

◆ setOwnership()

void Ms::PluginAPI::ScoreElement::setOwnership ( Ownership  o)
inline

◆ type()

int Ms::PluginAPI::ScoreElement::type ( ) const

◆ userName()

QString Ms::PluginAPI::ScoreElement::userName ( ) const

Human-readable element type name.

Returns
Name of the element type, translated according to the current MuseScore locale settings.

Friends And Related Function Documentation

◆ wrap()

template<class Wrapper , class T >
Wrapper * wrap ( T *  t,
Ownership  own = Ownership::SCORE 
)
related

Member Data Documentation

◆ _ownership

Ownership Ms::PluginAPI::ScoreElement::_ownership
private

◆ e

Ms::ScoreElement* const Ms::PluginAPI::ScoreElement::e
protected

Property Documentation

◆ name

QString Ms::PluginAPI::ScoreElement::name
read

Name of this element's type, not localized.

Use ScoreElement::userName() to obtain a localized element name suitable for usage in a user interface.

◆ type

int Ms::PluginAPI::ScoreElement::type
read

Type of this element.

See PluginAPI::PluginAPI::Element for the list of possible values.


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