21#include <QScopedPointer>
23#include "dtkcore_global.h"
34 connect(
this, &DSettingsBackend::sync,
this, &DSettingsBackend::doSync, Qt::QueuedConnection);
35 connect(
this, &DSettingsBackend::setOption,
this, &DSettingsBackend::doSetOption, Qt::QueuedConnection);
39 virtual QStringList
keys()
const = 0;
40 virtual QVariant
getOption(
const QString &key)
const = 0;
45 virtual void doSetOption(
const QString &key,
const QVariant &value) = 0;
53 void setOption(
const QString &key,
const QVariant &value);
DSettingsBackend is interface of DSettings storage class.
Definition: dsettingsbackend.h:29
virtual void doSync()=0
do the real sync action.
void setOption(const QString &key, const QVariant &value)
private signal, please do not use it.
void optionChanged(const QString &key, const QVariant &value)
emitted when option value changed.
virtual void doSetOption(const QString &key, const QVariant &value)=0
write key / value to storage.
void sync()
private signal, please do not use it.
virtual QVariant getOption(const QString &key) const =0
get value by key.
virtual QStringList keys() const =0
return all key of storage.