KConfig
kcoreconfigskeleton.cpp
38KConfigSkeletonItem::KConfigSkeletonItem(KConfigSkeletonItemPrivate &dd, const QString &_group, const QString &_key)
201KPropertySkeletonItem::KPropertySkeletonItem(QObject *object, const QByteArray &propertyName, const QVariant &defaultValue)
202 : KConfigSkeletonItem(*new KPropertySkeletonItemPrivate(object, propertyName, defaultValue), {}, {})
425KCoreConfigSkeleton::ItemBool::ItemBool(const QString &_group, const QString &_key, bool &reference, bool defaultValue)
454KCoreConfigSkeleton::ItemInt::ItemInt(const QString &_group, const QString &_key, qint32 &reference, qint32 defaultValue)
519KCoreConfigSkeleton::ItemLongLong::ItemLongLong(const QString &_group, const QString &_key, qint64 &reference, qint64 defaultValue)
604KCoreConfigSkeleton::ItemEnum::ItemEnum(const QString &_group, const QString &_key, qint32 &reference, const QList<Choice> &choices, qint32 defaultValue)
655KCoreConfigSkeleton::ItemUInt::ItemUInt(const QString &_group, const QString &_key, quint32 &reference, quint32 defaultValue)
720KCoreConfigSkeleton::ItemULongLong::ItemULongLong(const QString &_group, const QString &_key, quint64 &reference, quint64 defaultValue)
785KCoreConfigSkeleton::ItemDouble::ItemDouble(const QString &_group, const QString &_key, double &reference, double defaultValue)
1053KCoreConfigSkeleton::ItemStringList::ItemStringList(const QString &_group, const QString &_key, QStringList &reference, const QStringList &defaultValue)
1086KCoreConfigSkeleton::ItemPathList::ItemPathList(const QString &_group, const QString &_key, QStringList &reference, const QStringList &defaultValue)
1118KCoreConfigSkeleton::ItemUrlList::ItemUrlList(const QString &_group, const QString &_key, QList<QUrl> &reference, const QList<QUrl> &defaultValue)
1176KCoreConfigSkeleton::ItemIntList::ItemIntList(const QString &_group, const QString &_key, QList<int> &reference, const QList<int> &defaultValue)
1209// static int kCoreConfigSkeletionDebugArea() { static int s_area = KDebug::registerArea("kdecore (KConfigSkeleton)"); return s_area; }
1395KCoreConfigSkeleton::ItemString *KCoreConfigSkeleton::addItemString(const QString &name, QString &reference, const QString &defaultValue, const QString &key)
1398 item = new KCoreConfigSkeleton::ItemString(d->mCurrentGroup, key.isEmpty() ? name : key, reference, defaultValue, KCoreConfigSkeleton::ItemString::Normal);
1404KCoreConfigSkeleton::addItemPassword(const QString &name, QString &reference, const QString &defaultValue, const QString &key)
1407 item = new KCoreConfigSkeleton::ItemPassword(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
1412KCoreConfigSkeleton::ItemPath *KCoreConfigSkeleton::addItemPath(const QString &name, QString &reference, const QString &defaultValue, const QString &key)
1415 item = new KCoreConfigSkeleton::ItemPath(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
1421KCoreConfigSkeleton::addItemProperty(const QString &name, QVariant &reference, const QVariant &defaultValue, const QString &key)
1424 item = new KCoreConfigSkeleton::ItemProperty(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
1429KCoreConfigSkeleton::ItemBool *KCoreConfigSkeleton::addItemBool(const QString &name, bool &reference, bool defaultValue, const QString &key)
1432 item = new KCoreConfigSkeleton::ItemBool(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
1437KCoreConfigSkeleton::ItemInt *KCoreConfigSkeleton::addItemInt(const QString &name, qint32 &reference, qint32 defaultValue, const QString &key)
1440 item = new KCoreConfigSkeleton::ItemInt(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
1445KCoreConfigSkeleton::ItemUInt *KCoreConfigSkeleton::addItemUInt(const QString &name, quint32 &reference, quint32 defaultValue, const QString &key)
1448 item = new KCoreConfigSkeleton::ItemUInt(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
1453KCoreConfigSkeleton::ItemLongLong *KCoreConfigSkeleton::addItemLongLong(const QString &name, qint64 &reference, qint64 defaultValue, const QString &key)
1456 item = new KCoreConfigSkeleton::ItemLongLong(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
1461KCoreConfigSkeleton::ItemULongLong *KCoreConfigSkeleton::addItemULongLong(const QString &name, quint64 &reference, quint64 defaultValue, const QString &key)
1464 item = new KCoreConfigSkeleton::ItemULongLong(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
1469KCoreConfigSkeleton::ItemDouble *KCoreConfigSkeleton::addItemDouble(const QString &name, double &reference, double defaultValue, const QString &key)
1472 item = new KCoreConfigSkeleton::ItemDouble(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
1477KCoreConfigSkeleton::ItemRect *KCoreConfigSkeleton::addItemRect(const QString &name, QRect &reference, const QRect &defaultValue, const QString &key)
1480 item = new KCoreConfigSkeleton::ItemRect(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
1485KCoreConfigSkeleton::ItemRectF *KCoreConfigSkeleton::addItemRectF(const QString &name, QRectF &reference, const QRectF &defaultValue, const QString &key)
1488 item = new KCoreConfigSkeleton::ItemRectF(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
1493KCoreConfigSkeleton::ItemPoint *KCoreConfigSkeleton::addItemPoint(const QString &name, QPoint &reference, const QPoint &defaultValue, const QString &key)
1496 item = new KCoreConfigSkeleton::ItemPoint(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
1501KCoreConfigSkeleton::ItemPointF *KCoreConfigSkeleton::addItemPointF(const QString &name, QPointF &reference, const QPointF &defaultValue, const QString &key)
1504 item = new KCoreConfigSkeleton::ItemPointF(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
1509KCoreConfigSkeleton::ItemSize *KCoreConfigSkeleton::addItemSize(const QString &name, QSize &reference, const QSize &defaultValue, const QString &key)
1512 item = new KCoreConfigSkeleton::ItemSize(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
1517KCoreConfigSkeleton::ItemSizeF *KCoreConfigSkeleton::addItemSizeF(const QString &name, QSizeF &reference, const QSizeF &defaultValue, const QString &key)
1520 item = new KCoreConfigSkeleton::ItemSizeF(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
1526KCoreConfigSkeleton::addItemDateTime(const QString &name, QDateTime &reference, const QDateTime &defaultValue, const QString &key)
1529 item = new KCoreConfigSkeleton::ItemDateTime(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
1535KCoreConfigSkeleton::addItemStringList(const QString &name, QStringList &reference, const QStringList &defaultValue, const QString &key)
1538 item = new KCoreConfigSkeleton::ItemStringList(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
1544KCoreConfigSkeleton::addItemIntList(const QString &name, QList<int> &reference, const QList<int> &defaultValue, const QString &key)
1547 item = new KCoreConfigSkeleton::ItemIntList(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
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
T readEntry(const QString &key, const T &aDefault) const
Reads the value of an entry specified by pKey in the current group.
Definition kconfiggroup.h:223
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
bool hasKey(const QString &key) const
Checks whether the key has an entry in this group.
Definition kconfiggroup.cpp:1131
QString readPathEntry(const QString &pKey, const QString &aDefault) const
Reads a path.
Definition kconfiggroup.cpp:764
void writePathEntry(const QString &pKey, const QString &path, WriteConfigFlags pFlags=Normal)
Writes a file path to the configuration.
Definition kconfiggroup.cpp:1047
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
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 QVariant minValue() const
Return minimum value of item or invalid if not specified.
Definition kcoreconfigskeleton.cpp:143
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
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
@ FullConfig
Fully-fledged config, including globals and cascading to system settings.
Definition kconfig.h:88
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
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition kcoreconfigskeleton.cpp:332
ItemString(const QString &_group, const QString &_key, QString &reference, const QString &defaultValue=QLatin1String(""), Type type=Normal)
Constructor.
Definition kcoreconfigskeleton.cpp:286
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:309
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:292
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
Class for proxying a QObject property as a preferences setting.
Definition kcoreconfigskeleton.h:281
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
char16_t & unicode()
void append(QList< T > &&value)
void clear()
Q_EMITQ_EMIT
QObject * parent() const const
bool isEmpty() const const
bool isNull() const const
qsizetype length() const const
const QChar * unicode() const const
CaseInsensitive
QVariant fromValue(T &&value)
bool toBool() const const
QDateTime toDateTime() const const
double toDouble(bool *ok) const const
int toInt(bool *ok) const const
qlonglong toLongLong(bool *ok) const const
QPoint toPoint() const const
QPointF toPointF() const const
QRect toRect() const const
QRectF toRectF() const const
QSize toSize() const const
QSizeF toSizeF() const const
QString toString() const const
QStringList toStringList() const const
uint toUInt(bool *ok) const const
qulonglong toULongLong(bool *ok) const const
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:18:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:18:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.