# class KCoreConfigSkeleton

###

Module | kdecore
Namespace |
Class | KCoreConfigSkeleton
Inherits | QObject

### methods

- KCoreConfigSkeleton (configname, parent)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  configname | QString | QString()
  parent | QObject | 0

  Constructor.

  configname - name of config file. If no name is given, the default config file as returned by KGlobal.config() is used.

- KCoreConfigSkeleton (config, parent)

  returns ctor
  KDE 4.1.0 and later only

  Argument | Type | Default
  --- | --- | ---
  config | KSharedConfig.Ptr |
  parent | QObject | 0

  Constructor.

  config - configuration object to use.

- KCoreConfigSkeleton (a0, a1)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | QString | QString()
  a1 | QObject | 0

- KCoreConfigSkeleton (a0, a1)

  returns ctor
  before KDE 4.1.0 only

  Argument | Type | Default
  --- | --- | ---
  a0 | KSharedConfig.Ptr |
  a1 | QObject | 0

- addItem (a0, name)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  a0 | KConfigSkeletonItem |
  name | QString | QString()

  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.

- addItemBool (name, reference, defaultValue, key)

  returns KCoreConfigSkeleton.ItemBool

  Argument | Type | Default
  --- | --- | ---
  name | QString |
  reference | bool |
  defaultValue | bool | 0
  key | QString | QString()

  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

- addItemDateTime (name, reference, defaultValue, key)

  returns KCoreConfigSkeleton.ItemDateTime

  Argument | Type | Default
  --- | --- | ---
  name | QString |
  reference | QDateTime |
  defaultValue | QDateTime | QDateTime()
  key | QString | QString()

  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

- addItemDouble (name, reference, defaultValue, key)

  returns KCoreConfigSkeleton.ItemDouble

  Argument | Type | Default
  --- | --- | ---
  name | QString |
  reference | double |
  defaultValue | double | 0.0
  key | QString | QString()

  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

- addItemInt (name, reference, defaultValue, key)

  returns KCoreConfigSkeleton.ItemInt

  Argument | Type | Default
  --- | --- | ---
  name | QString |
  reference | qint32 |
  defaultValue | qint32 | 0
  key | QString | QString()

  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

- addItemInt64 (name, reference, defaultValue, key)

  returns KCoreConfigSkeleton.ItemLongLong

  Argument | Type | Default
  --- | --- | ---
  name | QString |
  reference | qint64 |
  defaultValue | qint64 | 0
  key | QString | QString()

- addItemIntList (name, reference, defaultValue, key)

  returns KCoreConfigSkeleton.ItemIntList

  Argument | Type | Default
  --- | --- | ---
  name | QString |
  reference | QList<int> |
  defaultValue | QList<int> | QList<int>()
  key | QString | QString()

  Register an item of type QList<int>.

  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

- addItemLongLong (name, reference, defaultValue, key)

  returns KCoreConfigSkeleton.ItemLongLong

  Argument | Type | Default
  --- | --- | ---
  name | QString |
  reference | qint64 |
  defaultValue | qint64 | 0
  key | QString | QString()

  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

- addItemPassword (name, reference, defaultValue, key)

  returns KCoreConfigSkeleton.ItemPassword

  Argument | Type | Default
  --- | --- | ---
  name | QString |
  reference | QString |
  defaultValue | QString | QLatin1String("")
  key | QString | QString()

  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

- addItemPath (name, reference, defaultValue, key)

  returns KCoreConfigSkeleton.ItemPath

  Argument | Type | Default
  --- | --- | ---
  name | QString |
  reference | QString |
  defaultValue | QString | QLatin1String("")
  key | QString | QString()

  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

- addItemPoint (name, reference, defaultValue, key)

  returns KCoreConfigSkeleton.ItemPoint

  Argument | Type | Default
  --- | --- | ---
  name | QString |
  reference | QPoint |
  defaultValue | QPoint | QPoint()
  key | QString | QString()

  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

- addItemProperty (name, reference, defaultValue, key)

  returns KCoreConfigSkeleton.ItemProperty

  Argument | Type | Default
  --- | --- | ---
  name | QString |
  reference | QVariant |
  defaultValue | QVariant | QVariant()
  key | QString | QString()

  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

- addItemRect (name, reference, defaultValue, key)

  returns KCoreConfigSkeleton.ItemRect

  Argument | Type | Default
  --- | --- | ---
  name | QString |
  reference | QRect |
  defaultValue | QRect | QRect()
  key | QString | QString()

  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

- addItemSize (name, reference, defaultValue, key)

  returns KCoreConfigSkeleton.ItemSize

  Argument | Type | Default
  --- | --- | ---
  name | QString |
  reference | QSize |
  defaultValue | QSize | QSize()
  key | QString | QString()

  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

- addItemString (name, reference, defaultValue, key)

  returns KCoreConfigSkeleton.ItemString

  Argument | Type | Default
  --- | --- | ---
  name | QString |
  reference | QString |
  defaultValue | QString | QLatin1String("")
  key | QString | QString()

  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

- addItemStringList (name, reference, defaultValue, key)

  returns KCoreConfigSkeleton.ItemStringList

  Argument | Type | Default
  --- | --- | ---
  name | QString |
  reference | QStringList |
  defaultValue | QStringList | QStringList()
  key | QString | QString()

  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

- addItemUInt (name, reference, defaultValue, key)

  returns KCoreConfigSkeleton.ItemUInt

  Argument | Type | Default
  --- | --- | ---
  name | QString |
  reference | quint32 |
  defaultValue | quint32 | 0
  key | QString | QString()

  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

- addItemUInt64 (name, reference, defaultValue, key)

  returns KCoreConfigSkeleton.ItemULongLong

  Argument | Type | Default
  --- | --- | ---
  name | QString |
  reference | quint64 |
  defaultValue | quint64 | 0
  key | QString | QString()

- addItemULongLong (name, reference, defaultValue, key)

  returns KCoreConfigSkeleton.ItemULongLong

  Argument | Type | Default
  --- | --- | ---
  name | QString |
  reference | quint64 |
  defaultValue | quint64 | 0
  key | QString | QString()

  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

- config ( )

  returns KConfig

  Return the KConfig object used for reading and writing the settings.

- config ( )

  returns KConfig
  Not implemented

  Return the KConfig object used for reading and writing the settings.

- configChanged ( )

  returns Nothing
  SIGNAL ("configChanged ()")

  This signal is emitted when the configuration change.

- currentGroup ( )

  returns QString

  Returns the current group used for addItem() calls.

- findItem (name)

  returns KConfigSkeletonItem

  Argument | Type | Default
  --- | --- | ---
  name | QString |

  Lookup item by name

- isImmutable (name)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  name | QString |

  Return whether a certain item is immutable

- items ( )

  returns KConfigSkeletonItem.List

  Return list of items managed by this KCoreConfigSkeleton object.

- readConfig ( )

  returns Nothing

  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.

- setCurrentGroup (group)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  group | QString |

  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".

- setDefaults ( )

  returns Nothing

  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.

- setSharedConfig (pConfig)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  pConfig | KSharedConfig.Ptr |

  Set the KSharedConfig object used for reading and writing the settings.

- useDefaults (b)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  b | bool |

  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 whether 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

- usrReadConfig ( )

  returns Nothing

  Perform the actual reading of the configuration file. Override in derived classes to read special config values. Called from readConfig()

- usrSetDefaults ( )

  returns Nothing

  Perform the actual setting of default values. Override in derived classes to set special default values. Called from setDefaults()

- usrUseDefaults (b)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  b | bool |

  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

- usrWriteConfig ( )

  returns Nothing

  Perform the actual writing of the configuration file. Override in derived classes to write special config values. Called from writeConfig()

- writeConfig ( )

  returns Nothing

  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.