59 Q_INVOKABLE QVariant getValue(
const QString &key,
const QVariant& def = {});
69 Q_INVOKABLE QString getStrValue(
const QString &key,
const QString& def = {});
74 Q_INVOKABLE
void resetToDefault();
82 virtual bool ignoreToRest(
const QString& key)
const;
93 void forceReloadCache();
123 static bool initService(std::unique_ptr<ISettings> obj);
131 void setValue(
const QString &key,
const QVariant& value);
138 void setStrValue(
const QString& key,
const QString& value);
214 QHash<QString, QVariant>& settingsMap();
220 QHash<QString, QVariant> _cache;
221 QHash<QString, QVariant> *_defaultConfig =
nullptr;
The Settings class base interface for implementation settings backends. Available implementations: Se...
void valueStrChanged(QString key, QString value)
valueStrChanged some as valueChanged(QString key, QVariant value) but value has ben converted to the ...
virtual void syncImplementation()=0
syncImplementation This method should save all configuration data to the hard drive;
void valueChanged(QString key, QVariant value)
valueChanged This signal when value of the key settings changed
virtual QVariant getValueImplementation(const QString &key, const QVariant &def)=0
getValueImplementation This method will return the value of the settings.
virtual void setValueImplementation(const QString key, const QVariant &value)=0
setValueImplementation This slot will set a new value for the key parameter.
virtual QHash< QString, QVariant > defaultSettings()=0
The Service class is a template class for creating a singleton services objects. This is manual contr...
The QuasaraAppUtils class This lib include base functions for the all applications of QuasarApp group...
SettingsSaveMode
The SettingsSaveMode enum.
@ Auto
a settings will be saved on hard disk when called the Settings::setValue method.
@ Manual
a settings will be saved on hard disk when called the Settings::Sync method.
#define QUASARAPPSHARED_EXPORT