From dfe289850f068f19ba4a83ab4e7e22a7e09c13c9 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sat, 26 Jan 2013 13:17:21 -0600 Subject: Rename a number of libraries and executables to avoid conflicts with KDE4 --- kutils/ksettings/dispatcher.h | 133 ------------------------------------------ 1 file changed, 133 deletions(-) delete mode 100644 kutils/ksettings/dispatcher.h (limited to 'kutils/ksettings/dispatcher.h') diff --git a/kutils/ksettings/dispatcher.h b/kutils/ksettings/dispatcher.h deleted file mode 100644 index fa0c9e6c9..000000000 --- a/kutils/ksettings/dispatcher.h +++ /dev/null @@ -1,133 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2003 Matthias Kretz - - 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 -#include -#include - -class TQCString; -class TQSignal; -class TQStrList; -template class KStaticDeleter; -class TDEInstance; -class TDEConfig; - -namespace KSettings -{ - -/** - * @ingroup settings - * @short Dispatch change notifications from the KCMs to the program. - * - * Since your program does not have direct control over the KCMs that get loaded - * into the TDEConfigureDialog you need a way to get notified. This is what you - * do: - * \code - * Dispatcher::self()->registerInstance( instance(), this, TQT_SLOT( loadSettings() ) ); - * \endcode - * - * @author Matthias Kretz - * @since 3.2 - */ -class KUTILS_EXPORT Dispatcher : public TQObject -{ - friend class KStaticDeleter; - - Q_OBJECT - public: - /** - * Get a reference the the Dispatcher object. - */ - static Dispatcher * self(); - - /** - * Register a slot to be called when the configuration for the instance - * has changed. @p instance is the TDEInstance object - * that is passed to KGenericFactory (if it is used). You can query - * it with KGenericFactory::instance(). - * instance->instanceName() is also the same name that is put into the - * .desktop file of the KCMs for the X-TDE-ParentComponents. - * - * @param instance The TDEInstance object - * @param recv The object that should receive the signal - * @param slot The slot to be called: TQT_SLOT( slotName() ) - */ - void registerInstance( TDEInstance * instance, TQObject * recv, const char * slot ); - - /** - * @return the TDEConfig object that belongs to the instanceName - */ - TDEConfig * configForInstanceName( const TQCString & instanceName ); - - /** - * @return a list of all the instance names that are currently - * registered - */ - TQStrList instanceNames() const; - -//X /** -//X * @return The TDEInstance object belonging to the instance name you pass -//X * (only works for registered instances of course). -//X */ -//X TDEInstance * instanceForName( const TQCString & instanceName ); - - public slots: - /** - * Call this slot when the configuration belonging to the associated - * instance name has changed. The registered slot will be called. - * - * @param instanceName The value of X-TDE-ParentComponents. - */ - void reparseConfiguration( const TQCString & instanceName ); - - /** - * When this slot is called the TDEConfig objects of all the registered - * instances are sync()ed. This is usefull when some other TDEConfig - * objects will read/write from/to the same config file, so that you - * can first write out the current state of the TDEConfig objects. - */ - void syncConfiguration(); - - private slots: - void unregisterInstance( TQObject * ); - - private: - Dispatcher( TQObject * parent = 0, const char * name = 0 ); - ~Dispatcher(); - static Dispatcher * m_self; - - struct InstanceInfo { - TDEInstance * instance; - TQSignal * signal; - int count; - }; - TQMap m_instanceInfo; - TQMap m_instanceName; - - class DispatcherPrivate; - DispatcherPrivate * d; -}; - -} - -// vim: sw=4 sts=4 et -#endif // KSETTINGS_DISPATCHER_H -- cgit v1.2.1