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

tdeutils

  • KSettings
  • Dispatcher
Public Slots | Public Member Functions | Static Public Member Functions | Friends | List of all members
KSettings::Dispatcher Class Reference
Settings UI classes

#include <dispatcher.h>

Inherits TQObject.

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, TQ_SLOT( loadSettings() ) );
KSettings::Dispatcher::self
static Dispatcher * self()
Get a reference the the Dispatcher object.
Definition: dispatcher.cpp:40
KSettings::Dispatcher::registerInstance
void registerInstance(TDEInstance *instance, TQObject *recv, const char *slot)
Register a slot to be called when the configuration for the instance has changed.
Definition: dispatcher.cpp:61
Author
Matthias Kretz kretz.nosp@m.@kde.nosp@m..org
Since
3.2

Definition at line 51 of file dispatcher.h.

Member Function Documentation

◆ configForInstanceName()

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

Definition at line 86 of file dispatcher.cpp.

◆ instanceNames()

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.

◆ registerInstance()

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
instanceThe TDEInstance object
recvThe object that should receive the signal
slotThe slot to be called: TQ_SLOT( slotName() )

Definition at line 61 of file dispatcher.cpp.

◆ reparseConfiguration

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
instanceNameThe value of X-TDE-ParentComponents.

Definition at line 110 of file dispatcher.cpp.

◆ self()

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

Get a reference the the Dispatcher object.

Definition at line 40 of file dispatcher.cpp.

◆ syncConfiguration

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.

Friends And Related Function Documentation

◆ KStaticDeleter< Dispatcher >

friend class KStaticDeleter< Dispatcher >
friend

Definition at line 51 of file dispatcher.h.


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.9.4
This website is maintained by Timothy Pearson.