dispatcher.h
/* This file is part of the KDE project
Copyright (C) 2003 Matthias Kretz <kretz@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KSETTINGS_DISPATCHER_H
#define KSETTINGS_DISPATCHER_H
#include <qobject.h>
#include <qmap.h>
#include <kdelibs_export.h>
class QCString;
class QSignal;
class QStrList;
template<class T> class KStaticDeleter;
class KInstance;
class KConfig;
namespace KSettings
{
class KUTILS_EXPORT Dispatcher : public QObject
{
friend class KStaticDeleter<Dispatcher>;
Q_OBJECT
public:
static Dispatcher * self();
void registerInstance( KInstance * instance, QObject * recv, const char * slot );
KConfig * configForInstanceName( const QCString & instanceName );
QStrList instanceNames() const;
//X /**
//X * @return The KInstance object belonging to the instance name you pass
//X * (only works for registered instances of course).
//X */
//X KInstance * instanceForName( const QCString & instanceName );
public slots:
void reparseConfiguration( const QCString & instanceName );
void syncConfiguration();
private slots:
void unregisterInstance( QObject * );
private:
Dispatcher( QObject * parent = 0, const char * name = 0 );
~Dispatcher();
static Dispatcher * m_self;
struct InstanceInfo {
KInstance * instance;
QSignal * signal;
int count;
};
QMap<QCString, InstanceInfo> m_instanceInfo;
QMap<QObject *, QCString> m_instanceName;
class DispatcherPrivate;
DispatcherPrivate * d;
};
}
// vim: sw=4 sts=4 et
#endif // KSETTINGS_DISPATCHER_H
KStaticDeleter
Definition: dispatcher.h:30
KSettings::Dispatcher
Dispatch change notifications from the KCMs to the program.
Definition: dispatcher.h:51
KInstance
KConfig

KDE Home | KDE Accessibility Home | Description of Access Keys