# class KSimpleConfig | KDE Configuration Management class with deletion ability. More...
Definition | `#include <ksimpleconfig.h>`
Inherits | KConfig [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- KSimpleConfig ( const QString &pFileName, bool bReadOnly = false)
- virtual ~KSimpleConfig ()
- QString deleteEntry ( const QString& pKey, bool bLocalized )
- QString deleteEntry ( const char *pKey, bool bLocalized )
- bool deleteGroup ( const QString& pGroup, bool bDeep = true )
- virtual void sync ()

## Detailed Description

KDE Configuration entries

This is a trivial extension of KConfig for applications that need only one configuration file and no default system. It also adds the ability to delete keys and/or groups. Lastly, when the data in memory is written back out by sync(), it is not merged with what is on disk. Whatever is in memory simply replaces what is on disk entirely.

See also: KConfigBase, KConfig

KSimpleConfig ( const QString &pFileName, bool bReadOnly = false) | ### KSimpleConfig

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

Parameters:

pFileName | The file used for saving the config data. Either a full path can be specified or just the filename. If only a flename is specified, the default directory for "config" files is used.
bReadOnly | Whether the object should be read-only.

~KSimpleConfig () | ### ~KSimpleConfig

[virtual]

Destructor.

Writes back any dirty configuration entries.

QString deleteEntry ( const QString& pKey, bool bLocalized ) | ### deleteEntry

Delete a configuration entry.

Parameters:

pKey | The key of the entry to delete
bLocalized | Whether the localized or the non-localized key should be deleted

Returns: The old value of that key.

QString deleteEntry ( const char *pKey, bool bLocalized ) | ### deleteEntry

bool deleteGroup ( const QString& pGroup, bool bDeep = true ) | ### deleteGroup

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:

pGroup | The name of the group
bDeep | Specify whether non-empty groups should be completely deleted (including their entries).

Returns: If the group does not exist or is not empty and bDeep is false, deleteGroup returns false.

void sync () | ### sync

[virtual]

Reimplemented from KConfigBase.

- Version: $Id: ksimpleconfig.h,v 1.20 2000/09/25 03:53:05 waba Exp $
- Author: Kalle Dalheimer <kalle@kde.org>, Preston Brown <pbrown@kde.org>
- Generated: root@i386.ports.openbsd.org on Wed Apr 25 13:58:13 2001, using kdoc 2.0a53.