class KConfigGroup |
|
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. |
|
Constructs a null group. A null group is invalid.
See also isValid |
|
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. |
|
|
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. |
|
|
|
|
|
|
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. |
|
|
Return the config object that this group belongs to. |
|
|
Deletes the entry specified by pKey in the current group.
This also hides system wide defaults.
pKey - The key to delete. pFlags - The flags to use when deleting this entry. |
|
|
Delete all entries in the entire group
pFlags - flags passed to KConfig.deleteGroup |
|
|
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. |
|
Check whether the containing KConfig object acutally contains a group with this name. |
|
|
|
|
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. key - The key of the entry to check. |
|
|
|
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).
key - The key to search for. Returns If true, the key is available. |
|
|
Checks whether it is possible to change the given entry.
key - the key to check Returns whether the entry key may be changed in the current group in this configuration file. |
|
|
|
Checks whether it is possible to change the given group. Returns whether changes may be made to this group. |
|
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. |
|
Returns a list of keys this group contains. |
|
|
The name of this group.
The root group is named " |
|
Reads the value of an entry specified by key in the current group.
key - The key to search for. aDefault - A default value returned if the key was not found. Returns The value for this key. The return value will always have the same QVariant.Type as aDefault. This implies that the only possible return value for aDefault == QVariant() is QVariant(). |
|
|
Reads the value of an entry specified by key in the current group.
If you want to read a path, please use readPathEntry().
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. |
|
|
Reads the value of an entry specified by key in the current group.
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. |
|
|
Reads a list from the config object.
readEntry(const char*, const QList
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 |
|
|
Reads a list of strings from the config object.
key - The key to search for. aDefault - The default value to use if the key does not exist. Returns The list. Contains aDefault if key does not exist. |
|
|
Reads the value of an entry specified by pKey in the current group.
The untranslated entry is returned, you normally do not need this.
pKey - The key to search for. aDefault - A default value returned if the key was not found. Returns The value for this key. |
|
|
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. 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 aDefault is null. |
|
|
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. 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. |
|
|
Reads a list of strings from the config object, following XDG
desktop entry spec separator semantics.
pKey - The key to search for. aDefault - The default value to use if the key does not exist. Returns The list. Contains aDefault if pKey does not exist. |
|
|
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. key - The key of the entry to revert. |
|
|
|
Writes a value to the config object.
key - The key to write value - The value to write pFlags - The flags to use when writing this entry. |
|
|
Writes a value to the config object.
key - The key to write value - The value to write pFlags - The flags to use when writing this entry. |
|
|
Writes a value to the config object.
key - The key to write value - The value to write pFlags - The flags to use when writing this entry. |
|
|
Writes a value to the config object.
key - The key to write value - The value to write pFlags - The flags to use when writing this entry. |
|
|
writeEntry() overridden to accept a list of strings.
key - The key to write value - The list to write pFlags - The flags to use when writing this entry. See also writeEntry() |
|
|
writeEntry() overridden to accept a list of QVariant values.
key - The key to write value - The list to write pFlags - The flags to use when writing this entry. See also writeEntry() |
|
|
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() pKey - The key to write. path - The path to write. pFlags - The flags to use when writing this entry. |
|
|
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() pKey - The key to write value - The list to write pFlags - The flags to use when writing this entry. See also readPathEntry() |
|
|
Writes a list of strings to the config object, following XDG
desktop entry spec separator semantics.
pKey - The key to write value - The list to write pFlags - The flags to use when writing this entry. See also writeEntry() |
|