diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-01 03:43:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-07-01 03:43:07 +0000 |
commit | 70b9eea2ba01c3691497f49e4c45cb070c16193c (patch) | |
tree | 9a6df61aa247a27275aad9c5245e419e89c2c640 /kradio3/src/include/plugins.h | |
parent | 998c1384ace4ae4655997c181fa33242148cd0a4 (diff) | |
download | tderadio-70b9eea2ba01c3691497f49e4c45cb070c16193c.tar.gz tderadio-70b9eea2ba01c3691497f49e4c45cb070c16193c.zip |
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
Diffstat (limited to 'kradio3/src/include/plugins.h')
-rw-r--r-- | kradio3/src/include/plugins.h | 50 |
1 files changed, 25 insertions, 25 deletions
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 <kglobal.h> #include "errorlog-interfaces.h" -#include <qstring.h> -#include <qobject.h> -#include <qptrlist.h> +#include <tqstring.h> +#include <tqobject.h> +#include <tqptrlist.h> class PluginManager; class PluginBase; -class QWidget; +class TQWidget; class KConfig; -typedef QPtrList<PluginBase> PluginList; -typedef QPtrListIterator<PluginBase> PluginIterator; +typedef TQPtrList<PluginBase> PluginList; +typedef TQPtrListIterator<PluginBase> 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<QString, QString> &info) \ +extern "C" void KRadioPlugin_GetAvailablePlugins(TQMap<TQString, TQString> &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<QString, QString> &info) \ +extern "C" void KRadioPlugin_GetAvailablePlugins(TQMap<TQString, TQString> &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); \ |