17 #include <QStringList>
50 T value(QString
const & key,
T const & defaultValue =
T())
const {
53 QVariant::fromValue(defaultValue)).template value<T>();
64 QVariant
const & defaultValue = QVariant())
const;
86 void remove(QString
const & key);
92 template <
typename Prefix>
100 template <
typename Prefix>
103 return std::move(*
this);
112 QString groupPrefix = QString());
std::shared_ptr< QSettings > m_state
BtConfigCore group(Prefix &&prefix) &&
BtConfigCore & operator=(BtConfigCore &&)=default
void sync()
Synchronizes the configuration to disk.
void setValue_(QString const &key, QVariant value)
QStringList childKeys() const
void remove(QString const &key)
removes a key (and its children) from the current group.
BtConfigCore group(Prefix &&prefix) const &
QString m_groupPrefix
Empty or absolute path with trailing slash.
T value(QString const &key, T const &defaultValue=T()) const
Returns the settings value for the given global key.
BtConfigCore & operator=(BtConfigCore const &)=default
void setValue(QString const &key, T const &value)
Sets a value for a key.
QStringList childGroups() const
BtConfigCore(BtConfigCore &&)=default
QVariant qVariantValue(QString const &key, QVariant const &defaultValue=QVariant()) const
Returns the settings value for the given global key as a QVariant.
BtConfigCore(BtConfigCore const &)=default