.TH "KConfigBackEnd" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdecore Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KConfigBackEnd \- Abstract base class for \fBKDE\fP configuration file loading/saving. \fBKDE\fP Configuration file loading/saving abstract base class.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kconfigbackend.h>\fP
.PP
Inherited by \fBKConfigINIBackEnd\fP.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKConfigBackEnd\fP (\fBKConfigBase\fP *_config, const \fBQString\fP &_fileName, const char *_resType, bool _useKDEGlobals)"
.br
.ti -1c
.RI "virtual \fB~KConfigBackEnd\fP ()"
.br
.ti -1c
.RI "virtual bool \fBparseConfigFiles\fP ()=0"
.br
.ti -1c
.RI "virtual void \fBsync\fP (bool bMerge=true)=0"
.br
.ti -1c
.RI "void \fBchangeFileName\fP (const \fBQString\fP &_fileName, const char *_resType, bool _useKDEGlobals)"
.br
.ti -1c
.RI "virtual \fBKConfigBase::ConfigState\fP \fBgetConfigState\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBfileName\fP () const "
.br
.ti -1c
.RI "const char * \fBresource\fP () const "
.br
.ti -1c
.RI "void \fBsetLocaleString\fP (const \fBQCString\fP &_localeString)"
.br
.ti -1c
.RI "void \fBsetFileWriteMode\fP (int mode)"
.br
.ti -1c
.RI "bool \fBcheckConfigFilesWritable\fP (bool warnUser)"
.br
.ti -1c
.RI "\fBKLockFile::Ptr\fP \fBlockFile\fP (bool bGlobal=false)"
.br
.ti -1c
.RI "KDE_DEPRECATED \fBQString\fP \fBfilename\fP () const "
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "\fBKConfigBase\fP * \fBpConfig\fP"
.br
.ti -1c
.RI "\fBQString\fP \fBmfileName\fP"
.br
.ti -1c
.RI "\fBQCString\fP \fBresType\fP"
.br
.ti -1c
.RI "bool \fBuseKDEGlobals\fP: 1"
.br
.ti -1c
.RI "bool \fBbFileImmutable\fP: 1"
.br
.ti -1c
.RI "\fBQCString\fP \fBlocaleString\fP"
.br
.ti -1c
.RI "\fBQString\fP \fBmLocalFileName\fP"
.br
.ti -1c
.RI "\fBQString\fP \fBmGlobalFileName\fP"
.br
.ti -1c
.RI "\fBKConfigBase::ConfigState\fP \fBmConfigState\fP"
.br
.ti -1c
.RI "int \fBmFileMode\fP"
.br
.ti -1c
.RI "KConfigBackEndPrivate * \fBd\fP"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "class \fBKConfig\fP"
.br
.ti -1c
.RI "class \fBKSharedConfig\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
Abstract base class for \fBKDE\fP configuration file loading/saving. \fBKDE\fP Configuration file loading/saving abstract base class. 

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.
.PP
\fBAuthor:\fP
.RS 4
Preston Brown <pbrown@kde.org>, Matthias Kalle Dalheimer <kalle@kde.org> 
.RE
.PP

.PP
Definition at line 47 of file kconfigbackend.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KConfigBackEnd::KConfigBackEnd (\fBKConfigBase\fP * _config, const \fBQString\fP & _fileName, const char * _resType, bool _useKDEGlobals)"
.PP
Constructs a configuration back end. 
.PP
\fBParameters:\fP
.RS 4
\fI_config\fP 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. 
.br
\fI_fileName\fP The name of the file in which config data is stored. All registered configuration directories will be looked in in order of decreasing relevance. 
.br
\fI_resType\fP the resource type of the fileName specified, _if_ it is not an absolute path (otherwise this parameter is ignored). 
.br
\fI_useKDEGlobals\fP 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. 
.RE
.PP

.PP
Definition at line 276 of file kconfigbackend.cpp.
.PP
References changeFileName().
.SS "KConfigBackEnd::~\fBKConfigBackEnd\fP ()\fC [virtual]\fP"
.PP
Destructs the configuration backend. 
.PP
Definition at line 286 of file kconfigbackend.cpp.
.SH "Member Function Documentation"
.PP 
.SS "virtual bool KConfigBackEnd::parseConfigFiles ()\fC [pure virtual]\fP"
.PP
Parses all configuration files for a configuration object. 
.PP
This method must be reimplemented by the derived classes.
.PP
\fBReturns:\fP
.RS 4
Whether or not parsing was successful. 
.RE
.PP

.PP
Implemented in \fBKConfigINIBackEnd\fP.
.PP
Referenced by KConfigBase::parseConfigFiles().
.SS "virtual void KConfigBackEnd::sync (bool bMerge = \fCtrue\fP)\fC [pure virtual]\fP"
.PP
Writes configuration data to file(s). 
.PP
This method must be reimplemented by the derived classes.
.PP
\fBParameters:\fP
.RS 4
\fIbMerge\fP 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. 
.RE
.PP

.PP
Implemented in \fBKConfigINIBackEnd\fP.
.PP
Referenced by KConfig::reparseConfiguration(), KSimpleConfig::sync(), and KConfigBase::sync().
.SS "void KConfigBackEnd::changeFileName (const \fBQString\fP & _fileName, const char * _resType, bool _useKDEGlobals)"
.PP
Changes the filenames associated with this back end. 
.PP
You should probably reparse your config info after doing this.
.PP
\fBParameters:\fP
.RS 4
\fI_fileName\fP the new filename to use 
.br
\fI_resType\fP the resource type of the fileName specified, _if_ it is not an absolute path (otherwise this parameter is ignored). 
.br
\fI_useKDEGlobals\fP specifies whether or not to also parse the global \fBKDE\fP configuration files. 
.RE
.PP

.PP
Definition at line 223 of file kconfigbackend.cpp.
.PP
References KGlobal::dirs(), QString::fromLatin1(), QString::isEmpty(), and KStandardDirs::saveLocation().
.PP
Referenced by KConfig::copyTo(), KConfigBackEnd(), KDesktopFile::KDesktopFile(), and KSimpleConfig::KSimpleConfig().
.SS "virtual \fBKConfigBase::ConfigState\fP KConfigBackEnd::getConfigState () const\fC [inline, virtual]\fP"
.PP
Returns the state of the app-config object. 
.PP
\fBSee also:\fP
.RS 4
\fBKConfig::getConfigState\fP 
.RE
.PP

.PP
Definition at line 112 of file kconfigbackend.h.
.PP
Referenced by KConfigBase::getConfigState(), and KConfigBase::parseConfigFiles().
.SS "\fBQString\fP KConfigBackEnd::fileName () const\fC [inline]\fP"
.PP
Returns the filename as passed to the constructor. 
.PP
\fBReturns:\fP
.RS 4
the filename as passed to the constructor. 
.RE
.PP

.PP
Definition at line 119 of file kconfigbackend.h.
.PP
Referenced by KDesktopFile::fileName().
.SS "const char* KConfigBackEnd::resource () const\fC [inline]\fP"
.PP
Returns the resource type as passed to the constructor. 
.PP
\fBReturns:\fP
.RS 4
the resource type as passed to the constructor. 
.RE
.PP

.PP
Definition at line 125 of file kconfigbackend.h.
.PP
Referenced by KDesktopFile::resource().
.SS "void KConfigBackEnd::setLocaleString (const \fBQCString\fP & _localeString)\fC [inline]\fP"
.PP
Set the locale string that defines the current language. 
.PP
\fBParameters:\fP
.RS 4
\fI_localeString\fP the identifier of the language 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBKLocale\fP 
.RE
.PP

.PP
Definition at line 132 of file kconfigbackend.h.
.PP
Referenced by KConfigINIBackEnd::parseConfigFiles(), and KConfigBase::setLocale().
.SS "void KConfigBackEnd::setFileWriteMode (int mode)"
.PP
Set the file mode for newly created files. 
.PP
\fBParameters:\fP
.RS 4
\fImode\fP the filemode (as in chmod) 
.RE
.PP

.PP
Definition at line 291 of file kconfigbackend.cpp.
.PP
Referenced by KConfig::setFileWriteMode().
.SS "bool KConfigBackEnd::checkConfigFilesWritable (bool warnUser)"
.PP
Check whether the config files are writable. 
.PP
\fBParameters:\fP
.RS 4
\fIwarnUser\fP Warn the user if the configuration files are not writable. 
.RE
.PP
\fBReturns:\fP
.RS 4
Indicates that all of the configuration files used are writable. 
.RE
.PP
\fBSince:\fP
.RS 4
3.2 
.RE
.PP

.PP
Definition at line 1080 of file kconfigbackend.cpp.
.PP
References QString::arg(), KStandardDirs::findExe(), KInstance::instanceName(), QString::isEmpty(), QString::local8Bit(), and KProcess::start().
.PP
Referenced by KConfigBase::checkConfigFilesWritable().
.SS "\fBKLockFile::Ptr\fP KConfigBackEnd::lockFile (bool bGlobal = \fCfalse\fP)"
.PP
Returns a lock file object for the configuration file. 
.PP
\fBParameters:\fP
.RS 4
\fIbGlobal\fP If true, returns a lock file object for kdeglobals 
.RE
.PP
\fBSince:\fP
.RS 4
3.3 
.RE
.PP

.PP
Definition at line 249 of file kconfigbackend.cpp.
.PP
References QString::isEmpty().
.PP
Referenced by KConfig::lockFile(), and KConfigINIBackEnd::sync().
.SS "KDE_DEPRECATED \fBQString\fP KConfigBackEnd::filename () const\fC [inline]\fP"
.PP
\fBDeprecated\fP
.RS 4
Use
.RE
.PP
\fBSee also:\fP
.RS 4
\fBfileName()\fP instead 
.RE
.PP

.PP
Definition at line 161 of file kconfigbackend.h.

.SH "Author"
.PP 
Generated automatically by Doxygen for kdecore Library from the source code.
