35 static std::shared_ptr<Settings> instance();
36 static void init(
void);
37 void addKey(QString moduleName, QString keyName, QString key, QVariant defaultValue)
override;
38 Q_INVOKABLE
void setValue(QString moduleName, QString keyName, QVariant value)
override;
39 void setValue(
Key key, QVariant value)
override;
40 Q_INVOKABLE QVariant getValue(QString moduleName, QString keyName)
override;
41 QVariant getValue(
Key key)
override;
42 Q_INVOKABLE
bool containsKey(QString moduleName, QString keyName)
override;
43 bool containsKey(
Key key)
override;
44 Q_INVOKABLE
void freeze(
void)
override;
45 Q_INVOKABLE
void saveChanges(
void)
override;
46 Q_INVOKABLE
void discardChanges(
void)
override;
47 Q_INVOKABLE
bool isFrozen(
void)
override;
50 static QVariant get(QString key, QVariant defaultValue);
51 static bool contains(QString key);
52 static void set(QString key, QVariant value);
55 static std::shared_ptr<Settings> m_instance;
56 static QSettings *settingsInstance;
57 static QSettings *mainSettingsInstance;
59 static QMap<QPair<QString, QString>,
Key> m_keys;
60 static void copySettings(QSettings *source, QSettings *target);
62 static bool tempSettingsCopied;
63 static void copyTempSettings(
void);