# class KConfigSkeletonItem

### abstract

Module | kdecore
Namespace |
Class | KConfigSkeletonItem
Inherits |

\class KConfigSkeletonItem kcoreconfigskeleton.h <KConfigSkeletonItem>

Class for storing a preferences setting Author Cornelius Schumacher

See also KCoreConfigSkeleton

This class represents one preferences setting as used by KCoreConfigSkeleton. Subclasses of KConfigSkeletonItem implement storage functions for a certain type of setting. Normally you don't have to use this class directly. Use the special addItem() functions of KCoreConfigSkeleton instead. If you subclass this class you will have to register instances with the function KCoreConfigSkeleton.addItem().

### methods

- KConfigSkeletonItem (_group, _key)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  _group | QString |
  _key | QString |

  Constructor.

  _group - Config file group.

  _key - Config file key.

- group ( )

  returns QString

  Return config file group.

- isEqual (v)

  returns bool
  pure virtual

  Argument | Type | Default
  --- | --- | ---
  v | QVariant |

  Check whether the item is equal to v.

  Use this function to compare items that use custom types such as KUrl, because QVariant.operator== will not work for those.

  v - QVariant to compare to Returns true if the item is equal to v, false otherwise

- isImmutable ( )

  returns bool

  Return if the entry can be modified.

- key ( )

  returns QString

  Return config file key.

- label ( )

  returns QString

  Return label of item. See setLabel().

- maxValue ( )

  returns QVariant

  Return maximum value of item or invalid if not specified

- minValue ( )

  returns QVariant

  Return minimum value of item or invalid if not specified

- name ( )

  returns QString

  Return internal name of entry.

- property ( )

  returns QVariant
  pure virtual

  Return item as property

- readConfig (a0)

  returns Nothing
  pure virtual

  Argument | Type | Default
  --- | --- | ---
  a0 | KConfig |

  This function is called by KCoreConfigSkeleton to read the value for this setting from a config file.

- readDefault (a0)

  returns Nothing
  pure virtual

  Argument | Type | Default
  --- | --- | ---
  a0 | KConfig |

  Read global default value.

- readImmutability (group)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  group | KConfigGroup |

  sets mIsImmutable to true if mKey in config is immutable

  group - KConfigGroup to check if mKey is immutable in

- setDefault ( )

  returns Nothing
  pure virtual

  Sets the current value to the default value.

- setGroup (_group)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  _group | QString |

  Set config file group.

- setKey (_key)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  _key | QString |

  Set config file key.

- setLabel (l)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  l | QString |

  Set label providing a translated one-line description of the item.

- setName (_name)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  _name | QString |

  Set internal name of entry.

- setProperty (p)

  returns Nothing
  pure virtual

  Argument | Type | Default
  --- | --- | ---
  p | QVariant |

  Set item to p

- setWhatsThis (w)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  w | QString |

  Set WhatsThis description of item.

- swapDefault ( )

  returns Nothing
  pure virtual

  Exchanges the current value with the default value Used by KCoreConfigSkeleton.useDefaults(bool);

- whatsThis ( )

  returns QString

  Return WhatsThis description of item. See setWhatsThis().

- writeConfig (a0)

  returns Nothing
  pure virtual

  Argument | Type | Default
  --- | --- | ---
  a0 | KConfig |

  This function is called by KCoreConfigSkeleton to write the value of this setting to a config file.