MuseScore Plugins  3.5
Plugins API for MuseScore
Public Member Functions | List of all members
MStyle Class Reference

Provides an access to score style settings. More...

Inheritance diagram for MStyle:
Inheritance graph
[legend]
Collaboration diagram for MStyle:
Collaboration graph
[legend]

Public Member Functions

Q_INVOKABLE QVariant value (const QString &key) const
 Returns a value of style setting named key. More...
 
Q_INVOKABLE void setValue (const QString &key, QVariant value)
 Sets the value of style setting named key to value. More...
 

Detailed Description

Provides an access to score style settings.

Style settings for a score can be obtained by querying the Score::style property.

Usage example:

var style = curScore.style;
var genClef = style.value("genClef"); // retrieves style setting on clefs generation, true by default
style.setValue("genClef", false); // disables generating clefs for this score
Since
MuseScore 3.5
See also
Sid

Member Function Documentation

◆ setValue()

void setValue ( const QString &  key,
QVariant  value 
)

Sets the value of style setting named key to value.

Key should be one of Sid values.

◆ value()

QVariant value ( const QString &  key) const

Returns a value of style setting named key.

Key should be one of Sid values. Type of the returned value depends on type of the corresponding style setting.


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