.TH "KConfigINIBackEnd" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdecore Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KConfigINIBackEnd \- Class for \fBKDE\fP INI-style configuration file loading/saving.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kconfigbackend.h>\fP
.PP
Inherits \fBKConfigBackEnd\fP.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKConfigINIBackEnd\fP (\fBKConfigBase\fP *_config, const \fBQString\fP &_fileName, const char *_resType, bool _useKDEGlobals=true)"
.br
.ti -1c
.RI "virtual \fB~KConfigINIBackEnd\fP ()"
.br
.ti -1c
.RI "bool \fBparseConfigFiles\fP ()"
.br
.ti -1c
.RI "virtual void \fBsync\fP (bool bMerge=true)"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "void \fBparseSingleConfigFile\fP (\fBQFile\fP &rFile, KEntryMap *pWriteBackMap=0L, bool bGlobal=false, bool bDefault=false)"
.br
.ti -1c
.RI "bool \fBwriteConfigFile\fP (\fBQString\fP filename, bool bGlobal=false, bool bMerge=true)"
.br
.ti -1c
.RI "bool \fBgetEntryMap\fP (KEntryMap &map, bool bGlobal, \fBQFile\fP *mergeFile)"
.br
.ti -1c
.RI "void \fBwriteEntries\fP (FILE *pStream, const KEntryMap &aTempMap)"
.br
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SH "Detailed Description"
.PP 
Class for \fBKDE\fP INI-style configuration file loading/saving. 

\fBAuthor:\fP
.RS 4
Preston Brown <pbrown@kde.org>, Matthias Kalle Dalheimer <kalle@kde.org> 
.RE
.PP

.PP
Definition at line 190 of file kconfigbackend.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KConfigINIBackEnd::KConfigINIBackEnd (\fBKConfigBase\fP * _config, const \fBQString\fP & _fileName, const char * _resType, bool _useKDEGlobals = \fCtrue\fP)\fC [inline]\fP"
.PP
Constructs an ini-style 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 209 of file kconfigbackend.h.
.SS "virtual KConfigINIBackEnd::~\fBKConfigINIBackEnd\fP ()\fC [inline, virtual]\fP"
.PP
Destructs the configuration backend. 
.PP
Definition at line 216 of file kconfigbackend.h.
.SH "Member Function Documentation"
.PP 
.SS "bool KConfigINIBackEnd::parseConfigFiles ()\fC [virtual]\fP"
.PP
Parses all INI-style configuration files for a config object. 
.PP
\fBReturns:\fP
.RS 4
Whether or not parsing was successful. 
.RE
.PP

.PP
Implements \fBKConfigBackEnd\fP.
.PP
Definition at line 296 of file kconfigbackend.cpp.
.PP
References QFile::close(), QFile::decodeName(), KURL::directory(), KGlobal::dirs(), KStandardDirs::findAllResources(), QString::fromLatin1(), QCString::isEmpty(), QString::isEmpty(), KConfigBase::isReadOnly(), QFileInfo::lastModified(), KStandardDirs::makeDir(), QFile::open(), parseSingleConfigFile(), KConfigBackEnd::setLocaleString(), KURL::setPath(), QFileInfo::size(), and QString::utf8().
.SS "void KConfigINIBackEnd::sync (bool bMerge = \fCtrue\fP)\fC [virtual]\fP"
.PP
Writes configuration data to file(s). 
.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
Implements \fBKConfigBackEnd\fP.
.PP
Definition at line 716 of file kconfigbackend.cpp.
.PP
References KURL::directory(), KConfigBase::isDirty(), QString::isEmpty(), QFileInfo::lastModified(), KConfigBackEnd::lockFile(), KStandardDirs::makeDir(), KURL::setPath(), QFileInfo::size(), and writeConfigFile().
.SS "void KConfigINIBackEnd::parseSingleConfigFile (\fBQFile\fP & rFile, KEntryMap * pWriteBackMap = \fC0L\fP, bool bGlobal = \fCfalse\fP, bool bDefault = \fCfalse\fP)\fC [protected]\fP"
.PP
Parses one configuration file. 
.PP
\fBParameters:\fP
.RS 4
\fIrFile\fP The configuration file to parse 
.br
\fIpWriteBackMap\fP If specified, points to a KEntryMap where the data read from the file should be stored, instead of inserting them directly into the configuration object. Use this area as a 'scratchpad' when you need to know what is on disk but don't want to effect the configuration object. 
.br
\fIbGlobal\fP Specifies whether entries should be marked as belonging to the global \fBKDE\fP configuration file rather than the application-specific \fBKDE\fP configuration file(s). 
.br
\fIbDefault\fP Specifies whether entries should be marked as being default values. 
.RE
.PP

.PP
Definition at line 426 of file kconfigbackend.cpp.
.PP
References KEntryKey::bDefault, KEntry::bDeleted, KEntry::bExpand, KEntry::bGlobal, KEntry::bImmutable, KEntryKey::bLocal, KEntry::bNLS, QCString::length(), KConfigBase::lookupData(), KEntry::mValue, and KConfigBase::putData().
.PP
Referenced by parseConfigFiles().
.SS "bool KConfigINIBackEnd::writeConfigFile (\fBQString\fP filename, bool bGlobal = \fCfalse\fP, bool bMerge = \fCtrue\fP)\fC [protected]\fP"
.PP
Writes configuration file back. 
.PP
\fBParameters:\fP
.RS 4
\fIfilename\fP The name of the file to write. 
.br
\fIbGlobal\fP Specifies whether to write only entries which are marked as belonging to the global \fBKDE\fP config file. If this is false, it skips those entries. 
.br
\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
\fBReturns:\fP
.RS 4
Whether some entries are left to be written to other files. 
.RE
.PP

.PP
Definition at line 960 of file kconfigbackend.cpp.
.PP
References KSaveFile::abort(), KSaveFile::close(), QFile::encodeName(), KSaveFile::fstream(), getEntryMap(), KSaveFile::handle(), KConfigBase::isReadOnly(), KSaveFile::status(), and writeEntries().
.PP
Referenced by sync().
.SS "bool KConfigINIBackEnd::getEntryMap (KEntryMap & map, bool bGlobal, \fBQFile\fP * mergeFile)\fC [protected]\fP"
.PP
Get the entry map. 
.PP
\fBParameters:\fP
.RS 4
\fImap\fP the entries will be stored in this object. 
.br
\fIbGlobal\fP Specifies whether to get only entries which are marked as belonging to the global \fBKDE\fP config file. If this is false, it skips those entries. 
.br
\fImergeFile\fP if not null, the dirty entries for this file will be merged.
.RE
.PP
\fBReturns:\fP
.RS 4
Whether there will be some entries left for writing to other files. 
.RE
.PP

.PP
Definition at line 906 of file kconfigbackend.cpp.
.PP
References KEntry::bDirty, and KEntry::bGlobal.
.PP
Referenced by writeConfigFile().
.SS "void KConfigINIBackEnd::writeEntries (FILE * pStream, const KEntryMap & aTempMap)\fC [protected]\fP"
.PP
Write the entries in \fIaTempMap\fP to the file stream. 
.PP
Definition at line 1063 of file kconfigbackend.cpp.
.PP
Referenced by writeConfigFile().

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