class KConfigGroupSaver
|
Helper class for easier use of KConfig/KSimpleConfig groups. More... |
|
|
Public Methods
Helper class to facilitate working with KConfig / KSimpleConfig
groups.
Careful programmers always set the group of a
KConfig KSimpleConfig object to the group they want to read from
and set it back to the old one of afterwards. This is usually
written as:
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.
See also: KConfigBase, KConfig, KSimpleConfig
Constructor. You pass a pointer to the KConfigBase-derived
object you want to work with and a string indicating the _new_
group.
Parameters:
config | The KConfigBase-derived object this
KConfigGroupSaver works on.
|
group | The new group that the config object should switch to.
|
KConfigGroupSaver ( KConfigBase* config, const char *group )
| KConfigGroupSaver |
~KConfigGroupSaver ()
| ~KConfigGroupSaver |
- Version: $Id: KConfigGroupSaver.html 132191 2002-01-17 21:32:13Z dfaure $
- Author: Matthias Kalle Dalheimer
- Generated: dfaure on kde.faure.org on Thu Jan 17 22:15:01 2002, using kdoc 2.0a53.