class KConfigBackEndabstract class |
|
|
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.
Author Preston Brown |
|
Constructs a configuration back end.
_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. |
|
Changes the filenames associated with this back end. You should probably reparse your config info after doing this.
_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. |
|
Check whether the config files are writable. warnUser - Warn the user if the configuration files are not writable. Returns Indicates that all of the configuration files used are writable. |
|
Gets the extraConfigFiles in the merge stack. |
|
Returns the filename as passed to the constructor. Returns the filename as passed to the constructor. |
|
Returns the state of the app-config object. See also KConfig.getConfigState |
|
Returns a lock file object for the configuration file bGlobal - If true, returns a lock file object for kdeglobals |
|
Parses all configuration files for a configuration object. This method must be reimplemented by the derived classes. Returns Whether or not parsing was successful. |
|
Remove all files from merge stack. This does not include the local file that was specified in the constructor. |
|
Returns the resource type as passed to the constructor. Returns the resource type as passed to the constructor. |
|
Sets the merge stack to the list of files. The stack is last in first out with the top of the stack being the most specific config file. files - A list of extra config files containing the full path of the local config file to remove from the stack. |
|
Set the file mode for newly created files. mode - the filemode (as in chmod) |
|
Set the locale string that defines the current language. _localeString - the identifier of the language See also KLocale |
|
Writes configuration data to file(s). This method must be reimplemented by the derived classes.
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. |