class KConfigBackEnd

# class KConfigBackEnd | KDE Configuration file loading/saving abstract base class. More...
Contains pure virtuals
Definition | `#include <kconfigbackend.h>`
Inherited by | KConfigINIBackEnd
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- KConfigBackEnd (KConfigBase *_config, const QString &_fileName, const char * _resType, bool _useKDEGlobals)
- virtual ~KConfigBackEnd ()
- virtual bool parseConfigFiles ()
- virtual void sync (bool bMerge = true)
- void changeFileName (const QString &_fileName, const char * _resType, bool _useKDEGlobals)
- virtual KConfigBase::ConfigState getConfigState () const
- QString fileName () const
- const char * resource () const
- void setLocaleString (const QCString &_localeString)
- void setFileWriteMode (int mode)

#### Protected Methods

- virtual void virtual_hook ( int id, void* data )

#### Protected Members

- KConfigBase *pConfig
- QString mfileName
- QCString resType
- bool useKDEGlobals
- bool bFileImmutable
- QCString localeString
- QString mLocalFileName
- QString mGlobalFileName
- KConfigBase::ConfigState mConfigState
- int mFileMode

## Detailed Description

Abstract base class for KDE configuration file loading/saving.

This class forms the base for all classes that implement some manner of loading/saving to configuration files. It is an abstract base class, meaning that you cannot directly instantiate objects of this class. As of right now, the only back end available is one to read/write to INI-style files, but in the future, other formats may be available, such as XML or a database.

KConfigBackEnd (KConfigBase *_config, const QString &_fileName, const char * _resType, bool _useKDEGlobals) | ### KConfigBackEnd

Constructs a configuration back end.

Parameters:

_config | Specifies the configuration object which values will be passed to as they are read, or from where values to be written to will be obtained from.
_fileName | The name of the file in which config data is stored. All registered configuration directories will be looked in in order of decreasing relevance.
_resType | the resource type of the fileName specified, _if_ it is not an absolute path (otherwise this parameter is ignored).
_useKDEGlobals | If true, the user's system-wide kdeglobals file will be imported into the config object. If false, only the filename specified will be dealt with.

~KConfigBackEnd () | ### ~KConfigBackEnd

[virtual]

Destructs the configuration backend.

bool parseConfigFiles () | ### parseConfigFiles

[pure virtual]

Parses all configuration files for a configuration object. This method must be reimplemented by the derived classes.

Returns: Whether or not parsing was successful.

void sync (bool bMerge = true) | ### sync

[pure virtual]

Writes configuration data to file(s). This method must be reimplemented by the derived classes.

Parameters:

bMerge | Specifies whether the old config file already on disk should be merged in with the data in memory. If true, data is read off the disk and merged. If false, the on-disk file is removed and only in-memory data is written out.

void changeFileName (const QString &_fileName, const char * _resType, bool _useKDEGlobals) | ### changeFileName

Changes the filenames associated with this back end. You should probably reparse your config info after doing this.

Parameters:

_fileName | the new filename to use
_resType | the resource type of the fileName specified, _if_ it is not an absolute path (otherwise this parameter is ignored).
_useKDEGlobals | specifies whether or not to also parse the global KDE configuration files.

KConfigBase::ConfigState getConfigState () | ### getConfigState

[const virtual]

Returns the state of the app-config object.

See also: KConfig::getConfigState

QString fileName () | ### fileName

[const]

Returns the filename as passed to the constructor.

Returns: the filename as passed to the constructor.

const char * resource () | ### resource

[const]

Returns the resource type as passed to the constructor.

Returns: the resource type as passed to the constructor.

void setLocaleString (const QCString &_localeString) | ### setLocaleString

Set the locale string that defines the current language.

Parameters:

_localeString | the identifier of the language

See also: KLocale

void setFileWriteMode (int mode) | ### setFileWriteMode

Set the file mode for newly created files.

Parameters:

mode | the filemode (as in chmod)

KConfigBase * pConfig | ### pConfig

[protected]

QString mfileName | ### mfileName

[protected]

QCString resType | ### resType

[protected]

bool useKDEGlobals | ### useKDEGlobals

[protected]

bool bFileImmutable | ### bFileImmutable

[protected]

QCString localeString | ### localeString

[protected]

QString mLocalFileName | ### mLocalFileName

[protected]

QString mGlobalFileName | ### mGlobalFileName

[protected]

KConfigBase::ConfigState mConfigState | ### mConfigState

[protected]

int mFileMode | ### mFileMode

[protected]

void virtual_hook ( int id, void* data ) | ### virtual_hook

[protected virtual]

- Version: $Id: kconfigbackend.h,v 1.22 2002/09/17 21:24:43 tjansen Exp $
- Author: Preston Brown , Matthias Kalle Dalheimer
- Generated: root on macppc.ports.openbsd.org on Sat Sep 6 10:36:15 2003, using kdoc 2.0a54.