KDECore
KConfigGroup Class Reference
#include <KConfigGroup>

Detailed Description
A class for one specific group in a KConfig object.If you want to access the top-level entries of a KConfig object, which are not associated with any group, use an empty group name. A KConfigGroup can be read-only if it is constructed from a const config object or from another read-only group.
Definition at line 53 of file kconfiggroup.h.
Public Member Functions | |
| AccessMode | accessMode () const |
| void | changeGroup (const char *group) |
| void | changeGroup (const QString &group) |
| const KConfig * | config () const |
| KConfig * | config () |
| void | copyTo (KConfigBase *other, WriteConfigFlags pFlags=Normal) const |
| void | deleteEntry (const char *pKey, WriteConfigFlags pFlags=Normal) |
| void | deleteEntry (const QString &pKey, WriteConfigFlags pFlags=Normal) |
| void | deleteGroup (WriteConfigFlags pFlags=Normal) |
| QMap< QString, QString > | entryMap () const |
| bool | exists () const |
| QStringList | groupList () const |
| bool | hasDefault (const char *key) const |
| bool | hasDefault (const QString &key) const |
| bool | hasKey (const char *key) const |
| bool | hasKey (const QString &key) const |
| bool | isEntryImmutable (const char *key) const |
| bool | isEntryImmutable (const QString &key) const |
| bool | isImmutable () const |
| bool | isValid () const |
| KConfigGroup (const KConfigGroup &) | |
| KConfigGroup (const KSharedConfigPtr &master, const char *group) | |
| KConfigGroup (const KSharedConfigPtr &master, const QString &group) | |
| KConfigGroup (const KConfigBase *master, const char *group) | |
| KConfigGroup (const KConfigBase *master, const QString &group) | |
| KConfigGroup (KConfigBase *master, const char *group) | |
| KConfigGroup (KConfigBase *master, const QString &group) | |
| KConfigGroup () | |
| QStringList | keyList () const |
| void | markAsClean () |
| QString | name () const |
| KConfigGroup & | operator= (const KConfigGroup &) |
| KConfigGroup | parent () const |
| template<typename T> | |
| QList< T > | readEntry (const char *key, const QList< T > &aDefault) const |
| template<typename T> | |
| QList< T > | readEntry (const QString &key, const QList< T > &aDefault) const |
| QStringList | readEntry (const char *key, const QStringList &aDefault) const |
| QStringList | readEntry (const QString &key, const QStringList &aDefault) const |
| QVariantList | readEntry (const char *key, const QVariantList &aDefault) const |
| QVariantList | readEntry (const QString &key, const QVariantList &aDefault) const |
| QString | readEntry (const char *key, const char *aDefault=0) const |
| QString | readEntry (const QString &key, const char *aDefault=0) const |
| QString | readEntry (const QString &key, const QString &aDefault) const |
| QString | readEntry (const char *key, const QString &aDefault) const |
| QVariant | readEntry (const char *key, const QVariant &aDefault) const |
| QVariant | readEntry (const QString &key, const QVariant &aDefault) const |
| template<typename T> | |
| T | readEntry (const char *key, const T &aDefault) const |
| template<typename T> | |
| T | readEntry (const QString &key, const T &aDefault) const |
| QString | readEntryUntranslated (const char *key, const QString &aDefault=QString()) const |
| QString | readEntryUntranslated (const QString &pKey, const QString &aDefault=QString()) const |
| QStringList | readPathEntry (const char *key, const QStringList &aDefault) const |
| QStringList | readPathEntry (const QString &pKey, const QStringList &aDefault) const |
| QString | readPathEntry (const char *key, const QString &aDefault) const |
| QString | readPathEntry (const QString &pKey, const QString &aDefault) const |
| QStringList | readXdgListEntry (const char *pKey, const QStringList &aDefault=QStringList()) const |
| QStringList | readXdgListEntry (const QString &pKey, const QStringList &aDefault=QStringList()) const |
| void | reparent (KConfigBase *parent, WriteConfigFlags pFlags=Normal) |
| void | revertToDefault (const char *key) |
| void | revertToDefault (const QString &key) |
| void | sync () |
| template<typename T> | |
| void | writeEntry (const char *key, const QList< T > &value, WriteConfigFlags pFlags=Normal) |
| template<typename T> | |
| void | writeEntry (const QString &key, const QList< T > &value, WriteConfigFlags pFlags=Normal) |
| void | writeEntry (const char *key, const QVariantList &value, WriteConfigFlags pFlags=Normal) |
| void | writeEntry (const QString &key, const QVariantList &value, WriteConfigFlags pFlags=Normal) |
| void | writeEntry (const char *key, const QStringList &value, WriteConfigFlags pFlags=Normal) |
| void | writeEntry (const QString &key, const QStringList &value, WriteConfigFlags pFlags=Normal) |
| template<typename T> | |
| void | writeEntry (const QString &key, const T &value, WriteConfigFlags pFlags=Normal) |
| template<typename T> | |
| void | writeEntry (const char *key, const T &value, WriteConfigFlags pFlags=Normal) |
| void | writeEntry (const char *key, const char *value, WriteConfigFlags pFlags=Normal) |
| void | writeEntry (const QString &key, const char *value, WriteConfigFlags pFlags=Normal) |
| void | writeEntry (const char *key, const QByteArray &value, WriteConfigFlags pFlags=Normal) |
| void | writeEntry (const QString &key, const QByteArray &value, WriteConfigFlags pFlags=Normal) |
| void | writeEntry (const char *key, const QString &value, WriteConfigFlags pFlags=Normal) |
| void | writeEntry (const QString &key, const QString &value, WriteConfigFlags pFlags=Normal) |
| void | writeEntry (const char *key, const QVariant &value, WriteConfigFlags pFlags=Normal) |
| void | writeEntry (const QString &key, const QVariant &value, WriteConfigFlags pFlags=Normal) |
| void | writePathEntry (const char *pKey, const QStringList &value, WriteConfigFlags pFlags=Normal) |
| void | writePathEntry (const QString &pKey, const QStringList &value, WriteConfigFlags pFlags=Normal) |
| void | writePathEntry (const char *pKey, const QString &path, WriteConfigFlags pFlags=Normal) |
| void | writePathEntry (const QString &pKey, const QString &path, WriteConfigFlags pFlags=Normal) |
| void | writeXdgListEntry (const char *pKey, const QStringList &value, WriteConfigFlags pFlags=Normal) |
| void | writeXdgListEntry (const QString &pKey, const QStringList &value, WriteConfigFlags pFlags=Normal) |
| ~KConfigGroup () | |
Protected Member Functions | |
| void | deleteGroupImpl (const QByteArray &group, WriteConfigFlags flags) |
| const KConfigGroup | groupImpl (const QByteArray &b) const |
| KConfigGroup | groupImpl (const QByteArray &b) |
| bool | hasGroupImpl (const QByteArray &group) const |
| bool | isGroupImmutableImpl (const QByteArray &aGroup) const |
Constructor & Destructor Documentation
| KConfigGroup::KConfigGroup | ( | ) |
Constructs a null group.
A null group is invalid.
- See also:
- isValid
Definition at line 526 of file kconfiggroup.cpp.
| KConfigGroup::KConfigGroup | ( | KConfigBase * | master, | |
| const QString & | group | |||
| ) |
Construct a config group corresponding to group in master.
This allows to create subgroups, by passing an existing group as master.
group is the group name encoded in UTF-8.
Definition at line 552 of file kconfiggroup.cpp.
| KConfigGroup::KConfigGroup | ( | KConfigBase * | master, | |
| const char * | group | |||
| ) |
Definition at line 557 of file kconfiggroup.cpp.
| KConfigGroup::KConfigGroup | ( | const KConfigBase * | master, | |
| const QString & | group | |||
| ) |
Construct a read-only config group.
A read-only group will silently ignore any attempts to write to it.
This allows to create subgroups, by passing an existing group as master.
Definition at line 562 of file kconfiggroup.cpp.
| KConfigGroup::KConfigGroup | ( | const KConfigBase * | master, | |
| const char * | group | |||
| ) |
Definition at line 567 of file kconfiggroup.cpp.
| KConfigGroup::KConfigGroup | ( | const KSharedConfigPtr & | master, | |
| const QString & | group | |||
| ) |
Definition at line 572 of file kconfiggroup.cpp.
| KConfigGroup::KConfigGroup | ( | const KSharedConfigPtr & | master, | |
| const char * | group | |||
| ) |
Definition at line 577 of file kconfiggroup.cpp.
| KConfigGroup::KConfigGroup | ( | const KConfigGroup & | rhs | ) |
Definition at line 588 of file kconfiggroup.cpp.
| KConfigGroup::~KConfigGroup | ( | ) |
Definition at line 593 of file kconfiggroup.cpp.
Member Function Documentation
| KConfigGroup::AccessMode KConfigGroup::accessMode | ( | ) | const [virtual] |
- Reimplemented from superclass.
Implements KConfigBase.
Definition at line 1273 of file kconfiggroup.cpp.
| void KConfigGroup::changeGroup | ( | const char * | group | ) |
Definition at line 653 of file kconfiggroup.cpp.
| void KConfigGroup::changeGroup | ( | const QString & | group | ) |
Changes the group of the object.
This is a convenience function and should not be overused. Prefer another object for another group to avoid mixture of groups. A subgroup can only change to another subgroup of the parent.
Definition at line 648 of file kconfiggroup.cpp.
| const KConfig * KConfigGroup::config | ( | ) | const |
Definition at line 699 of file kconfiggroup.cpp.
| KConfig * KConfigGroup::config | ( | ) |
Return the config object that this group belongs to.
Definition at line 692 of file kconfiggroup.cpp.
| void KConfigGroup::copyTo | ( | KConfigBase * | other, | |
| WriteConfigFlags | pFlags = Normal | |||
| ) | const |
Copies the entries in this group to another config object.
- Parameters:
-
other The other config object to copy this group's entries to.
- Note:
othercan be either another group or a different file.
- Since:
- 4.1
Definition at line 1305 of file kconfiggroup.cpp.
| void KConfigGroup::deleteEntry | ( | const char * | pKey, | |
| WriteConfigFlags | pFlags = Normal | |||
| ) |
Definition at line 1186 of file kconfiggroup.cpp.
| void KConfigGroup::deleteEntry | ( | const QString & | pKey, | |
| WriteConfigFlags | pFlags = Normal | |||
| ) |
Deletes the entry specified by pKey in the current group.
This also hides system wide defaults.
- Parameters:
-
pKey The key to delete. pFlags The flags to use when deleting this entry.
Definition at line 1194 of file kconfiggroup.cpp.
| void KConfigGroup::deleteGroup | ( | WriteConfigFlags | pFlags = Normal |
) |
Delete all entries in the entire group.
- Parameters:
-
pFlags flags passed to KConfig::deleteGroup
Definition at line 640 of file kconfiggroup.cpp.
| void KConfigGroup::deleteGroupImpl | ( | const QByteArray & | group, | |
| WriteConfigFlags | flags | |||
| ) | [protected, virtual] |
Returns a map (tree) of entries for all entries in this group.
Only the actual entry string is returned, none of the other internal data should be included.
- Returns:
- A map of entries in this group, indexed by key.
Definition at line 685 of file kconfiggroup.cpp.
| bool KConfigGroup::exists | ( | ) | const |
Check whether the containing KConfig object acutally contains a group with this name.
Definition at line 670 of file kconfiggroup.cpp.
| const KConfigGroup KConfigGroup::groupImpl | ( | const QByteArray & | b | ) | const [protected, virtual] |
| KConfigGroup KConfigGroup::groupImpl | ( | const QByteArray & | b | ) | [protected, virtual] |
| QStringList KConfigGroup::groupList | ( | ) | const [virtual] |
- Reimplemented from superclass.
Implements KConfigBase.
Definition at line 1252 of file kconfiggroup.cpp.
| bool KConfigGroup::hasDefault | ( | const char * | key | ) | const |
Definition at line 1215 of file kconfiggroup.cpp.
Returns whether a default is specified for an entry in either the system wide configuration file or the global KDE config file.
If an application computes a default value at runtime for a certain entry, e.g. like:
QColor computedDefault = qApp->palette().color(QPalette::Active, QPalette::Text) QColor color = config->readEntry(key, computedDefault);
Then it may wish to make the following check before writing back changes:
if ( (value == computedDefault) && !config->hasDefault(key) ) config->revertToDefault(key) else config->writeEntry(key, value)
This ensures that as long as the entry is not modified to differ from the computed default, the application will keep using the computed default and will follow changes the computed default makes over time.
- Parameters:
-
key The key of the entry to check.
Definition at line 1224 of file kconfiggroup.cpp.
| bool KConfigGroup::hasGroupImpl | ( | const QByteArray & | group | ) | const [protected, virtual] |
| bool KConfigGroup::hasKey | ( | const char * | key | ) | const |
Definition at line 1229 of file kconfiggroup.cpp.
Checks whether the key has an entry in the currently active group.
Use this to determine whether a key is not specified for the current group (hasKey() returns false).
- Parameters:
-
key The key to search for.
- Returns:
- If true, the key is available.
Definition at line 1240 of file kconfiggroup.cpp.
| bool KConfigGroup::isEntryImmutable | ( | const char * | key | ) | const |
Definition at line 706 of file kconfiggroup.cpp.
Checks whether it is possible to change the given entry.
- Parameters:
-
key the key to check
- Returns:
- whether the entry
keymay be changed in the current group in this configuration file.
Definition at line 714 of file kconfiggroup.cpp.
| bool KConfigGroup::isGroupImmutableImpl | ( | const QByteArray & | aGroup | ) | const [protected, virtual] |
| bool KConfigGroup::isImmutable | ( | ) | const [virtual] |
Checks whether it is possible to change the given group.
- Returns:
- whether changes may be made to this group.
Implements KConfigBase.
Definition at line 1245 of file kconfiggroup.cpp.
| bool KConfigGroup::isValid | ( | ) | const |
Returns true if the group is valid; otherwise returns false.
A group is invalid if it was constructed without arguments.
You should not call any functions on an invalid group.
Definition at line 530 of file kconfiggroup.cpp.
| QStringList KConfigGroup::keyList | ( | ) | const |
| void KConfigGroup::markAsClean | ( | ) | [virtual] |
- Reimplemented from superclass.
Implements KConfigBase.
Definition at line 1266 of file kconfiggroup.cpp.
| QString KConfigGroup::name | ( | ) | const |
The name of this group.
The root group is named "<default>".
Definition at line 663 of file kconfiggroup.cpp.
| KConfigGroup & KConfigGroup::operator= | ( | const KConfigGroup & | rhs | ) |
Definition at line 582 of file kconfiggroup.cpp.
| KConfigGroup KConfigGroup::parent | ( | ) | const |
Returns the group that this group belongs to, can be invalid if this is a top-level group.
- Since:
- 4.1
Definition at line 623 of file kconfiggroup.cpp.
| QList<T> KConfigGroup::readEntry | ( | const char * | key, | |
| const QList< T > & | aDefault | |||
| ) | const [inline] |
Definition at line 265 of file kconfiggroup.h.
| QList<T> KConfigGroup::readEntry | ( | const QString & | key, | |
| const QList< T > & | aDefault | |||
| ) | const [inline] |
Reads a list of values from the config object.
- Parameters:
-
key The key to search for. aDefault The default value to use if the key does not exist.
- Returns:
- The list. Contains
aDefaultifkeydoes not exist.
Definition at line 262 of file kconfiggroup.h.
| QStringList KConfigGroup::readEntry | ( | const char * | key, | |
| const QStringList & | aDefault | |||
| ) | const |
Definition at line 767 of file kconfiggroup.cpp.
| QStringList KConfigGroup::readEntry | ( | const QString & | key, | |
| const QStringList & | aDefault | |||
| ) | const |
Reads a list of strings from the config object.
- Parameters:
-
key The key to search for. aDefault The default value to use if the key does not exist.
- Returns:
- The list. Contains
aDefaultifkeydoes not exist.
Definition at line 778 of file kconfiggroup.cpp.
| QVariantList KConfigGroup::readEntry | ( | const char * | key, | |
| const QVariantList & | aDefault | |||
| ) | const |
Definition at line 803 of file kconfiggroup.cpp.
| QVariantList KConfigGroup::readEntry | ( | const QString & | key, | |
| const QVariantList & | aDefault | |||
| ) | const |
Reads a list from the config object.
- Warning:
- This function doesn't convert the items returned to any type. It's actually a list of QVariant::String's. If you want the items converted to a specific type use readEntry(const char*, const QList<T>&) const
Definition at line 818 of file kconfiggroup.cpp.
| QString KConfigGroup::readEntry | ( | const char * | key, | |
| const char * | aDefault = 0 | |||
| ) | const |
Definition at line 734 of file kconfiggroup.cpp.
Reads the value of an entry specified by key in the current group.
- Parameters:
-
key The key to search for. aDefault A default value returned if the key was not found.
- Returns:
- The value for this key. Can be QString() if aDefault is null.
Definition at line 739 of file kconfiggroup.cpp.
Definition at line 762 of file kconfiggroup.cpp.
Reads the value of an entry specified by key in the current group.
If you want to read a path, please use readPathEntry().
- Parameters:
-
key The key to search for. aDefault A default value returned if the key was not found.
- Returns:
- The value for this key. Can be QString() if aDefault is null.
Definition at line 744 of file kconfiggroup.cpp.
Definition at line 783 of file kconfiggroup.cpp.
Reads the value of an entry specified by key in the current group.
- Parameters:
-
key The key to search for. aDefault A default value returned if the key was not found.
- Returns:
- The value for this key. Can be QVariant() if aDefault is null.
Definition at line 798 of file kconfiggroup.cpp.
| T KConfigGroup::readEntry | ( | const char * | key, | |
| const T & | aDefault | |||
| ) | const [inline] |
Definition at line 199 of file kconfiggroup.h.
| T KConfigGroup::readEntry | ( | const QString & | key, | |
| const T & | aDefault | |||
| ) | const [inline] |
Reads the value of an entry specified by pKey in the current group.
This template method makes it possible to write QString foo = readEntry("...", QString("default")); and the same with all other types supported by QVariant. The return type of the method is simply the same as the type of the default value.
- Note:
- readEntry("...", Qt::white) cannot compile because Qt::white is an enum. You must turn it into readEntry("...", QColor(Qt::white)).
Only the following QVariant types are allowed : String, StringList, List, Font, Point, Rect, Size, Color, Int, UInt, Bool, Double, LongLong, ULongLong, DateTime and Date.
- Parameters:
-
pKey The key to search for. aDefault A default value returned if the key was not found.
- Returns:
- The value for this key, or
aDefault.
Definition at line 196 of file kconfiggroup.h.
| QString KConfigGroup::readEntryUntranslated | ( | const char * | key, | |
| const QString & | aDefault = QString() | |||
| ) | const |
Definition at line 724 of file kconfiggroup.cpp.
| QString KConfigGroup::readEntryUntranslated | ( | const QString & | pKey, | |
| const QString & | aDefault = QString() | |||
| ) | const |
Reads the value of an entry specified by pKey in the current group.
The untranslated entry is returned, you normally do not need this.
- Parameters:
-
pKey The key to search for. aDefault A default value returned if the key was not found.
- Returns:
- The value for this key.
Definition at line 719 of file kconfiggroup.cpp.
| QStringList KConfigGroup::readPathEntry | ( | const char * | key, | |
| const QStringList & | aDefault | |||
| ) | const |
Definition at line 887 of file kconfiggroup.cpp.
| QStringList KConfigGroup::readPathEntry | ( | const QString & | pKey, | |
| const QStringList & | aDefault | |||
| ) | const |
Reads a list of string paths.
Read the value of an entry specified by pKey in the current group and interpret it as a list of paths. This means, dollar expansion is activated for this value, so that e.g. $HOME gets expanded.
- Parameters:
-
pKey The key to search for. aDefault A default value returned if the key was not found.
- Returns:
- The list. Empty if the entry does not exist.
Definition at line 882 of file kconfiggroup.cpp.
Definition at line 868 of file kconfiggroup.cpp.
Reads a path.
Read the value of an entry specified by pKey in the current group and interpret it as a path. This means, dollar expansion is activated for this value, so that e.g. $HOME gets expanded.
- Parameters:
-
pKey The key to search for. aDefault A default value returned if the key was not found.
- Returns:
- The value for this key. Can be QString() if
aDefaultis null.
Definition at line 863 of file kconfiggroup.cpp.
| QStringList KConfigGroup::readXdgListEntry | ( | const char * | pKey, | |
| const QStringList & | aDefault = QStringList() | |||
| ) | const |
Definition at line 828 of file kconfiggroup.cpp.
| QStringList KConfigGroup::readXdgListEntry | ( | const QString & | pKey, | |
| const QStringList & | aDefault = QStringList() | |||
| ) | const |
Reads a list of strings from the config object, following XDG desktop entry spec separator semantics.
- Parameters:
-
pKey The key to search for. aDefault The default value to use if the key does not exist.
- Returns:
- The list. Contains
aDefaultifpKeydoes not exist.
Definition at line 823 of file kconfiggroup.cpp.
| void KConfigGroup::reparent | ( | KConfigBase * | parent, | |
| WriteConfigFlags | pFlags = Normal | |||
| ) |
Changes the group that this group belongs to.
- Parameters:
-
parent the config object to place this group under. If parentis a KConfig it will be promoted to a top-level group.
- Since:
- 4.1
Definition at line 1320 of file kconfiggroup.cpp.
| void KConfigGroup::revertToDefault | ( | const char * | key | ) |
Definition at line 1199 of file kconfiggroup.cpp.
| void KConfigGroup::revertToDefault | ( | const QString & | key | ) |
Reverts the entry with key key in the current group in the application specific config file to either the system wide (default) value or the value specified in the global KDE config file.
To revert entries in the global KDE config file, the global KDE config file should be opened explicitly in a separate config object.
- Parameters:
-
key The key of the entry to revert.
Definition at line 1210 of file kconfiggroup.cpp.
| void KConfigGroup::sync | ( | ) | [virtual] |
- Reimplemented from superclass.
Implements KConfigBase.
Definition at line 677 of file kconfiggroup.cpp.
| void KConfigGroup::writeEntry | ( | const char * | key, | |
| const QList< T > & | value, | |||
| WriteConfigFlags | pFlags = Normal | |||
| ) | [inline] |
Definition at line 422 of file kconfiggroup.h.
| void KConfigGroup::writeEntry | ( | const QString & | key, | |
| const QList< T > & | value, | |||
| WriteConfigFlags | pFlags = Normal | |||
| ) | [inline] |
Writes a list to the config object.
- Parameters:
-
key The key to write value The list to write pFlags The flags to use when writing this entry.
Definition at line 418 of file kconfiggroup.h.
| void KConfigGroup::writeEntry | ( | const char * | key, | |
| const QVariantList & | value, | |||
| WriteConfigFlags | pFlags = Normal | |||
| ) |
Definition at line 957 of file kconfiggroup.cpp.
| void KConfigGroup::writeEntry | ( | const QString & | key, | |
| const QVariantList & | value, | |||
| WriteConfigFlags | pFlags = Normal | |||
| ) |
writeEntry() overridden to accept a list of QVariant values.
- Parameters:
-
key The key to write value The list to write pFlags The flags to use when writing this entry.
- See also:
- writeEntry()
Definition at line 1124 of file kconfiggroup.cpp.
| void KConfigGroup::writeEntry | ( | const char * | key, | |
| const QStringList & | value, | |||
| WriteConfigFlags | pFlags = Normal | |||
| ) |
Definition at line 939 of file kconfiggroup.cpp.
| void KConfigGroup::writeEntry | ( | const QString & | key, | |
| const QStringList & | value, | |||
| WriteConfigFlags | pFlags = Normal | |||
| ) |
writeEntry() overridden to accept a list of strings.
- Parameters:
-
key The key to write value The list to write pFlags The flags to use when writing this entry.
- See also:
- writeEntry()
Definition at line 952 of file kconfiggroup.cpp.
| void KConfigGroup::writeEntry | ( | const QString & | key, | |
| const T & | value, | |||
| WriteConfigFlags | pFlags = Normal | |||
| ) | [inline] |
Definition at line 377 of file kconfiggroup.h.
| void KConfigGroup::writeEntry | ( | const char * | key, | |
| const T & | value, | |||
| WriteConfigFlags | pFlags = Normal | |||
| ) | [inline] |
Writes a value to the config object.
- Parameters:
-
key The key to write value The value to write pFlags The flags to use when writing this entry.
Definition at line 373 of file kconfiggroup.h.
| void KConfigGroup::writeEntry | ( | const char * | key, | |
| const char * | value, | |||
| WriteConfigFlags | pFlags = Normal | |||
| ) |
Definition at line 919 of file kconfiggroup.cpp.
| void KConfigGroup::writeEntry | ( | const QString & | key, | |
| const char * | value, | |||
| WriteConfigFlags | pFlags = Normal | |||
| ) |
Writes a value to the config object.
- Parameters:
-
key The key to write value The value to write pFlags The flags to use when writing this entry.
Definition at line 911 of file kconfiggroup.cpp.
| void KConfigGroup::writeEntry | ( | const char * | key, | |
| const QByteArray & | value, | |||
| WriteConfigFlags | pFlags = Normal | |||
| ) |
Definition at line 924 of file kconfiggroup.cpp.
| void KConfigGroup::writeEntry | ( | const QString & | key, | |
| const QByteArray & | value, | |||
| WriteConfigFlags | pFlags = Normal | |||
| ) |
Writes a value to the config object.
- Parameters:
-
key The key to write value The value to write pFlags The flags to use when writing this entry.
Definition at line 933 of file kconfiggroup.cpp.
| void KConfigGroup::writeEntry | ( | const char * | key, | |
| const QString & | value, | |||
| WriteConfigFlags | pFlags = Normal | |||
| ) |
Definition at line 898 of file kconfiggroup.cpp.
| void KConfigGroup::writeEntry | ( | const QString & | key, | |
| const QString & | value, | |||
| WriteConfigFlags | pFlags = Normal | |||
| ) |
Writes a value to the config object.
- Parameters:
-
key The key to write value The value to write pFlags The flags to use when writing this entry.
Definition at line 906 of file kconfiggroup.cpp.
| void KConfigGroup::writeEntry | ( | const char * | key, | |
| const QVariant & | value, | |||
| WriteConfigFlags | pFlags = Normal | |||
| ) |
Definition at line 974 of file kconfiggroup.cpp.
| void KConfigGroup::writeEntry | ( | const QString & | key, | |
| const QVariant & | value, | |||
| WriteConfigFlags | pFlags = Normal | |||
| ) |
Writes a value to the config object.
- Parameters:
-
key The key to write value The value to write pFlags The flags to use when writing this entry.
Definition at line 1119 of file kconfiggroup.cpp.
| void KConfigGroup::writePathEntry | ( | const char * | pKey, | |
| const QStringList & | value, | |||
| WriteConfigFlags | pFlags = Normal | |||
| ) |
Definition at line 1174 of file kconfiggroup.cpp.
| void KConfigGroup::writePathEntry | ( | const QString & | pKey, | |
| const QStringList & | value, | |||
| WriteConfigFlags | pFlags = Normal | |||
| ) |
writePathEntry() overridden to accept a list of paths (strings).
It is checked whether the paths are located under $HOME. If so each of the paths are written out with the user's home-directory replaced with $HOME. The paths should be read back with readPathEntry()
- Parameters:
-
pKey The key to write value The list to write pFlags The flags to use when writing this entry.
- See also:
- readPathEntry()
Definition at line 1169 of file kconfiggroup.cpp.
| void KConfigGroup::writePathEntry | ( | const char * | pKey, | |
| const QString & | path, | |||
| WriteConfigFlags | pFlags = Normal | |||
| ) |
Definition at line 1161 of file kconfiggroup.cpp.
| void KConfigGroup::writePathEntry | ( | const QString & | pKey, | |
| const QString & | path, | |||
| WriteConfigFlags | pFlags = Normal | |||
| ) |
Writes a file path.
It is checked whether the path is located under $HOME. If so the path is written out with the user's home-directory replaced with $HOME. The path should be read back with readPathEntry()
- Parameters:
-
pKey The key to write. path The path to write. pFlags The flags to use when writing this entry.
Definition at line 1156 of file kconfiggroup.cpp.
| void KConfigGroup::writeXdgListEntry | ( | const char * | pKey, | |
| const QStringList & | value, | |||
| WriteConfigFlags | pFlags = Normal | |||
| ) |
Definition at line 1134 of file kconfiggroup.cpp.
| void KConfigGroup::writeXdgListEntry | ( | const QString & | pKey, | |
| const QStringList & | value, | |||
| WriteConfigFlags | pFlags = Normal | |||
| ) |
Writes a list of strings to the config object, following XDG desktop entry spec separator semantics.
- Parameters:
-
pKey The key to write value The list to write pFlags The flags to use when writing this entry.
- See also:
- writeEntry()
Definition at line 1129 of file kconfiggroup.cpp.
The documentation for this class was generated from the following files:
KDE 4.1 API Reference