22 #ifndef _KCONFIGBACKEND_H
23 #define _KCONFIGBACKEND_H
25 #include "kconfigdata.h"
26 #include <kconfigbase.h>
27 #include <klockfile.h>
29 #include "kdelibs_export.h"
32 class KConfigBackEndPrivate;
69 const char * _resType,
bool _useKDEGlobals);
93 virtual void sync(
bool bMerge =
true) = 0;
105 void changeFileName(
const TQString &_fileName,
const char * _resType,
106 bool _useKDEGlobals);
114 {
return mConfigState; }
133 void setLocaleString(
const TQCString &_localeString) { localeString = _localeString; }
162 KDE_DEPRECATED TQString
filename()
const {
return mfileName; }
169 bool useKDEGlobals : 1;
170 bool bFileImmutable : 1;
171 TQCString localeString;
172 TQString mLocalFileName;
173 TQString mGlobalFileName;
178 virtual void virtual_hook(
int id,
void* data );
180 class KConfigBackEndPrivate;
181 KConfigBackEndPrivate *d;
211 const char * _resType,
bool _useKDEGlobals =
true)
224 bool parseConfigFiles();
233 virtual void sync(
bool bMerge =
true);
251 void parseSingleConfigFile(TQFile& rFile, KEntryMap *pWriteBackMap = 0L,
252 bool bGlobal =
false,
bool bDefault =
false);
257 void translateKey(
KLocale& locale, TQCString currentGroup, TQCString key);
273 bool writeConfigFile(TQString filename,
bool bGlobal =
false,
bool bMerge =
true);
287 bool getEntryMap(KEntryMap &map,
bool bGlobal, TQFile *mergeFile);
290 void writeEntries(FILE *pStream,
const KEntryMap &aTempMap);
293 virtual void virtual_hook(
int id,
void* data );
295 class KConfigINIBackEndPrivate;
296 KConfigINIBackEndPrivate *not_d;
Abstract base class for KDE configuration file loading/saving.
KDE_DEPRECATED TQString filename() const
const char * resource() const
Returns the resource type as passed to the constructor.
void setLocaleString(const TQCString &_localeString)
Set the locale string that defines the current language.
virtual bool parseConfigFiles()=0
Parses all configuration files for a configuration object.
virtual void sync(bool bMerge=true)=0
Writes configuration data to file(s).
virtual KConfigBase::ConfigState getConfigState() const
Returns the state of the app-config object.
TQString fileName() const
Returns the filename as passed to the constructor.
KDE Configuration Management abstract base class.
bool checkConfigFilesWritable(bool warnUser)
Check whether the config files are writable.
ConfigState
Possible return values for getConfigState().
Class for KDE INI-style configuration file loading/saving.
KConfigINIBackEnd(KConfigBase *_config, const TQString &_fileName, const char *_resType, bool _useKDEGlobals=true)
Constructs an ini-style configuration back end.
virtual ~KConfigINIBackEnd()
Destructs the configuration backend.
Access KDE Configuration entries.
void setFileWriteMode(int mode)
Set the file mode for newly created files.
KLockFile::Ptr lockFile(bool bGlobal=false)
Returns a lock file object for the configuration file or 0 if the backend does not support locking.
KLocale provides support for country specific stuff like the national language.
KConfig variant using shared memory.