class KSimpleConfig

KDE Configuration Management class with deletion ability. More...

Definition#include <ksimpleconfig.h>
InheritsKConfig [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


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:
pFileNameThe 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.
bReadOnlyWhether 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:
pKeyThe key of the entry to delete
bLocalizedWhether 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:
pGroupThe name of the group
bDeepSpecify 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.