# class KConfigBase

### abstract

Module | kdecore
Namespace |
Class | KConfigBase
Inherits |

\class KConfigBase kconfigbase.h <KConfigBase>

### enums

- AccessMode { NoAccess, ReadOnly, ReadWrite }
- WriteConfigFlag { Persistent, Global, Localized, Normal }
  typesafe object: WriteConfigFlags

enum details

### methods

- KConfigBase ( )

  returns ctor

- accessMode ( )

  returns KConfigBase.AccessMode
  pure virtual

  Returns the access mode of the app-config object.

  Possible return values are NoAccess (the application-specific config file could not be opened neither read-write nor read-only), ReadOnly (the application-specific config file is opened read-only, but not read-write) and ReadWrite (the application-specific config file is opened read-write).

  Returns the access mode of the app-config object

- deleteGroup (group, flags)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  group | QByteArray |
  flags | KConfigBase.WriteConfigFlags | KConfigBase.Normal

  Delete aGroup. This marks aGroup as deleted in the config object. This effectively removes any cascaded values from config files earlier in the stack.

- deleteGroup (group, flags)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  group | QString |
  flags | KConfigBase.WriteConfigFlags | KConfigBase.Normal

- deleteGroup (group, flags)

  returns Nothing

  Argument | Type | Default
  --- | --- | ---
  group | char |
  flags | KConfigBase.WriteConfigFlags | KConfigBase.Normal

- deleteGroupImpl (group, flags)

  returns Nothing
  pure virtual

  Argument | Type | Default
  --- | --- | ---
  group | QByteArray |
  flags | KConfigBase.WriteConfigFlags | KConfigBase.Normal

- group (group)

  returns KConfigGroup

  Argument | Type | Default
  --- | --- | ---
  group | QByteArray |

  Returns an object for the named subgroup.

  group - the group to open. Pass a null string on to the KConfig object to obtain a handle on the root group. Returns The list of groups.

- group (group)

  returns KConfigGroup

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

- group (group)

  returns KConfigGroup

  Argument | Type | Default
  --- | --- | ---
  group | char |

- group (group)

  returns KConfigGroup
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  group | QByteArray |

- group (group)

  returns KConfigGroup
  Not implemented

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

- group (group)

  returns KConfigGroup
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  group | char |

- groupImpl (b)

  returns KConfigGroup
  pure virtual

  Argument | Type | Default
  --- | --- | ---
  b | QByteArray |

- groupImpl (b)

  returns KConfigGroup
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  b | QByteArray |

- groupList ( )

  returns QStringList
  pure virtual

  Returns a list of groups that are known about.

  Returns The list of groups.

- hasGroup (group)

  returns bool

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

  Returns true if the specified group is known about.

  group - The group to search for. Returns true if the group exists.

- hasGroup (group)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  group | char |

- hasGroup (group)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  group | QByteArray |

- hasGroupImpl (group)

  returns bool
  pure virtual

  Argument | Type | Default
  --- | --- | ---
  group | QByteArray |

- isGroupImmutable (aGroup)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  aGroup | QByteArray |

  Can changes be made to the entries in aGroup?

  aGroup - The group to check for immutability. Returns false if the entries in aGroup can be modified.

- isGroupImmutable (aGroup)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  aGroup | QString |

- isGroupImmutable (aGroup)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  aGroup | char |

- isGroupImmutableImpl (aGroup)

  returns bool
  pure virtual

  Argument | Type | Default
  --- | --- | ---
  aGroup | QByteArray |

- isImmutable ( )

  returns bool
  pure virtual

  Checks whether this configuration object can be modified. Returns whether changes may be made to this configuration object.

- markAsClean ( )

  returns Nothing
  pure virtual

  Reset the dirty flags of all entries in the entry map, so the values will not be written to disk on a later call to sync().

- sync ( )

  returns Nothing
  pure virtual

  Syncs the configuration object that this group belongs to. Unrelated concurrent changes to the same file are merged and thus not overwritten. Note however, that this object is not automatically updated with those changes.

- virtual_hook (id, data)

  returns Nothing
  Not implemented

  Argument | Type | Default
  --- | --- | ---
  id | int |
  data | void |

  Virtual hook, used to add new "virtual" functions while maintaining binary compatibility. Unused in this class.

### enums - detail

- AccessMode { NoAccess, ReadOnly, ReadWrite }

  Possible return values for accessMode().

  | NoAccess | - | - |
  | ReadOnly | - | - |
  | ReadWrite | - | - |

- WriteConfigFlag { Persistent, Global, Localized, Normal }

  Flags to control write entry

  typesafe object: WriteConfigFlags

Persistent - 0x01 -
Global - 0x02 -
Localized - 0x04 -
Normal - Persistent -