MuseScore  3.4
Music composition and notation
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
Ms::Preferences Class Reference

#include <inspectorplugin.h>

Public Types

typedef QHash< QString, Preference * > prefs_map_t
 

Public Member Functions

int getInt (QString) const
 
bool isThemeDark () const
 
 Preferences ()
 
 ~Preferences ()
 
void init (bool storeInMemoryOnly=false)
 
void save ()
 
void setReturnDefaultValuesMode (bool returnDefaultValues)
 
const prefs_map_tallPreferences () const
 
QVariant defaultValue (const QString key) const
 
bool getBool (const QString key) const
 
QColor getColor (const QString key) const
 
QString getString (const QString key) const
 
int getInt (const QString key) const
 
double getDouble (const QString key) const
 
void setToDefaultValue (const QString key)
 
void setPreference (const QString key, QVariant value)
 
void setTemporaryPreference (const QString key, QVariant value)
 
SessionStart sessionStart () const
 
MusicxmlExportBreaks musicxmlExportBreaks () const
 
MuseScoreStyleType globalStyle () const
 
bool isThemeDark () const
 
template<typename T >
void setCustomPreference (const QString key, T t)
 
MidiRemote midiRemote (int recordId) const
 
void updateMidiRemote (int recordId, MidiRemoteType type, int data)
 
void clearMidiRemote (int recordId)
 
QMap< QString, QVariant > getLocalPreferences ()
 
void setLocalPreference (QString key, QVariant value)
 
void setUseLocalPreferences (bool value)
 
bool getUseLocalPreferences ()
 
void updateLocalPreferences ()
 

Private Member Functions

QSettings * settings () const
 
QVariant get (const QString key) const
 
bool has (const QString key) const
 
void set (const QString key, QVariant value, bool temporary=false)
 
void remove (const QString key)
 
QVariant preference (const QString key) const
 
QMetaType::Type type (const QString key) const
 
bool checkIfKeyExists (const QString key) const
 
bool checkType (const QString key, QMetaType::Type t) const
 
QMap< QString, QVariant > getDefaultLocalPreferences ()
 

Private Attributes

prefs_map_t _allPreferences
 
QHash< QString, QVariant > _inMemorySettings
 
bool _storeInMemoryOnly = false
 
bool _returnDefaultValues = false
 
bool _initialized = false
 
QSettings * _settings
 
QMap< QString, QVariant > localPreferences
 
bool useLocalPrefs = false
 

Member Typedef Documentation

◆ prefs_map_t

typedef QHash<QString, Preference*> Ms::Preferences::prefs_map_t

Constructor & Destructor Documentation

◆ Preferences()

Ms::Preferences::Preferences ( )

◆ ~Preferences()

Ms::Preferences::~Preferences ( )

Member Function Documentation

◆ allPreferences()

const prefs_map_t& Ms::Preferences::allPreferences ( ) const
inline

◆ checkIfKeyExists()

bool Ms::Preferences::checkIfKeyExists ( const QString  key) const
private

◆ checkType()

bool Ms::Preferences::checkType ( const QString  key,
QMetaType::Type  t 
) const
private

◆ clearMidiRemote()

void Ms::Preferences::clearMidiRemote ( int  recordId)

◆ defaultValue()

QVariant Ms::Preferences::defaultValue ( const QString  key) const

◆ get()

QVariant Ms::Preferences::get ( const QString  key) const
private

◆ getBool()

bool Ms::Preferences::getBool ( const QString  key) const

◆ getColor()

QColor Ms::Preferences::getColor ( const QString  key) const

◆ getDefaultLocalPreferences()

QMap< QString, QVariant > Ms::Preferences::getDefaultLocalPreferences ( )
private

◆ getDouble()

double Ms::Preferences::getDouble ( const QString  key) const

◆ getInt() [1/2]

int Ms::Preferences::getInt ( QString  key) const

◆ getInt() [2/2]

int Ms::Preferences::getInt ( const QString  key) const

◆ getLocalPreferences()

QMap<QString, QVariant> Ms::Preferences::getLocalPreferences ( )
inline

◆ getString()

QString Ms::Preferences::getString ( const QString  key) const

◆ getUseLocalPreferences()

bool Ms::Preferences::getUseLocalPreferences ( )
inline

◆ globalStyle()

MuseScoreStyleType Ms::Preferences::globalStyle ( ) const

◆ has()

bool Ms::Preferences::has ( const QString  key) const
private

◆ init()

void Ms::Preferences::init ( bool  storeInMemoryOnly = false)

◆ isThemeDark() [1/2]

bool Ms::Preferences::isThemeDark ( ) const

◆ isThemeDark() [2/2]

bool Ms::Preferences::isThemeDark ( ) const

◆ midiRemote()

MidiRemote Ms::Preferences::midiRemote ( int  recordId) const

◆ musicxmlExportBreaks()

MusicxmlExportBreaks Ms::Preferences::musicxmlExportBreaks ( ) const

◆ preference()

QVariant Ms::Preferences::preference ( const QString  key) const
private

◆ remove()

void Ms::Preferences::remove ( const QString  key)
private

◆ save()

void Ms::Preferences::save ( )

◆ sessionStart()

SessionStart Ms::Preferences::sessionStart ( ) const

◆ set()

void Ms::Preferences::set ( const QString  key,
QVariant  value,
bool  temporary = false 
)
private

◆ setCustomPreference()

template<typename T >
void Ms::Preferences::setCustomPreference ( const QString  key,
t 
)
inline

◆ setLocalPreference()

void Ms::Preferences::setLocalPreference ( QString  key,
QVariant  value 
)

◆ setPreference()

void Ms::Preferences::setPreference ( const QString  key,
QVariant  value 
)

◆ setReturnDefaultValuesMode()

void Ms::Preferences::setReturnDefaultValuesMode ( bool  returnDefaultValues)
inline

◆ setTemporaryPreference()

void Ms::Preferences::setTemporaryPreference ( const QString  key,
QVariant  value 
)

◆ settings()

QSettings * Ms::Preferences::settings ( ) const
private

◆ setToDefaultValue()

void Ms::Preferences::setToDefaultValue ( const QString  key)

◆ setUseLocalPreferences()

void Ms::Preferences::setUseLocalPreferences ( bool  value)
inline

◆ type()

QMetaType::Type Ms::Preferences::type ( const QString  key) const
private

◆ updateLocalPreferences()

void Ms::Preferences::updateLocalPreferences ( )
inline

◆ updateMidiRemote()

void Ms::Preferences::updateMidiRemote ( int  recordId,
MidiRemoteType  type,
int  data 
)

Member Data Documentation

◆ _allPreferences

prefs_map_t Ms::Preferences::_allPreferences
private

◆ _initialized

bool Ms::Preferences::_initialized = false
private

◆ _inMemorySettings

QHash<QString, QVariant> Ms::Preferences::_inMemorySettings
private

◆ _returnDefaultValues

bool Ms::Preferences::_returnDefaultValues = false
private

◆ _settings

QSettings* Ms::Preferences::_settings
private

◆ _storeInMemoryOnly

bool Ms::Preferences::_storeInMemoryOnly = false
private

◆ localPreferences

QMap<QString, QVariant> Ms::Preferences::localPreferences
private

◆ useLocalPrefs

bool Ms::Preferences::useLocalPrefs = false
private

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