\section{KConfig\-Group\-Saver Class Reference}
\label{classKConfigGroupSaver}\index{KConfigGroupSaver@{KConfigGroupSaver}}
Helper class to facilitate working with {\bf KConfig}{\rm (p.\,\pageref{classKConfig})} / {\bf KSimple\-Config}{\rm (p.\,\pageref{classKSimpleConfig})} groups. Helper class for easier use of KConfig/KSimple\-Config groups.  


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

Collaboration diagram for KConfig\-Group\-Saver:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=223pt]{classKConfigGroupSaver__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KConfig\-Group\-Saver} ({\bf KConfig\-Base} $\ast$config, {\bf QString} group)
\begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item 
{\bf KConfig\-Group\-Saver} ({\bf KConfig\-Base} $\ast$config, const  char $\ast$group)\label{classKConfigGroupSaver_a1}

\item 
{\bf KConfig\-Group\-Saver} ({\bf KConfig\-Base} $\ast$config, const  {\bf QCString} \&group)\label{classKConfigGroupSaver_a2}

\item 
{\bf KConfig\-Base} $\ast$ {\bf config} ()\label{classKConfigGroupSaver_a4}

\end{CompactItemize}


\subsection{Detailed Description}
Helper class to facilitate working with {\bf KConfig}{\rm (p.\,\pageref{classKConfig})} / {\bf KSimple\-Config}{\rm (p.\,\pageref{classKSimpleConfig})} groups. Helper class for easier use of KConfig/KSimple\-Config groups. 

Careful programmers always set the group of a {\bf KConfig}{\rm (p.\,\pageref{classKConfig})} {\bf KSimple\-Config}{\rm (p.\,\pageref{classKSimpleConfig})} object to the group they want to read from and set it back to the old one of afterwards. This is usually written as: \small\begin{alltt}\end{alltt}\normalsize 


\small\begin{alltt} {\bf QString} oldgroup config-$>$group();
 config-$>$setGroup( "TheGroupThatIWant" );
 ...
 config-$>$writeEntry( "Blah", "Blubb" );\end{alltt}\normalsize 


\small\begin{alltt} config-$>$setGroup( oldgroup );
 \end{alltt}\normalsize 


In order to facilitate this task, you can use KConfig\-Group\-Saver. Simply construct such an object ON THE STACK when you want to switch to a new group. Then, when the object goes out of scope, the group will automatically be restored. If you want to use several different groups within a function or method, you can still use KConfig\-Group\-Saver: Simply enclose all work with one group (including the creation of the KConfig\-Group\-Saver object) in one block.

\begin{Desc}
\item[Author:]Matthias Kalle Dalheimer $<${\tt kalle@kde.org}$>$ \end{Desc}
\begin{Desc}
\item[Version:]\begin{Desc}
\item[Id]{\bf kconfigbase.h}{\rm (p.\,\pageref{kconfigbase_8h})},v 1.83.2.1 2003/06/22 21:39:31 deller Exp \end{Desc}
\end{Desc}
\begin{Desc}
\item[See also:]{\bf KConfig\-Base}{\rm (p.\,\pageref{classKConfigBase})}, {\bf KConfig}{\rm (p.\,\pageref{classKConfig})}, {\bf KSimple\-Config}{\rm (p.\,\pageref{classKSimpleConfig})} \end{Desc}




Definition at line 1840 of file kconfigbase.h.

\subsection{Constructor \& Destructor Documentation}
\index{KConfigGroupSaver@{KConfig\-Group\-Saver}!KConfigGroupSaver@{KConfigGroupSaver}}
\index{KConfigGroupSaver@{KConfigGroupSaver}!KConfigGroupSaver@{KConfig\-Group\-Saver}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KConfig\-Group\-Saver::KConfig\-Group\-Saver ({\bf KConfig\-Base} $\ast$ {\em config}, {\bf QString} {\em group})\hspace{0.3cm}{\tt  [inline]}}\label{classKConfigGroupSaver_a0}


Constructor. 

You pass a pointer to the KConfig\-Base-derived object you want to work with and a string indicating the \_\-new\_\- group. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em config}]The KConfig\-Base-derived object this KConfig\-Group\-Saver works on. \item[{\em group}]The new group that the config object should switch to. \end{description}
\end{Desc}


Definition at line 1851 of file kconfigbase.h.

References KConfig\-Base::set\-Group().

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