kdecore Library API Documentation

KConfigGroup Class Reference

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

#include <kconfigbase.h>

Inheritance diagram for KConfigGroup:

KConfigBase QObject 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)
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 2071 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 1755 of file kconfigbase.cpp.

References KConfigBase::aLocaleString, KConfigBase::backEnd, KConfigBase::bReadOnly, KConfigGroup(), and KConfigBase::readDefaults().

Referenced by KConfigGroup().

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 1742 of file kconfigbase.cpp.

References KConfigBase::aLocaleString, KConfigBase::backEnd, KConfigBase::bReadOnly, KConfigGroup(), and KConfigBase::readDefaults().

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 1768 of file kconfigbase.cpp.

References KConfigBase::aLocaleString, KConfigBase::backEnd, KConfigBase::bReadOnly, KConfigGroup(), and KConfigBase::readDefaults().


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 1781 of file kconfigbase.cpp.

References KConfigBase::deleteGroup(), and deleteGroup().

Referenced by deleteGroup().

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 1786 of file kconfigbase.cpp.

References KConfigBase::setDirty(), and setDirty().

Referenced by 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 1791 of file kconfigbase.cpp.

References KConfigBase::putData(), and putData().

Referenced by 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 1796 of file kconfigbase.cpp.

References KConfigBase::lookupData(), and lookupData().

Referenced by 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 1801 of file kconfigbase.cpp.

References KConfigBase::sync().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdecore Library Version 3.2.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Aug 20 09:48:30 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003