\section{KSimple\-Config Class Reference}
\label{classKSimpleConfig}\index{KSimpleConfig@{KSimpleConfig}}
{\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} Configuration entries {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} Configuration Management class with deletion ability.  


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

Inheritance diagram for KSimple\-Config:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=59pt]{classKSimpleConfig__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KSimple\-Config:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=213pt]{classKSimpleConfig__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KSimple\-Config} (const {\bf QString} \&file\-Name, bool b\-Read\-Only=false)
\item 
{\bf KSimple\-Config} ({\bf KConfig\-Back\-End} $\ast${\bf back\-End}, bool b\-Read\-Only=false)\label{classKSimpleConfig_a1}

\item 
virtual {\bf $\sim$KSimple\-Config} ()
\item 
virtual void {\bf sync} ()
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKSimpleConfig_b0}

\end{CompactItemize}


\subsection{Detailed Description}
{\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} Configuration entries {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} Configuration Management class with deletion ability. 

This is a trivial extension of {\bf KConfig}{\rm (p.\,\pageref{classKConfig})} for applications that need only one configuration file and no default system. A difference with {\bf KConfig}{\rm (p.\,\pageref{classKConfig})} is that when the data in memory is written back it is not merged with what is on disk. Whatever is in memory simply replaces what is on disk entirely.

\begin{Desc}
\item[Author:]Kalle Dalheimer $<${\tt kalle@kde.org}$>$, Preston Brown $<${\tt pbrown@kde.org}$>$ \end{Desc}
\begin{Desc}
\item[See also:]{\bf KConfig\-Base}{\rm (p.\,\pageref{classKConfigBase})} {\bf KConfig}{\rm (p.\,\pageref{classKConfig})} \end{Desc}




Definition at line 41 of file ksimpleconfig.h.

\subsection{Constructor \& Destructor Documentation}
\index{KSimpleConfig@{KSimple\-Config}!KSimpleConfig@{KSimpleConfig}}
\index{KSimpleConfig@{KSimpleConfig}!KSimpleConfig@{KSimple\-Config}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KSimple\-Config::KSimple\-Config (const {\bf QString} \& {\em file\-Name}, bool {\em b\-Read\-Only} = {\tt false})}\label{classKSimpleConfig_a0}


Construct a KSimple\-Config object and make it either read-write or read-only. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em file\-Name}]The file used for saving the config data. Either a full path can be specified or just the filename. If only a filename is specified, the default directory for \char`\"{}config\char`\"{} files is used. \item[{\em b\-Read\-Only}]Whether the object should be read-only. \end{description}
\end{Desc}


Definition at line 40 of file ksimpleconfig.cpp.

References KConfig\-Back\-End::change\-File\-Name(), QDir::is\-Relative\-Path(), KConfig::reparse\-Configuration(), and KConfig\-Base::set\-Read\-Only().\index{KSimpleConfig@{KSimple\-Config}!~KSimpleConfig@{$\sim$KSimpleConfig}}
\index{~KSimpleConfig@{$\sim$KSimpleConfig}!KSimpleConfig@{KSimple\-Config}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KSimple\-Config::$\sim${\bf KSimple\-Config} ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKSimpleConfig_a2}


Destructor. 

Writes back any dirty configuration entries. 

Definition at line 59 of file ksimpleconfig.cpp.

References sync().

\subsection{Member Function Documentation}
\index{KSimpleConfig@{KSimple\-Config}!sync@{sync}}
\index{sync@{sync}!KSimpleConfig@{KSimple\-Config}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KSimple\-Config::sync ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKSimpleConfig_a3}


Flushes all changes that currently reside only in memory back to disk / permanent storage. 

Dirty configuration entries are written to the most specific file available.

Asks the back end to flush out all pending writes, and then calls {\bf rollback()}{\rm (p.\,\pageref{classKConfig_a3})}. No changes are made if the object has {\tt read\-Only} status.

You should call this from your destructor in derivative classes.

\begin{Desc}
\item[See also:]{\bf rollback()}{\rm (p.\,\pageref{classKConfig_a3})}, {\bf is\-Read\-Only()}{\rm (p.\,\pageref{classKConfigBase_a108})} \end{Desc}


Reimplemented from {\bf KConfig\-Base} {\rm (p.\,\pageref{classKConfigBase_a105})}.

Definition at line 68 of file ksimpleconfig.cpp.

References KConfig\-Base::is\-Dirty(), KConfig\-Base::is\-Read\-Only(), KConfig::rollback(), and KConfig\-Back\-End::sync().

Referenced by $\sim$KSimple\-Config().

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