• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KUtils

KSettings::Dispatcher

KSettings::Dispatcher Namespace Reference

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

Functions

QList< QString > componentNames ()
KSharedConfig::Ptr configForComponentName (const QString &componentName)
void registerComponent (const KComponentData &componentData, QObject *recv, const char *slot)
void reparseConfiguration (const QString &componentName)
void syncConfiguration ()

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 KSettings::Dialog you need a way to get notified. This is what you do:

 Dispatcher::registerComponent(componentData(), this, "loadSettings");
Author:
Matthias Kretz <kretz@kde.org>

Function Documentation

QList< QString > KSettings::Dispatcher::componentNames (  ) 
Returns:
a list of all the componentData names that are currently registered
KSharedConfig::Ptr KSettings::Dispatcher::configForComponentName ( const QString &  componentName  ) 
Returns:
the KConfig object that belongs to the componentName
void KSettings::Dispatcher::registerComponent ( const KComponentData &  componentData,
QObject *  recv,
const char *  slot 
)

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

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

Parameters:
componentData The KComponentData object
recv The object that should receive the signal
slot The slot to be called: "slotName"
void KSettings::Dispatcher::reparseConfiguration ( const QString &  componentName  ) 

Call this function when the configuration belonging to the associated componentData name has changed.

The registered slot will be called.

Parameters:
componentName The value of X-KDE-ParentComponents.
void KSettings::Dispatcher::syncConfiguration (  ) 

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

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

KUtils

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal