KSimpleConfig Class Reference

[kdecore Index] [kdecore Hierarchy] [Headers]


KDE Configuration Management class More...

#include <ksimpleconfig.h>

Inherits: KConfigBase

Public Members

Protected Members

Private Members


Detailed Description

KDE Configuration entries

This is a trivial implementation of KConfigBase for applications that need only one configuration file and no default system.

See Also: KApplication


KSimpleConfig( const char* pFile ) [public]

Construct a read-write KSimpleConfig object.

Parameters:
pfile The file used for saving the config data.

KSimpleConfig( const char* pFile, bool bReadOnly ) [public]

Construct a KSimpleConfig object and make it either read-write or read-only.

Parameters:
pFile The file uses for saving the config data. bReadOnly Whether the object should be read-only.

~KSimpleConfig() [public virtual]

Destructor.

Writes back any dirty configuration entries.

bool isReadOnly() const [public]

Returns true if the object is read-only

void sync() [public virtual]

Write back the cache.

bool writeConfigFile( QFile& rFile, bool bGlobal = false ) [public]

Write back the configuration data.

const QString deleteEntry( const char* pKey, bool bLocalized ) [public]

Delete a configuration entry.

Parameters:
bLocalized Whether the localized or the non-localized key should be deleted
pKey The key of the entry to delete
Returns:
The old value of that key.

bool deleteGroup( const char* pGroup, bool bDeep = true ) [public]

Delete a configuration entry group

If the group is not empty and bDeep is false, nothing gets deleted and false is returned. If this group is the current group and it is deleted, the current group is undefined and should be set with setGroup() before the next operation on the configuration object.

Parameters:
bDeep Whether non-empty groups should be completely deleted (including their entries)
pGroup The name of the group
Returns:
If the group does not exist or is not empty and bDeep is false, deleteGroup returns false.

void parseConfigFiles() [protected virtual]

Open all appropriate configuration files and pass them on toparseOneConfigFile()


  • Author: Kalle Dalheimer (kalle@kde.org)
  • Version: $Id: ksimpleconfig.h,v 1.6 1998/01/18 14:39:02 kulow Exp $
  • Documentation generated by root@darkstar.lst.de on Wed Sep 8 17:38:18 CEST 1999
Kdoc