class KCoreConfigSkeleton |
|
|
Constructor.
configname - name of config file. If no name is given, the default config file as returned by KGlobal.config() is used. |
|
Constructor.
config - configuration object to use. |
|
Register a custom KConfigSkeletonItem with a given name. If the name parameter is null, take the name from KConfigSkeletonItem.key(). Note that all names must be unique but that multiple entries can have the same key if they reside in different groups. |
|
Register an item of type bool.
name - Name used to identify this setting. Names must be unique. reference - Pointer to the variable, which is set by readConfig() calls and read by writeConfig() calls. defaultValue - Default value, which is used when the config file does not yet contain the key of this item. key - Key used in config file. If key is null, name is used as key. Returns The created item |
|
Register an item of type QDateTime.
name - Name used to identify this setting. Names must be unique. reference - Pointer to the variable, which is set by readConfig() calls and read by writeConfig() calls. defaultValue - Default value, which is used when the config file does not yet contain the key of this item. key - Key used in config file. If key is null, name is used as key. Returns The created item |
|
Register an item of type double.
name - Name used to identify this setting. Names must be unique. reference - Pointer to the variable, which is set by readConfig() calls and read by writeConfig() calls. defaultValue - Default value, which is used when the config file does not yet contain the key of this item. key - Key used in config file. If key is null, name is used as key. Returns The created item |
|
Register an item of type qint32.
name - Name used to identify this setting. Names must be unique. reference - Pointer to the variable, which is set by readConfig() calls and read by writeConfig() calls. defaultValue - Default value, which is used when the config file does not yet contain the key of this item. key - Key used in config file. If key is null, name is used as key. Returns The created item |
|
|
Register an item of type QList name - Name used to identify this setting. Names must be unique. reference - Pointer to the variable, which is set by readConfig() calls and read by writeConfig() calls. defaultValue - Default value, which is used when the config file does not yet contain the key of this item. key - Key used in config file. If key is null, name is used as key. Returns The created item |
|
Register an item of type qint64.
name - Name used to identify this setting. Names must be unique. reference - Pointer to the variable, which is set by readConfig() calls and read by writeConfig() calls. defaultValue - Default value, which is used when the config file does not yet contain the key of this item. key - Key used in config file. If key is null, name is used as key. Returns The created item |
|
Register a password item of type QString. The string value is written
encrypted to the config file. Note that the current encryption scheme
is very weak.
name - Name used to identify this setting. Names must be unique. reference - Pointer to the variable, which is set by readConfig() calls and read by writeConfig() calls. defaultValue - Default value, which is used when the config file does not yet contain the key of this item. key - Key used in config file. If key is null, name is used as key. Returns The created item |
|
Register a path item of type QString. The string value is interpreted
as a path. This means, dollar expension is activated for this value, so
that e.g. $HOME gets expanded.
name - Name used to identify this setting. Names must be unique. reference - Pointer to the variable, which is set by readConfig() calls and read by writeConfig() calls. defaultValue - Default value, which is used when the config file does not yet contain the key of this item. key - Key used in config file. If key is null, name is used as key. Returns The created item |
|
Register an item of type QPoint.
name - Name used to identify this setting. Names must be unique. reference - Pointer to the variable, which is set by readConfig() calls and read by writeConfig() calls. defaultValue - Default value, which is used when the config file does not yet contain the key of this item. key - Key used in config file. If key is null, name is used as key. Returns The created item |
|
Register a property item of type QVariant. Note that only the following
QVariant types are allowed: String, StringList, Font, Point, Rect, Size,
Color, Int, UInt, Bool, Double, DateTime and Date.
name - Name used to identify this setting. Names must be unique. reference - Pointer to the variable, which is set by readConfig() calls and read by writeConfig() calls. defaultValue - Default value, which is used when the config file does not yet contain the key of this item. key - Key used in config file. If key is null, name is used as key. Returns The created item |
|
Register an item of type QRect.
name - Name used to identify this setting. Names must be unique. reference - Pointer to the variable, which is set by readConfig() calls and read by writeConfig() calls. defaultValue - Default value, which is used when the config file does not yet contain the key of this item. key - Key used in config file. If key is null, name is used as key. Returns The created item |
|
Register an item of type QSize.
name - Name used to identify this setting. Names must be unique. reference - Pointer to the variable, which is set by readConfig() calls and read by writeConfig() calls. defaultValue - Default value, which is used when the config file does not yet contain the key of this item. key - Key used in config file. If key is null, name is used as key. Returns The created item |
|
Register an item of type QString.
name - Name used to identify this setting. Names must be unique. reference - Pointer to the variable, which is set by readConfig() calls and read by writeConfig() calls. defaultValue - Default value, which is used when the config file does not yet contain the key of this item. key - Key used in config file. If key is null, name is used as key. Returns The created item |
|
Register an item of type QStringList.
name - Name used to identify this setting. Names must be unique. reference - Pointer to the variable, which is set by readConfig() calls and read by writeConfig() calls. defaultValue - Default value, which is used when the config file does not yet contain the key of this item. key - Key used in config file. If key is null, name is used as key. Returns The created item |
|
Register an item of type quint32.
name - Name used to identify this setting. Names must be unique. reference - Pointer to the variable, which is set by readConfig() calls and read by writeConfig() calls. defaultValue - Default value, which is used when the config file does not yet contain the key of this item. key - Key used in config file. If key is null, name is used as key. Returns The created item |
|
|
Register an item of type quint64
name - Name used to identify this setting. Names must be unique. reference - Pointer to the variable, which is set by readConfig() calls and read by writeConfig() calls. defaultValue - Default value, which is used when the config file does not yet contain the key of this item. key - Key used in config file. If key is null, name is used as key. Returns The created item |
|
Return the KConfig object used for reading and writing the settings. |
|
Return the KConfig object used for reading and writing the settings. |
|
This signal is emitted when the configuration change. |
|
Returns the current group used for addItem() calls. |
|
Lookup item by name |
|
Return whether a certain item is immutable |
|
Return list of items managed by this KCoreConfigSkeleton object. |
|
Read preferences from config file. All registered items are set to the values read from disk. This method calls usrReadConfig() after reading the settings of the registered items from the KConfig. You can overridde usrReadConfig() in derived classes if you have special requirements. If you need more fine-grained control of storing the settings from the registered items you can override readConfig() in a derived class. |
|
Set the config file group for subsequent addItem() calls. It is valid until setCurrentGroup() is called with a new argument. Call this before you add any items. The default value is "No Group". |
|
Set all registered items to their default values. This method calls usrSetDefaults() after setting the defaults for the registered items. You can overridde usrSetDefaults() in derived classes if you have special requirements. If you need more fine-grained control of setting the default values of the registered items you can override setDefaults() in a derived class. |
|
Set the KSharedConfig object used for reading and writing the settings. |
|
Specify whether this object should reflect the actual values or the
default values.
This method is implemented by usrUseDefaults(), which can be overridden
in derived classes if you have special requirements and can call
usrUseDefaults() directly.
If you don't have control wether useDefaults() or usrUseDefaults() is
called override useDefaults() directly.
b - true to make this object reflect the default values, false to make it reflect the actual values. Returns The state prior to this call |
|
Perform the actual reading of the configuration file. Override in derived classes to read special config values. Called from readConfig() |
|
Perform the actual setting of default values. Override in derived classes to set special default values. Called from setDefaults() |
|
Implemented by subclasses that use special defaults.
It replaces the default values with the actual values and
vice versa. Called from useDefaults()
b - true to make this object reflect the default values, false to make it reflect the actual values. Returns The state prior to this call |
|
Perform the actual writing of the configuration file. Override in derived classes to write special config values. Called from writeConfig() |
|
Write preferences to config file. The values of all registered items are written to disk. This method calls usrWriteConfig() after writing the settings from the registered items to the KConfig. You can overridde usrWriteConfig() in derived classes if you have special requirements. If you need more fine-grained control of storing the settings from the registered items you can override writeConfig() in a derived class. |