diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kword/KWMailMergeLabelAction.cpp | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kword/KWMailMergeLabelAction.cpp')
-rw-r--r-- | kword/KWMailMergeLabelAction.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/kword/KWMailMergeLabelAction.cpp b/kword/KWMailMergeLabelAction.cpp index 79d06378..7adce7f3 100644 --- a/kword/KWMailMergeLabelAction.cpp +++ b/kword/KWMailMergeLabelAction.cpp @@ -27,25 +27,25 @@ #include <kstyle.h> #include <kpopupmenu.h> -class MailMergeDraggableLabel : public QToolButton +class MailMergeDraggableLabel : public TQToolButton { public: - MailMergeDraggableLabel( KoMainWindow * mw, const QString & text, QWidget * parent = 0, const char * name = 0 ) - : QToolButton( parent, name ), m_mw(mw) + MailMergeDraggableLabel( KoMainWindow * mw, const TQString & text, TQWidget * tqparent = 0, const char * name = 0 ) + : TQToolButton( tqparent, name ), m_mw(mw) { setText(text); setAcceptDrops(true); validDrag = false; } protected: - void mousePressEvent( QMouseEvent * ev ) + void mousePressEvent( TQMouseEvent * ev ) { validDrag = true; startDragPos = ev->pos(); } - void mouseMoveEvent( QMouseEvent * ev ) + void mouseMoveEvent( TQMouseEvent * ev ) { - if ((startDragPos - ev->pos()).manhattanLength() > QApplication::startDragDistance()) + if ((startDragPos - ev->pos()).manhattanLength() > TQApplication::startDragDistance()) { validDrag = false; @@ -59,33 +59,33 @@ protected: #endif } } - void mouseReleaseEvent( QMouseEvent * ) + void mouseReleaseEvent( TQMouseEvent * ) { validDrag = false; } - QSize sizeHint() const + TQSize tqsizeHint() const { int w = fontMetrics().width( text() ); int h = fontMetrics().height(); - return QSize( w, h ); + return TQSize( w, h ); } - void drawButton( QPainter * p ) + void drawButton( TQPainter * p ) { // Draw the background - style().drawComplexControl( QStyle::CC_ToolButton, p, this, rect(), colorGroup(), - QStyle::Style_Enabled, QStyle::SC_ToolButton ); + tqstyle().tqdrawComplexControl( TQStyle::CC_ToolButton, p, this, rect(), tqcolorGroup(), + TQStyle::Style_Enabled, TQStyle::SC_ToolButton ); // Draw the label - style().drawControl( QStyle::CE_ToolButtonLabel, p, this, rect(), colorGroup(), - QStyle::Style_Enabled ); + tqstyle().tqdrawControl( TQStyle::CE_ToolButtonLabel, p, this, rect(), tqcolorGroup(), + TQStyle::Style_Enabled ); } - void enterEvent( QEvent* ) {}; - void leaveEvent( QEvent* ) {}; + void enterEvent( TQEvent* ) {}; + void leaveEvent( TQEvent* ) {}; #if 0 - void dragEnterEvent( QDragEnterEvent *ev ) { + void dragEnterEvent( TQDragEnterEvent *ev ) { if ( KURLDrag::canDecode( ev ) ) ev->acceptAction(); } - void dropEvent( QDropEvent* ev ) { + void dropEvent( TQDropEvent* ev ) { KURL::List lst; if ( KURLDrag::decode( ev, lst ) ) { m_mw->openURL( 0L, lst.first() ); @@ -93,7 +93,7 @@ protected: } #endif private: - QPoint startDragPos; + TQPoint startDragPos; bool validDrag; KoMainWindow * m_mw; }; @@ -102,13 +102,13 @@ private: -KWMailMergeLabelAction::KWMailMergeLabelAction( const QString &text, int accel, - QObject* receiver, const char* slot, QObject *parent, const char *name ) - : KAction( text, accel, receiver, slot, parent, name ), m_label( 0L ) +KWMailMergeLabelAction::KWMailMergeLabelAction( const TQString &text, int accel, + TQObject* receiver, const char* slot, TQObject *tqparent, const char *name ) + : KAction( text, accel, receiver, slot, tqparent, name ), m_label( 0L ) { } -int KWMailMergeLabelAction::plug( QWidget *widget, int index ) +int KWMailMergeLabelAction::plug( TQWidget *widget, int index ) { //do not call the previous implementation here @@ -123,7 +123,7 @@ int KWMailMergeLabelAction::plug( QWidget *widget, int index ) addContainer( tb, id ); - connect( tb, SIGNAL( destroyed() ), this, SLOT( slotDestroyed() ) ); + connect( tb, TQT_SIGNAL( destroyed() ), this, TQT_SLOT( slotDestroyed() ) ); return containerCount() - 1; } @@ -131,7 +131,7 @@ int KWMailMergeLabelAction::plug( QWidget *widget, int index ) return -1; } -void KWMailMergeLabelAction::unplug( QWidget *widget ) +void KWMailMergeLabelAction::unplug( TQWidget *widget ) { if ( widget->inherits( "KToolBar" ) ) { |