diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-18 17:00:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-18 17:00:31 +0000 |
commit | 395a904bff7b4d6ead445c342f7ac0c5fbf29121 (patch) | |
tree | 9829cadb79d2cc7c29a940627fadb28b11e54150 /kate/tabbarextension | |
parent | 399f47c376fdf4d19192732a701ea9578d11619d (diff) | |
download | tdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.tar.gz tdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.zip |
TQt4 port kdeaddons
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1237404 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kate/tabbarextension')
-rw-r--r-- | kate/tabbarextension/plugin_katetabbarextension.cpp | 28 | ||||
-rw-r--r-- | kate/tabbarextension/plugin_katetabbarextension.h | 29 |
2 files changed, 31 insertions, 26 deletions
diff --git a/kate/tabbarextension/plugin_katetabbarextension.cpp b/kate/tabbarextension/plugin_katetabbarextension.cpp index cfc4619..e789c20 100644 --- a/kate/tabbarextension/plugin_katetabbarextension.cpp +++ b/kate/tabbarextension/plugin_katetabbarextension.cpp @@ -73,17 +73,17 @@ KatePluginFactory::~KatePluginFactory() } TQObject* KatePluginFactory::createObject( - TQObject* parent, const char* name, const char*, const TQStringList & ) + TQObject* tqparent, const char* name, const char*, const TQStringList & ) { - return new KatePluginTabBarExtension( parent, name ); + return new KatePluginTabBarExtension( tqparent, name ); } KInstance* KatePluginFactory::s_instance = 0L; // BEGIN KatePluginTabBarExtension KatePluginTabBarExtension::KatePluginTabBarExtension( - TQObject* parent, const char* name ) - : Kate::Plugin ( (Kate::Application*)parent, name ), + TQObject* tqparent, const char* name ) + : Kate::Plugin ( (Kate::Application*)tqparent, name ), pConfig(new KConfig("katetabbarextensionpluginrc")) { pConfig->setGroup("global"); @@ -122,8 +122,8 @@ void KatePluginTabBarExtension::addView(Kate::MainWindow *win) KToolBar* toolbar = dynamic_cast<KToolBar*> (win->guiFactory()->container("tabbarExtensionToolBar", view)); if (toolbar) { - connect(toolbar, TQT_SIGNAL( orientationChanged(Orientation) ), - view->tabbar, TQT_SLOT( slotMoved(Orientation) )); + connect(toolbar, TQT_SIGNAL( orientationChanged(Qt::Orientation) ), + view->tabbar, TQT_SLOT( slotMoved(Qt::Orientation) )); } } @@ -175,8 +175,8 @@ void KatePluginTabBarExtension::applyConfig( KateTabBarExtensionConfigPage* p ) // BEGIN KateTabBarButton KateTabBarButton::KateTabBarButton(Kate::ViewManager* pViewManager, - Kate::Document *pDoc, TQWidget * parent, const char * name) - : TQPushButton(parent, name), + Kate::Document *pDoc, TQWidget * tqparent, const char * name) + : TQPushButton(tqparent, name), modified(false), myDocID(pDoc->documentNumber()), doc(pDoc), @@ -184,7 +184,7 @@ KateTabBarButton::KateTabBarButton(Kate::ViewManager* pViewManager, { setFlat(true); setToggleButton(true); - setFocusPolicy(TQWidget::NoFocus); + setFocusPolicy(TQ_NoFocus); setText(pDoc->docName()); @@ -264,8 +264,8 @@ void KateTabBarButton::setOn(bool on) // BEGIN KateTabBarExtension KateTabBarExtension::KateTabBarExtension( Kate::DocumentManager *pDocManager, Kate::MainWindow *win, bool bHorizOrientation, bool bSort, - TQWidget* parent, const char* name, WFlags f ) - : TQWidget(parent, name, f), + TQWidget* tqparent, const char* name, WFlags f ) + : TQWidget(tqparent, name, f), pCurrentTab(0), m_win(win), m_docManager(pDocManager), m_sort(false) { if (bHorizOrientation) { @@ -295,7 +295,7 @@ KateTabBarExtension::KateTabBarExtension( Kate::DocumentManager *pDocManager, KateTabBarExtension::~KateTabBarExtension() {} -void KateTabBarExtension::slotMoved(Orientation o) +void KateTabBarExtension::slotMoved(Qt::Orientation o) { // the tabbar moved (top, right, bottom, left or fluently) switch (o) { @@ -475,8 +475,8 @@ void KateTabBarExtension::slotViewChanged () // BEGIN KateTabBarExtensionConfigPage KateTabBarExtensionConfigPage::KateTabBarExtensionConfigPage( - TQObject* /*parent*/ /*= 0L*/, TQWidget *parentWidget /*= 0L*/) - : Kate::PluginConfigPage( parentWidget ) + TQObject* /*tqparent*/ /*= 0L*/, TQWidget *tqparentWidget /*= 0L*/) + : Kate::PluginConfigPage( tqparentWidget ) { TQVBoxLayout* top = new TQVBoxLayout(this, 0, KDialogBase::spacingHint()); diff --git a/kate/tabbarextension/plugin_katetabbarextension.h b/kate/tabbarextension/plugin_katetabbarextension.h index ca668ba..1655e18 100644 --- a/kate/tabbarextension/plugin_katetabbarextension.h +++ b/kate/tabbarextension/plugin_katetabbarextension.h @@ -61,13 +61,14 @@ class MyPtrList : public TQPtrList <KateTabBarButton> class KatePluginFactory : public KLibFactory { Q_OBJECT + TQ_OBJECT public: KatePluginFactory(); virtual ~KatePluginFactory(); - virtual TQObject* createObject( TQObject* parent = 0, const char* pname = 0, - const char* name = "TQObject", const TQStringList &args = TQStringList() ); + virtual TQObject* createObject( TQObject* tqparent = 0, const char* pname = 0, + const char* name = TQOBJECT_OBJECT_NAME_STRING, const TQStringList &args = TQStringList() ); private: static KInstance* s_instance; @@ -77,20 +78,21 @@ class KatePluginFactory : public KLibFactory * This class implements a single tab. Every tab represents a document and shows * the current flag (modified: true or false). */ -class KateTabBarButton: public QPushButton +class KateTabBarButton: public TQPushButton { Q_OBJECT + TQ_OBJECT public: /** * constructor * @param pViewManager pointer to kate's the view manager * @param pDoc pointer to the document, that the tab button represents - * @param parent parent widget + * @param tqparent tqparent widget * @param name name of the tab button */ KateTabBarButton(Kate::ViewManager* pViewManager, Kate::Document *pDoc, - TQWidget* parent = 0, const char * name = 0); + TQWidget* tqparent = 0, const char * name = 0); /** * standard destructor (emtpy) @@ -150,9 +152,10 @@ class KateTabBarButton: public QPushButton /** * This class handels all tabs and implements a full-featured "tabbar". */ -class KateTabBarExtension : public QWidget +class KateTabBarExtension : public TQWidget { Q_OBJECT + TQ_OBJECT public: /** @@ -161,13 +164,13 @@ class KateTabBarExtension : public QWidget * @param win pinter to the main window * @param bHorizOrientation true, if orientation is Qt::Horizontal * @param bSort true, if orientation is Qt::Horizontal - * @param parent parent widget + * @param tqparent tqparent widget * @param name name of widget * @param f widget flags */ KateTabBarExtension( Kate::DocumentManager *pDocManager, Kate::MainWindow *win, bool bHorizOrientation, bool bSort, - TQWidget * parent = 0, const char * name = 0, WFlags f = 0 ); + TQWidget * tqparent = 0, const char * name = 0, WFlags f = 0 ); /** standard destructor */ ~KateTabBarExtension(); @@ -241,11 +244,11 @@ class KateTabBarExtension : public QWidget * called whenever the toolbar's orientation changes * @param o new orientation [Qt::Horizontal or Qt::Vertical] */ - void slotMoved(Orientation o); + void slotMoved(Qt::Orientation o); private: KateTabBarButton* pCurrentTab; ///< pointer to the current tab - TQBoxLayout* top; ///< layout that contains all tabs + TQBoxLayout* top; ///< tqlayout that contains all tabs Kate::MainWindow* m_win; ///< pointer to the main window Kate::DocumentManager* m_docManager; ///< pointer to the document manager // TQPtrList <KateTabBarButton> m_tabs; ///< list containing all tabs @@ -260,11 +263,12 @@ class KateTabBarExtension : public QWidget class KateTabBarExtensionConfigPage : public Kate::PluginConfigPage { Q_OBJECT + TQ_OBJECT friend class KatePluginTabBarExtension; public: - KateTabBarExtensionConfigPage (TQObject* parent = 0L, TQWidget *parentWidget = 0L); + KateTabBarExtensionConfigPage (TQObject* tqparent = 0L, TQWidget *tqparentWidget = 0L); ~KateTabBarExtensionConfigPage (); /** @@ -294,9 +298,10 @@ class KateTabBarExtensionConfigPage : public Kate::PluginConfigPage class KatePluginTabBarExtension : public Kate::Plugin, Kate::PluginViewInterface, Kate::PluginConfigInterfaceExtension { Q_OBJECT + TQ_OBJECT public: - KatePluginTabBarExtension( TQObject* parent = 0, const char* name = 0 ); + KatePluginTabBarExtension( TQObject* tqparent = 0, const char* name = 0 ); virtual ~KatePluginTabBarExtension(); void addView (Kate::MainWindow *win); |