\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=191pt]{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)
\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: 

\footnotesize\begin{verbatim} QString oldgroup config->group();
 config->setGroup( "TheGroupThatIWant" );
 ...
 config->writeEntry( "Blah", "Blubb" );

 config->setGroup( oldgroup );
\end{verbatim}
\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[{\bf Deprecated}]This class is deprecated and will be removed in {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} 4. {\bf KConfig\-Group}{\rm (p.\,\pageref{classKConfigGroup})} provides similar functionality in a more object oriented way. \end{Desc}
\begin{Desc}
\item[Author:]Matthias Kalle Dalheimer $<${\tt kalle@kde.org}$>$ \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})}, {\bf KConfig\-Group}{\rm (p.\,\pageref{classKConfigGroup})} \end{Desc}




Definition at line 2051 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 2063 of file kconfigbase.h.

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