\section{KConfig\-INIBack\-End Class Reference}
\label{classKConfigINIBackEnd}\index{KConfigINIBackEnd@{KConfigINIBackEnd}}
Class for {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} INI-style configuration file loading/saving.  


{\tt \#include $<$kconfigbackend.h$>$}

Inheritance diagram for KConfig\-INIBack\-End:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=70pt]{classKConfigINIBackEnd__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KConfig\-INIBack\-End:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=196pt]{classKConfigINIBackEnd__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KConfig\-INIBack\-End} ({\bf KConfig\-Base} $\ast$\_\-config, const {\bf QString} \&\_\-file\-Name, const char $\ast$\_\-res\-Type, bool \_\-use\-KDEGlobals=true)
\item 
virtual {\bf $\sim$KConfig\-INIBack\-End} ()
\item 
bool {\bf parse\-Config\-Files} ()
\item 
virtual void {\bf sync} (bool b\-Merge=true)
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
void {\bf parse\-Single\-Config\-File} ({\bf QFile} \&r\-File, KEntry\-Map $\ast$p\-Write\-Back\-Map=0L, bool b\-Global=false, bool b\-Default=false)
\item 
bool {\bf write\-Config\-File} ({\bf QString} filename, bool b\-Global=false, bool b\-Merge=true)
\item 
bool {\bf get\-Entry\-Map} (KEntry\-Map \&map, bool b\-Global, {\bf QFile} $\ast$merge\-File)
\item 
void {\bf write\-Entries} (FILE $\ast$p\-Stream, const KEntry\-Map \&a\-Temp\-Map)
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKConfigINIBackEnd_b4}

\end{CompactItemize}


\subsection{Detailed Description}
Class for {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} INI-style configuration file loading/saving. 

\begin{Desc}
\item[Author:]Preston Brown $<${\tt pbrown@kde.org}$>$, Matthias Kalle Dalheimer $<${\tt kalle@kde.org}$>$ \end{Desc}




Definition at line 190 of file kconfigbackend.h.

\subsection{Constructor \& Destructor Documentation}
\index{KConfigINIBackEnd@{KConfig\-INIBack\-End}!KConfigINIBackEnd@{KConfigINIBackEnd}}
\index{KConfigINIBackEnd@{KConfigINIBackEnd}!KConfigINIBackEnd@{KConfig\-INIBack\-End}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KConfig\-INIBack\-End::KConfig\-INIBack\-End ({\bf KConfig\-Base} $\ast$ {\em \_\-config}, const {\bf QString} \& {\em \_\-file\-Name}, const char $\ast$ {\em \_\-res\-Type}, bool {\em \_\-use\-KDEGlobals} = {\tt true})\hspace{0.3cm}{\tt  [inline]}}\label{classKConfigINIBackEnd_a0}


Constructs an ini-style configuration back end. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em \_\-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. \item[{\em \_\-file\-Name}]The name of the file in which config data is stored. All registered configuration directories will be looked in in order of decreasing relevance. \item[{\em \_\-res\-Type}]the resource type of the file\-Name specified, \_\-if\_\- it is not an absolute path (otherwise this parameter is ignored). \item[{\em \_\-use\-KDEGlobals}]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. \end{description}
\end{Desc}


Definition at line 209 of file kconfigbackend.h.\index{KConfigINIBackEnd@{KConfig\-INIBack\-End}!~KConfigINIBackEnd@{$\sim$KConfigINIBackEnd}}
\index{~KConfigINIBackEnd@{$\sim$KConfigINIBackEnd}!KConfigINIBackEnd@{KConfig\-INIBack\-End}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual KConfig\-INIBack\-End::$\sim${\bf KConfig\-INIBack\-End} ()\hspace{0.3cm}{\tt  [inline, virtual]}}\label{classKConfigINIBackEnd_a1}


Destructs the configuration backend. 



Definition at line 216 of file kconfigbackend.h.

\subsection{Member Function Documentation}
\index{KConfigINIBackEnd@{KConfig\-INIBack\-End}!parseConfigFiles@{parseConfigFiles}}
\index{parseConfigFiles@{parseConfigFiles}!KConfigINIBackEnd@{KConfig\-INIBack\-End}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KConfig\-INIBack\-End::parse\-Config\-Files ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKConfigINIBackEnd_a2}


Parses all INI-style configuration files for a config object. 

\begin{Desc}
\item[Returns:]Whether or not parsing was successful. \end{Desc}


Implements {\bf KConfig\-Back\-End} {\rm (p.\,\pageref{classKConfigBackEnd_a2})}.

Definition at line 296 of file kconfigbackend.cpp.

References QFile::close(), QFile::decode\-Name(), KURL::directory(), KGlobal::dirs(), KStandard\-Dirs::find\-All\-Resources(), QString::from\-Latin1(), QCString::is\-Empty(), QString::is\-Empty(), KConfig\-Base::is\-Read\-Only(), QFile\-Info::last\-Modified(), KStandard\-Dirs::make\-Dir(), QFile::open(), parse\-Single\-Config\-File(), KConfig\-Back\-End::set\-Locale\-String(), KURL::set\-Path(), QFile\-Info::size(), and QString::utf8().\index{KConfigINIBackEnd@{KConfig\-INIBack\-End}!sync@{sync}}
\index{sync@{sync}!KConfigINIBackEnd@{KConfig\-INIBack\-End}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KConfig\-INIBack\-End::sync (bool {\em b\-Merge} = {\tt true})\hspace{0.3cm}{\tt  [virtual]}}\label{classKConfigINIBackEnd_a3}


Writes configuration data to file(s). 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em b\-Merge}]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. \end{description}
\end{Desc}


Implements {\bf KConfig\-Back\-End} {\rm (p.\,\pageref{classKConfigBackEnd_a3})}.

Definition at line 716 of file kconfigbackend.cpp.

References KURL::directory(), KConfig\-Base::is\-Dirty(), QString::is\-Empty(), QFile\-Info::last\-Modified(), KConfig\-Back\-End::lock\-File(), KStandard\-Dirs::make\-Dir(), KURL::set\-Path(), QFile\-Info::size(), and write\-Config\-File().\index{KConfigINIBackEnd@{KConfig\-INIBack\-End}!parseSingleConfigFile@{parseSingleConfigFile}}
\index{parseSingleConfigFile@{parseSingleConfigFile}!KConfigINIBackEnd@{KConfig\-INIBack\-End}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KConfig\-INIBack\-End::parse\-Single\-Config\-File ({\bf QFile} \& {\em r\-File}, KEntry\-Map $\ast$ {\em p\-Write\-Back\-Map} = {\tt 0L}, bool {\em b\-Global} = {\tt false}, bool {\em b\-Default} = {\tt false})\hspace{0.3cm}{\tt  [protected]}}\label{classKConfigINIBackEnd_b0}


Parses one configuration file. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em r\-File}]The configuration file to parse \item[{\em p\-Write\-Back\-Map}]If specified, points to a KEntry\-Map where the data read from the file should be stored, instead of inserting them directly into the configuration object. Use this area as a \char`\"{}scratchpad\char`\"{} when you need to know what is on disk but don't want to effect the configuration object. \item[{\em b\-Global}]Specifies whether entries should be marked as belonging to the global {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} configuration file rather than the application-specific {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} configuration file(s). \item[{\em b\-Default}]Specifies whether entries should be marked as being default values. \end{description}
\end{Desc}


Definition at line 426 of file kconfigbackend.cpp.

References KEntry\-Key::b\-Default, KEntry::b\-Deleted, KEntry::b\-Expand, KEntry::b\-Global, KEntry::b\-Immutable, KEntry\-Key::b\-Local, KEntry::b\-NLS, QCString::length(), KConfig\-Base::lookup\-Data(), KEntry::m\-Value, and KConfig\-Base::put\-Data().

Referenced by parse\-Config\-Files().\index{KConfigINIBackEnd@{KConfig\-INIBack\-End}!writeConfigFile@{writeConfigFile}}
\index{writeConfigFile@{writeConfigFile}!KConfigINIBackEnd@{KConfig\-INIBack\-End}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KConfig\-INIBack\-End::write\-Config\-File ({\bf QString} {\em filename}, bool {\em b\-Global} = {\tt false}, bool {\em b\-Merge} = {\tt true})\hspace{0.3cm}{\tt  [protected]}}\label{classKConfigINIBackEnd_b1}


Writes configuration file back. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em filename}]The name of the file to write. \item[{\em b\-Global}]Specifies whether to write only entries which are marked as belonging to the global {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} config file. If this is false, it skips those entries. \item[{\em b\-Merge}]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. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Whether some entries are left to be written to other files. \end{Desc}


Definition at line 960 of file kconfigbackend.cpp.

References KSave\-File::abort(), KSave\-File::close(), QFile::encode\-Name(), KSave\-File::fstream(), get\-Entry\-Map(), KSave\-File::handle(), KConfig\-Base::is\-Read\-Only(), KSave\-File::status(), and write\-Entries().

Referenced by sync().\index{KConfigINIBackEnd@{KConfig\-INIBack\-End}!getEntryMap@{getEntryMap}}
\index{getEntryMap@{getEntryMap}!KConfigINIBackEnd@{KConfig\-INIBack\-End}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KConfig\-INIBack\-End::get\-Entry\-Map (KEntry\-Map \& {\em map}, bool {\em b\-Global}, {\bf QFile} $\ast$ {\em merge\-File})\hspace{0.3cm}{\tt  [protected]}}\label{classKConfigINIBackEnd_b2}


Get the entry map. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em map}]the entries will be stored in this object. \item[{\em b\-Global}]Specifies whether to get only entries which are marked as belonging to the global {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} config file. If this is false, it skips those entries. \item[{\em merge\-File}]if not null, the dirty entries for this file will be merged.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]Whether there will be some entries left for writing to other files. \end{Desc}


Definition at line 906 of file kconfigbackend.cpp.

References KEntry::b\-Dirty, and KEntry::b\-Global.

Referenced by write\-Config\-File().\index{KConfigINIBackEnd@{KConfig\-INIBack\-End}!writeEntries@{writeEntries}}
\index{writeEntries@{writeEntries}!KConfigINIBackEnd@{KConfig\-INIBack\-End}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KConfig\-INIBack\-End::write\-Entries (FILE $\ast$ {\em p\-Stream}, const KEntry\-Map \& {\em a\-Temp\-Map})\hspace{0.3cm}{\tt  [protected]}}\label{classKConfigINIBackEnd_b3}


Write the entries in {\em a\-Temp\-Map\/} to the file stream. 



Definition at line 1063 of file kconfigbackend.cpp.

Referenced by write\-Config\-File().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
kconfigbackend.h\item 
kconfigbackend.cpp\end{CompactItemize}
