KConfig
kconfiggroup.h
161 void moveValuesTo(const QList<const char *> &keys, KConfigGroup &other, WriteConfigFlags pFlags = Normal);
338 QStringList readXdgListEntry(const QString &pKey, const QStringList &aDefault = QStringList()) const;
343 QStringList readXdgListEntry(const char *key, const QStringList &aDefault = QStringList()) const;
451 void writeEntry(const QString &key, const QStringList &value, WriteConfigFlags pFlags = Normal);
459 void writeEntry(const QString &key, const QVariantList &value, WriteConfigFlags pFlags = Normal);
489 void writeXdgListEntry(const QString &pKey, const QStringList &value, WriteConfigFlags pFlags = Normal);
494 void writeXdgListEntry(const char *key, const QStringList &value, WriteConfigFlags pFlags = Normal);
509 void writePathEntry(const QString &pKey, const QString &path, WriteConfigFlags pFlags = Normal);
529 void writePathEntry(const QString &pKey, const QStringList &value, WriteConfigFlags pFlags = Normal);
534 void writePathEntry(const char *key, const QStringList &value, WriteConfigFlags pFlags = Normal);
686 * @return @p value converted to QVariant, or @p aDefault if @p value is invalid or cannot be converted.
688 static QVariant convertToQVariant(const char *pKey, const QByteArray &value, const QVariant &aDefault);
690 KCONFIGCORE_NO_EXPORT void moveValue(const char *key, KConfigGroup &other, WriteConfigFlags pFlags);
699#define KCONFIGGROUP_ENUMERATOR_ERROR(ENUM) "The Qt MetaObject system does not seem to know about \"" ENUM "\" please use Q_ENUM or Q_FLAG to register it."
722 void KConfigGroup::writeEntry(const char *key, const Class::Enum &value, KConfigBase::WriteConfigFlags flags) \
749 void KConfigGroup::writeEntry(const char *key, const Class::Flags &value, KConfigBase::WriteConfigFlags flags) \
virtual QStringList groupList() const =0
Returns a list of groups that are known about.
virtual bool isGroupImmutableImpl(const QString &groupName) const =0
void deleteGroup(const QString &group, WriteConfigFlags flags=Normal)
Delete group.
Definition kconfigbase.cpp:31
virtual bool hasGroupImpl(const QString &groupName) const =0
virtual void markAsClean()=0
Reset the dirty flags of all entries in the entry map, so the values will not be written to disk on a...
virtual bool isImmutable() const =0
Checks whether this configuration object can be modified.
@ Normal
Save the entry to the application specific config file without a locale tag.
Definition kconfigbase.h:57
virtual KConfigGroup groupImpl(const QString &groupName)=0
virtual AccessMode accessMode() const =0
Returns the access mode of the app-config object.
QFlags< WriteConfigFlag > WriteConfigFlags
Stores a combination of WriteConfigFlag values.
Definition kconfigbase.h:67
KConfigGroup group(const QString &group)
Returns an object for the named subgroup.
Definition kconfigbase.cpp:21
virtual void deleteGroupImpl(const QString &groupName, WriteConfigFlags flags=Normal)=0
void reparent(KConfigBase *parent, WriteConfigFlags pFlags=Normal)
Changes the configuration object that this group belongs to.
Definition kconfiggroup.cpp:1212
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
void writeEntry(const QString &key, const QVariant &value, WriteConfigFlags pFlags=Normal)
Writes a value to the configuration object.
Definition kconfiggroup.cpp:1014
void writeEntry(const QString &key, const QList< T > &value, WriteConfigFlags pFlags=Normal)
Overload for writeEntry(const QString&, const QVariant&, WriteConfigFlags)
Definition kconfiggroup.h:468
KConfig * config()
Return the config object that this group belongs to.
Definition kconfiggroup.cpp:584
bool exists() const
Check whether the containing KConfig object actually contains a group with this name.
Definition kconfiggroup.cpp:559
void moveValuesTo(const QList< const char * > &keys, KConfigGroup &other, WriteConfigFlags pFlags=Normal)
Moves the key-value pairs from one config group to the other.
Definition kconfiggroup.cpp:1247
KConfigGroup parent() const
Returns the group that this group belongs to.
Definition kconfiggroup.cpp:527
QList< T > readEntry(const QString &key, const QList< T > &aDefault) const
Reads a list of values from the config object.
Definition kconfiggroup.h:317
void writeEntry(const QString &key, const T &value, WriteConfigFlags pFlags=Normal)
Overload for writeEntry(const QString&, const QVariant&, WriteConfigFlags)
Definition kconfiggroup.h:445
QStringList keyList() const
Returns a list of keys this group contains.
Definition kconfiggroup.cpp:1150
void copyTo(KConfigBase *other, WriteConfigFlags pFlags=Normal) const
Copies the entries in this group to another configuration object.
Definition kconfiggroup.cpp:1197
const char * constData() const const
void append(QList< T > &&value)
QByteArray toUtf8() const const
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.