• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

Public Member Functions | List of all members
TDEConfigGroupSaver Class Reference

#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:

TQString oldgroup config->group();
config->setGroup( "TheGroupThatIWant" );
...
config->writeEntry( "Blah", "Blubb" );
config->setGroup( oldgroup );

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.
Author
Matthias Kalle Dalheimer kalle.nosp@m.@kde.nosp@m..org
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::TDEConfigGroupSaver ( TDEConfigBase *  config,
TQString  group 
)
inline

Constructor.

You pass a pointer to the TDEConfigBase-derived object you want to work with and a string indicating the new group.

Parameters
configThe TDEConfigBase-derived object this TDEConfigGroupSaver works on.
groupThe 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:
  • tdeconfigbase.h

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.8.8
This website is maintained by Timothy Pearson.