diff options
Diffstat (limited to 'krita/plugins/tools/defaulttools/kis_tool_move.cc')
-rw-r--r-- | krita/plugins/tools/defaulttools/kis_tool_move.cc | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/krita/plugins/tools/defaulttools/kis_tool_move.cc b/krita/plugins/tools/defaulttools/kis_tool_move.cc index 810bda37..643c29c8 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_move.cc +++ b/krita/plugins/tools/defaulttools/kis_tool_move.cc @@ -20,10 +20,10 @@ */ #include <stdlib.h> -#include <qpoint.h> +#include <tqpoint.h> #include <kaction.h> #include <klocale.h> -#include <qcolor.h> +#include <tqcolor.h> #include "kis_canvas_subject.h" #include "kis_cursor.h" #include "kis_image.h" @@ -45,8 +45,8 @@ KisToolMove::KisToolMove() setName("tool_move"); setCursor(KisCursor::moveCursor()); - m_repeatTimer = new QTimer(this); - connect( m_repeatTimer, SIGNAL( timeout() ), this, SLOT( slotMove() ) ); + m_repeatTimer = new TQTimer(this); + connect( m_repeatTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( slotMove() ) ); } KisToolMove::~KisToolMove() @@ -62,8 +62,8 @@ void KisToolMove::update(KisCanvasSubject *subject) void KisToolMove::buttonPress(KisButtonPressEvent *e) { - if (m_subject && e->button() == QMouseEvent::LeftButton) { - QPoint pos = e->pos().floorQPoint(); + if (m_subject && e->button() == TQMouseEvent::LeftButton) { + TQPoint pos = e->pos().floorTQPoint(); KisImageSP img = m_subject->currentImg(); KisLayerSP dev; @@ -76,9 +76,9 @@ void KisToolMove::buttonPress(KisButtonPressEvent *e) void KisToolMove::move(KisMoveEvent *e) { - if (m_subject && e->state() == QMouseEvent::LeftButton) { - QPoint pos = e->pos().floorQPoint(); - if((e->state() & Qt::AltButton) || (e->state() & Qt::ControlButton)) { + if (m_subject && e->state() == TQMouseEvent::LeftButton) { + TQPoint pos = e->pos().floorTQPoint(); + if((e->state() & TQt::AltButton) || (e->state() & TQt::ControlButton)) { if(fabs(pos.x() - m_dragStart.x()) > fabs(pos.y() - m_dragStart.y())) pos.setY(m_dragStart.y()); else @@ -90,8 +90,8 @@ void KisToolMove::move(KisMoveEvent *e) void KisToolMove::buttonRelease(KisButtonReleaseEvent *e) { - if (m_subject && e->button() == QMouseEvent::LeftButton) { - m_strategy.endDrag(e->pos().floorQPoint()); + if (m_subject && e->button() == TQMouseEvent::LeftButton) { + m_strategy.endDrag(e->pos().floorTQPoint()); } } @@ -102,9 +102,9 @@ void KisToolMove::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("&Move"), "tool_move", - Qt::SHIFT+Qt::Key_V, + TQt::SHIFT+TQt::Key_V, this, - SLOT(activate()), + TQT_SLOT(activate()), collection, name()); m_action->setToolTip(i18n("Move")); @@ -114,7 +114,7 @@ void KisToolMove::setup(KActionCollection *collection) } -void KisToolMove::keyPress( QKeyEvent *e ) +void KisToolMove::keyPress( TQKeyEvent *e ) { m_keyEvent = e; @@ -126,7 +126,7 @@ void KisToolMove::keyPress( QKeyEvent *e ) if (!img || !(dev = img->activeLayer())) return; - m_dragStart = QPoint( 0, 0 ); + m_dragStart = TQPoint( 0, 0 ); m_strategy.startDrag( m_dragStart ); m_steps = 1; m_repeatTimer->start(200); @@ -134,23 +134,23 @@ void KisToolMove::keyPress( QKeyEvent *e ) } } -void KisToolMove::keyRelease(QKeyEvent *) +void KisToolMove::keyRelease(TQKeyEvent *) { m_repeatTimer->stop(); if ( m_subject && m_keyEvent) { - if ( m_keyEvent->key() == Qt::Key_Left ) { - m_strategy.endDrag(QPoint( -m_steps, 0 )); + if ( m_keyEvent->key() == TQt::Key_Left ) { + m_strategy.endDrag(TQPoint( -m_steps, 0 )); } - else if ( m_keyEvent->key() == Qt::Key_Right ) { - m_strategy.endDrag(QPoint(m_steps, 0) ); + else if ( m_keyEvent->key() == TQt::Key_Right ) { + m_strategy.endDrag(TQPoint(m_steps, 0) ); } - else if ( m_keyEvent->key() == Qt::Key_Up ) { - m_strategy.endDrag(QPoint(0, -m_steps) ); + else if ( m_keyEvent->key() == TQt::Key_Up ) { + m_strategy.endDrag(TQPoint(0, -m_steps) ); } - else if ( m_keyEvent->key() == Qt::Key_Down ) { - m_strategy.endDrag(QPoint(0, m_steps) ); + else if ( m_keyEvent->key() == TQt::Key_Down ) { + m_strategy.endDrag(TQPoint(0, m_steps) ); } } m_steps = 0; @@ -162,17 +162,17 @@ void KisToolMove::slotMove() { if (m_subject && m_keyEvent) { - if ( m_keyEvent->key() == Qt::Key_Left ) { - m_strategy.drag(QPoint(-m_steps, 0) ); + if ( m_keyEvent->key() == TQt::Key_Left ) { + m_strategy.drag(TQPoint(-m_steps, 0) ); } - else if ( m_keyEvent->key() == Qt::Key_Right ) { - m_strategy.drag(QPoint(m_steps, 0) ); + else if ( m_keyEvent->key() == TQt::Key_Right ) { + m_strategy.drag(TQPoint(m_steps, 0) ); } - else if ( m_keyEvent->key() == Qt::Key_Up ) { - m_strategy.drag(QPoint(0, -m_steps) ); + else if ( m_keyEvent->key() == TQt::Key_Up ) { + m_strategy.drag(TQPoint(0, -m_steps) ); } - else if ( m_keyEvent->key() == Qt::Key_Down ) { - m_strategy.drag(QPoint(0, m_steps) ); + else if ( m_keyEvent->key() == TQt::Key_Down ) { + m_strategy.drag(TQPoint(0, m_steps) ); } ++m_steps; |