summaryrefslogtreecommitdiffstats
path: root/arts/builder/mwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'arts/builder/mwidget.cpp')
-rw-r--r--arts/builder/mwidget.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/arts/builder/mwidget.cpp b/arts/builder/mwidget.cpp
index b6c3d841..808b3bcf 100644
--- a/arts/builder/mwidget.cpp
+++ b/arts/builder/mwidget.cpp
@@ -7,9 +7,9 @@
#include <klocale.h>
#include <kmessagebox.h>
-#include <qtimer.h>
-#include <qpainter.h>
-#include <qevent.h>
+#include <tqtimer.h>
+#include <tqpainter.h>
+#include <tqevent.h>
#include "createtool.h"
@@ -56,22 +56,22 @@ void ModuleWidget::leaveTool(MWidgetTool *tool, bool wasModified)
emit modified(wasModified);
}
-QPoint ModuleWidget::componentPos(const StructureComponent *component) const
+TQPoint ModuleWidget::componentPos(const StructureComponent *component) const
{
int cellx = 0, celly = 0;
colXPos(component->x(), &cellx);
rowYPos(component->y(), &celly);
- return QPoint(cellx, celly);
+ return TQPoint(cellx, celly);
}
-QPoint ModuleWidget::portPos(const ModulePort *port) const
+TQPoint ModuleWidget::portPos(const ModulePort *port) const
{
int cellx = 0, celly = 0;
colXPos(port->owner->x() + port->drawsegment, &cellx);
rowYPos(port->owner->y(), &celly);
- return QPoint(cellx, celly);
+ return TQPoint(cellx, celly);
}
bool ModuleWidget::insertModule( Module *newModule )
@@ -125,7 +125,7 @@ void ModuleWidget::selectComponent( StructureComponent *component, bool onlyThis
endUpdate();
}
-void ModuleWidget::mousePressEvent( QMouseEvent *e )
+void ModuleWidget::mousePressEvent( TQMouseEvent *e )
{
if(activeTool)
{
@@ -172,7 +172,7 @@ void ModuleWidget::mousePressEvent( QMouseEvent *e )
}
}
-void ModuleWidget::mouseMoveEvent( QMouseEvent *e )
+void ModuleWidget::mouseMoveEvent( TQMouseEvent *e )
{
if(activeTool)
{
@@ -181,7 +181,7 @@ void ModuleWidget::mouseMoveEvent( QMouseEvent *e )
}
}
-void ModuleWidget::mouseReleaseEvent( QMouseEvent *e )
+void ModuleWidget::mouseReleaseEvent( TQMouseEvent *e )
{
if(activeTool)
{
@@ -250,16 +250,16 @@ bool ModuleWidget::hasSpace(StructureComponent *c, int destx, int desty,
return true;
}
-void ModuleWidget::paintCellBackground(QPainter *p, int y, int x)
+void ModuleWidget::paintCellBackground(TQPainter *p, int y, int x)
{
- QColor bgcolor;
+ TQColor bgcolor;
if((y & 1) == 1)
- bgcolor = QColor(168, 168, 168);
+ bgcolor = TQColor(168, 168, 168);
else
- bgcolor = QColor(146, 168, 146);
+ bgcolor = TQColor(146, 168, 146);
- p->fillRect(0, 0, cellsize, cellsize, QBrush(bgcolor));
+ p->fillRect(0, 0, cellsize, cellsize, TQBrush(bgcolor));
p->setPen(bgcolor.dark(115));
p->drawLine(0, 0, 0, cellsize - 1);
@@ -296,7 +296,7 @@ void ModuleWidget::endUpdate()
{
if(!--updateDepth)
{
- std::list<QRect>::iterator i;
+ std::list<TQRect>::iterator i;
for(i = UpdateList.begin(); i != UpdateList.end(); i++)
{
@@ -309,7 +309,7 @@ void ModuleWidget::endUpdate()
void ModuleWidget::redrawRect(int x, int y, int width, int height)
{
- QRect r = QRect(x, y, width, height);
+ TQRect r = TQRect(x, y, width, height);
if(!updateDepth)
{
@@ -321,7 +321,7 @@ void ModuleWidget::redrawRect(int x, int y, int width, int height)
}
}
-void ModuleWidget::redrawCells(QRect &r)
+void ModuleWidget::redrawCells(TQRect &r)
{
int x, y;
@@ -461,18 +461,18 @@ void ModuleWidget::reRoute()
void ModuleWidget::redrawAll()
{
// redraw everything
- QRect updaterect(0, 0, cols, rows);
+ TQRect updaterect(0, 0, cols, rows);
redrawCells(updaterect);
}
-void ModuleWidget::paintConnection(QPainter *p, int x, int y, int arx, int ary)
+void ModuleWidget::paintConnection(TQPainter *p, int x, int y, int arx, int ary)
{
long linetype = autorouter->get(arx, ary);
long ud_owner = -1, lr_owner = -1, lr_break = 0, ud_break = 0;
autorouter->getowners(arx, ary, ud_owner, lr_owner);
- p->setPen(QColor(255, 255, 255));
+ p->setPen(TQColor(255, 255, 255));
/*
if(linetype == AutoRouter::none)
@@ -481,7 +481,7 @@ void ModuleWidget::paintConnection(QPainter *p, int x, int y, int arx, int ary)
}
if(linetype & AutoRouter::solid)
{
- QBrush whitefill(QColor(255, 255, 255));
+ TQBrush whitefill(TQColor(255, 255, 255));
p->fillRect(x + cellsize/6, y + cellsize/6, cellsize/6, cellsize/6, whitefill);
}
@@ -513,7 +513,7 @@ void ModuleWidget::paintConnection(QPainter *p, int x, int y, int arx, int ary)
p->drawLine(x, y + cellsize/4, x, y + ud_break);
}
-void ModuleWidget::paintConnections(QPainter *p, int y, int x)
+void ModuleWidget::paintConnections(TQPainter *p, int y, int x)
{
// paints connections in the given 2x2-autorouter-block being a 1x1 block to the user
for(int dx = 0; dx < 2; dx++)
@@ -521,7 +521,7 @@ void ModuleWidget::paintConnections(QPainter *p, int y, int x)
paintConnection(p, (cellsize*dx)/2, (cellsize*dy)/2, x*2 + dx, y*2 + dy);
}
-void ModuleWidget::paintCell(QPainter *p, int y, int x)
+void ModuleWidget::paintCell(TQPainter *p, int y, int x)
{
#if 0 /* PORT */
if(theArtsBuilderApp->eventStackDepth() > 1)
@@ -594,7 +594,7 @@ void ModuleWidget::delModule()
if(KMessageBox::warningContinueCancel(0,
i18n("Delete %n selected module, port or connection? (No undo possible.)",
"Delete %n selected modules, ports and connections? (No undo possible.)",
- numSelected), QString::null, i18n("&Delete")) == KMessageBox::Continue)
+ numSelected), TQString::null, i18n("&Delete")) == KMessageBox::Continue)
{
selectPort(0L);
emit componentSelected(0);
@@ -608,7 +608,7 @@ void ModuleWidget::autoRedrawRouter()
if(autorouter->needRedraw()) redrawAll();
}
-ModuleWidget::ModuleWidget(Structure *structure, QWidget *parent, const char *name, WFlags f)
+ModuleWidget::ModuleWidget(Structure *structure, TQWidget *parent, const char *name, WFlags f)
: QtTableView( parent, name, f),
updateDepth( 0 ),
activeTool( 0L ),
@@ -636,9 +636,9 @@ ModuleWidget::ModuleWidget(Structure *structure, QWidget *parent, const char *na
autorouter = new AutoRouter(cols*2, rows*2);
arts_debug("PORT: mw; new ar ok - qtimer");
- QTimer *timer = new QTimer( this );
- connect( timer, SIGNAL(timeout()),
- this, SLOT(autoRedrawRouter()) );
+ TQTimer *timer = new TQTimer( this );
+ connect( timer, TQT_SIGNAL(timeout()),
+ this, TQT_SLOT(autoRedrawRouter()) );
arts_debug("PORT: mw; tstart");
timer->start( 100, FALSE ); // 100 ms reoccurring check