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

tdeutils

  • KSettings
  • KSettings::Dispatcher
Public Slots | Public Member Functions | Static Public Member Functions | Friends

KSettings::Dispatcher Class Reference
[Settings UI classes]

Dispatch change notifications from the KCMs to the program. More...

#include <dispatcher.h>

Inheritance diagram for KSettings::Dispatcher:
TQObject

List of all members.

Public Slots

void reparseConfiguration (const TQCString &instanceName)
void syncConfiguration ()

Public Member Functions

void registerInstance (TDEInstance *instance, TQObject *recv, const char *slot)
TDEConfig * configForInstanceName (const TQCString &instanceName)
TQStrList instanceNames () const

Static Public Member Functions

static Dispatcher * self ()

Friends

class KStaticDeleter< Dispatcher >

Detailed Description

Dispatch change notifications from the KCMs to the program.

Since your program does not have direct control over the KCMs that get loaded into the TDEConfigureDialog you need a way to get notified. This is what you do:

 Dispatcher::self()->registerInstance( instance(), this, TQT_SLOT( loadSettings() ) );
Author:
Matthias Kretz <kretz@kde.org>
Since:
3.2

Definition at line 51 of file dispatcher.h.


Member Function Documentation

TDEConfig * KSettings::Dispatcher::configForInstanceName ( const TQCString &  instanceName  ) 
Returns:
the TDEConfig object that belongs to the instanceName

Definition at line 86 of file dispatcher.cpp.

TQStrList KSettings::Dispatcher::instanceNames (  )  const
Returns:
a list of all the instance names that are currently registered

Definition at line 100 of file dispatcher.cpp.

void KSettings::Dispatcher::registerInstance ( TDEInstance *  instance,
TQObject *  recv,
const char *  slot 
)

Register a slot to be called when the configuration for the instance has changed.

instance is the TDEInstance object that is passed to KGenericFactory (if it is used). You can query it with KGenericFactory<YourClassName>::instance(). instance->instanceName() is also the same name that is put into the .desktop file of the KCMs for the X-TDE-ParentComponents.

Parameters:
instance The TDEInstance object
recv The object that should receive the signal
slot The slot to be called: TQT_SLOT( slotName() )

Definition at line 61 of file dispatcher.cpp.

void KSettings::Dispatcher::reparseConfiguration ( const TQCString &  instanceName  )  [slot]

Call this slot when the configuration belonging to the associated instance name has changed.

The registered slot will be called.

Parameters:
instanceName The value of X-TDE-ParentComponents.

Definition at line 110 of file dispatcher.cpp.

Dispatcher * KSettings::Dispatcher::self (  )  [static]

Get a reference the the Dispatcher object.

Definition at line 40 of file dispatcher.cpp.

void KSettings::Dispatcher::syncConfiguration (  )  [slot]

When this slot is called the TDEConfig objects of all the registered instances are sync()ed.

This is usefull when some other TDEConfig objects will read/write from/to the same config file, so that you can first write out the current state of the TDEConfig objects.

Definition at line 127 of file dispatcher.cpp.


The documentation for this class was generated from the following files:
  • dispatcher.h
  • dispatcher.cpp

tdeutils

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

tdeutils

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