diff options
author | Timothy Pearson <[email protected]> | 2011-12-18 18:31:10 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-18 18:31:10 -0600 |
commit | 0e2b76239f354a9eead0b4e37d86d390ec57ffa9 (patch) | |
tree | cd20202507f54f61a4e58ae64fcd7cdb894abe19 /kmines/status.cpp | |
parent | 84ace1135cac57993b72fee7105b92def1638d32 (diff) | |
download | tdegames-0e2b76239f354a9eead0b4e37d86d390ec57ffa9.tar.gz tdegames-0e2b76239f354a9eead0b4e37d86d390ec57ffa9.zip |
Rename old tq methods that no longer need a unique name
Diffstat (limited to 'kmines/status.cpp')
-rw-r--r-- | kmines/status.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/kmines/status.cpp b/kmines/status.cpp index 31fd7b36..2d081628 100644 --- a/kmines/status.cpp +++ b/kmines/status.cpp @@ -45,7 +45,7 @@ #include "version.h" -tqStatus::tqStatus(TQWidget *parent) +Status::Status(TQWidget *parent) : TQWidget(parent, "status"), _oldLevel(Level::Easy) { _timer = new TQTimer(this); @@ -93,7 +93,7 @@ tqStatus::tqStatus(TQWidget *parent) _field = new Field(_fieldContainer); _field->readSettings(); g->addWidget(_field, 0, 0, AlignCenter); - connect( _field, TQT_SIGNAL(updatetqStatus(bool)), TQT_SLOT(updatetqStatus(bool)) ); + connect( _field, TQT_SIGNAL(updateStatus(bool)), TQT_SLOT(updateStatus(bool)) ); connect(_field, TQT_SIGNAL(gameStateChanged(GameState)), TQT_SLOT(gameStateChangedSlot(GameState)) ); connect(_field, TQT_SIGNAL(setMood(Mood)), smiley, TQT_SLOT(setMood(Mood))); @@ -120,13 +120,13 @@ tqStatus::tqStatus(TQWidget *parent) top->addMultiCellWidget(_stack, 1, 1, 0, 4); } -void tqStatus::smileyClicked() +void Status::smileyClicked() { if ( _field->gameState()==Paused ) emit pause(); else restartGame(); } -void tqStatus::newGame(int t) +void Status::newGame(int t) { if ( _field->gameState()==Paused ) emit pause(); Level::Type type = (Level::Type)t; @@ -135,7 +135,7 @@ void tqStatus::newGame(int t) else newGame( Settings::customLevel() ); } -void tqStatus::newGame(const Level &level) +void Status::newGame(const Level &level) { _timer->stop(); if ( level.type()!=Level::Custom ) @@ -143,14 +143,14 @@ void tqStatus::newGame(const Level &level) _field->setLevel(level); } -bool tqStatus::checkBlackMark() +bool Status::checkBlackMark() { bool bm = ( _field->gameState()==Playing ); if (bm) KExtHighscore::submitScore(KExtHighscore::Lost, this); return bm; } -void tqStatus::restartGame() +void Status::restartGame() { if ( _field->gameState()==Paused ) emit pause(); else if ( _field->gameState()==Replaying ) { @@ -162,7 +162,7 @@ void tqStatus::restartGame() } } -void tqStatus::settingsChanged() +void Status::settingsChanged() { _field->readSettings(); @@ -173,7 +173,7 @@ void tqStatus::settingsChanged() newGame(l); } -void tqStatus::updatetqStatus(bool mine) +void Status::updateStatus(bool mine) { int r = _field->nbMines() - _field->nbMarked(); TQColor color = (r<0 && !_field->isSolved() ? red : white); @@ -184,7 +184,7 @@ void tqStatus::updatetqStatus(bool mine) gameStateChanged(GameOver, true); // ends only for wins } -void tqStatus::setGameOver(bool won) +void Status::setGameOver(bool won) { if ( !won ) KNotifyClient::event(winId(), "explosion", i18n("Explosion!")); @@ -218,16 +218,16 @@ void tqStatus::setGameOver(bool won) f.appendChild(data); } -void tqStatus::setStopped() +void Status::setStopped() { smiley->setMood(Normal); - updatetqStatus(false); + updateStatus(false); bool custom = ( _field->level().type()==Level::Custom ); dg->reset(custom); _field->setSolvingState(Regular); } -void tqStatus::setPlaying() +void Status::setPlaying() { smiley->setMood(Normal); dg->start(); @@ -238,7 +238,7 @@ void tqStatus::setPlaying() _log = TQDomDocument("kmineslog"); _logRoot = _log.createElement("kmineslog"); _logRoot.setAttribute("version", SHORT_VERSION); - TQDateTime date = TQDateTime::tqcurrentDateTime(); + TQDateTime date = TQDateTime::currentDateTime(); _logRoot.setAttribute("date", date.toString(Qt::ISODate)); _logRoot.setAttribute("width", level.width()); _logRoot.setAttribute("height", level.height()); @@ -248,7 +248,7 @@ void tqStatus::setPlaying() _logRoot.appendChild(_logList); } -void tqStatus::gameStateChanged(GameState state, bool won) +void Status::gameStateChanged(GameState state, bool won) { TQWidget *w = _fieldContainer; @@ -280,7 +280,7 @@ void tqStatus::gameStateChanged(GameState state, bool won) emit gameStateChangedSignal(state); } -void tqStatus::addAction(const KGrid2D::Coord &c, Field::ActionType type) +void Status::addAction(const KGrid2D::Coord &c, Field::ActionType type) { TQDomElement action = _log.createElement("Action"); action.setAttribute("time", dg->pretty()); @@ -291,7 +291,7 @@ void tqStatus::addAction(const KGrid2D::Coord &c, Field::ActionType type) dg->addAction(); } -void tqStatus::advise() +void Status::advise() { int res = KMessageBox::warningContinueCancel(this, i18n("When the solver gives " @@ -304,25 +304,25 @@ void tqStatus::advise() _field->setAdvised(c, probability); } -void tqStatus::solve() +void Status::solve() { dg->setCheating(); _solver->solve(*_field, false); _field->setSolvingState(Solved); } -void tqStatus::solvingDone(bool success) +void Status::solvingDone(bool success) { if ( !success ) gameStateChanged(GameOver, false); } -void tqStatus::solveRate() +void Status::solveRate() { SolvingRateDialog sd(*_field, this); sd.exec(); } -void tqStatus::viewLog() +void Status::viewLog() { KDialogBase d(this, "view_log", true, i18n("View Game Log"), KDialogBase::Close, KDialogBase::Close); @@ -335,7 +335,7 @@ void tqStatus::viewLog() d.exec(); } -void tqStatus::saveLog() +void Status::saveLog() { KURL url = KFileDialog::getSaveURL(TQString(), TQString(), this); if ( url.isEmpty() ) return; @@ -354,7 +354,7 @@ void tqStatus::saveLog() tmp.unlink(); } -void tqStatus::loadLog() +void Status::loadLog() { KURL url = KFileDialog::getOpenURL(TQString(), TQString(), this); if ( url.isEmpty() ) return; @@ -390,7 +390,7 @@ void tqStatus::loadLog() } } -bool tqStatus::checkLog(const TQDomDocument &doc) +bool Status::checkLog(const TQDomDocument &doc) { // check root element if ( doc.doctype().name()!="kmineslog" ) return false; @@ -435,7 +435,7 @@ bool tqStatus::checkLog(const TQDomDocument &doc) } -void tqStatus::replayLog() +void Status::replayLog() { uint w = _logRoot.attribute("width").toUInt(); uint h = _logRoot.attribute("height").toUInt(); @@ -454,7 +454,7 @@ void tqStatus::replayLog() _timer->start(500); } -void tqStatus::replayStep() +void Status::replayStep() { if ( _index>=_actions.count() ) { _timer->stop(); |