summaryrefslogtreecommitdiffstats
path: root/kolf/floater.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kolf/floater.cpp')
-rw-r--r--kolf/floater.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/kolf/floater.cpp b/kolf/floater.cpp
index 73612bc8..ff42398a 100644
--- a/kolf/floater.cpp
+++ b/kolf/floater.cpp
@@ -1,5 +1,5 @@
-#include <qlabel.h>
-#include <qslider.h>
+#include <tqlabel.h>
+#include <tqslider.h>
#include <kconfig.h>
@@ -39,14 +39,14 @@ void FloaterGuide::setPoints(int xa, int ya, int xb, int yb)
}
}
-Config *FloaterGuide::config(QWidget *parent)
+Config *FloaterGuide::config(TQWidget *parent)
{
return floater->config(parent);
}
/////////////////////////
-Floater::Floater(QRect rect, QCanvas *canvas)
+Floater::Floater(TQRect rect, TQCanvas *canvas)
: Bridge(rect, canvas), speedfactor(16)
{
wall = 0;
@@ -55,7 +55,7 @@ Floater::Floater(QRect rect, QCanvas *canvas)
haventMoved = true;
wall = new FloaterGuide(this, canvas);
wall->setPoints(100, 100, 200, 200);
- wall->setPen(QPen(wall->pen().color().light(), wall->pen().width() - 1));
+ wall->setPen(TQPen(wall->pen().color().light(), wall->pen().width() - 1));
move(wall->endPoint().x(), wall->endPoint().y());
setTopWallVisible(false);
@@ -95,7 +95,7 @@ void Floater::advance(int phase)
if (phase == 1 && (xVelocity() || yVelocity()))
{
- if (Vector(origin, QPoint(x(), y())).magnitude() > vector.magnitude())
+ if (Vector(origin, TQPoint(x(), y())).magnitude() > vector.magnitude())
{
vector.setDirection(vector.direction() + M_PI);
origin = (origin == wall->startPoint()? wall->endPoint() : wall->startPoint());
@@ -107,8 +107,8 @@ void Floater::advance(int phase)
void Floater::reset()
{
- QPoint start = wall->startPoint() + QPoint(wall->x(), wall->y());
- QPoint end = wall->endPoint() + QPoint(wall->x(), wall->y());
+ TQPoint start = wall->startPoint() + TQPoint(wall->x(), wall->y());
+ TQPoint end = wall->endPoint() + TQPoint(wall->x(), wall->y());
vector = Vector(end, start);
origin = end;
@@ -117,9 +117,9 @@ void Floater::reset()
setSpeed(speed);
}
-QPtrList<QCanvasItem> Floater::moveableItems() const
+TQPtrList<TQCanvasItem> Floater::moveableItems() const
{
- QPtrList<QCanvasItem> ret(wall->moveableItems());
+ TQPtrList<TQCanvasItem> ret(wall->moveableItems());
ret.append(wall);
ret.append(point);
return ret;
@@ -167,8 +167,8 @@ void Floater::moveBy(double dx, double dy)
if (!isEnabled())
return;
- QCanvasItemList l = collisions(false);
- for (QCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it)
+ TQCanvasItemList l = collisions(false);
+ for (TQCanvasItemList::Iterator it = l.begin(); it != l.end(); ++it)
{
CanvasItem *item = dynamic_cast<CanvasItem *>(*it);
@@ -197,7 +197,7 @@ void Floater::moveBy(double dx, double dy)
// this call must come after we have tested for collisions, otherwise we skip them when saving!
// that's a bad thing
- QCanvasRectangle::moveBy(dx, dy);
+ TQCanvasRectangle::moveBy(dx, dy);
// because we don't do Bridge::moveBy();
topWall->move(x(), y());
@@ -211,20 +211,20 @@ void Floater::moveBy(double dx, double dy)
void Floater::saveState(StateDB *db)
{
- db->setPoint(QPoint(x(), y()));
+ db->setPoint(TQPoint(x(), y()));
}
void Floater::loadState(StateDB *db)
{
- const QPoint moveTo = db->point();
+ const TQPoint moveTo = db->point();
move(moveTo.x(), moveTo.y());
}
void Floater::save(KConfig *cfg)
{
cfg->writeEntry("speed", speed);
- cfg->writeEntry("startPoint", QPoint(wall->startPoint().x() + wall->x(), wall->startPoint().y() + wall->y()));
- cfg->writeEntry("endPoint", QPoint(wall->endPoint().x() + wall->x(), wall->endPoint().y() + wall->y()));
+ cfg->writeEntry("startPoint", TQPoint(wall->startPoint().x() + wall->x(), wall->startPoint().y() + wall->y()));
+ cfg->writeEntry("endPoint", TQPoint(wall->endPoint().x() + wall->x(), wall->endPoint().y() + wall->y()));
doSave(cfg);
}
@@ -233,9 +233,9 @@ void Floater::load(KConfig *cfg)
{
move(firstPoint.x(), firstPoint.y());
- QPoint start(wall->startPoint() + QPoint(wall->x(), wall->y()));
+ TQPoint start(wall->startPoint() + TQPoint(wall->x(), wall->y()));
start = cfg->readPointEntry("startPoint", &start);
- QPoint end(wall->endPoint() + QPoint(wall->x(), wall->y()));
+ TQPoint end(wall->endPoint() + TQPoint(wall->x(), wall->y()));
end = cfg->readPointEntry("endPoint", &end);
wall->setPoints(start.x(), start.y(), end.x(), end.y());
wall->move(0, 0);
@@ -248,24 +248,24 @@ void Floater::load(KConfig *cfg)
void Floater::firstMove(int x, int y)
{
- firstPoint = QPoint(x, y);
+ firstPoint = TQPoint(x, y);
}
/////////////////////////
-FloaterConfig::FloaterConfig(Floater *floater, QWidget *parent)
+FloaterConfig::FloaterConfig(Floater *floater, TQWidget *parent)
: BridgeConfig(floater, parent)
{
this->floater = floater;
m_vlayout->addStretch();
- m_vlayout->addWidget(new QLabel(i18n("Moving speed"), this));
- QHBoxLayout *hlayout = new QHBoxLayout(m_vlayout, spacingHint());
- hlayout->addWidget(new QLabel(i18n("Slow"), this));
- QSlider *slider = new QSlider(0, 20, 2, floater->curSpeed(), Qt::Horizontal, this);
+ m_vlayout->addWidget(new TQLabel(i18n("Moving speed"), this));
+ TQHBoxLayout *hlayout = new TQHBoxLayout(m_vlayout, spacingHint());
+ hlayout->addWidget(new TQLabel(i18n("Slow"), this));
+ TQSlider *slider = new TQSlider(0, 20, 2, floater->curSpeed(), Qt::Horizontal, this);
hlayout->addWidget(slider);
- hlayout->addWidget(new QLabel(i18n("Fast"), this));
- connect(slider, SIGNAL(valueChanged(int)), this, SLOT(speedChanged(int)));
+ hlayout->addWidget(new TQLabel(i18n("Fast"), this));
+ connect(slider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(speedChanged(int)));
}
void FloaterConfig::speedChanged(int news)