.TH "KConfigINIBackEnd" 3 "28 Jan 2004" "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
.RI "\fIConstructs an ini-style configuration back end. \fP"
.ti -1c
.RI "virtual \fB~KConfigINIBackEnd\fP ()"
.br
.RI "\fIDestructs the configuration backend. \fP"
.ti -1c
.RI "bool \fBparseConfigFiles\fP ()"
.br
.RI "\fIParses all INI-style configuration files for a config object. \fP"
.ti -1c
.RI "virtual void \fBsync\fP (bool bMerge=true)"
.br
.RI "\fIWrites configuration data to file(s). \fP"
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "void \fBparseSingleConfigFile\fP (\fBQFile\fP &rFile, \fBKEntryMap\fP *pWriteBackMap=0L, bool bGlobal=false, bool bDefault=false)"
.br
.RI "\fIParses one configuration file. \fP"
.ti -1c
.RI "bool \fBwriteConfigFile\fP (\fBQString\fP filename, bool bGlobal=false, bool bMerge=true)"
.br
.RI "\fIWrites configuration file back. \fP"
.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
\fBVersion:\fP
.RS 4
\fBId\fP.RS 4
\fBkconfigbackend.h\fP,v 1.22 2002/09/17 21:24:43 tjansen Exp 
.RE
.PP
.RE
.PP

.PP
Definition at line 174 of file kconfigbackend.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KConfigINIBackEnd::KConfigINIBackEnd (\fBKConfigBase\fP * _config, const \fBQString\fP & _fileName, const char * _resType, bool _useKDEGlobals = true)\fC [inline]\fP"
.PP
Constructs an ini-style configuration back end. \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
Definition at line 193 of file kconfigbackend.h.
.SS "virtual KConfigINIBackEnd::~\fBKConfigINIBackEnd\fP ()\fC [inline, virtual]\fP"
.PP
Destructs the configuration backend. Definition at line 200 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. \fBReturns:\fP
.RS 4
Whether or not parsing was successful. 
.RE
.PP
Implements \fBKConfigBackEnd\fP.
.PP
Definition at line 198 of file kconfigbackend.cpp.
.PP
References QFile::close(), KURL::directory(), KGlobal::dirs(), QString::fromLatin1(), QCString::isEmpty(), QString::isEmpty(), KConfigBase::isReadOnly(), KStandardDirs::isRestrictedResource(), KStandardDirs::makeDir(), QFile::open(), parseSingleConfigFile(), KConfigBackEnd::setLocaleString(), KURL::setPath(), and QString::utf8().
.SS "void KConfigINIBackEnd::sync (bool bMerge = true)\fC [virtual]\fP"
.PP
Writes configuration data to file(s). \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
Implements \fBKConfigBackEnd\fP.
.PP
Definition at line 575 of file kconfigbackend.cpp.
.PP
References KURL::directory(), KConfigBase::isDirty(), QString::isEmpty(), KStandardDirs::makeDir(), KURL::setPath(), and writeConfigFile().
.SS "void KConfigINIBackEnd::parseSingleConfigFile (\fBQFile\fP & rFile, \fBKEntryMap\fP * pWriteBackMap = 0L, bool bGlobal = false, bool bDefault = false)\fC [protected]\fP"
.PP
Parses one configuration file. \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
Definition at line 313 of file kconfigbackend.cpp.
.PP
References KEntryKey::bDefault, KEntry::bDeleted, KEntry::bExpand, KEntry::bGlobal, KEntry::bImmutable, KEntryKey::bLocal, KEntry::bNLS, QFile::handle(), QMap::insert(), KStdAccel::key(), QCString::length(), KConfigBase::lookupData(), KEntry::mValue, QFile::name(), KConfigBase::putData(), QFile::readAll(), and QFile::size().
.PP
Referenced by parseConfigFiles(), and writeConfigFile().
.SS "bool KConfigINIBackEnd::writeConfigFile (\fBQString\fP filename, bool bGlobal = false, bool bMerge = true)\fC [protected]\fP"
.PP
Writes configuration file back. \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
Definition at line 709 of file kconfigbackend.cpp.
.PP
References KEntry::bDirty, QMap::begin(), KEntry::bGlobal, KSaveFile::close(), KStdAction::close(), QFile::close(), QFile::encodeName(), QMap::end(), QMap::find(), KSaveFile::fstream(), KSaveFile::handle(), QMap::insert(), KConfigBase::internalEntryMap(), KConfigBase::isReadOnly(), KStdAction::open(), QFile::open(), parseSingleConfigFile(), QMap::replace(), and KSaveFile::status().
.PP
Referenced by sync().

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