kdecore Library: KConfigGroup Class Reference (kdecore Library)

| # kdecore Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Namespaces | Source Files

# KConfigGroup Class Reference

A KConfigBase derived class for one specific group in a KConfig object. More...

`#include <kconfigbase.h>`

Inheritance diagram for KConfigGroup:

[legend]
Collaboration diagram for KConfigGroup:

[legend]
List of all members.

## Public Member Functions
| KConfigGroup (KConfigBase *master, const QCString &group)
| KConfigGroup (KConfigBase *master, const QString &group)
| KConfigGroup (KConfigBase *master, const char *group)
void | deleteGroup (bool bGlobal=false)
bool | groupIsImmutable () const
virtual void | setDirty (bool b)
virtual void | putData (const KEntryKey &_key, const KEntry &_data, bool _checkGroup=true)
virtual KEntry | lookupData (const KEntryKey &_key) const
virtual void | sync ()
## Protected Member Functions
virtual void | virtual_hook (int id, void *data)

## Detailed Description

A KConfigBase derived class for one specific group in a KConfig object.

Definition at line 2095 of file kconfigbase.h.

## Constructor & Destructor Documentation

KConfigGroup::KConfigGroup | ( | KConfigBase * | master,
|  | const QCString & | group
| ) |

| Construct a config group corresponding to `group` in `master`. `group` is the group name encoded in UTF-8. Definition at line 1777 of file kconfigbase.cpp. References KConfigBase::aLocaleString, KConfigBase::backEnd, KConfigBase::bReadOnly, KConfigBase::readDefaults(), and KConfigBase::setReadDefaults().

KConfigGroup::KConfigGroup | ( | KConfigBase * | master,
|  | const QString & | group
| ) |

| This is an overloaded constructor provided for convenience. It behaves essentially like the above function. Construct a config group corresponding to `group` in `master` Definition at line 1764 of file kconfigbase.cpp. References KConfigBase::aLocaleString, KConfigBase::backEnd, KConfigBase::bReadOnly, KConfigBase::readDefaults(), and KConfigBase::setReadDefaults().

KConfigGroup::KConfigGroup | ( | KConfigBase * | master,
|  | const char * | group
| ) |

| 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. Definition at line 1790 of file kconfigbase.cpp. References KConfigBase::aLocaleString, KConfigBase::backEnd, KConfigBase::bReadOnly, KConfigBase::readDefaults(), and KConfigBase::setReadDefaults().

## Member Function Documentation

void KConfigGroup::deleteGroup | ( | bool | bGlobal = `false` | ) |

  | Delete all entries in the entire group. Parameters:
  | bGlobal | If `bGlobal` is true, the entries are not removed from the application specific config file, but from the global KDE config file.
Definition at line 1803 of file kconfigbase.cpp. References KConfigBase::deleteGroup().

bool KConfigGroup::groupIsImmutable | ( |  | ) | const

| Checks whether it is possible to change this group. Returns: whether changes may be made to this group in this configuration file. Since: 3.4 Definition at line 1808 of file kconfigbase.cpp. References KConfigBase::groupIsImmutable().

void KConfigGroup::setDirty | ( | bool | _bDirty | ) | `[virtual]`

  | Sets the global dirty flag of the config object. Parameters:
  | _bDirty | How to mark the object's dirty status
Reimplemented from KConfigBase. Definition at line 1813 of file kconfigbase.cpp. References KConfigBase::setDirty().

void KConfigGroup::putData | ( | const KEntryKey & | _key,
|  | const KEntry & | _data,
|  | bool | _checkGroup = `true`
| ) | `[virtual]`

  | Inserts a (key/value) pair into the internal storage mechanism of the configuration object. Classes that derive from KConfigBase will need to implement this method in a storage-specific manner. Do not use this function, the implementation / return type are subject to change. Parameters:
  | _key | The key to insert. It contains information both on the group of the key and the key itself. If the key already exists, the old value will be replaced.
  | _data | the KEntry that is to be stored.
  | _checkGroup | When false, assume that the group already exists.
Implements KConfigBase. Definition at line 1818 of file kconfigbase.cpp. References KConfigBase::putData().

KEntry KConfigGroup::lookupData | ( | const KEntryKey & | _key | ) | const`[virtual]`

  | Looks up an entry in the config object's internal structure. Classes that derive from KConfigBase will need to implement this method in a storage-specific manner. Do not use this function, the implementation and return type are subject to change. Parameters:
  | _key | The key to look up It contains information both on the group of the key and the entry's key itself.
Returns: The KEntry value (data) found for the key. `KEntry.aValue` will be the null string if nothing was located. Implements KConfigBase. Definition at line 1823 of file kconfigbase.cpp. References KConfigBase::lookupData().

void KConfigGroup::sync | ( |  | ) | `[virtual]`

| Flushes all changes that currently reside only in memory back to disk / permanent storage. Dirty configuration entries are written to the most specific file available. Asks the back end to flush out all pending writes, and then calls rollback(). No changes are made if the object has `readOnly` status. You should call this from your destructor in derivative classes. See also: rollback(), isReadOnly() Reimplemented from KConfigBase. Definition at line 1828 of file kconfigbase.cpp. References KConfigBase::sync().

The documentation for this class was generated from the following files:

- kconfigbase.h
- kconfigbase.cpp

This file is part of the documentation for kdecore Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:18:30 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003