diff options
Diffstat (limited to 'kivio/kiviopart/addstenciltool.cpp')
-rw-r--r-- | kivio/kiviopart/addstenciltool.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/kivio/kiviopart/addstenciltool.cpp b/kivio/kiviopart/addstenciltool.cpp index 01f87e4f..e195af69 100644 --- a/kivio/kiviopart/addstenciltool.cpp +++ b/kivio/kiviopart/addstenciltool.cpp @@ -18,8 +18,8 @@ */ #include "addstenciltool.h" -#include <qevent.h> -#include <qcursor.h> +#include <tqevent.h> +#include <tqcursor.h> #include "kdebug.h" @@ -32,8 +32,8 @@ namespace Kivio { -AddStencilTool::AddStencilTool(KivioView* parent) - : MouseTool(parent, "Add Stencil Mouse Tool") +AddStencilTool::AddStencilTool(KivioView* tqparent) + : MouseTool(tqparent, "Add Stencil Mouse Tool") { m_leftMouseButtonPressed = false; m_stencil = 0; @@ -46,14 +46,14 @@ AddStencilTool::~AddStencilTool() m_stencil = 0; } -bool AddStencilTool::processEvent(QEvent* e) +bool AddStencilTool::processEvent(TQEvent* e) { switch(e->type()) { - case QEvent::MouseButtonPress: + case TQEvent::MouseButtonPress: { - QMouseEvent* me = static_cast<QMouseEvent*>(e); + TQMouseEvent* me = TQT_TQMOUSEEVENT(e); - if(me->button() == LeftButton) { + if(me->button() == Qt::LeftButton) { m_leftMouseButtonPressed = true; createStencil(me->pos()); return true; @@ -61,11 +61,11 @@ bool AddStencilTool::processEvent(QEvent* e) break; } - case QEvent::MouseButtonRelease: + case TQEvent::MouseButtonRelease: { - QMouseEvent* me = static_cast<QMouseEvent*>(e); + TQMouseEvent* me = TQT_TQMOUSEEVENT(e); - if(m_leftMouseButtonPressed && (me->button() == LeftButton)) { + if(m_leftMouseButtonPressed && (me->button() == Qt::LeftButton)) { m_leftMouseButtonPressed = false; endOperation(me->pos()); return true; @@ -73,9 +73,9 @@ bool AddStencilTool::processEvent(QEvent* e) break; } - case QEvent::MouseMove: + case TQEvent::MouseMove: { - QMouseEvent* me = static_cast<QMouseEvent*>(e); + TQMouseEvent* me = TQT_TQMOUSEEVENT(e); if(m_leftMouseButtonPressed) { resize(me->pos()); @@ -95,7 +95,7 @@ void AddStencilTool::setActivated(bool a) { if(a) { m_leftMouseButtonPressed = false; - view()->canvasWidget()->setCursor(Qt::CrossCursor); + view()->canvasWidget()->setCursor(TQt::CrossCursor); emit activated(this); } else { view()->canvasWidget()->unsetCursor(); @@ -111,7 +111,7 @@ void AddStencilTool::activateNewStencil(KivioStencilSpawner* spawner) setActivated(true); } -void AddStencilTool::createStencil(const QPoint& position) +void AddStencilTool::createStencil(const TQPoint& position) { if(!m_spawner) { return; @@ -135,7 +135,7 @@ void AddStencilTool::createStencil(const QPoint& position) view()->canvasWidget()->drawStencilXOR(m_stencil); } -void AddStencilTool::endOperation(const QPoint& position) +void AddStencilTool::endOperation(const TQPoint& position) { if(!m_stencil) { return; @@ -161,7 +161,7 @@ void AddStencilTool::endOperation(const QPoint& position) view()->pluginManager()->activateDefaultTool(); } -void AddStencilTool::resize(const QPoint& position) +void AddStencilTool::resize(const TQPoint& position) { KoPoint endPoint = view()->canvasWidget()->mapFromScreen(position); endPoint = view()->canvasWidget()->snapToGridAndGuides(endPoint); |