class KConfigGroup |
|
|
A class for one specific group in a KConfig object. |
|
Constructs a null group. A null group is invalid. See also isValid |
|
Construct a config group corresponding to group in master. group is the group name encoded in UTF-8. |
|
This is an overloaded constructor provided for convenience. It behaves essentially like the above function. Construct a config group corresponding to group in master |
|
This is an overloaded constructor provided for convenience. It behaves essentially like the above function. Construct a config group corresponding to group in master group is the group name encoded in UTF-8. |
|
|
|
|
|
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. |
|
|
|
Return the config object behind this group. |
|
Deletes the entry specified by pKey in the current group.
pKey - The key to delete. pFlags - The flags to use when deleting this entry. |
|
Deletes the entry specified by pKey in the current group.
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 KConfigBase.deleteGroup |
|
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. |
|
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. |
|
|
|
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).value 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). Keys with null data are considered nonexistent.
key - The key to search for. Returns If true, the key is available. |
|
|
Checks whether it is possible to change the given group. Returns whether changes may be made to this group in this configuration file. |
|
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. |
|
|
|
Reads the value of an entry specified by pKey in the current group. If you want to read a path, please use readPathEntry().
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 the value of an entry specified by pKey in the current group.
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 the value of an entry specified by pKey in the current group. The value is treated as if it is of the type of the given default value. Only the following QVariant types are allowed : String, StringList, List, Font, Point, Rect, Size, Color, Int, UInt, Bool, Double, LongLong, ULongLong, DateTime and Date.
pKey - The key to search for. aDefault - A default value returned if the key was not found or if the read value cannot be converted to the QVariant.Type. Returns The value for the key or the default value if the key was not found. |
|
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. readEntry("...", Qt.white) cannot compile because Qt.white is an enum. You must turn it into readEntry("...", QColor(Qt.white)).
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. Reads the value of an entry specified by pKey in the current group. readEntry(const char*, const T&) const Reads a list from the config object. This function only works for those types that QVariant can convert from QString. pKey - The key to search for. aDefault - The default value to use if the key does not exist. Returns The list. 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. pKey - The key to search for. aDefault - The default value to use if the key does not exist. sep - The list separator. Returns The list. Contains aDefault if pKey does not exist. |
|
Reads a list of strings, but returns a default if the key did not exist. readEntry(const char*, const QStringList&, char) 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.
pKey - The key to search for. aDefault - A default value returned if the key was not found. Returns The value for this key. |
|
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 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. sep - The list separator (default is ","). Returns The list. Empty if the entry does not exist. |
|
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. sep - The list separator (default is ","). Returns The list. Empty if the entry 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. |
|
|
When set, all readEntry and readXXXEntry calls return the system wide (default) values instead of the user's preference. This is off by default. |
|
|
Writes a key/value pair. This is stored in the most specific config file when destroying the config object or when calling sync(). If you want to write a path, please use writePathEntry().
pKey - The key to write. value - The value to write. pFlags - The flags to use when writing this entry. |
|
writeEntry() Overridden to accept a property.
pKey - The key to write value - The property to write pFlags - The flags to use when writing this entry. See also writeEntry() |
|
writeEntry( const char*, const QString&, WriteConfigFlags ) writeEntry( const char*, const QString&, WriteConfigFlags ) writeEntry() overridden to accept a list of strings.
pKey - The key to write value - The list to write sep - The list separator (default is ","). pFlags - The flags to use when writing this entry. See also writeEntry() |
|
writeEntry() overridden to accept a list of strings.
pKey - The key to write value - The list to write sep - The list separator (default is ","). pFlags - The flags to use when writing this entry. See also writeEntry() |
|
writeEntry() overridden to accept a list.
pKey - 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 variants.
writeEntry(const char*, const QList |
|
Write a (key/value) pair where the value is a const char*. This is stored to the most specific config file when destroying the config object or when calling sync().
pKey - The key to write. value - The value to write; assumed to be in latin1 encoding. pFlags - The flags to use when writing this entry. |
|
Write a (key/value) pair where the value is a QByteArray. This is stored to the most specific config file when destroying the config object or when calling sync().
pKey - The key to write. value - The value to write; assumed to be in latin1 encoding. If it contains the null character between 0 and size()-1, the string will be truncated at the null character.
pFlags - The flags to use when writing this entry. |
|
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. |
|
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 readPathListEntry()
pKey - The key to write value - The list to write sep - The list separator (default is ","). pFlags - The flags to use when writing this entry. See also writePathEntry() See also readPathListEntry() |
|
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 readPathListEntry()
pKey - The key to write value - The list to write sep - The list separator (default is ","). pFlags - The flags to use when writing this entry. See also writePathEntry() See also readPathListEntry() |