KConfig
kcoreconfigskeleton.cpp
38 KConfigSkeletonItem::KConfigSkeletonItem(KConfigSkeletonItemPrivate &dd, const QString &_group, const QString &_key)
201 KPropertySkeletonItem::KPropertySkeletonItem(QObject *object, const QByteArray &propertyName, const QVariant &defaultValue)
202 : KConfigSkeletonItem(*new KPropertySkeletonItemPrivate(object, propertyName, defaultValue), {}, {})
286 KCoreConfigSkeleton::ItemString::ItemString(const QString &_group, const QString &_key, QString &reference, const QString &defaultValue, Type type)
342 KCoreConfigSkeleton::ItemPassword::ItemPassword(const QString &_group, const QString &_key, QString &reference, const QString &defaultValue)
347 KCoreConfigSkeleton::ItemPath::ItemPath(const QString &_group, const QString &_key, QString &reference, const QString &defaultValue)
352 KCoreConfigSkeleton::ItemUrl::ItemUrl(const QString &_group, const QString &_key, QUrl &reference, const QUrl &defaultValue)
395 KCoreConfigSkeleton::ItemProperty::ItemProperty(const QString &_group, const QString &_key, QVariant &reference, const QVariant &defaultValue)
425 KCoreConfigSkeleton::ItemBool::ItemBool(const QString &_group, const QString &_key, bool &reference, bool defaultValue)
454 KCoreConfigSkeleton::ItemInt::ItemInt(const QString &_group, const QString &_key, qint32 &reference, qint32 defaultValue)
519 KCoreConfigSkeleton::ItemLongLong::ItemLongLong(const QString &_group, const QString &_key, qint64 &reference, qint64 defaultValue)
587 // TODO KF6: remove KConfigSkeletonItemPrivate::mValues and add a value field to KCoreConfigSkeleton::ItemEnum::Choice
592 void KCoreConfigSkeleton::ItemEnum::setValueForChoice(const QString &name, const QString &value)
597 KCoreConfigSkeleton::ItemEnum::ItemEnum(const QString &_group, const QString &_key, qint32 &reference, const QList<Choice> &choices, qint32 defaultValue)
655 KCoreConfigSkeleton::ItemUInt::ItemUInt(const QString &_group, const QString &_key, quint32 &reference, quint32 defaultValue)
720 KCoreConfigSkeleton::ItemULongLong::ItemULongLong(const QString &_group, const QString &_key, quint64 &reference, quint64 defaultValue)
785 KCoreConfigSkeleton::ItemDouble::ItemDouble(const QString &_group, const QString &_key, double &reference, double defaultValue)
850 KCoreConfigSkeleton::ItemRect::ItemRect(const QString &_group, const QString &_key, QRect &reference, const QRect &defaultValue)
879 KCoreConfigSkeleton::ItemPoint::ItemPoint(const QString &_group, const QString &_key, QPoint &reference, const QPoint &defaultValue)
908 KCoreConfigSkeleton::ItemSize::ItemSize(const QString &_group, const QString &_key, QSize &reference, const QSize &defaultValue)
937 KCoreConfigSkeleton::ItemDateTime::ItemDateTime(const QString &_group, const QString &_key, QDateTime &reference, const QDateTime &defaultValue)
966 KCoreConfigSkeleton::ItemStringList::ItemStringList(const QString &_group, const QString &_key, QStringList &reference, const QStringList &defaultValue)
999 KCoreConfigSkeleton::ItemPathList::ItemPathList(const QString &_group, const QString &_key, QStringList &reference, const QStringList &defaultValue)
1031 KCoreConfigSkeleton::ItemUrlList::ItemUrlList(const QString &_group, const QString &_key, QList<QUrl> &reference, const QList<QUrl> &defaultValue)
1089 KCoreConfigSkeleton::ItemIntList::ItemIntList(const QString &_group, const QString &_key, QList<int> &reference, const QList<int> &defaultValue)
1122 // static int kCoreConfigSkeletionDebugArea() { static int s_area = KDebug::registerArea("kdecore (KConfigSkeleton)"); return s_area; }
1328 KCoreConfigSkeleton::ItemString *KCoreConfigSkeleton::addItemString(const QString &name, QString &reference, const QString &defaultValue, const QString &key)
1331 item = new KCoreConfigSkeleton::ItemString(d->mCurrentGroup, key.isEmpty() ? name : key, reference, defaultValue, KCoreConfigSkeleton::ItemString::Normal);
1337 KCoreConfigSkeleton::addItemPassword(const QString &name, QString &reference, const QString &defaultValue, const QString &key)
1340 item = new KCoreConfigSkeleton::ItemPassword(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
1345 KCoreConfigSkeleton::ItemPath *KCoreConfigSkeleton::addItemPath(const QString &name, QString &reference, const QString &defaultValue, const QString &key)
1348 item = new KCoreConfigSkeleton::ItemPath(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
1354 KCoreConfigSkeleton::addItemProperty(const QString &name, QVariant &reference, const QVariant &defaultValue, const QString &key)
1357 item = new KCoreConfigSkeleton::ItemProperty(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
1362 KCoreConfigSkeleton::ItemBool *KCoreConfigSkeleton::addItemBool(const QString &name, bool &reference, bool defaultValue, const QString &key)
1365 item = new KCoreConfigSkeleton::ItemBool(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
1370 KCoreConfigSkeleton::ItemInt *KCoreConfigSkeleton::addItemInt(const QString &name, qint32 &reference, qint32 defaultValue, const QString &key)
1373 item = new KCoreConfigSkeleton::ItemInt(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
1378 KCoreConfigSkeleton::ItemUInt *KCoreConfigSkeleton::addItemUInt(const QString &name, quint32 &reference, quint32 defaultValue, const QString &key)
1381 item = new KCoreConfigSkeleton::ItemUInt(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
1386 KCoreConfigSkeleton::ItemLongLong *KCoreConfigSkeleton::addItemLongLong(const QString &name, qint64 &reference, qint64 defaultValue, const QString &key)
1389 item = new KCoreConfigSkeleton::ItemLongLong(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
1395 KCoreConfigSkeleton::ItemLongLong *KCoreConfigSkeleton::addItemInt64(const QString &name, qint64 &reference, qint64 defaultValue, const QString &key)
1401 KCoreConfigSkeleton::ItemULongLong *KCoreConfigSkeleton::addItemULongLong(const QString &name, quint64 &reference, quint64 defaultValue, const QString &key)
1404 item = new KCoreConfigSkeleton::ItemULongLong(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
1410 KCoreConfigSkeleton::ItemULongLong *KCoreConfigSkeleton::addItemUInt64(const QString &name, quint64 &reference, quint64 defaultValue, const QString &key)
1416 KCoreConfigSkeleton::ItemDouble *KCoreConfigSkeleton::addItemDouble(const QString &name, double &reference, double defaultValue, const QString &key)
1419 item = new KCoreConfigSkeleton::ItemDouble(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
1424 KCoreConfigSkeleton::ItemRect *KCoreConfigSkeleton::addItemRect(const QString &name, QRect &reference, const QRect &defaultValue, const QString &key)
1427 item = new KCoreConfigSkeleton::ItemRect(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
1432 KCoreConfigSkeleton::ItemPoint *KCoreConfigSkeleton::addItemPoint(const QString &name, QPoint &reference, const QPoint &defaultValue, const QString &key)
1435 item = new KCoreConfigSkeleton::ItemPoint(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
1440 KCoreConfigSkeleton::ItemSize *KCoreConfigSkeleton::addItemSize(const QString &name, QSize &reference, const QSize &defaultValue, const QString &key)
1443 item = new KCoreConfigSkeleton::ItemSize(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
1449 KCoreConfigSkeleton::addItemDateTime(const QString &name, QDateTime &reference, const QDateTime &defaultValue, const QString &key)
1452 item = new KCoreConfigSkeleton::ItemDateTime(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
1458 KCoreConfigSkeleton::addItemStringList(const QString &name, QStringList &reference, const QStringList &defaultValue, const QString &key)
1461 item = new KCoreConfigSkeleton::ItemStringList(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
1467 KCoreConfigSkeleton::addItemIntList(const QString &name, QList<int> &reference, const QList<int> &defaultValue, const QString &key)
1470 item = new KCoreConfigSkeleton::ItemIntList(d->mCurrentGroup, key.isNull() ? name : key, reference, defaultValue);
QRect toRect() const const
KSharedConfig::Ptr sharedConfig() const
Return the KConfig object used for reading and writing the settings.
Definition: kcoreconfigskeleton.cpp:1166
void append(const T &value)
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:1467
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:1354
bool isNull() const const
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:1094
ItemPoint(const QString &_group, const QString &_key, QPoint &reference, const QPoint &defaultValue=QPoint())
Constructor.
Definition: kcoreconfigskeleton.cpp:879
ItemLongLong * addItemInt64(const QString &name, qint64 &reference, qint64 defaultValue=0, const QString &key=QString())
Definition: kcoreconfigskeleton.cpp:1395
virtual QVariant maxValue() const
Return maximum value of item or invalid if not specified.
Definition: kcoreconfigskeleton.cpp:148
void setCurrentGroup(const QString &group)
Set the config file group for subsequent addItem() calls.
Definition: kcoreconfigskeleton.cpp:1146
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
KCoreConfigSkeleton(const QString &configname=QString(), QObject *parent=nullptr)
Constructor.
Definition: kcoreconfigskeleton.cpp:1124
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition: kcoreconfigskeleton.cpp:927
void writeEntry(const QString &key, const QVariant &value, WriteConfigFlags pFlags=Normal)
Writes a value to the configuration object.
Definition: kconfiggroup.cpp:1051
QVariant minValue() const override
Return minimum value of item or invalid if not specified.
Definition: kcoreconfigskeleton.cpp:1525
Class for handling a floating point preference item.
Definition: kcoreconfigskeleton.h:909
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
CaseInsensitive
ItemSize(const QString &_group, const QString &_key, QSize &reference, const QSize &defaultValue=QSize())
Constructor.
Definition: kcoreconfigskeleton.cpp:908
ItemUrlList(const QString &_group, const QString &_key, QList< QUrl > &reference, const QList< QUrl > &defaultValue=QList< QUrl >())
Constructor.
Definition: kcoreconfigskeleton.cpp:1031
KConfigSkeletonItem::List items() const
Return list of items managed by this KCoreConfigSkeleton object.
Definition: kcoreconfigskeleton.cpp:1176
ItemInt * addItemInt(const QString &name, qint32 &reference, qint32 defaultValue=0, const QString &key=QString())
Register an item of type qint32.
Definition: kcoreconfigskeleton.cpp:1370
virtual bool useDefaults(bool b)
Specify whether this object should reflect the actual values or the default values.
Definition: kcoreconfigskeleton.cpp:1181
Q_EMITQ_EMIT
virtual bool usrSave()
Perform the actual writing of the configuration file.
Definition: kcoreconfigskeleton.cpp:1274
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 setValueForChoice(const QString &name, const QString &valueForChoice)
Stores a choice value for name.
Definition: kcoreconfigskeleton.cpp:592
void readDefault(KConfig *) override
Read global default value.
Definition: kcoreconfigskeleton.cpp:1547
Class for handling a string preferences item.
Definition: kcoreconfigskeleton.h:557
ItemPathList(const QString &_group, const QString &_key, QStringList &reference, const QStringList &defaultValue=QStringList())
Constructor.
Definition: kcoreconfigskeleton.cpp:999
bool isDefault() const
Indicates if the item is set to its default value.
Definition: kcoreconfigskeleton.cpp:159
ItemInt(const QString &_group, const QString &_key, qint32 &reference, qint32 defaultValue=0)
Constructor.
Definition: kcoreconfigskeleton.cpp:454
void configChanged()
This signal is emitted when the configuration change.
ItemDateTime(const QString &_group, const QString &_key, QDateTime &reference, const QDateTime &defaultValue=QDateTime())
Constructor.
Definition: kcoreconfigskeleton.cpp:937
Class for handling a 64-bit integer preferences item.
Definition: kcoreconfigskeleton.h:732
QList< Choice > choices2() const
Definition: kcoreconfigskeleton.cpp:649
virtual void usrRead()
Perform the actual reading of the configuration file.
Definition: kcoreconfigskeleton.cpp:1261
ItemUInt(const QString &_group, const QString &_key, quint32 &reference, quint32 defaultValue=0)
Constructor.
Definition: kcoreconfigskeleton.cpp:655
KConfigSkeletonItem * findItem(const QString &name) const
Lookup item by name.
Definition: kcoreconfigskeleton.cpp:1481
ItemUrl(const QString &_group, const QString &_key, QUrl &reference, const QUrl &defaultValue=QUrl())
Constructor.
Definition: kcoreconfigskeleton.cpp:352
QVariant minValue() const override
Get the minimum value that is allowed to be stored in this item.
Definition: kcoreconfigskeleton.cpp:757
bool isEqual(const QVariant &p) const override
Definition: kcoreconfigskeleton.cpp:236
const QChar * unicode() const const
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
qlonglong toLongLong(bool *ok) const const
QVariant minValue() const override
Get the minimum value that is allowed to be stored in this item.
Definition: kcoreconfigskeleton.cpp:692
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:1337
void writePathEntry(const QString &pKey, const QString &path, WriteConfigFlags pFlags=Normal)
Writes a file path to the configuration.
Definition: kconfiggroup.cpp:1084
void setDefault() override
Sets the current value to the default value.
Definition: kcoreconfigskeleton.cpp:262
QVariant maxValue() const override
Get the maximum value this is allowed to be stored in this item.
Definition: kcoreconfigskeleton.cpp:564
ItemSize * addItemSize(const QString &name, QSize &reference, const QSize &defaultValue=QSize(), const QString &key=QString())
Register an item of type QSize.
Definition: kcoreconfigskeleton.cpp:1440
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition: kcoreconfigskeleton.cpp:546
void swapDefault() override
Exchanges the current value with the default value Used by KCoreConfigSkeleton::useDefaults(bool);.
Definition: kcoreconfigskeleton.cpp:268
void setWhatsThis(const QString &w)
Set WhatsThis description of item.
Definition: kcoreconfigskeleton.cpp:119
void setToolTip(const QString &t)
Set ToolTip description of item.
Definition: kcoreconfigskeleton.cpp:107
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:971
Class for handling a QVariant preferences item.
Definition: kcoreconfigskeleton.h:645
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:1161
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:700
KConfigGroup configGroup(KConfig *config) const
Return a KConfigGroup, the one provided by setGroup(const KConfigGroup&) if it's valid,...
Definition: kcoreconfigskeleton.cpp:61
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition: kcoreconfigskeleton.cpp:812
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition: kcoreconfigskeleton.cpp:1515
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:1345
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:628
QVariant minValue() const override
Get the minimum value that is allowed to be stored in this item.
Definition: kcoreconfigskeleton.cpp:491
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:1057
Class for handling a QDateTime preferences item.
Definition: kcoreconfigskeleton.h:1015
void setWriteFlags(KConfigBase::WriteConfigFlags flags)
The write flags to be used when writing configuration.
Definition: kcoreconfigskeleton.cpp:131
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
Q_INVOKABLE bool isImmutable(const QString &name) const
Return whether a certain item is immutable.
Definition: kcoreconfigskeleton.cpp:1475
void removeItem(const QString &name)
Removes and deletes an item by name.
Definition: kcoreconfigskeleton.cpp:1310
ItemString * addItemString(const QString &name, QString &reference, const QString &defaultValue=QLatin1String(""), const QString &key=QString())
Register an item of type QString.
Definition: kcoreconfigskeleton.cpp:1328
void setSharedConfig(KSharedConfig::Ptr pConfig)
Set the KSharedConfig object used for reading and writing the settings.
Definition: kcoreconfigskeleton.cpp:1171
double toDouble(bool *ok) const const
ItemPath(const QString &_group, const QString &_key, QString &reference, const QString &defaultValue=QString())
Constructor.
Definition: kcoreconfigskeleton.cpp:347
QString whatsThis() const
Return WhatsThis description of item.
Definition: kcoreconfigskeleton.cpp:125
QVariant minValue() const override
Get the minimum value that is allowed to be stored in this item.
Definition: kcoreconfigskeleton.cpp:556
qulonglong toULongLong(bool *ok) const const
Class for handling a password preferences item.
Definition: kcoreconfigskeleton.h:599
ItemLongLong * addItemLongLong(const QString &name, qint64 &reference, qint64 defaultValue=0, const QString &key=QString())
Register an item of type qint64.
Definition: kcoreconfigskeleton.cpp:1386
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:603
ItemRect(const QString &_group, const QString &_key, QRect &reference, const QRect &defaultValue=QRect())
Constructor.
Definition: kcoreconfigskeleton.cpp:850
QVariant maxValue() const override
Return maximum value of item or invalid if not specified.
Definition: kcoreconfigskeleton.cpp:1530
@ FullConfig
Fully-fledged config, including globals and cascading to system settings.
Definition: kconfig.h:89
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
Class for handling unsigned 64-bit integer preferences item.
Definition: kcoreconfigskeleton.h:866
Class for handling a QSize preferences item.
Definition: kcoreconfigskeleton.h:993
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:1004
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
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition: kcoreconfigskeleton.cpp:989
bool isEmpty() const const
QString currentGroup() const
Returns the current group used for addItem() calls.
Definition: kcoreconfigskeleton.cpp:1151
int length() const const
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
Class for handling an unsigned 32-bit integer preferences item.
Definition: kcoreconfigskeleton.h:826
uint toUInt(bool *ok) const const
virtual void setDefaults()
Set all registered items to their default values.
Definition: kcoreconfigskeleton.cpp:1196
ItemIntList(const QString &_group, const QString &_key, QList< int > &reference, const QList< int > &defaultValue=QList< int >())
Constructor.
Definition: kcoreconfigskeleton.cpp:1089
ItemEnum(const QString &_group, const QString &_key, qint32 &reference, const QList< Choice > &choices, qint32 defaultValue=0)
Constructor.
Definition: kcoreconfigskeleton.cpp:597
ItemDateTime * addItemDateTime(const QString &name, QDateTime &reference, const QDateTime &defaultValue=QDateTime(), const QString &key=QString())
Register an item of type QDateTime.
Definition: kcoreconfigskeleton.cpp:1449
ItemStringList * addItemStringList(const QString &name, QStringList &reference, const QStringList &defaultValue=QStringList(), const QString &key=QString())
Register an item of type QStringList.
Definition: kcoreconfigskeleton.cpp:1458
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition: kcoreconfigskeleton.cpp:414
int toInt(bool *ok) const const
bool isSaveNeeded() const
Indicates if the item has a different value than the previously loaded value.
Definition: kcoreconfigskeleton.cpp:165
QVariant maxValue() const override
Get the maximum value this is allowed to be stored in this item.
Definition: kcoreconfigskeleton.cpp:830
void setDefault() override
Sets the current value to the default value.
Definition: kcoreconfigskeleton.cpp:1560
Definition: kconfiggroup.h:38
KConfigCompilerSignallingItem(KConfigSkeletonItem *item, QObject *object, NotifyFunction targetFunction, quint64 userData)
Constructor.
Definition: kcoreconfigskeleton.cpp:1486
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition: kcoreconfigskeleton.cpp:869
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition: kcoreconfigskeleton.cpp:332
void readImmutability(const KConfigGroup &group)
Sets mIsImmutable to true if mKey in config is immutable.
Definition: kcoreconfigskeleton.cpp:177
virtual void readConfig(KConfig *)=0
This function is called by KCoreConfigSkeleton to read the value for this setting from a config file.
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:258
void addItem(KConfigSkeletonItem *item, const QString &name=QString())
Register a custom KConfigSkeletonItem item with a given name.
Definition: kcoreconfigskeleton.cpp:1290
virtual QVariant minValue() const
Return minimum value of item or invalid if not specified.
Definition: kcoreconfigskeleton.cpp:143
KSharedConfigPtr config()
Base class for storing a preferences setting of type T.
Definition: kcoreconfigskeleton.h:325
Class for handling a string list preferences item.
Definition: kcoreconfigskeleton.h:1037
KConfigBase::WriteConfigFlags writeFlags() const
Return write flags to be used when writing configuration.
Definition: kcoreconfigskeleton.cpp:137
QPoint toPoint() const const
bool isSaveNeeded() const
Indicates if any registered item has a different value than the previously loaded value.
Definition: kcoreconfigskeleton.cpp:1225
ItemPassword(const QString &_group, const QString &_key, QString &reference, const QString &defaultValue=QLatin1String(""))
Constructor.
Definition: kcoreconfigskeleton.cpp:342
bool toBool() const const
ItemLongLong(const QString &_group, const QString &_key, qint64 &reference, qint64 defaultValue=0)
Constructor.
Definition: kcoreconfigskeleton.cpp:519
virtual bool usrWriteConfig()
Definition: kcoreconfigskeleton.cpp:1284
void readConfig(KConfig *) override
This function is called by KCoreConfigSkeleton to read the value for this setting from a config file.
Definition: kcoreconfigskeleton.cpp:1535
ItemPoint * addItemPoint(const QString &name, QPoint &reference, const QPoint &defaultValue=QPoint(), const QString &key=QString())
Register an item of type QPoint.
Definition: kcoreconfigskeleton.cpp:1432
void swapDefault() override
Exchanges the current value with the default value Used by KCoreConfigSkeleton::useDefaults(bool);.
Definition: kcoreconfigskeleton.cpp:1577
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: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:292
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition: kcoreconfigskeleton.cpp:444
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
ItemRect * addItemRect(const QString &name, QRect &reference, const QRect &defaultValue=QRect(), const QString &key=QString())
Register an item of type QRect.
Definition: kcoreconfigskeleton.cpp:1424
virtual void usrSetDefaults()
Perform the actual setting of default values.
Definition: kcoreconfigskeleton.cpp:1257
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition: kcoreconfigskeleton.cpp:682
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
bool isDefaults() const
Indicates if all the registered items are set to their default value.
Definition: kcoreconfigskeleton.cpp:1218
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
QDateTime toDateTime() const const
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 writeConfig(KConfig *config) override
This function is called by KCoreConfigSkeleton to write the value of this setting to a config file.
Definition: kcoreconfigskeleton.cpp:1017
QVariant maxValue() const override
Get the maximum value this is allowed to be stored in this item.
Definition: kcoreconfigskeleton.cpp:765
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition: kcoreconfigskeleton.cpp:747
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition: kcoreconfigskeleton.cpp:1112
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition: kcoreconfigskeleton.cpp:898
Class for handling a 32-bit integer preferences item.
Definition: kcoreconfigskeleton.h:686
Class for handling an integer list preferences item.
Definition: kcoreconfigskeleton.h:1099
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
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition: kcoreconfigskeleton.cpp:956
ItemStringList(const QString &_group, const QString &_key, QStringList &reference, const QStringList &defaultValue=QStringList())
Constructor.
Definition: kcoreconfigskeleton.cpp:966
KConfig * config()
Return the KConfig object used for reading and writing the settings.
Definition: kcoreconfigskeleton.cpp:1156
Class for handling a QRect preferences item.
Definition: kcoreconfigskeleton.h:949
QSize toSize() const const
bool hasKey(const QString &key) const
Checks whether the key has an entry in this group.
Definition: kconfiggroup.cpp:1178
QString readPathEntry(const QString &pKey, const QString &aDefault) const
Reads a path.
Definition: kconfiggroup.cpp:801
void revertToDefault(const QString &key)
Reverts an entry to the default settings.
Definition: kconfiggroup.cpp:1142
void readDefault(KConfig *) override
Read global default value.
Definition: kcoreconfigskeleton.cpp:256
KConfigSkeletonItem(const QString &_group, const QString &_key)
Constructor.
Definition: kcoreconfigskeleton.cpp:31
virtual bool usrUseDefaults(bool b)
Implemented by subclasses that use special defaults.
Definition: kcoreconfigskeleton.cpp:1252
void setLabel(const QString &l)
Set label providing a translated one-line description of the item.
Definition: kcoreconfigskeleton.cpp:95
ItemULongLong * addItemUInt64(const QString &name, quint64 &reference, quint64 defaultValue=0, const QString &key=QString())
Definition: kcoreconfigskeleton.cpp:1410
KPropertySkeletonItem(QObject *object, const QByteArray &propertyName, const QVariant &defaultValue)
Constructor.
Definition: kcoreconfigskeleton.cpp:201
QStringList toStringList() const const
ItemString(const QString &_group, const QString &_key, QString &reference, const QString &defaultValue=QLatin1String(""), Type type=Normal)
Constructor.
Definition: kcoreconfigskeleton.cpp:286
QString valueForChoice(const QString &name) const
Returns the value for for the choice with the given name.
Definition: kcoreconfigskeleton.cpp:584
virtual void usrReadConfig()
Definition: kcoreconfigskeleton.cpp:1269
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition: kcoreconfigskeleton.cpp:385
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
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition: kcoreconfigskeleton.cpp:1079
Class for proxying a QObject property as a preferences setting.
Definition: kcoreconfigskeleton.h:280
Class for handling a path preferences item.
Definition: kcoreconfigskeleton.h:610
ItemULongLong(const QString &_group, const QString &_key, quint64 &reference, quint64 defaultValue=0)
Constructor.
Definition: kcoreconfigskeleton.cpp:720
ItemDouble * addItemDouble(const QString &name, double &reference, double defaultValue=0.0, const QString &key=QString())
Register an item of type double.
Definition: kcoreconfigskeleton.cpp:1416
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:1036
bool isEqual(const QVariant &p) const override
Check whether the item is equal to p.
Definition: kcoreconfigskeleton.cpp:481
ItemULongLong * addItemULongLong(const QString &name, quint64 &reference, quint64 defaultValue=0, const QString &key=QString())
Register an item of type quint64.
Definition: kcoreconfigskeleton.cpp:1401
Class for handling a bool preferences item.
Definition: kcoreconfigskeleton.h:664
QObject * parent() const const
void writeConfig(KConfig *) override
This function is called by KCoreConfigSkeleton to write the value of this setting to a config file.
Definition: kcoreconfigskeleton.cpp:1555
ItemProperty(const QString &_group, const QString &_key, QVariant &reference, const QVariant &defaultValue=QVariant())
Constructor.
Definition: kcoreconfigskeleton.cpp:395
ItemDouble(const QString &_group, const QString &_key, double &reference, double defaultValue=0)
Constructor.
Definition: kcoreconfigskeleton.cpp:785
Q_D(Todo)
QVariant maxValue() const override
Get the maximum value this is allowed to be stored in this item.
Definition: kcoreconfigskeleton.cpp:499
ushort unicode() const const
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
QString toString() const const
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
ItemBool * addItemBool(const QString &name, bool &reference, bool defaultValue=false, const QString &key=QString())
Register an item of type bool.
Definition: kcoreconfigskeleton.cpp:1362
ItemUInt * addItemUInt(const QString &name, quint32 &reference, quint32 defaultValue=0, const QString &key=QString())
Register an item of type quint32.
Definition: kcoreconfigskeleton.cpp:1378
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Nov 30 2023 04:10:19 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Nov 30 2023 04:10:19 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.