diff options
Diffstat (limited to 'arts/builder/createtool.cpp')
-rw-r--r-- | arts/builder/createtool.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/arts/builder/createtool.cpp b/arts/builder/createtool.cpp index d533a8fa..a08515f3 100644 --- a/arts/builder/createtool.cpp +++ b/arts/builder/createtool.cpp @@ -25,8 +25,8 @@ #include "structureport.h" //#include <arts/debug.h> -#include <qpalette.h> -#include <qpainter.h> +#include <tqpalette.h> +#include <tqpainter.h> #include <kmessagebox.h> #include <klocale.h> @@ -50,7 +50,7 @@ CreateTool::CreateTool(ModuleWidget *mwidget) width = -1; height = -1; - componentRect = QRect(0, 0, 0, 0); + componentRect = TQRect(0, 0, 0, 0); } CreateTool::~CreateTool() @@ -60,7 +60,7 @@ CreateTool::~CreateTool() mwidget->setMouseTracking(oldMouseTracking); } -void CreateTool::mousePressEvent(QMouseEvent *e) +void CreateTool::mousePressEvent(TQMouseEvent *e) { int x = mwidget->findCol(e->x()); int y = mwidget->findRow(e->y()); @@ -74,7 +74,7 @@ void CreateTool::mousePressEvent(QMouseEvent *e) mwidget->leaveTool(this); } -void CreateTool::mouseMoveEvent(QMouseEvent *e) +void CreateTool::mouseMoveEvent(TQMouseEvent *e) { if(width == -1) estimateSize(); @@ -90,9 +90,9 @@ void CreateTool::mouseMoveEvent(QMouseEvent *e) if(!posok) return; mwidget->repaint(componentRect); - componentRect = QRect(cellx, celly, cellx2 - cellx, celly2 - celly); + componentRect = TQRect(cellx, celly, cellx2 - cellx, celly2 - celly); - QPainter *p = new QPainter; + TQPainter *p = new QPainter; p->begin(mwidget); p->save(); @@ -102,7 +102,7 @@ void CreateTool::mouseMoveEvent(QMouseEvent *e) delete p; } -void CreateTool::mouseReleaseEvent(QMouseEvent *e) +void CreateTool::mouseReleaseEvent(TQMouseEvent *e) { } @@ -241,17 +241,17 @@ CreatePortTool::CreatePortTool(ModuleWidget *mwidget, this->type = type; } -MoveComponentsTool::MoveComponentsTool(ModuleWidget *widget, QMouseEvent *e) +MoveComponentsTool::MoveComponentsTool(ModuleWidget *widget, TQMouseEvent *e) : MWidgetTool(widget), lastPos(e->pos()) { } -void MoveComponentsTool::mousePressEvent(QMouseEvent *e) +void MoveComponentsTool::mousePressEvent(TQMouseEvent *e) { } -void MoveComponentsTool::mouseMoveEvent(QMouseEvent *e) +void MoveComponentsTool::mouseMoveEvent(TQMouseEvent *e) { int dx = (e->x() - lastPos.x())/mwidget->cellsize; int dy = (e->y() - lastPos.y())/mwidget->cellsize; @@ -283,7 +283,7 @@ void MoveComponentsTool::mouseMoveEvent(QMouseEvent *e) mwidget->reRoute(); } -void MoveComponentsTool::mouseReleaseEvent(QMouseEvent *e) +void MoveComponentsTool::mouseReleaseEvent(TQMouseEvent *e) { mwidget->leaveTool(this, true); } @@ -295,20 +295,20 @@ ConnectPortsTool::ConnectPortsTool(ModuleWidget *widget, ModulePort *connectingP firstPos = mwidget->portPos(connectingPort) + connectingPort->clickrect.center(); } -void ConnectPortsTool::mousePressEvent(QMouseEvent *e) +void ConnectPortsTool::mousePressEvent(TQMouseEvent *e) { } -void ConnectPortsTool::mouseMoveEvent(QMouseEvent *e) +void ConnectPortsTool::mouseMoveEvent(TQMouseEvent *e) { - QPainter painter(mwidget); + TQPainter painter(mwidget); painter.setPen(Qt::white); - mwidget->repaint(QRect(firstPos, lastPos).normalize()); + mwidget->repaint(TQRect(firstPos, lastPos).normalize()); painter.drawLine(firstPos, e->pos()); lastPos = e->pos(); } -void ConnectPortsTool::mouseReleaseEvent(QMouseEvent *e) +void ConnectPortsTool::mouseReleaseEvent(TQMouseEvent *e) { StructureComponent *component; ModulePort *otherPort; @@ -334,6 +334,6 @@ void ConnectPortsTool::mouseReleaseEvent(QMouseEvent *e) } } } - mwidget->repaint(QRect(firstPos, lastPos).normalize()); + mwidget->repaint(TQRect(firstPos, lastPos).normalize()); mwidget->leaveTool(this); } |