summaryrefslogtreecommitdiffstats
path: root/kolf/game.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:58:53 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-16 09:58:53 -0600
commit84ace1135cac57993b72fee7105b92def1638d32 (patch)
treeb8871eb76e3db4a062731b0ce7c99c24fac119e8 /kolf/game.cpp
parent97d1732e257f8700488d7ca1660ae7eba8fc6065 (diff)
downloadtdegames-84ace1135cac57993b72fee7105b92def1638d32.tar.gz
tdegames-84ace1135cac57993b72fee7105b92def1638d32.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 97d1732e257f8700488d7ca1660ae7eba8fc6065.
Diffstat (limited to 'kolf/game.cpp')
-rw-r--r--kolf/game.cpp304
1 files changed, 152 insertions, 152 deletions
diff --git a/kolf/game.cpp b/kolf/game.cpp
index 7554d173..9ff1ed73 100644
--- a/kolf/game.cpp
+++ b/kolf/game.cpp
@@ -15,7 +15,7 @@
#include <kprinter.h>
#include <kstandarddirs.h>
-#include <brush.h>
+#include <tqbrush.h>
#include <tqcanvas.h>
#include <tqcheckbox.h>
#include <tqcolor.h>
@@ -25,7 +25,7 @@
#include <tqfontmetrics.h>
#include <tqimage.h>
#include <tqlabel.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqmap.h>
#include <tqpainter.h>
#include <tqpaintdevicemetrics.h>
@@ -58,12 +58,12 @@
inline TQString makeGroup(int id, int hole, TQString name, int x, int y)
{
- return TQString("%1-%2@%3,%4|%5").arg(hole).arg(name).arg(x).arg(y).arg(id);
+ return TQString("%1-%2@%3,%4|%5").tqarg(hole).tqarg(name).tqarg(x).tqarg(y).tqarg(id);
}
inline TQString makeStateGroup(int id, const TQString &name)
{
- return TQString("%1|%2").arg(name).arg(id);
+ return TQString("%1|%2").tqarg(name).tqarg(id);
}
/////////////////////////
@@ -144,9 +144,9 @@ void Arrow::setZ(double newz)
void Arrow::setVisible(bool yes)
{
- TQCanvasLine::setVisible(yes);
- line1->setVisible(yes);
- line2->setVisible(yes);
+ TQCanvasLine::tqsetVisible(yes);
+ line1->tqsetVisible(yes);
+ line2->tqsetVisible(yes);
}
void Arrow::moveBy(double dx, double dy)
@@ -197,23 +197,23 @@ BridgeConfig::BridgeConfig(Bridge *bridge, TQWidget *parent)
{
this->bridge = bridge;
- m_vlayout = new TQVBoxLayout(this, marginHint(), spacingHint());
- TQGridLayout *layout = new TQGridLayout(m_vlayout, 2, 3, spacingHint());
- layout->addWidget(new TQLabel(i18n("Walls on:"), this), 0, 0);
+ m_vtqlayout = new TQVBoxLayout(this, marginHint(), spacingHint());
+ TQGridLayout *tqlayout = new TQGridLayout(m_vtqlayout, 2, 3, spacingHint());
+ tqlayout->addWidget(new TQLabel(i18n("Walls on:"), this), 0, 0);
top = new TQCheckBox(i18n("&Top"), this);
- layout->addWidget(top, 0, 1);
+ tqlayout->addWidget(top, 0, 1);
connect(top, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(topWallChanged(bool)));
top->setChecked(bridge->topWallVisible());
bot = new TQCheckBox(i18n("&Bottom"), this);
- layout->addWidget(bot, 1, 1);
+ tqlayout->addWidget(bot, 1, 1);
connect(bot, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(botWallChanged(bool)));
bot->setChecked(bridge->botWallVisible());
left = new TQCheckBox(i18n("&Left"), this);
- layout->addWidget(left, 1, 0);
+ tqlayout->addWidget(left, 1, 0);
connect(left, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(leftWallChanged(bool)));
left->setChecked(bridge->leftWallVisible());
right = new TQCheckBox(i18n("&Right"), this);
- layout->addWidget(right, 1, 2);
+ tqlayout->addWidget(right, 1, 2);
connect(right, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(rightWallChanged(bool)));
right->setChecked(bridge->rightWallVisible());
}
@@ -264,10 +264,10 @@ Bridge::Bridge(TQRect rect, TQCanvas *canvas)
setWallZ(z() + 0.01);
setWallColor(color);
- topWall->setVisible(false);
- botWall->setVisible(false);
- leftWall->setVisible(false);
- rightWall->setVisible(false);
+ topWall->tqsetVisible(false);
+ botWall->tqsetVisible(false);
+ leftWall->tqsetVisible(false);
+ rightWall->tqsetVisible(false);
point = new RectPoint(color, this, canvas);
editModeChanged(false);
@@ -321,7 +321,7 @@ void Bridge::aboutToDie()
void Bridge::editModeChanged(bool changed)
{
- point->setVisible(changed);
+ point->tqsetVisible(changed);
moveBy(0, 0);
}
@@ -405,18 +405,18 @@ WindmillConfig::WindmillConfig(Windmill *windmill, TQWidget *parent)
: BridgeConfig(windmill, parent)
{
this->windmill = windmill;
- m_vlayout->addStretch();
+ m_vtqlayout->addStretch();
TQCheckBox *check = new TQCheckBox(i18n("Windmill on bottom"), this);
check->setChecked(windmill->bottom());
connect(check, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(endChanged(bool)));
- m_vlayout->addWidget(check);
+ m_vtqlayout->addWidget(check);
- TQHBoxLayout *hlayout = new TQHBoxLayout(m_vlayout, spacingHint());
- hlayout->addWidget(new TQLabel(i18n("Slow"), this));
+ TQHBoxLayout *htqlayout = new TQHBoxLayout(m_vtqlayout, spacingHint());
+ htqlayout->addWidget(new TQLabel(i18n("Slow"), this));
TQSlider *slider = new TQSlider(1, 10, 1, windmill->curSpeed(), Qt::Horizontal, this);
- hlayout->addWidget(slider);
- hlayout->addWidget(new TQLabel(i18n("Fast"), this));
+ htqlayout->addWidget(slider);
+ htqlayout->addWidget(new TQLabel(i18n("Fast"), this));
connect(slider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(speedChanged(int)));
endChanged(check->isChecked());
@@ -454,7 +454,7 @@ Windmill::Windmill(TQRect rect, TQCanvas *canvas)
{
guard = new WindmillGuard(canvas);
guard->setPen(TQPen(black, 5));
- guard->setVisible(true);
+ guard->tqsetVisible(true);
guard->setAlwaysShow(true);
setSpeed(5);
guard->setZ(wallZ() + .1);
@@ -467,8 +467,8 @@ Windmill::Windmill(TQRect rect, TQCanvas *canvas)
right->setAlwaysShow(true);
left->setZ(wallZ());
right->setZ(wallZ());
- left->setVisible(true);
- right->setVisible(true);
+ left->tqsetVisible(true);
+ right->tqsetVisible(true);
setTopWallVisible(false);
setBotWallVisible(false);
@@ -629,12 +629,12 @@ void Sign::draw(TQPainter &painter)
TQSimpleRichText txt(m_text, kapp->font());
const int indent = wallPen().width() + 3;
txt.setWidth(width() - 2*indent);
- TQColorGroup colorGroup;
- colorGroup.setColor(TQColorGroup::Foreground, black);
- colorGroup.setColor(TQColorGroup::Text, black);
- colorGroup.setColor(TQColorGroup::Background, black);
- colorGroup.setColor(TQColorGroup::Base, black);
- txt.draw(&painter, x() + indent, y(), TQRect(x() + indent, y(), width() - indent, height() - indent), colorGroup);
+ TQColorGroup tqcolorGroup;
+ tqcolorGroup.setColor(TQColorGroup::Foreground, black);
+ tqcolorGroup.setColor(TQColorGroup::Text, black);
+ tqcolorGroup.setColor(TQColorGroup::Background, black);
+ tqcolorGroup.setColor(TQColorGroup::Base, black);
+ txt.draw(&painter, x() + indent, y(), TQRect(x() + indent, y(), width() - indent, height() - indent), tqcolorGroup);
}
/////////////////////////
@@ -643,10 +643,10 @@ SignConfig::SignConfig(Sign *sign, TQWidget *parent)
: BridgeConfig(sign, parent)
{
this->sign = sign;
- m_vlayout->addStretch();
- m_vlayout->addWidget(new TQLabel(i18n("Sign HTML:"), this));
+ m_vtqlayout->addStretch();
+ m_vtqlayout->addWidget(new TQLabel(i18n("Sign HTML:"), this));
KLineEdit *name = new KLineEdit(sign->text(), this);
- m_vlayout->addWidget(name);
+ m_vtqlayout->addWidget(name);
connect(name, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(textChanged(const TQString &)));
}
@@ -663,20 +663,20 @@ EllipseConfig::EllipseConfig(Ellipse *ellipse, TQWidget *parent)
{
this->ellipse = ellipse;
- m_vlayout = new TQVBoxLayout(this, marginHint(), spacingHint());
+ m_vtqlayout = new TQVBoxLayout(this, marginHint(), spacingHint());
TQCheckBox *check = new TQCheckBox(i18n("Enable show/hide"), this);
- m_vlayout->addWidget(check);
+ m_vtqlayout->addWidget(check);
connect(check, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(check1Changed(bool)));
check->setChecked(ellipse->changeEnabled());
- TQHBoxLayout *hlayout = new TQHBoxLayout(m_vlayout, spacingHint());
+ TQHBoxLayout *htqlayout = new TQHBoxLayout(m_vtqlayout, spacingHint());
slow1 = new TQLabel(i18n("Slow"), this);
- hlayout->addWidget(slow1);
+ htqlayout->addWidget(slow1);
slider1 = new TQSlider(1, 100, 5, 100 - ellipse->changeEvery(), Qt::Horizontal, this);
- hlayout->addWidget(slider1);
+ htqlayout->addWidget(slider1);
fast1 = new TQLabel(i18n("Fast"), this);
- hlayout->addWidget(fast1);
+ htqlayout->addWidget(fast1);
connect(slider1, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(value1Changed(int)));
@@ -684,7 +684,7 @@ EllipseConfig::EllipseConfig(Ellipse *ellipse, TQWidget *parent)
// TODO add slider2 and friends and make it possible for ellipses to grow and contract
- m_vlayout->addStretch();
+ m_vtqlayout->addStretch();
}
void EllipseConfig::value1Changed(int news)
@@ -733,7 +733,7 @@ Ellipse::Ellipse(TQCanvas *canvas)
setChangeEnabled(false);
setChangeEvery(50);
count = 0;
- setVisible(true);
+ tqsetVisible(true);
point = new RectPoint(black, this, canvas);
point->setSizeFactor(2.0);
@@ -750,7 +750,7 @@ void Ellipse::setChangeEnabled(bool changeEnabled)
setAnimated(m_changeEnabled);
if (!m_changeEnabled)
- setVisible(true);
+ tqsetVisible(true);
}
TQPtrList<TQCanvasItem> Ellipse::moveableItems() const
@@ -775,7 +775,7 @@ void Ellipse::moveBy(double dx, double dy)
void Ellipse::editModeChanged(bool changed)
{
- point->setVisible(changed);
+ point->tqsetVisible(changed);
moveBy(0, 0);
}
@@ -788,7 +788,7 @@ void Ellipse::advance(int phase)
if (count > (m_changeEvery + 10) * 1.8)
count = 0;
if (count == 0)
- setVisible(!isVisible());
+ tqsetVisible(!isVisible());
count++;
}
@@ -819,7 +819,7 @@ Config *Ellipse::config(TQWidget *parent)
void Ellipse::aboutToSave()
{
- setVisible(true);
+ tqsetVisible(true);
dontHide = true;
}
@@ -860,7 +860,7 @@ bool Puddle::collision(Ball *ball, long int /*id*/)
if (ball->isVisible())
{
TQCanvasRectangle i(TQRect(ball->x(), ball->y(), 1, 1), canvas());
- i.setVisible(true);
+ i.tqsetVisible(true);
// is center of ball in?
if (i.collidesWith(this)/* && ball->curVector().magnitude() < 4*/)
@@ -868,7 +868,7 @@ bool Puddle::collision(Ball *ball, long int /*id*/)
playSound("puddle");
ball->setAddStroke(ball->addStroke() + 1);
ball->setPlaceOnGround(true);
- ball->setVisible(false);
+ ball->tqsetVisible(false);
ball->setState(Stopped);
ball->setVelocity(0, 0);
if (game && game->curBall() == ball)
@@ -911,7 +911,7 @@ Sand::Sand(TQCanvas *canvas)
bool Sand::collision(Ball *ball, long int /*id*/)
{
TQCanvasRectangle i(TQRect(ball->x(), ball->y(), 1, 1), canvas());
- i.setVisible(true);
+ i.tqsetVisible(true);
// is center of ball in?
if (i.collidesWith(this)/* && ball->curVector().magnitude() < 4*/)
@@ -954,12 +954,12 @@ Putter::Putter(TQCanvas *canvas)
void Putter::showInfo()
{
- guideLine->setVisible(isVisible());
+ guideLine->tqsetVisible(isVisible());
}
void Putter::hideInfo()
{
- guideLine->setVisible(m_showGuideLine? isVisible() : false);
+ guideLine->tqsetVisible(m_showGuideLine? isVisible() : false);
}
void Putter::moveBy(double dx, double dy)
@@ -976,8 +976,8 @@ void Putter::setShowGuideLine(bool yes)
void Putter::setVisible(bool yes)
{
- TQCanvasLine::setVisible(yes);
- guideLine->setVisible(m_showGuideLine? yes : false);
+ TQCanvasLine::tqsetVisible(yes);
+ guideLine->tqsetVisible(m_showGuideLine? yes : false);
}
void Putter::setOrigin(int _x, int _y)
@@ -1002,11 +1002,11 @@ void Putter::go(Direction d, Amount amount)
{
case Forwards:
len -= 1;
- guideLine->setVisible(false);
+ guideLine->tqsetVisible(false);
break;
case Backwards:
len += 1;
- guideLine->setVisible(false);
+ guideLine->tqsetVisible(false);
break;
case D_Left:
angle += addition;
@@ -1085,7 +1085,7 @@ void Bumper::moveBy(double dx, double dy)
void Bumper::editModeChanged(bool changed)
{
- inside->setVisible(!changed);
+ inside->tqsetVisible(!changed);
}
void Bumper::advance(int phase)
@@ -1166,7 +1166,7 @@ HoleResult Hole::result(TQPoint p, double s, bool * /*wasCenter*/)
return Result_Miss;
TQCanvasRectangle i(TQRect(p, TQSize(1, 1)), canvas());
- i.setVisible(true);
+ i.tqsetVisible(true);
// is center of ball in cup?
if (i.collidesWith(this))
@@ -1238,7 +1238,7 @@ BlackHole::BlackHole(TQCanvas *canvas)
setSize(width(), width() / .8);
const float factor = 1.3;
outside->setSize(width() * factor, height() * factor);
- outside->setVisible(true);
+ outside->tqsetVisible(true);
moveBy(0, 0);
@@ -1249,7 +1249,7 @@ void BlackHole::showInfo()
{
delete infoLine;
infoLine = new TQCanvasLine(canvas());
- infoLine->setVisible(true);
+ infoLine->tqsetVisible(true);
infoLine->setPen(TQPen(exitItem->pen().color(), 2));
infoLine->setZ(10000);
infoLine->setPoints(x(), y(), exitItem->x(), exitItem->y());
@@ -1277,7 +1277,7 @@ void BlackHole::updateInfo()
{
if (infoLine)
{
- infoLine->setVisible(true);
+ infoLine->tqsetVisible(true);
infoLine->setPoints(x(), y(), exitItem->x(), exitItem->y());
exitItem->showInfo();
}
@@ -1338,7 +1338,7 @@ bool BlackHole::place(Ball *ball, bool /*wasCenter*/)
ball->setVelocity(0, 0);
ball->setState(Stopped);
- ball->setVisible(false);
+ ball->tqsetVisible(false);
ball->setForceStillGoing(true);
double magnitude = Vector(TQPoint(x(), y()), TQPoint(exitItem->x(), exitItem->y())).magnitude();
@@ -1367,7 +1367,7 @@ void BlackHole::eject(Ball *ball, double speed)
ball->setVector(v);
ball->setForceStillGoing(false);
- ball->setVisible(true);
+ ball->tqsetVisible(true);
ball->setState(Rolling);
runs++;
@@ -1418,7 +1418,7 @@ void BlackHole::finishMe()
}
exitItem->setPoints(start.x(), start.y(), end.x(), end.y());
- exitItem->setVisible(true);
+ exitItem->tqsetVisible(true);
}
void BlackHole::save(KConfig *cfg)
@@ -1439,7 +1439,7 @@ BlackHoleExit::BlackHoleExit(BlackHole *blackHole, TQCanvas *canvas)
setZ(blackHole->z());
arrow->setZ(z() - .00001);
updateArrowLength();
- arrow->setVisible(false);
+ arrow->tqsetVisible(false);
}
void BlackHoleExit::aboutToDie()
@@ -1484,12 +1484,12 @@ void BlackHoleExit::editModeChanged(bool editing)
void BlackHoleExit::showInfo()
{
- arrow->setVisible(true);
+ arrow->tqsetVisible(true);
}
void BlackHoleExit::hideInfo()
{
- arrow->setVisible(false);
+ arrow->tqsetVisible(false);
}
Config *BlackHoleExit::config(TQWidget *parent)
@@ -1503,30 +1503,30 @@ BlackHoleConfig::BlackHoleConfig(BlackHole *blackHole, TQWidget *parent)
: Config(parent)
{
this->blackHole = blackHole;
- TQVBoxLayout *layout = new TQVBoxLayout(this, marginHint(), spacingHint());
- layout->addWidget(new TQLabel(i18n("Exiting ball angle:"), this));
+ TQVBoxLayout *tqlayout = new TQVBoxLayout(this, marginHint(), spacingHint());
+ tqlayout->addWidget(new TQLabel(i18n("Exiting ball angle:"), this));
TQSpinBox *deg = new TQSpinBox(0, 359, 10, this);
deg->setSuffix(TQString(" ") + i18n("degrees"));
deg->setValue(blackHole->curExitDeg());
deg->setWrapping(true);
- layout->addWidget(deg);
+ tqlayout->addWidget(deg);
connect(deg, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(degChanged(int)));
- layout->addStretch();
+ tqlayout->addStretch();
- TQHBoxLayout *hlayout = new TQHBoxLayout(layout, spacingHint());
- hlayout->addWidget(new TQLabel(i18n("Minimum exit speed:"), this));
+ TQHBoxLayout *htqlayout = new TQHBoxLayout(tqlayout, spacingHint());
+ htqlayout->addWidget(new TQLabel(i18n("Minimum exit speed:"), this));
KDoubleNumInput *min = new KDoubleNumInput(this);
min->setRange(0, 8, 1, true);
- hlayout->addWidget(min);
+ htqlayout->addWidget(min);
connect(min, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(minChanged(double)));
min->setValue(blackHole->minSpeed());
- hlayout = new TQHBoxLayout(layout, spacingHint());
- hlayout->addWidget(new TQLabel(i18n("Maximum:"), this));
+ htqlayout = new TQHBoxLayout(tqlayout, spacingHint());
+ htqlayout->addWidget(new TQLabel(i18n("Maximum:"), this));
KDoubleNumInput *max = new KDoubleNumInput(this);
max->setRange(1, 10, 1, true);
- hlayout->addWidget(max);
+ htqlayout->addWidget(max);
connect(max, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(maxChanged(double)));
max->setValue(blackHole->maxSpeed());
}
@@ -1639,7 +1639,7 @@ void WallPoint::updateVisible()
void WallPoint::editModeChanged(bool changed)
{
editing = changed;
- setVisible(true);
+ tqsetVisible(true);
if (!editing)
updateVisible();
}
@@ -1741,8 +1741,8 @@ Wall::Wall(TQCanvas *canvas)
startItem = new WallPoint(true, this, canvas);
endItem = new WallPoint(false, this, canvas);
- startItem->setVisible(true);
- endItem->setVisible(true);
+ startItem->tqsetVisible(true);
+ endItem->tqsetVisible(true);
setPen(TQPen(darkRed, 3));
setPoints(-15, 10, 15, -5);
@@ -1777,10 +1777,10 @@ void Wall::setAlwaysShow(bool yes)
void Wall::setVisible(bool yes)
{
- TQCanvasLine::setVisible(yes);
+ TQCanvasLine::tqsetVisible(yes);
- startItem->setVisible(yes);
- endItem->setVisible(yes);
+ startItem->tqsetVisible(yes);
+ endItem->tqsetVisible(yes);
startItem->updateVisible();
endItem->updateVisible();
}
@@ -1959,42 +1959,42 @@ HoleConfig::HoleConfig(HoleInfo *holeInfo, TQWidget *parent)
{
this->holeInfo = holeInfo;
- TQVBoxLayout *layout = new TQVBoxLayout(this, marginHint(), spacingHint());
+ TQVBoxLayout *tqlayout = new TQVBoxLayout(this, marginHint(), spacingHint());
- TQHBoxLayout *hlayout = new TQHBoxLayout(layout, spacingHint());
- hlayout->addWidget(new TQLabel(i18n("Course name: "), this));
+ TQHBoxLayout *htqlayout = new TQHBoxLayout(tqlayout, spacingHint());
+ htqlayout->addWidget(new TQLabel(i18n("Course name: "), this));
KLineEdit *nameEdit = new KLineEdit(holeInfo->untranslatedName(), this);
- hlayout->addWidget(nameEdit);
+ htqlayout->addWidget(nameEdit);
connect(nameEdit, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(nameChanged(const TQString &)));
- hlayout = new TQHBoxLayout(layout, spacingHint());
- hlayout->addWidget(new TQLabel(i18n("Course author: "), this));
+ htqlayout = new TQHBoxLayout(tqlayout, spacingHint());
+ htqlayout->addWidget(new TQLabel(i18n("Course author: "), this));
KLineEdit *authorEdit = new KLineEdit(holeInfo->author(), this);
- hlayout->addWidget(authorEdit);
+ htqlayout->addWidget(authorEdit);
connect(authorEdit, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(authorChanged(const TQString &)));
- layout->addStretch();
+ tqlayout->addStretch();
- hlayout = new TQHBoxLayout(layout, spacingHint());
- hlayout->addWidget(new TQLabel(i18n("Par:"), this));
+ htqlayout = new TQHBoxLayout(tqlayout, spacingHint());
+ htqlayout->addWidget(new TQLabel(i18n("Par:"), this));
TQSpinBox *par = new TQSpinBox(1, 15, 1, this);
par->setValue(holeInfo->par());
- hlayout->addWidget(par);
+ htqlayout->addWidget(par);
connect(par, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(parChanged(int)));
- hlayout->addStretch();
+ htqlayout->addStretch();
- hlayout->addWidget(new TQLabel(i18n("Maximum:"), this));
+ htqlayout->addWidget(new TQLabel(i18n("Maximum:"), this));
TQSpinBox *maxstrokes = new TQSpinBox(holeInfo->lowestMaxStrokes(), 30, 1, this);
TQWhatsThis::add(maxstrokes, i18n("Maximum number of strokes player can take on this hole."));
TQToolTip::add(maxstrokes, i18n("Maximum number of strokes"));
maxstrokes->setSpecialValueText(i18n("Unlimited"));
maxstrokes->setValue(holeInfo->maxStrokes());
- hlayout->addWidget(maxstrokes);
+ htqlayout->addWidget(maxstrokes);
connect(maxstrokes, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(maxStrokesChanged(int)));
TQCheckBox *check = new TQCheckBox(i18n("Show border walls"), this);
check->setChecked(holeInfo->borderWalls());
- layout->addWidget(check);
+ tqlayout->addWidget(check);
connect(check, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(borderWallsChanged(bool)));
}
@@ -2212,7 +2212,7 @@ KolfGame::KolfGame(ObjectList *obj, PlayerList *players, TQString filename, TQWi
pic.load(locate("appdata", "pics/grass.png"));
TQPixmapCache::insert("grass", pic);
}
- course->setBackgroundPixmap(pic);
+ course->tqsetBackgroundPixmap(pic);
setCanvas(course);
move(0, 0);
@@ -2225,7 +2225,7 @@ KolfGame::KolfGame(ObjectList *obj, PlayerList *players, TQString filename, TQWi
highlighter = new TQCanvasRectangle(course);
highlighter->setPen(TQPen(yellow, 1));
highlighter->setBrush(TQBrush(NoBrush));
- highlighter->setVisible(false);
+ highlighter->tqsetVisible(false);
highlighter->setZ(10000);
// shows some info about hole
@@ -2237,14 +2237,14 @@ KolfGame::KolfGame(ObjectList *obj, PlayerList *players, TQString filename, TQWi
infoText->move(15, width/2);
infoText->setZ(10001);
infoText->setFont(font);
- infoText->setVisible(false);
+ infoText->tqsetVisible(false);
// create the advanced putting indicator
strokeCircle = new StrokeCircle(course);
strokeCircle->move(width - 90, height - 90);
strokeCircle->setSize(80, 80);
strokeCircle->setThickness(8);
- strokeCircle->setVisible(false);
+ strokeCircle->tqsetVisible(false);
strokeCircle->setValue(0);
strokeCircle->setMaxValue(360);
@@ -2252,7 +2252,7 @@ KolfGame::KolfGame(ObjectList *obj, PlayerList *players, TQString filename, TQWi
whiteBall = new Ball(course);
whiteBall->setGame(this);
whiteBall->setColor(white);
- whiteBall->setVisible(false);
+ whiteBall->tqsetVisible(false);
whiteBall->setDoDetect(false);
int highestLog = 0;
@@ -2311,7 +2311,7 @@ void KolfGame::startFirstHole(int hole)
{
for (; scoreboardHoles < curHole; ++scoreboardHoles)
{
- cfg->setGroup(TQString("%1-hole@-50,-50|0").arg(scoreboardHoles + 1));
+ cfg->setGroup(TQString("%1-hole@-50,-50|0").tqarg(scoreboardHoles + 1));
emit newHole(cfg->readNumEntry("par", 3));
}
@@ -2382,7 +2382,7 @@ void KolfGame::addBorderWall(TQPoint start, TQPoint end)
{
Wall *wall = new Wall(course);
wall->setPoints(start.x(), start.y(), end.x(), end.y());
- wall->setVisible(true);
+ wall->tqsetVisible(true);
wall->setGame(this);
wall->setZ(998.7);
borderWalls.append(wall);
@@ -2420,7 +2420,7 @@ void KolfGame::handleMousePressEvent(TQMouseEvent *e)
list.pop_front();
moving = false;
- highlighter->setVisible(false);
+ highlighter->tqsetVisible(false);
selectedItem = 0;
movingItem = 0;
@@ -2458,7 +2458,7 @@ void KolfGame::handleMousePressEvent(TQMouseEvent *e)
setCursor(KCursor::sizeAllCursor());
emit newSelectedItem(citem);
- highlighter->setVisible(true);
+ highlighter->tqsetVisible(true);
TQRect rect = selectedItem->boundingRect();
highlighter->move(rect.x() + 1, rect.y() + 1);
highlighter->setSize(rect.width(), rect.height());
@@ -2553,7 +2553,7 @@ void KolfGame::handleMouseMoveEvent(TQMouseEvent *e)
highlighter->moveBy(-(double)moveX, -(double)moveY);
movingItem->moveBy(-(double)moveX, -(double)moveY);
TQRect brect = movingItem->boundingRect();
- emit newStatusText(TQString("%1x%2").arg(brect.x()).arg(brect.y()));
+ emit newStatusText(TQString("%1x%2").tqarg(brect.x()).tqarg(brect.y()));
storedMousePos = mouse;
}
@@ -2608,7 +2608,7 @@ void KolfGame::keyPressEvent(TQKeyEvent *e)
putting = false;
stroking = false;
finishStroking = false;
- strokeCircle->setVisible(false);
+ strokeCircle->tqsetVisible(false);
putterTimer->stop();
putter->setOrigin((*curPlayer).ball()->x(), (*curPlayer).ball()->y());
break;
@@ -2701,7 +2701,7 @@ void KolfGame::puttPress()
strokeCircle->move(px + pw / 2 + 10, py + 10);
else
strokeCircle->move(px + pw / 2 + 10, py - 10 - strokeCircle->height());
- strokeCircle->setVisible(true);
+ strokeCircle->tqsetVisible(true);
}
putterTimer->start(putterTimerMsec);
}
@@ -2741,7 +2741,7 @@ void KolfGame::keyReleaseEvent(TQKeyEvent *e)
{
lastDelId = citem->curId();
- highlighter->setVisible(false);
+ highlighter->tqsetVisible(false);
items.removeRef(item);
citem->hideInfo();
citem->aboutToDelete();
@@ -2907,7 +2907,7 @@ void KolfGame::putterTimeout()
{
// aborted
putting = false;
- strokeCircle->setVisible(false);
+ strokeCircle->tqsetVisible(false);
}
else if (strength > maxStrength || puttReverse)
{
@@ -2950,7 +2950,7 @@ void KolfGame::putterTimeout()
putter->go(Forwards);
else
{
- strokeCircle->setVisible(false);
+ strokeCircle->tqsetVisible(false);
finishStroking = false;
putterTimer->stop();
putting = false;
@@ -3084,7 +3084,7 @@ void KolfGame::loadStateList()
if ((*curPlayer).id() == info.id)
ballMoved();
else
- player.ball()->setVisible(!info.beginningOfHole);
+ player.ball()->tqsetVisible(!info.beginningOfHole);
player.setScoreForHole(info.score, curHole);
player.ball()->setState(info.state);
emit scoreChanged(info.id, curHole, info.score);
@@ -3136,7 +3136,7 @@ void KolfGame::shotDone()
const TQString placeOutside = i18n("Drop Outside of Hazard");
const TQString rehit = i18n("Rehit From Last Location");
options << placeOutside << rehit;
- const TQString choice = KComboBoxDialog::getItem(i18n("What would you like to do for your next shot?"), i18n("%1 is in a Hazard").arg((*it).name()), options, placeOutside, "hazardOptions");
+ const TQString choice = KComboBoxDialog::getItem(i18n("What would you like to do for your next shot?"), i18n("%1 is in a Hazard").tqarg((*it).name()), options, placeOutside, "hazardOptions");
if (choice == placeOutside)
{
@@ -3186,7 +3186,7 @@ void KolfGame::shotDone()
}
}
- ball->setVisible(true);
+ ball->tqsetVisible(true);
ball->setState(Stopped);
(*it).ball()->setDoDetect(true);
@@ -3207,7 +3207,7 @@ void KolfGame::shotDone()
if (curStrokes >= holeInfo.maxStrokes() && holeInfo.hasMaxStrokes())
{
ball->setState(Holed);
- ball->setVisible(false);
+ ball->tqsetVisible(false);
// move to center in case he/she hit out
ball->move(width / 2, height / 2);
@@ -3236,7 +3236,7 @@ void KolfGame::shotDone()
emit newPlayersTurn(&(*curPlayer));
- (*curPlayer).ball()->setVisible(true);
+ (*curPlayer).ball()->tqsetVisible(true);
putter->setAngle((*curPlayer).ball());
putter->setOrigin((*curPlayer).ball()->x(), (*curPlayer).ball()->y());
@@ -3256,7 +3256,7 @@ void KolfGame::startBall(const Vector &vector)
playSound("hit");
emit inPlayStart();
- putter->setVisible(false);
+ putter->tqsetVisible(false);
(*curPlayer).ball()->setState(Rolling);
(*curPlayer).ball()->setVector(vector);
@@ -3303,14 +3303,14 @@ void KolfGame::sayWhosGoing()
{
if (players->count() >= 2)
{
- KMessageBox::information(this, i18n("%1 will start off.").arg((*curPlayer).name()), i18n("New Hole"), "newHole");
+ KMessageBox::information(this, i18n("%1 will start off.").tqarg((*curPlayer).name()), i18n("New Hole"), "newHole");
}
}
void KolfGame::holeDone()
{
for (PlayerList::Iterator it = players->begin(); it != players->end(); ++it)
- (*it).ball()->setVisible(false);
+ (*it).ball()->tqsetVisible(false);
startNextHole();
sayWhosGoing();
}
@@ -3407,7 +3407,7 @@ void KolfGame::startNextHole()
if ((int)(*it).scores().count() < curHole)
(*it).addHole();
(*it).ball()->setVelocity(0, 0);
- (*it).ball()->setVisible(false);
+ (*it).ball()->tqsetVisible(false);
}
emit newPlayersTurn(&(*curPlayer));
@@ -3429,7 +3429,7 @@ void KolfGame::startNextHole()
for (; scoreboardHoles < curHole; ++scoreboardHoles)
{
- cfg->setGroup(TQString("%1-hole@-50,-50|0").arg(scoreboardHoles + 1));
+ cfg->setGroup(TQString("%1-hole@-50,-50|0").tqarg(scoreboardHoles + 1));
emit newHole(cfg->readNumEntry("par", 3));
}
@@ -3437,7 +3437,7 @@ void KolfGame::startNextHole()
updateShowInfo();
// this is from shotDone()
- (*curPlayer).ball()->setVisible(true);
+ (*curPlayer).ball()->tqsetVisible(true);
putter->setOrigin((*curPlayer).ball()->x(), (*curPlayer).ball()->y());
updateMouse();
@@ -3451,11 +3451,11 @@ void KolfGame::startNextHole()
void KolfGame::showInfo()
{
- TQString text = i18n("Hole %1: par %2, maximum %3 strokes").arg(curHole).arg(holeInfo.par()).arg(holeInfo.maxStrokes());
+ TQString text = i18n("Hole %1: par %2, maximum %3 strokes").tqarg(curHole).tqarg(holeInfo.par()).tqarg(holeInfo.maxStrokes());
infoText->move((width - TQFontMetrics(infoText->font()).width(text)) / 2, infoText->y());
infoText->setText(text);
// I hate this text! Let's not show it
- //infoText->setVisible(true);
+ //infoText->tqsetVisible(true);
emit newStatusText(text);
}
@@ -3463,9 +3463,9 @@ void KolfGame::showInfo()
void KolfGame::showInfoDlg(bool addDontShowAgain)
{
KMessageBox::information(parentWidget(),
- i18n("Course name: %1").arg(holeInfo.name()) + TQString("\n")
- + i18n("Created by %1").arg(holeInfo.author()) + TQString("\n")
- + i18n("%1 holes").arg(highestHole),
+ i18n("Course name: %1").tqarg(holeInfo.name()) + TQString("\n")
+ + i18n("Created by %1").tqarg(holeInfo.author()) + TQString("\n")
+ + i18n("%1 holes").tqarg(highestHole),
i18n("Course Information"),
addDontShowAgain? holeInfo.name() + TQString(" ") + holeInfo.author() : TQString());
}
@@ -3473,7 +3473,7 @@ void KolfGame::showInfoDlg(bool addDontShowAgain)
void KolfGame::hideInfo()
{
infoText->setText("");
- infoText->setVisible(false);
+ infoText->tqsetVisible(false);
emit newStatusText(TQString());
}
@@ -3514,7 +3514,7 @@ void KolfGame::openFile()
holeInfo.setUntranslatedName(cfg->readEntryUntranslated("Name", holeInfo.untranslatedName()));
emit titleChanged(holeInfo.name());
- cfg->setGroup(TQString("%1-hole@-50,-50|0").arg(curHole));
+ cfg->setGroup(TQString("%1-hole@-50,-50|0").tqarg(curHole));
curPar = cfg->readNumEntry("par", 3);
holeInfo.setPar(curPar);
holeInfo.borderWallsChanged(cfg->readBoolEntry("borderWalls", holeInfo.borderWalls()));
@@ -3593,7 +3593,7 @@ void KolfGame::openFile()
newItem->move(x, y);
canvasItem->firstMove(x, y);
- newItem->setVisible(true);
+ newItem->tqsetVisible(true);
// make things actually show
if (!hasFinalLoad)
@@ -3616,7 +3616,7 @@ void KolfGame::openFile()
if (!missingPlugins.empty())
{
- KMessageBox::informationList(this, TQString("<p>&lt;http://katzbrown.com/kolf/Plugins/&gt;</p><p>") + i18n("This hole uses the following plugins, which you do not have installed:") + TQString("</p>"), missingPlugins, TQString(), TQString("%1 warning").arg(holeInfo.untranslatedName() + TQString::number(curHole)));
+ KMessageBox::informationList(this, TQString("<p>&lt;http://katzbrown.com/kolf/Plugins/&gt;</p><p>") + i18n("This hole uses the following plugins, which you do not have installed:") + TQString("</p>"), missingPlugins, TQString(), TQString("%1 warning").tqarg(holeInfo.untranslatedName() + TQString::number(curHole)));
}
lastDelId = -1;
@@ -3634,7 +3634,7 @@ void KolfGame::openFile()
clearHole();
setModified(false);
for (PlayerList::Iterator it = players->begin(); it != players->end(); ++it)
- (*it).ball()->setVisible(false);
+ (*it).ball()->tqsetVisible(false);
return;
}
@@ -3719,7 +3719,7 @@ void KolfGame::addNewObject(Object *newObj)
{
TQCanvasItem *newItem = newObj->newObject(course);
items.append(newItem);
- newItem->setVisible(true);
+ newItem->tqsetVisible(true);
CanvasItem *canvasItem = dynamic_cast<CanvasItem *>(newItem);
if (!canvasItem)
@@ -3826,11 +3826,11 @@ void KolfGame::addNewHole()
// make sure even the current player isn't showing
for (PlayerList::Iterator it = players->begin(); it != players->end(); ++it)
- (*it).ball()->setVisible(false);
+ (*it).ball()->tqsetVisible(false);
- whiteBall->setVisible(editing);
- highlighter->setVisible(false);
- putter->setVisible(!editing);
+ whiteBall->tqsetVisible(editing);
+ highlighter->tqsetVisible(false);
+ putter->tqsetVisible(!editing);
inPlay = false;
// add default objects
@@ -3995,7 +3995,7 @@ void KolfGame::save()
}
// save where ball starts (whiteBall tells all)
- cfg->setGroup(TQString("%1-ball@%2,%3").arg(curHole).arg((int)whiteBall->x()).arg((int)whiteBall->y()));
+ cfg->setGroup(TQString("%1-ball@%2,%3").tqarg(curHole).tqarg((int)whiteBall->x()).tqarg((int)whiteBall->y()));
cfg->writeEntry("dummykey", true);
cfg->setGroup("0-course@-50,-50");
@@ -4003,7 +4003,7 @@ void KolfGame::save()
cfg->writeEntry("Name", holeInfo.untranslatedName());
// save hole info
- cfg->setGroup(TQString("%1-hole@-50,-50|0").arg(curHole));
+ cfg->setGroup(TQString("%1-hole@-50,-50|0").tqarg(curHole));
cfg->writeEntry("par", holeInfo.par());
cfg->writeEntry("maxstrokes", holeInfo.maxStrokes());
cfg->writeEntry("borderWalls", holeInfo.borderWalls());
@@ -4066,16 +4066,16 @@ void KolfGame::toggleEditMode()
{
// curplayer shouldn't be hidden no matter what
if ((*it).ball()->beginningOfHole() && it != curPlayer)
- (*it).ball()->setVisible(false);
+ (*it).ball()->tqsetVisible(false);
else
- (*it).ball()->setVisible(!editing);
+ (*it).ball()->tqsetVisible(!editing);
}
- whiteBall->setVisible(editing);
- highlighter->setVisible(false);
+ whiteBall->tqsetVisible(editing);
+ highlighter->tqsetVisible(false);
// shouldn't see putter whilst editing
- putter->setVisible(!editing);
+ putter->tqsetVisible(!editing);
if (editing)
autoSaveTimer->start(autoSaveMsec);
@@ -4103,7 +4103,7 @@ void KolfGame::playSound(TQString file, double vol)
}
}
- file = soundDir + file + TQString::fromLatin1(".wav");
+ file = soundDir + file + TQString::tqfromLatin1(".wav");
// not needed when all of the files are in the distribution
//if (!TQFile::exists(file))
@@ -4160,7 +4160,7 @@ void KolfGame::print(KPrinter &pr)
if (pr.option("kde-kolf-title") == "true")
{
- TQString text = i18n("%1 - Hole %2; by %3").arg(holeInfo.name()).arg(curHole).arg(holeInfo.author());
+ TQString text = i18n("%1 - Hole %2; by %3").tqarg(holeInfo.name()).tqarg(curHole).tqarg(holeInfo.author());
TQFont font(kapp->font());
font.setPointSize(18);
TQRect rect = TQFontMetrics(font).boundingRect(text);
@@ -4183,7 +4183,7 @@ void KolfGame::setBorderWalls(bool showing)
{
Wall *wall = 0;
for (wall = borderWalls.first(); wall; wall = borderWalls.next())
- wall->setVisible(showing);
+ wall->tqsetVisible(showing);
}
void KolfGame::setUseAdvancedPutting(bool yes)
@@ -4219,7 +4219,7 @@ void KolfGame::courseInfo(CourseInfo &info, const TQString& filename)
unsigned int par= 0;
while (1)
{
- TQString group = TQString("%1-hole@-50,-50|0").arg(hole);
+ TQString group = TQString("%1-hole@-50,-50|0").tqarg(hole);
if (!cfg.hasGroup(group))
{
hole--;