summaryrefslogtreecommitdiffstats
path: root/kmines/status.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:47:36 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:47:36 -0600
commit97d1732e257f8700488d7ca1660ae7eba8fc6065 (patch)
tree4c6397ed2c1dd6f7c3354b5b87f313547d92a35f /kmines/status.cpp
parent9c27a1a03e02fd53aedc1a182444b35fd8e14967 (diff)
downloadtdegames-97d1732e257f8700488d7ca1660ae7eba8fc6065.tar.gz
tdegames-97d1732e257f8700488d7ca1660ae7eba8fc6065.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kmines/status.cpp')
-rw-r--r--kmines/status.cpp60
1 files changed, 30 insertions, 30 deletions
diff --git a/kmines/status.cpp b/kmines/status.cpp
index 31fd7b36..b0c0554f 100644
--- a/kmines/status.cpp
+++ b/kmines/status.cpp
@@ -22,9 +22,9 @@
#include <tqpainter.h>
#include <tqpixmap.h>
#include <tqwhatsthis.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqwidgetstack.h>
-#include <tqtextedit.h>
+#include <textedit.h>
#include <tqtimer.h>
#include <kapplication.h>
@@ -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);
@@ -54,7 +54,7 @@ tqStatus::tqStatus(TQWidget *parent)
_solver = new Solver(TQT_TQOBJECT(this));
connect(_solver, TQT_SIGNAL(solvingDone(bool)), TQT_SLOT(solvingDone(bool)));
-// top tqlayout
+// top layout
TQGridLayout *top = new TQGridLayout(this, 2, 5, 10, 10);
top->setColStretch(1, 1);
top->setColStretch(3, 1);
@@ -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;
@@ -368,7 +368,7 @@ void tqStatus::loadLog()
bool ok = doc.setContent(&file, 0, &errorLine);
if ( !ok ) {
KMessageBox::sorry(this, i18n("Cannot read XML file on line %1")
- .tqarg(errorLine));
+ .arg(errorLine));
return;
}
success = true;
@@ -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();