From 70b9eea2ba01c3691497f49e4c45cb070c16193c Mon Sep 17 00:00:00 2001 From: tpearson Date: Fri, 1 Jul 2011 03:43:07 +0000 Subject: TQt4 port kradio This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kradio@1238952 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kradio3/src/include/plugins.h | 50 +++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'kradio3/src/include/plugins.h') diff --git a/kradio3/src/include/plugins.h b/kradio3/src/include/plugins.h index 8040437..6fd6d70 100644 --- a/kradio3/src/include/plugins.h +++ b/kradio3/src/include/plugins.h @@ -27,23 +27,23 @@ #include #include "errorlog-interfaces.h" -#include -#include -#include +#include +#include +#include class PluginManager; class PluginBase; -class QWidget; +class TQWidget; class KConfig; -typedef QPtrList PluginList; -typedef QPtrListIterator PluginIterator; +typedef TQPtrList PluginList; +typedef TQPtrListIterator PluginIterator; /* PluginBase must be inherited from Interface so that a plugin can be used in Interface::connect functions. - PluginBase must not be inherited from QObject, because derived classes may - be inherited e.g. from QWidget (multiple inheritance is not possible with + PluginBase must not be inherited from TQObject, because derived classes may + be inherited e.g. from TQWidget (multiple inheritance is not possible with OBjects). But we must be able to receive destroy messages e.g. from configuration pages. Thus we need the special callback member m_destroyNotifier. @@ -61,18 +61,18 @@ class WidgetPluginBase; struct ConfigPageInfo { ConfigPageInfo () : page(NULL) {} - ConfigPageInfo (QWidget *p, - const QString &in, - const QString &ph, - const QString &icon) + ConfigPageInfo (TQWidget *p, + const TQString &in, + const TQString &ph, + const TQString &icon) : page (p), itemName(in), pageHeader(ph), iconName(icon) {} - QWidget *page; - QString itemName, + TQWidget *page; + TQString itemName, pageHeader, iconName; }; @@ -84,15 +84,15 @@ class PluginBase : public IErrorLogClient { friend class PluginManager; public : - PluginBase(const QString &name, const QString &description); + PluginBase(const TQString &name, const TQString &description); virtual ~PluginBase(); - virtual QString pluginClassName() const = 0; + virtual TQString pluginClassName() const = 0; - const QString &name() const { return m_name; } - QString &name() { return m_name; } + const TQString &name() const { return m_name; } + TQString &name() { return m_name; } - const QString &description() const { return m_description; } + const TQString &description() const { return m_description; } // workaround for compiler bugs bool destructorCalled() const { return m_destructorCalled; } @@ -127,8 +127,8 @@ public: virtual void noticePluginsChanged(const PluginList &) {} protected : - QString m_name; - QString m_description; + TQString m_name; + TQString m_description; PluginManager *m_manager; bool m_destructorCalled; }; @@ -145,12 +145,12 @@ extern "C" void KRadioPlugin_UnloadLibrary() \ KGlobal::locale()->removeCatalogue(i18nName); \ } \ \ -extern "C" void KRadioPlugin_GetAvailablePlugins(QMap &info) \ +extern "C" void KRadioPlugin_GetAvailablePlugins(TQMap &info) \ { \ info.insert(#class_name, (description)); \ } \ \ -extern "C" PluginBase *KRadioPlugin_CreatePlugin(const QString &type, const QString &object_name) \ +extern "C" PluginBase *KRadioPlugin_CreatePlugin(const TQString &type, const TQString &object_name) \ { \ if (type == #class_name) { \ return new class_name(object_name); \ @@ -171,13 +171,13 @@ extern "C" void KRadioPlugin_UnloadLibrary() \ KGlobal::locale()->removeCatalogue(i18nName); \ } \ \ -extern "C" void KRadioPlugin_GetAvailablePlugins(QMap &info) \ +extern "C" void KRadioPlugin_GetAvailablePlugins(TQMap &info) \ { \ info.insert(#class_name1, (description1)); \ info.insert(#class_name2, (description2)); \ } \ \ -extern "C" PluginBase *KRadioPlugin_CreatePlugin(const QString &type, const QString &object_name) \ +extern "C" PluginBase *KRadioPlugin_CreatePlugin(const TQString &type, const TQString &object_name) \ { \ if (type == #class_name1) { \ return new class_name1(object_name); \ -- cgit v1.2.1