diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-01-13 12:28:49 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-01-13 12:28:49 +0900 |
commit | c20f4d8f2cf03c69fcecc80d63fe3cbb80f51610 (patch) | |
tree | 50b08262da538c5b91f77e83e4b80d7fd6dbe0de /kolf/game.cpp | |
parent | 51f65427771c47f6d34cda56b07d9d82bd0bfd33 (diff) | |
download | tdegames-c20f4d8f2cf03c69fcecc80d63fe3cbb80f51610.tar.gz tdegames-c20f4d8f2cf03c69fcecc80d63fe3cbb80f51610.zip |
Use new TQ_METHOD, TQ_SIGNAL, TQ_SLOT defines
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kolf/game.cpp')
-rw-r--r-- | kolf/game.cpp | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/kolf/game.cpp b/kolf/game.cpp index d2b61221..4f6b7edb 100644 --- a/kolf/game.cpp +++ b/kolf/game.cpp @@ -202,19 +202,19 @@ BridgeConfig::BridgeConfig(Bridge *bridge, TQWidget *parent) layout->addWidget(new TQLabel(i18n("Walls on:"), this), 0, 0); top = new TQCheckBox(i18n("&Top"), this); layout->addWidget(top, 0, 1); - connect(top, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(topWallChanged(bool))); + connect(top, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(topWallChanged(bool))); top->setChecked(bridge->topWallVisible()); bot = new TQCheckBox(i18n("&Bottom"), this); layout->addWidget(bot, 1, 1); - connect(bot, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(botWallChanged(bool))); + connect(bot, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(botWallChanged(bool))); bot->setChecked(bridge->botWallVisible()); left = new TQCheckBox(i18n("&Left"), this); layout->addWidget(left, 1, 0); - connect(left, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(leftWallChanged(bool))); + connect(left, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(leftWallChanged(bool))); left->setChecked(bridge->leftWallVisible()); right = new TQCheckBox(i18n("&Right"), this); layout->addWidget(right, 1, 2); - connect(right, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(rightWallChanged(bool))); + connect(right, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(rightWallChanged(bool))); right->setChecked(bridge->rightWallVisible()); } @@ -409,7 +409,7 @@ WindmillConfig::WindmillConfig(Windmill *windmill, TQWidget *parent) TQCheckBox *check = new TQCheckBox(i18n("Windmill on bottom"), this); check->setChecked(windmill->bottom()); - connect(check, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(endChanged(bool))); + connect(check, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(endChanged(bool))); m_vlayout->addWidget(check); TQHBoxLayout *hlayout = new TQHBoxLayout(m_vlayout, spacingHint()); @@ -417,7 +417,7 @@ WindmillConfig::WindmillConfig(Windmill *windmill, TQWidget *parent) TQSlider *slider = new TQSlider(1, 10, 1, windmill->curSpeed(), TQt::Horizontal, this); hlayout->addWidget(slider); hlayout->addWidget(new TQLabel(i18n("Fast"), this)); - connect(slider, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(speedChanged(int))); + connect(slider, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(speedChanged(int))); endChanged(check->isChecked()); } @@ -647,7 +647,7 @@ SignConfig::SignConfig(Sign *sign, TQWidget *parent) m_vlayout->addWidget(new TQLabel(i18n("Sign HTML:"), this)); KLineEdit *name = new KLineEdit(sign->text(), this); m_vlayout->addWidget(name); - connect(name, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(textChanged(const TQString &))); + connect(name, TQ_SIGNAL(textChanged(const TQString &)), this, TQ_SLOT(textChanged(const TQString &))); } void SignConfig::textChanged(const TQString &text) @@ -667,7 +667,7 @@ EllipseConfig::EllipseConfig(Ellipse *ellipse, TQWidget *parent) TQCheckBox *check = new TQCheckBox(i18n("Enable show/hide"), this); m_vlayout->addWidget(check); - connect(check, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(check1Changed(bool))); + connect(check, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(check1Changed(bool))); check->setChecked(ellipse->changeEnabled()); TQHBoxLayout *hlayout = new TQHBoxLayout(m_vlayout, spacingHint()); @@ -678,7 +678,7 @@ EllipseConfig::EllipseConfig(Ellipse *ellipse, TQWidget *parent) fast1 = new TQLabel(i18n("Fast"), this); hlayout->addWidget(fast1); - connect(slider1, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(value1Changed(int))); + connect(slider1, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(value1Changed(int))); check1Changed(ellipse->changeEnabled()); @@ -1310,8 +1310,8 @@ TQPtrList<TQCanvasItem> BlackHole::moveableItems() const BlackHoleTimer::BlackHoleTimer(Ball *ball, double speed, int msec) : m_speed(speed), m_ball(ball) { - TQTimer::singleShot(msec, this, TQT_SLOT(mySlot())); - TQTimer::singleShot(msec / 2, this, TQT_SLOT(myMidSlot())); + TQTimer::singleShot(msec, this, TQ_SLOT(mySlot())); + TQTimer::singleShot(msec / 2, this, TQ_SLOT(myMidSlot())); } void BlackHoleTimer::mySlot() @@ -1344,8 +1344,8 @@ bool BlackHole::place(Ball *ball, bool /*wasCenter*/) double magnitude = Vector(TQPoint(x(), y()), TQPoint(exitItem->x(), exitItem->y())).magnitude(); BlackHoleTimer *timer = new BlackHoleTimer(ball, speed, magnitude * 2.5 - speed * 35 + 500); - connect(timer, TQT_SIGNAL(eject(Ball *, double)), this, TQT_SLOT(eject(Ball *, double))); - connect(timer, TQT_SIGNAL(halfway()), this, TQT_SLOT(halfway())); + connect(timer, TQ_SIGNAL(eject(Ball *, double)), this, TQ_SLOT(eject(Ball *, double))); + connect(timer, TQ_SIGNAL(halfway()), this, TQ_SLOT(halfway())); playSound("blackhole"); return false; @@ -1510,7 +1510,7 @@ BlackHoleConfig::BlackHoleConfig(BlackHole *blackHole, TQWidget *parent) deg->setValue(blackHole->curExitDeg()); deg->setWrapping(true); layout->addWidget(deg); - connect(deg, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(degChanged(int))); + connect(deg, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(degChanged(int))); layout->addStretch(); @@ -1519,7 +1519,7 @@ BlackHoleConfig::BlackHoleConfig(BlackHole *blackHole, TQWidget *parent) KDoubleNumInput *min = new KDoubleNumInput(this); min->setRange(0, 8, 1, true); hlayout->addWidget(min); - connect(min, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(minChanged(double))); + connect(min, TQ_SIGNAL(valueChanged(double)), this, TQ_SLOT(minChanged(double))); min->setValue(blackHole->minSpeed()); hlayout = new TQHBoxLayout(layout, spacingHint()); @@ -1527,7 +1527,7 @@ BlackHoleConfig::BlackHoleConfig(BlackHole *blackHole, TQWidget *parent) KDoubleNumInput *max = new KDoubleNumInput(this); max->setRange(1, 10, 1, true); hlayout->addWidget(max); - connect(max, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(maxChanged(double))); + connect(max, TQ_SIGNAL(valueChanged(double)), this, TQ_SLOT(maxChanged(double))); max->setValue(blackHole->maxSpeed()); } @@ -1965,13 +1965,13 @@ HoleConfig::HoleConfig(HoleInfo *holeInfo, TQWidget *parent) hlayout->addWidget(new TQLabel(i18n("Course name: "), this)); KLineEdit *nameEdit = new KLineEdit(holeInfo->untranslatedName(), this); hlayout->addWidget(nameEdit); - connect(nameEdit, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(nameChanged(const TQString &))); + connect(nameEdit, TQ_SIGNAL(textChanged(const TQString &)), this, TQ_SLOT(nameChanged(const TQString &))); hlayout = new TQHBoxLayout(layout, spacingHint()); hlayout->addWidget(new TQLabel(i18n("Course author: "), this)); KLineEdit *authorEdit = new KLineEdit(holeInfo->author(), this); hlayout->addWidget(authorEdit); - connect(authorEdit, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(authorChanged(const TQString &))); + connect(authorEdit, TQ_SIGNAL(textChanged(const TQString &)), this, TQ_SLOT(authorChanged(const TQString &))); layout->addStretch(); @@ -1980,7 +1980,7 @@ HoleConfig::HoleConfig(HoleInfo *holeInfo, TQWidget *parent) TQSpinBox *par = new TQSpinBox(1, 15, 1, this); par->setValue(holeInfo->par()); hlayout->addWidget(par); - connect(par, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(parChanged(int))); + connect(par, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(parChanged(int))); hlayout->addStretch(); hlayout->addWidget(new TQLabel(i18n("Maximum:"), this)); @@ -1990,12 +1990,12 @@ HoleConfig::HoleConfig(HoleInfo *holeInfo, TQWidget *parent) maxstrokes->setSpecialValueText(i18n("Unlimited")); maxstrokes->setValue(holeInfo->maxStrokes()); hlayout->addWidget(maxstrokes); - connect(maxstrokes, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(maxStrokesChanged(int))); + connect(maxstrokes, TQ_SIGNAL(valueChanged(int)), this, TQ_SLOT(maxStrokesChanged(int))); TQCheckBox *check = new TQCheckBox(i18n("Show border walls"), this); check->setChecked(holeInfo->borderWalls()); layout->addWidget(check); - connect(check, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(borderWallsChanged(bool))); + connect(check, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(borderWallsChanged(bool))); } void HoleConfig::authorChanged(const TQString &newauthor) @@ -2284,15 +2284,15 @@ KolfGame::KolfGame(ObjectList *obj, PlayerList *players, TQString filename, TQWi addBorderWall(TQPoint(width - margin - 1, margin), TQPoint(width - margin - 1, height - margin)); timer = new TQTimer(this); - connect(timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timeout())); + connect(timer, TQ_SIGNAL(timeout()), this, TQ_SLOT(timeout())); timerMsec = 300; fastTimer = new TQTimer(this); - connect(fastTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(fastTimeout())); + connect(fastTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(fastTimeout())); fastTimerMsec = 11; autoSaveTimer = new TQTimer(this); - connect(autoSaveTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(autoSaveTimeout())); + connect(autoSaveTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(autoSaveTimeout())); autoSaveMsec = 5 * 1000 * 60; // 5 min autosave // setUseAdvancedPutting() sets maxStrength! @@ -2300,7 +2300,7 @@ KolfGame::KolfGame(ObjectList *obj, PlayerList *players, TQString filename, TQWi putting = false; putterTimer = new TQTimer(this); - connect(putterTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(putterTimeout())); + connect(putterTimer, TQ_SIGNAL(timeout()), this, TQ_SLOT(putterTimeout())); putterTimerMsec = 20; } @@ -2808,7 +2808,7 @@ void KolfGame::timeout() if (curState == Stopped && inPlay) { inPlay = false; - TQTimer::singleShot(0, this, TQT_SLOT(shotDone())); + TQTimer::singleShot(0, this, TQ_SLOT(shotDone())); } if (curState == Holed && inPlay) @@ -2842,12 +2842,12 @@ void KolfGame::timeout() (*curPlayer).addStrokeToHole(curHole); emit scoreChanged((*curPlayer).id(), curHole, (*curPlayer).score(curHole)); } - TQTimer::singleShot(600, this, TQT_SLOT(holeDone())); + TQTimer::singleShot(600, this, TQ_SLOT(holeDone())); } else { inPlay = false; - TQTimer::singleShot(0, this, TQT_SLOT(shotDone())); + TQTimer::singleShot(0, this, TQ_SLOT(shotDone())); } } } @@ -3216,11 +3216,11 @@ void KolfGame::shotDone() if (allPlayersDone()) { startNextHole(); - TQTimer::singleShot(100, this, TQT_SLOT(emitMax())); + TQTimer::singleShot(100, this, TQ_SLOT(emitMax())); return; } - TQTimer::singleShot(100, this, TQT_SLOT(emitMax())); + TQTimer::singleShot(100, this, TQ_SLOT(emitMax())); } } |