dispatcher.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
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
00050 class KUTILS_EXPORT Dispatcher : public QObject
00051 {
00052 friend class KStaticDeleter<Dispatcher>;
00053
00054 Q_OBJECT
00055 public:
00059 static Dispatcher * self();
00060
00073 void registerInstance( KInstance * instance, QObject * recv, const char * slot );
00074
00078 KConfig * configForInstanceName( const QCString & instanceName );
00079
00084 QStrList instanceNames() const;
00085
00086
00087
00088
00089
00090
00091
00092 public slots:
00099 void reparseConfiguration( const QCString & instanceName );
00100
00107 void syncConfiguration();
00108
00109 private slots:
00110 void unregisterInstance( QObject * );
00111
00112 private:
00113 Dispatcher( QObject * parent = 0, const char * name = 0 );
00114 ~Dispatcher();
00115 static Dispatcher * m_self;
00116
00117 struct InstanceInfo {
00118 KInstance * instance;
00119 QSignal * signal;
00120 int count;
00121 };
00122 QMap<QCString, InstanceInfo> m_instanceInfo;
00123 QMap<QObject *, QCString> m_instanceName;
00124
00125 class DispatcherPrivate;
00126 DispatcherPrivate * d;
00127 };
00128
00129 }
00130
00131
00132 #endif // KSETTINGS_DISPATCHER_H
This file is part of the documentation for kutils Library Version 3.4.1.