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

KUtils

dispatcher.h

Go to the documentation of this file.
00001 /*  This file is part of the KDE project
00002     Copyright (C) 2003 Matthias Kretz <kretz@kde.org>
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License version 2 as published by the Free Software Foundation.
00007 
00008     This library is distributed in the hope that it will be useful,
00009     but WITHOUT ANY WARRANTY; without even the implied warranty of
00010     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011     Library General Public License for more details.
00012 
00013     You should have received a copy of the GNU Library General Public License
00014     along with this library; see the file COPYING.LIB.  If not, write to
00015     the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00016     Boston, MA 02110-1301, USA.
00017 
00018 */
00019 
00020 #ifndef KSETTINGS_DISPATCHER_H
00021 #define KSETTINGS_DISPATCHER_H
00022 
00023 #include <qobject.h>
00024 #include <qmap.h>
00025 #include <kdelibs_export.h>
00026 
00027 class QCString;
00028 class QSignal;
00029 class QStrList;
00030 template<class T> class KStaticDeleter;
00031 class KInstance;
00032 class KConfig;
00033 
00034 namespace KSettings
00035 {
00036 
00051 class KUTILS_EXPORT Dispatcher : public QObject
00052 {
00053     friend class KStaticDeleter<Dispatcher>;
00054 
00055     Q_OBJECT
00056     public:
00060         static Dispatcher * self();
00061 
00074         void registerInstance( KInstance * instance, QObject * recv, const char * slot );
00075 
00079         KConfig * configForInstanceName( const QCString & instanceName );
00080 
00085         QStrList instanceNames() const;
00086 
00087 //X         /**
00088 //X          * @return The KInstance object belonging to the instance name you pass
00089 //X          * (only works for registered instances of course).
00090 //X          */
00091 //X         KInstance * instanceForName( const QCString & instanceName );
00092 
00093     public slots:
00100         void reparseConfiguration( const QCString & instanceName );
00101 
00108         void syncConfiguration();
00109 
00110     private slots:
00111         void unregisterInstance( QObject * );
00112 
00113     private:
00114         Dispatcher( QObject * parent = 0, const char * name = 0 );
00115         ~Dispatcher();
00116         static Dispatcher * m_self;
00117 
00118         struct InstanceInfo {
00119             KInstance * instance;
00120             QSignal * signal;
00121             int count;
00122         };
00123         QMap<QCString, InstanceInfo> m_instanceInfo;
00124         QMap<QObject *, QCString> m_instanceName;
00125 
00126         class DispatcherPrivate;
00127         DispatcherPrivate * d;
00128 };
00129 
00130 }
00131 
00132 // vim: sw=4 sts=4 et
00133 #endif // KSETTINGS_DISPATCHER_H

KUtils

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

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
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