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

KUtils

  • KSettings
  • Dispatcher
Classes | Functions
KSettings::Dispatcher Namespace Reference

Classes

class  ComponentInfo
 
class  DispatcherPrivate
 

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.nosp@m.@kde.nosp@m..org

Function Documentation

QList< QString > KSettings::Dispatcher::componentNames ( )
Returns
a list of all the componentData names that are currently registered

Definition at line 69 of file dispatcher.cpp.

KSharedConfig::Ptr KSettings::Dispatcher::configForComponentName ( const QString &  componentName)
Returns
the KConfig object that belongs to the componentName

Definition at line 54 of file dispatcher.cpp.

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 KPluginFactory (if it is used). You can query it with MyPluginFactory::componentData(). componentData.componentName() is also the same name that is put into the .desktop file of the KCMs for the X-KDE-ParentComponents.

Parameters
componentDataThe KComponentData object
recvThe object that should receive the signal
slotThe slot to be called: "slotName"

Definition at line 37 of file dispatcher.cpp.

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
componentNameThe value of X-KDE-ParentComponents.

Definition at line 81 of file dispatcher.cpp.

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.

Definition at line 97 of file dispatcher.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:35 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KUtils

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal