diff options
Diffstat (limited to 'krita/plugins/tools/selectiontools/kis_tool_move_selection.cc')
-rw-r--r-- | krita/plugins/tools/selectiontools/kis_tool_move_selection.cc | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/krita/plugins/tools/selectiontools/kis_tool_move_selection.cc b/krita/plugins/tools/selectiontools/kis_tool_move_selection.cc index 25ceb924..42c95093 100644 --- a/krita/plugins/tools/selectiontools/kis_tool_move_selection.cc +++ b/krita/plugins/tools/selectiontools/kis_tool_move_selection.cc @@ -19,11 +19,11 @@ #include "kis_tool_move_selection.h" #include <stdlib.h> -#include <qpoint.h> +#include <tqpoint.h> #include <kaction.h> #include <kcommand.h> #include <klocale.h> -#include <qcolor.h> +#include <tqcolor.h> #include "kis_canvas_subject.h" #include "kis_cursor.h" #include "kis_image.h" @@ -41,22 +41,22 @@ class KisSelectionOffsetCommand : public KNamedCommand { typedef KNamedCommand super; public: - KisSelectionOffsetCommand(KisSelectionSP layer, const QPoint& oldpos, const QPoint& newpos); + KisSelectionOffsetCommand(KisSelectionSP layer, const TQPoint& oldpos, const TQPoint& newpos); virtual ~KisSelectionOffsetCommand(); virtual void execute(); virtual void unexecute(); private: - void moveTo(const QPoint& pos); + void moveTo(const TQPoint& pos); private: KisSelectionSP m_layer; - QPoint m_oldPos; - QPoint m_newPos; + TQPoint m_oldPos; + TQPoint m_newPos; }; - KisSelectionOffsetCommand::KisSelectionOffsetCommand(KisSelectionSP layer, const QPoint& oldpos, const QPoint& newpos) : + KisSelectionOffsetCommand::KisSelectionOffsetCommand(KisSelectionSP layer, const TQPoint& oldpos, const TQPoint& newpos) : super(i18n("Move Layer")) { m_layer = layer; @@ -79,7 +79,7 @@ private: moveTo(m_oldPos); } - void KisSelectionOffsetCommand::moveTo(const QPoint& pos) + void KisSelectionOffsetCommand::moveTo(const TQPoint& pos) { if (m_layer->undoAdapter()) { m_layer->undoAdapter()->setUndo(false); @@ -88,7 +88,7 @@ private: m_layer->setX(pos.x()); m_layer->setY(pos.y()); - m_layer->parentPaintDevice()->setDirty(); + m_layer->tqparentPaintDevice()->setDirty(); if (m_layer->undoAdapter()) { m_layer->undoAdapter()->setUndo(true); @@ -118,8 +118,8 @@ void KisToolMoveSelection::update(KisCanvasSubject *subject) void KisToolMoveSelection::buttonPress(KisButtonPressEvent *e) { m_dragging = false; - 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(); KisPaintLayerSP lay; @@ -145,8 +145,8 @@ void KisToolMoveSelection::buttonPress(KisButtonPressEvent *e) void KisToolMoveSelection::move(KisMoveEvent *e) { if (m_subject && m_dragging) { - QPoint pos = e->pos().floorQPoint(); - if((e->state() & Qt::AltButton) || (e->state() & Qt::ControlButton)) { + 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 @@ -158,7 +158,7 @@ void KisToolMoveSelection::move(KisMoveEvent *e) if(!lay) return; KisSelectionSP sel = lay->paintDevice()->selection(); - QRect rc; + TQRect rc; pos -= m_dragStart; // convert to delta rc = sel->selectedRect(); @@ -166,8 +166,8 @@ void KisToolMoveSelection::move(KisMoveEvent *e) sel->setY(sel->getY() + pos.y()); rc = rc.unite(sel->selectedRect()); - m_layerPosition = QPoint(sel->getX(), sel->getY()); - m_dragStart = e->pos().floorQPoint(); + m_layerPosition = TQPoint(sel->getX(), sel->getY()); + m_dragStart = e->pos().floorTQPoint(); lay->paintDevice()->setDirty(rc); } @@ -176,7 +176,7 @@ void KisToolMoveSelection::move(KisMoveEvent *e) void KisToolMoveSelection::buttonRelease(KisButtonReleaseEvent *e) { - if (m_subject && e->button() == QMouseEvent::LeftButton && m_dragging) { + if (m_subject && e->button() == TQMouseEvent::LeftButton && m_dragging) { m_dragging = false; KisImageSP img = m_subject->currentImg(); if(!img) return; @@ -209,9 +209,9 @@ void KisToolMoveSelection::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("&Move selection"), "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 the selection")); |