KConfig
kcoreconfigskeleton.h
151 * They should be passed to every call of KConfigGroup::writeEntry() and KConfigGroup::revertToDefault().
165 * Make sure to pass writeFlags() to every call of KConfigGroup::writeEntry() and KConfigGroup::revertToDefault().
243 KCONFIGCORE_NO_EXPORT explicit KConfigSkeletonItem(KConfigSkeletonItemPrivate &dd, const QString &_group, const QString &_key);
276 * You will have to register instances of this class with the function KCoreConfigSkeleton::addItem().
291 KPropertySkeletonItem(QObject *object, const QByteArray &propertyName, const QVariant &defaultValue);
333 KConfigSkeletonGenericItem(const QString &_group, const QString &_key, T &reference, T defaultValue)
432 * This class wraps a @ref KConfigSkeletonItem and invokes a function whenever the value changes.
433 * That function must take one quint64 parameter. Whenever the property value of the wrapped KConfigSkeletonItem
435 * It does not call a function with the new value since this class is designed solely for the \ref kconfig_compiler generated
452 KConfigCompilerSignallingItem(KConfigSkeletonItem *item, QObject *object, NotifyFunction targetFunction, quint64 userData);
736 ItemLongLong(const QString &_group, const QString &_key, qint64 &reference, qint64 defaultValue = 0);
787 ItemEnum(const QString &_group, const QString &_key, qint32 &reference, const QList<Choice> &choices, qint32 defaultValue = 0);
858 ItemULongLong(const QString &_group, const QString &_key, quint64 &reference, quint64 defaultValue = 0);
898 ItemDouble(const QString &_group, const QString &_key, double &reference, double defaultValue = 0);
1092 ItemStringList(const QString &_group, const QString &_key, QStringList &reference, const QStringList &defaultValue = QStringList());
1114 ItemPathList(const QString &_group, const QString &_key, QStringList &reference, const QStringList &defaultValue = QStringList());
1129 ItemUrlList(const QString &_group, const QString &_key, QList<QUrl> &reference, const QList<QUrl> &defaultValue = QList<QUrl>());
1154 ItemIntList(const QString &_group, const QString &_key, QList<int> &reference, const QList<int> &defaultValue = QList<int>());
1177 explicit KCoreConfigSkeleton(const QString &configname = QString(), QObject *parent = nullptr);
1292 ItemPassword *addItemPassword(const QString &name, QString &reference, const QString &defaultValue = QLatin1String(""), const QString &key = QString());
1307 ItemPath *addItemPath(const QString &name, QString &reference, const QString &defaultValue = QLatin1String(""), const QString &key = QString());
1324 ItemProperty *addItemProperty(const QString &name, QVariant &reference, const QVariant &defaultValue = QVariant(), const QString &key = QString());
1336 ItemBool *addItemBool(const QString &name, bool &reference, bool defaultValue = false, const QString &key = QString());
1349 ItemInt *addItemInt(const QString &name, qint32 &reference, qint32 defaultValue = 0, const QString &key = QString());
1362 ItemUInt *addItemUInt(const QString &name, quint32 &reference, quint32 defaultValue = 0, const QString &key = QString());
1375 ItemLongLong *addItemLongLong(const QString &name, qint64 &reference, qint64 defaultValue = 0, const QString &key = QString());
1388 ItemULongLong *addItemULongLong(const QString &name, quint64 &reference, quint64 defaultValue = 0, const QString &key = QString());
1401 ItemDouble *addItemDouble(const QString &name, double &reference, double defaultValue = 0.0, const QString &key = QString());
1414 ItemRect *addItemRect(const QString &name, QRect &reference, const QRect &defaultValue = QRect(), const QString &key = QString());
1427 ItemRectF *addItemRectF(const QString &name, QRectF &reference, const QRectF &defaultValue = QRectF(), const QString &key = QString());
1440 ItemPoint *addItemPoint(const QString &name, QPoint &reference, const QPoint &defaultValue = QPoint(), const QString &key = QString());
1453 ItemPointF *addItemPointF(const QString &name, QPointF &reference, const QPointF &defaultValue = QPointF(), const QString &key = QString());
1466 ItemSize *addItemSize(const QString &name, QSize &reference, const QSize &defaultValue = QSize(), const QString &key = QString());
1479 ItemSizeF *addItemSizeF(const QString &name, QSizeF &reference, const QSizeF &defaultValue = QSizeF(), const QString &key = QString());
1492 ItemDateTime *addItemDateTime(const QString &name, QDateTime &reference, const QDateTime &defaultValue = QDateTime(), const QString &key = QString());
1506 addItemStringList(const QString &name, QStringList &reference, const QStringList &defaultValue = QStringList(), const QString &key = QString());
1519 ItemIntList *addItemIntList(const QString &name, QList<int> &reference, const QList<int> &defaultValue = QList<int>(), const QString &key = QString());
bool hasDefault(const QString &key) const
Whether a default is specified for an entry in either the system wide configuration file or the globa...
Definition kconfiggroup.cpp:1114
void revertToDefault(const QString &key, WriteConfigFlags pFlag=WriteConfigFlags())
Reverts an entry to the default settings.
Definition kconfiggroup.cpp:1100
void writeEntry(const QString &key, const QVariant &value, WriteConfigFlags pFlags=Normal)
Writes a value to the configuration object.
Definition kconfiggroup.cpp:1014
Base class for storing a preferences setting of type T.
Definition kcoreconfigskeleton.h:326
void readDefault(KConfig *config) override
Read global default value.
Definition kcoreconfigskeleton.h:405
KConfigSkeletonGenericItem(const QString &_group, const QString &_key, T &reference, T defaultValue)
Constructor.
Definition kcoreconfigskeleton.h:333
const T & value() const
Return const value of this KConfigSkeletonItem.
Definition kcoreconfigskeleton.h:369
virtual void setDefaultValue(const T &v)
Set default value for this item.
Definition kcoreconfigskeleton.h:377
void writeConfig(KConfig *config) override
This function is called by KCoreConfigSkeleton to write the value of this setting to a config file.
Definition kcoreconfigskeleton.h:391
void setDefault() override
Set the value for this item to the default value.
Definition kcoreconfigskeleton.h:385
void swapDefault() override
Exchanges the current value with the default value Used by KCoreConfigSkeleton::useDefaults(bool);.
Definition kcoreconfigskeleton.h:414
KConfigGroup configGroup(KConfig *config) const
Return a KConfigGroup, the one provided by setGroup(const KConfigGroup&) if it's valid,...
Definition kcoreconfigskeleton.cpp:61
virtual bool isEqual(const QVariant &p) const =0
Check whether the item is equal to p.
virtual void writeConfig(KConfig *)=0
This function is called by KCoreConfigSkeleton to write the value of this setting to a config file.
virtual void swapDefault()=0
Exchanges the current value with the default value Used by KCoreConfigSkeleton::useDefaults(bool);.
virtual void setDefault()=0
Sets the current value to the default value.
KConfigBase::WriteConfigFlags writeFlags() const
Return write flags to be used when writing configuration.
Definition kcoreconfigskeleton.cpp:137
virtual void readConfig(KConfig *)=0
This function is called by KCoreConfigSkeleton to read the value for this setting from a config file.
Class for handling preferences settings for an application.
Definition kconfigskeleton.h:28
Class for handling a bool preferences item.
Definition kcoreconfigskeleton.h:665
Class for handling a QDateTime preferences item.
Definition kcoreconfigskeleton.h:1067
Class for handling a floating point preference item.
Definition kcoreconfigskeleton.h:895
Class for handling an integer list preferences item.
Definition kcoreconfigskeleton.h:1151
Class for handling a 32-bit integer preferences item.
Definition kcoreconfigskeleton.h:687
Class for handling a 64-bit integer preferences item.
Definition kcoreconfigskeleton.h:733
Class for handling a password preferences item.
Definition kcoreconfigskeleton.h:600
Class for handling a path list preferences item.
Definition kcoreconfigskeleton.h:1111
Class for handling a path preferences item.
Definition kcoreconfigskeleton.h:611
Class for handling a QPointF preferences item.
Definition kcoreconfigskeleton.h:1001
Class for handling a QPoint preferences item.
Definition kcoreconfigskeleton.h:979
Class for handling a QVariant preferences item.
Definition kcoreconfigskeleton.h:646
Class for handling a QRectF preferences item.
Definition kcoreconfigskeleton.h:957
Class for handling a QRect preferences item.
Definition kcoreconfigskeleton.h:935
Class for handling a QSizeF preferences item.
Definition kcoreconfigskeleton.h:1045
Class for handling a QSize preferences item.
Definition kcoreconfigskeleton.h:1023
Class for handling a string list preferences item.
Definition kcoreconfigskeleton.h:1089
Class for handling a string preferences item.
Definition kcoreconfigskeleton.h:558
Class for handling an unsigned 32-bit integer preferences item.
Definition kcoreconfigskeleton.h:815
Class for handling unsigned 64-bit integer preferences item.
Definition kcoreconfigskeleton.h:855
Class for handling a url list preferences item.
Definition kcoreconfigskeleton.h:1126
Class for handling a url preferences item.
Definition kcoreconfigskeleton.h:621
Class for handling preferences settings for an application.
Definition kcoreconfigskeleton.h:551
void configChanged()
This signal is emitted when the configuration change.
Class for proxying a QObject property as a preferences setting.
Definition kcoreconfigskeleton.h:281
Iterator
QVariant fromValue(T &&value)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:49:07 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 29 2024 11:49:07 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.