#include <tdeconfigbase.h>
Public Member Functions | |
TDEConfigGroupSaver (TDEConfigBase *config, TQString group) | |
TDEConfigGroupSaver (TDEConfigBase *config, const char *group) | |
TDEConfigGroupSaver (TDEConfigBase *config, const TQCString &group) | |
TDEConfigBase * | config () |
Detailed Description
Helper class to facilitate working with TDEConfig / KSimpleConfig groups.
Careful programmers always set the group of a TDEConfig 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 TDEConfigGroupSaver. 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 TDEConfigGroupSaver: Simply enclose all work with one group (including the creation of the TDEConfigGroupSaver object) in one block.
- Deprecated:
- This class is deprecated and will be removed in KDE 4. TDEConfigGroup provides similar functionality in a more object oriented way.
- See also
- TDEConfigBase, TDEConfig, KSimpleConfig, TDEConfigGroup
Helper class for easier use of TDEConfig/KSimpleConfig groups
Definition at line 2082 of file tdeconfigbase.h.
Constructor & Destructor Documentation
◆ TDEConfigGroupSaver()
|
inline |
Constructor.
You pass a pointer to the TDEConfigBase-derived object you want to work with and a string indicating the new group.
- Parameters
-
config The TDEConfigBase-derived object this TDEConfigGroupSaver works on. group The new group that the config object should switch to.
Definition at line 2094 of file tdeconfigbase.h.
The documentation for this class was generated from the following file: