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());
QFlags< WriteConfigFlag > WriteConfigFlags
Stores a combination of WriteConfigFlag values.
Definition kconfigbase.h:67
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition kcoreconfigskeleton.cpp:1592
void readConfig(KConfig *) override
This function is called by KCoreConfigSkeleton to read the value for this setting from a config file.
Definition kcoreconfigskeleton.cpp:1612
void readDefault(KConfig *) override
Read global default value.
Definition kcoreconfigskeleton.cpp:1624
QVariant maxValue() const override
Return maximum value of item or invalid if not specified.
Definition kcoreconfigskeleton.cpp:1607
QVariant minValue() const override
Return minimum value of item or invalid if not specified.
Definition kcoreconfigskeleton.cpp:1602
void setDefault() override
Sets the current value to the default value.
Definition kcoreconfigskeleton.cpp:1637
void swapDefault() override
Exchanges the current value with the default value Used by KCoreConfigSkeleton::useDefaults(bool);.
Definition kcoreconfigskeleton.cpp:1654
KConfigCompilerSignallingItem(KConfigSkeletonItem *item, QObject *object, NotifyFunction targetFunction, quint64 userData)
Constructor.
Definition kcoreconfigskeleton.cpp:1563
void writeConfig(KConfig *) override
This function is called by KCoreConfigSkeleton to write the value of this setting to a config file.
Definition kcoreconfigskeleton.cpp:1632
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
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
KConfigSkeletonItem(const QString &_group, const QString &_key)
Constructor.
Definition kcoreconfigskeleton.cpp:31
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 QVariant minValue() const
Return minimum value of item or invalid if not specified.
Definition kcoreconfigskeleton.cpp:143
virtual void writeConfig(KConfig *)=0
This function is called by KCoreConfigSkeleton to write the value of this setting to a config file.
void readImmutability(const KConfigGroup &group)
Sets mIsImmutable to true if mKey in config is immutable.
Definition kcoreconfigskeleton.cpp:177
void setToolTip(const QString &t)
Set ToolTip description of item.
Definition kcoreconfigskeleton.cpp:107
void setWriteFlags(KConfigBase::WriteConfigFlags flags)
The write flags to be used when writing configuration.
Definition kcoreconfigskeleton.cpp:131
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.
void setLabel(const QString &l)
Set label providing a translated one-line description of the item.
Definition kcoreconfigskeleton.cpp:95
QString whatsThis() const
Return WhatsThis description of item.
Definition kcoreconfigskeleton.cpp:125
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.
virtual QVariant maxValue() const
Return maximum value of item or invalid if not specified.
Definition kcoreconfigskeleton.cpp:148
bool isSaveNeeded() const
Indicates if the item has a different value than the previously loaded value.
Definition kcoreconfigskeleton.cpp:165
void setWhatsThis(const QString &w)
Set WhatsThis description of item.
Definition kcoreconfigskeleton.cpp:119
bool isDefault() const
Indicates if the item is set to its default value.
Definition kcoreconfigskeleton.cpp:159
Class for handling a bool preferences item.
Definition kcoreconfigskeleton.h:665
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition kcoreconfigskeleton.cpp:444
ItemBool(const QString &_group, const QString &_key, bool &reference, bool defaultValue=true)
Constructor.
Definition kcoreconfigskeleton.cpp:425
void readConfig(KConfig *config) override
This function is called by KCoreConfigSkeleton to read the value for this setting from a config file.
Definition kcoreconfigskeleton.cpp:430
Class for handling a QDateTime preferences item.
Definition kcoreconfigskeleton.h:1067
ItemDateTime(const QString &_group, const QString &_key, QDateTime &reference, const QDateTime &defaultValue=QDateTime())
Constructor.
Definition kcoreconfigskeleton.cpp:1024
void readConfig(KConfig *config) override
This function is called by KCoreConfigSkeleton to read the value for this setting from a config file.
Definition kcoreconfigskeleton.cpp:1029
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition kcoreconfigskeleton.cpp:1043
Class for handling a floating point preference item.
Definition kcoreconfigskeleton.h:895
ItemDouble(const QString &_group, const QString &_key, double &reference, double defaultValue=0)
Constructor.
Definition kcoreconfigskeleton.cpp:785
void readConfig(KConfig *config) override
This function is called by KCoreConfigSkeleton to read the value for this setting from a config file.
Definition kcoreconfigskeleton.cpp:792
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition kcoreconfigskeleton.cpp:812
QVariant minValue() const override
Get the minimum value that is allowed to be stored in this item.
Definition kcoreconfigskeleton.cpp:822
QVariant maxValue() const override
Get the maximum value this is allowed to be stored in this item.
Definition kcoreconfigskeleton.cpp:830
void setValueForChoice(const QString &name, const QString &valueForChoice)
Stores a choice value for name.
Definition kcoreconfigskeleton.cpp:594
void writeConfig(KConfig *config) override
This function is called by KCoreConfigSkeleton to write the value of this setting to a config file.
Definition kcoreconfigskeleton.cpp:635
QString valueForChoice(const QString &name) const
Returns the value for the choice with the given name.
Definition kcoreconfigskeleton.cpp:584
void readConfig(KConfig *config) override
This function is called by KCoreConfigSkeleton to read the value for this setting from a config file.
Definition kcoreconfigskeleton.cpp:610
ItemEnum(const QString &_group, const QString &_key, qint32 &reference, const QList< Choice > &choices, qint32 defaultValue=0)
Constructor.
Definition kcoreconfigskeleton.cpp:604
Class for handling an integer list preferences item.
Definition kcoreconfigskeleton.h:1151
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition kcoreconfigskeleton.cpp:1199
ItemIntList(const QString &_group, const QString &_key, QList< int > &reference, const QList< int > &defaultValue=QList< int >())
Constructor.
Definition kcoreconfigskeleton.cpp:1176
void readConfig(KConfig *config) override
This function is called by KCoreConfigSkeleton to read the value for this setting from a config file.
Definition kcoreconfigskeleton.cpp:1181
Class for handling a 32-bit integer preferences item.
Definition kcoreconfigskeleton.h:687
QVariant maxValue() const override
Get the maximum value this is allowed to be stored in this item.
Definition kcoreconfigskeleton.cpp:499
QVariant minValue() const override
Get the minimum value that is allowed to be stored in this item.
Definition kcoreconfigskeleton.cpp:491
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition kcoreconfigskeleton.cpp:481
void readConfig(KConfig *config) override
This function is called by KCoreConfigSkeleton to read the value for this setting from a config file.
Definition kcoreconfigskeleton.cpp:461
ItemInt(const QString &_group, const QString &_key, qint32 &reference, qint32 defaultValue=0)
Constructor.
Definition kcoreconfigskeleton.cpp:454
Class for handling a 64-bit integer preferences item.
Definition kcoreconfigskeleton.h:733
QVariant maxValue() const override
Get the maximum value this is allowed to be stored in this item.
Definition kcoreconfigskeleton.cpp:564
ItemLongLong(const QString &_group, const QString &_key, qint64 &reference, qint64 defaultValue=0)
Constructor.
Definition kcoreconfigskeleton.cpp:519
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition kcoreconfigskeleton.cpp:546
QVariant minValue() const override
Get the minimum value that is allowed to be stored in this item.
Definition kcoreconfigskeleton.cpp:556
void readConfig(KConfig *config) override
This function is called by KCoreConfigSkeleton to read the value for this setting from a config file.
Definition kcoreconfigskeleton.cpp:526
Class for handling a password preferences item.
Definition kcoreconfigskeleton.h:600
ItemPassword(const QString &_group, const QString &_key, QString &reference, const QString &defaultValue=QLatin1String(""))
Constructor.
Definition kcoreconfigskeleton.cpp:342
void readConfig(KConfig *config) override
This function is called by KCoreConfigSkeleton to read the value for this setting from a config file.
Definition kcoreconfigskeleton.cpp:1091
void writeConfig(KConfig *config) override
This function is called by KCoreConfigSkeleton to write the value of this setting to a config file.
Definition kcoreconfigskeleton.cpp:1104
ItemPathList(const QString &_group, const QString &_key, QStringList &reference, const QStringList &defaultValue=QStringList())
Constructor.
Definition kcoreconfigskeleton.cpp:1086
Class for handling a path preferences item.
Definition kcoreconfigskeleton.h:611
ItemPath(const QString &_group, const QString &_key, QString &reference, const QString &defaultValue=QString())
Constructor.
Definition kcoreconfigskeleton.cpp:347
Class for handling a QPointF preferences item.
Definition kcoreconfigskeleton.h:1001
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition kcoreconfigskeleton.cpp:956
ItemPointF(const QString &_group, const QString &_key, QPointF &reference, const QPointF &defaultValue=QPointF())
Constructor.
Definition kcoreconfigskeleton.cpp:937
void readConfig(KConfig *config) override
This function is called by KCoreConfigSkeleton to read the value for this setting from a config file.
Definition kcoreconfigskeleton.cpp:942
Class for handling a QPoint preferences item.
Definition kcoreconfigskeleton.h:979
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition kcoreconfigskeleton.cpp:927
ItemPoint(const QString &_group, const QString &_key, QPoint &reference, const QPoint &defaultValue=QPoint())
Constructor.
Definition kcoreconfigskeleton.cpp:908
void readConfig(KConfig *config) override
This function is called by KCoreConfigSkeleton to read the value for this setting from a config file.
Definition kcoreconfigskeleton.cpp:913
Class for handling a QVariant preferences item.
Definition kcoreconfigskeleton.h:646
void readConfig(KConfig *config) override
This function is called by KCoreConfigSkeleton to read the value for this setting from a config file.
Definition kcoreconfigskeleton.cpp:400
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition kcoreconfigskeleton.cpp:414
ItemProperty(const QString &_group, const QString &_key, QVariant &reference, const QVariant &defaultValue=QVariant())
Constructor.
Definition kcoreconfigskeleton.cpp:395
Class for handling a QRectF preferences item.
Definition kcoreconfigskeleton.h:957
ItemRectF(const QString &_group, const QString &_key, QRectF &reference, const QRectF &defaultValue=QRectF())
Constructor.
Definition kcoreconfigskeleton.cpp:879
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition kcoreconfigskeleton.cpp:898
void readConfig(KConfig *config) override
This function is called by KCoreConfigSkeleton to read the value for this setting from a config file.
Definition kcoreconfigskeleton.cpp:884
Class for handling a QRect preferences item.
Definition kcoreconfigskeleton.h:935
ItemRect(const QString &_group, const QString &_key, QRect &reference, const QRect &defaultValue=QRect())
Constructor.
Definition kcoreconfigskeleton.cpp:850
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition kcoreconfigskeleton.cpp:869
void readConfig(KConfig *config) override
This function is called by KCoreConfigSkeleton to read the value for this setting from a config file.
Definition kcoreconfigskeleton.cpp:855
Class for handling a QSizeF preferences item.
Definition kcoreconfigskeleton.h:1045
ItemSizeF(const QString &_group, const QString &_key, QSizeF &reference, const QSizeF &defaultValue=QSizeF())
Constructor.
Definition kcoreconfigskeleton.cpp:995
void readConfig(KConfig *config) override
This function is called by KCoreConfigSkeleton to read the value for this setting from a config file.
Definition kcoreconfigskeleton.cpp:1000
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition kcoreconfigskeleton.cpp:1014
Class for handling a QSize preferences item.
Definition kcoreconfigskeleton.h:1023
void readConfig(KConfig *config) override
This function is called by KCoreConfigSkeleton to read the value for this setting from a config file.
Definition kcoreconfigskeleton.cpp:971
ItemSize(const QString &_group, const QString &_key, QSize &reference, const QSize &defaultValue=QSize())
Constructor.
Definition kcoreconfigskeleton.cpp:966
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition kcoreconfigskeleton.cpp:985
Class for handling a string list preferences item.
Definition kcoreconfigskeleton.h:1089
ItemStringList(const QString &_group, const QString &_key, QStringList &reference, const QStringList &defaultValue=QStringList())
Constructor.
Definition kcoreconfigskeleton.cpp:1053
void readConfig(KConfig *config) override
This function is called by KCoreConfigSkeleton to read the value for this setting from a config file.
Definition kcoreconfigskeleton.cpp:1058
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition kcoreconfigskeleton.cpp:1076
Class for handling a string preferences item.
Definition kcoreconfigskeleton.h:558
ItemString(const QString &_group, const QString &_key, QString &reference, const QString &defaultValue=QLatin1String(""), Type type=Normal)
Constructor.
Definition kcoreconfigskeleton.cpp:286
Class for handling an unsigned 32-bit integer preferences item.
Definition kcoreconfigskeleton.h:815
ItemUInt(const QString &_group, const QString &_key, quint32 &reference, quint32 defaultValue=0)
Constructor.
Definition kcoreconfigskeleton.cpp:655
QVariant minValue() const override
Get the minimum value that is allowed to be stored in this item.
Definition kcoreconfigskeleton.cpp:692
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition kcoreconfigskeleton.cpp:682
void readConfig(KConfig *config) override
This function is called by KCoreConfigSkeleton to read the value for this setting from a config file.
Definition kcoreconfigskeleton.cpp:662
QVariant maxValue() const override
Get the maximum value this is allowed to be stored in this item.
Definition kcoreconfigskeleton.cpp:700
Class for handling unsigned 64-bit integer preferences item.
Definition kcoreconfigskeleton.h:855
QVariant maxValue() const override
Get the maximum value this is allowed to be stored in this item.
Definition kcoreconfigskeleton.cpp:765
ItemULongLong(const QString &_group, const QString &_key, quint64 &reference, quint64 defaultValue=0)
Constructor.
Definition kcoreconfigskeleton.cpp:720
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition kcoreconfigskeleton.cpp:747
void readConfig(KConfig *config) override
This function is called by KCoreConfigSkeleton to read the value for this setting from a config file.
Definition kcoreconfigskeleton.cpp:727
QVariant minValue() const override
Get the minimum value that is allowed to be stored in this item.
Definition kcoreconfigskeleton.cpp:757
void writeConfig(KConfig *config) override
This function is called by KCoreConfigSkeleton to write the value of this setting to a config file.
Definition kcoreconfigskeleton.cpp:1144
void readConfig(KConfig *config) override
This function is called by KCoreConfigSkeleton to read the value for this setting from a config file.
Definition kcoreconfigskeleton.cpp:1123
ItemUrlList(const QString &_group, const QString &_key, QList< QUrl > &reference, const QList< QUrl > &defaultValue=QList< QUrl >())
Constructor.
Definition kcoreconfigskeleton.cpp:1118
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition kcoreconfigskeleton.cpp:1166
void readConfig(KConfig *config) override
This function is called by KCoreConfigSkeleton to read the value for this setting from a config file.
Definition kcoreconfigskeleton.cpp:370
void writeConfig(KConfig *config) override
This function is called by KCoreConfigSkeleton to write the value of this setting to a config file.
Definition kcoreconfigskeleton.cpp:357
ItemUrl(const QString &_group, const QString &_key, QUrl &reference, const QUrl &defaultValue=QUrl())
Constructor.
Definition kcoreconfigskeleton.cpp:352
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition kcoreconfigskeleton.cpp:385
ItemSize * addItemSize(const QString &name, QSize &reference, const QSize &defaultValue=QSize(), const QString &key=QString())
Register an item of type QSize.
Definition kcoreconfigskeleton.cpp:1509
ItemDouble * addItemDouble(const QString &name, double &reference, double defaultValue=0.0, const QString &key=QString())
Register an item of type double.
Definition kcoreconfigskeleton.cpp:1469
ItemLongLong * addItemLongLong(const QString &name, qint64 &reference, qint64 defaultValue=0, const QString &key=QString())
Register an item of type qint64.
Definition kcoreconfigskeleton.cpp:1453
ItemDateTime * addItemDateTime(const QString &name, QDateTime &reference, const QDateTime &defaultValue=QDateTime(), const QString &key=QString())
Register an item of type QDateTime.
Definition kcoreconfigskeleton.cpp:1526
virtual void usrSetDefaults()
Perform the actual setting of default values.
Definition kcoreconfigskeleton.cpp:1344
ItemULongLong * addItemULongLong(const QString &name, quint64 &reference, quint64 defaultValue=0, const QString &key=QString())
Register an item of type quint64.
Definition kcoreconfigskeleton.cpp:1461
ItemIntList * addItemIntList(const QString &name, QList< int > &reference, const QList< int > &defaultValue=QList< int >(), const QString &key=QString())
Register an item of type QList<int>.
Definition kcoreconfigskeleton.cpp:1544
QString currentGroup() const
Returns the current group used for addItem() calls.
Definition kcoreconfigskeleton.cpp:1238
void setSharedConfig(KSharedConfig::Ptr pConfig)
Set the KSharedConfig object used for reading and writing the settings.
Definition kcoreconfigskeleton.cpp:1258
ItemString * addItemString(const QString &name, QString &reference, const QString &defaultValue=QLatin1String(""), const QString &key=QString())
Register an item of type QString.
Definition kcoreconfigskeleton.cpp:1395
virtual bool usrUseDefaults(bool b)
Implemented by subclasses that use special defaults.
Definition kcoreconfigskeleton.cpp:1339
KSharedConfig::Ptr sharedConfig() const
Return the KConfig object used for reading and writing the settings.
Definition kcoreconfigskeleton.cpp:1253
void configChanged()
This signal is emitted when the configuration change.
bool isSaveNeeded() const
Indicates if any registered item has a different value than the previously loaded value.
Definition kcoreconfigskeleton.cpp:1312
ItemStringList * addItemStringList(const QString &name, QStringList &reference, const QStringList &defaultValue=QStringList(), const QString &key=QString())
Register an item of type QStringList.
Definition kcoreconfigskeleton.cpp:1535
virtual bool usrSave()
Perform the actual writing of the configuration file.
Definition kcoreconfigskeleton.cpp:1352
KConfigSkeletonItem * findItem(const QString &name) const
Lookup item by name.
Definition kcoreconfigskeleton.cpp:1558
virtual void usrRead()
Perform the actual reading of the configuration file.
Definition kcoreconfigskeleton.cpp:1348
ItemPointF * addItemPointF(const QString &name, QPointF &reference, const QPointF &defaultValue=QPointF(), const QString &key=QString())
Register an item of type QPointF.
Definition kcoreconfigskeleton.cpp:1501
void removeItem(const QString &name)
Removes and deletes an item by name.
Definition kcoreconfigskeleton.cpp:1377
KConfig * config()
Return the KConfig object used for reading and writing the settings.
Definition kcoreconfigskeleton.cpp:1243
ItemPath * addItemPath(const QString &name, QString &reference, const QString &defaultValue=QLatin1String(""), const QString &key=QString())
Register a path item of type QString.
Definition kcoreconfigskeleton.cpp:1412
KCoreConfigSkeleton(const QString &configname=QString(), QObject *parent=nullptr)
Constructor.
Definition kcoreconfigskeleton.cpp:1211
KConfigSkeletonItem::List items() const
Return list of items managed by this KCoreConfigSkeleton object.
Definition kcoreconfigskeleton.cpp:1263
ItemPassword * addItemPassword(const QString &name, QString &reference, const QString &defaultValue=QLatin1String(""), const QString &key=QString())
Register a password item of type QString.
Definition kcoreconfigskeleton.cpp:1404
Q_INVOKABLE bool isImmutable(const QString &name) const
Return whether a certain item is immutable.
Definition kcoreconfigskeleton.cpp:1552
ItemRectF * addItemRectF(const QString &name, QRectF &reference, const QRectF &defaultValue=QRectF(), const QString &key=QString())
Register an item of type QRectF.
Definition kcoreconfigskeleton.cpp:1485
ItemProperty * addItemProperty(const QString &name, QVariant &reference, const QVariant &defaultValue=QVariant(), const QString &key=QString())
Register a property item of type QVariant.
Definition kcoreconfigskeleton.cpp:1421
ItemSizeF * addItemSizeF(const QString &name, QSizeF &reference, const QSizeF &defaultValue=QSizeF(), const QString &key=QString())
Register an item of type QSizeF.
Definition kcoreconfigskeleton.cpp:1517
ItemPoint * addItemPoint(const QString &name, QPoint &reference, const QPoint &defaultValue=QPoint(), const QString &key=QString())
Register an item of type QPoint.
Definition kcoreconfigskeleton.cpp:1493
void addItem(KConfigSkeletonItem *item, const QString &name=QString())
Register a custom KConfigSkeletonItem item with a given name.
Definition kcoreconfigskeleton.cpp:1357
ItemUInt * addItemUInt(const QString &name, quint32 &reference, quint32 defaultValue=0, const QString &key=QString())
Register an item of type quint32.
Definition kcoreconfigskeleton.cpp:1445
virtual void setDefaults()
Set all registered items to their default values.
Definition kcoreconfigskeleton.cpp:1283
ItemInt * addItemInt(const QString &name, qint32 &reference, qint32 defaultValue=0, const QString &key=QString())
Register an item of type qint32.
Definition kcoreconfigskeleton.cpp:1437
ItemBool * addItemBool(const QString &name, bool &reference, bool defaultValue=false, const QString &key=QString())
Register an item of type bool.
Definition kcoreconfigskeleton.cpp:1429
bool isDefaults() const
Indicates if all the registered items are set to their default value.
Definition kcoreconfigskeleton.cpp:1305
virtual bool useDefaults(bool b)
Specify whether this object should reflect the actual values or the default values.
Definition kcoreconfigskeleton.cpp:1268
void setCurrentGroup(const QString &group)
Set the config file group for subsequent addItem() calls.
Definition kcoreconfigskeleton.cpp:1233
ItemRect * addItemRect(const QString &name, QRect &reference, const QRect &defaultValue=QRect(), const QString &key=QString())
Register an item of type QRect.
Definition kcoreconfigskeleton.cpp:1477
bool isEqual(const QVariant &p) const override
Definition kcoreconfigskeleton.cpp:236
void setDefault() override
Sets the current value to the default value.
Definition kcoreconfigskeleton.cpp:262
KPropertySkeletonItem(QObject *object, const QByteArray &propertyName, const QVariant &defaultValue)
Constructor.
Definition kcoreconfigskeleton.cpp:201
void setNotifyFunction(const std::function< void()> &impl)
Set a notify function, it will be invoked when the value of the property changes.
Definition kcoreconfigskeleton.cpp:280
void swapDefault() override
Exchanges the current value with the default value Used by KCoreConfigSkeleton::useDefaults(bool);.
Definition kcoreconfigskeleton.cpp:268
void readConfig(KConfig *) override
This function is called by KCoreConfigSkeleton to read the value for this setting from a config file.
Definition kcoreconfigskeleton.cpp:242
void writeConfig(KConfig *) override
This function is called by KCoreConfigSkeleton to write the value of this setting to a config file.
Definition kcoreconfigskeleton.cpp:249
void readDefault(KConfig *) override
Read global default value.
Definition kcoreconfigskeleton.cpp:256
typedef Iterator
QObject(QObject *parent)
Q_INVOKABLEQ_INVOKABLE
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
Q_SLOTSQ_SLOTS
QObject * parent() const const
QVariant property(const char *name) const const
bool setProperty(const char *name, QVariant &&value)
QVariant fromValue(T &&value)
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:55:16 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:55:16 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.