.TH "KConfigGroupSaver" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdecore Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KConfigGroupSaver \- Helper class to facilitate working with \fBKConfig\fP / \fBKSimpleConfig\fP groups. Helper class for easier use of KConfig/KSimpleConfig groups.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kconfigbase.h>\fP
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKConfigGroupSaver\fP (\fBKConfigBase\fP *config, \fBQString\fP group)"
.br
.ti -1c
.RI "\fBKConfigGroupSaver\fP (\fBKConfigBase\fP *config, const char *group)"
.br
.ti -1c
.RI "\fBKConfigGroupSaver\fP (\fBKConfigBase\fP *config, const \fBQCString\fP &group)"
.br
.ti -1c
.RI "\fBKConfigBase\fP * \fBconfig\fP ()"
.br
.in -1c
.SH "Detailed Description"
.PP 
Helper class to facilitate working with \fBKConfig\fP / \fBKSimpleConfig\fP groups. Helper class for easier use of KConfig/KSimpleConfig groups. 

Careful programmers always set the group of a \fBKConfig\fP \fBKSimpleConfig\fP object to the group they want to read from and set it back to the old one of afterwards. This is usually written as: 
.PP
.nf
 QString oldgroup config->group();
 config->setGroup( 'TheGroupThatIWant' );
 ...
 config->writeEntry( 'Blah', 'Blubb' );

 config->setGroup( oldgroup );

.fi
.PP
.PP
In order to facilitate this task, you can use KConfigGroupSaver. 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 KConfigGroupSaver: Simply enclose all work with one group (including the creation of the KConfigGroupSaver object) in one block.
.PP
\fBDeprecated\fP
.RS 4
This class is deprecated and will be removed in \fBKDE\fP 4. \fBKConfigGroup\fP provides similar functionality in a more object oriented way. 
.RE
.PP
\fBAuthor:\fP
.RS 4
Matthias Kalle Dalheimer <kalle@kde.org> 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBKConfigBase\fP, \fBKConfig\fP, \fBKSimpleConfig\fP, \fBKConfigGroup\fP 
.RE
.PP

.PP
Definition at line 2051 of file kconfigbase.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KConfigGroupSaver::KConfigGroupSaver (\fBKConfigBase\fP * config, \fBQString\fP group)\fC [inline]\fP"
.PP
Constructor. 
.PP
You pass a pointer to the KConfigBase-derived object you want to work with and a string indicating the _new_ group.
.PP
\fBParameters:\fP
.RS 4
\fIconfig\fP The KConfigBase-derived object this KConfigGroupSaver works on. 
.br
\fIgroup\fP The new group that the config object should switch to. 
.RE
.PP

.PP
Definition at line 2063 of file kconfigbase.h.

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