|
|
KDE Configuration entries
This is a trivial implementation of KConfigBase for applications that need only one configuration file and no default system.
See also: getConfig, KConfigBase, KConfig
void parseConfigFiles () |
Open all appropriate configuration files and pass them on to parseOneConfigFile()
KSimpleConfig ( const char* pFile ) |
Construct a read-write KSimpleConfig object.
Parameters:
pfile | The file used for saving the config data. |
KSimpleConfig ( const char* pFile, bool bReadOnly ) |
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 () |
Destructor.
Writes back any dirty configuration entries.
bool isReadOnly () |
Returns true if the object is read-only
void sync () |
Write back the cache.
bool writeConfigFile ( QFile& rFile, bool bGlobal = false ) |
Write back the configuration data.
const QString deleteEntry ( const char* pKey, bool bLocalized ) |
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.
bool deleteGroup ( const char* pGroup, bool bDeep = true ) |
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 | 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.