summaryrefslogtreecommitdiffstats
path: root/kpat/freecell.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:42:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:42:31 +0000
commit576eb4299a00bc053db35414406f46372a0f70f2 (patch)
tree4c030922d533821db464af566188e7d40cc8848c /kpat/freecell.cpp
parent0718336b6017d1a4fc1d626544180a5a2a29ddec (diff)
downloadtdegames-576eb4299a00bc053db35414406f46372a0f70f2.tar.gz
tdegames-576eb4299a00bc053db35414406f46372a0f70f2.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1157643 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpat/freecell.cpp')
-rw-r--r--kpat/freecell.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/kpat/freecell.cpp b/kpat/freecell.cpp
index 7a72c1fc..ff8a5b1a 100644
--- a/kpat/freecell.cpp
+++ b/kpat/freecell.cpp
@@ -26,7 +26,7 @@
#include <kdebug.h>
#include <stdio.h>
#include <stdlib.h>
-#include <qtimer.h>
+#include <tqtimer.h>
#include "cardmaps.h"
#include "freecell-solver/fcs_user.h"
@@ -102,7 +102,7 @@ void FreecellBase::restart()
deal();
}
-QString suitToString(Card::Suit s) {
+TQString suitToString(Card::Suit s) {
switch (s) {
case Card::Clubs:
return "C";
@@ -113,10 +113,10 @@ QString suitToString(Card::Suit s) {
case Card::Spades:
return "S";
}
- return QString::null;
+ return TQString::null;
}
-QString rankToString(Card::Rank r)
+TQString rankToString(Card::Rank r)
{
switch (r) {
case Card::King:
@@ -128,7 +128,7 @@ QString rankToString(Card::Rank r)
case Card::Queen:
return "Q";
default:
- return QString::number(r);
+ return TQString::number(r);
}
}
@@ -211,7 +211,7 @@ void FreecellBase::findSolution()
{
kdDebug(11111) << "findSolution\n";
- QString output = solverFormat();
+ TQString output = solverFormat();
kdDebug(11111) << output << endl;
int ret;
@@ -313,7 +313,7 @@ void FreecellBase::resumeSolution()
}
solver_ret = freecell_solver_user_resume_solution(solver_instance);
- QTimer::singleShot(0, this, SLOT(resumeSolution()));
+ TQTimer::singleShot(0, this, TQT_SLOT(resumeSolution()));
}
MoveHint *FreecellBase::translateMove(void *m) {
@@ -369,17 +369,17 @@ MoveHint *FreecellBase::translateMove(void *m) {
return new MoveHint(c, to);
}
-QString FreecellBase::solverFormat() const
+TQString FreecellBase::solverFormat() const
{
- QString output;
- QString tmp;
+ TQString output;
+ TQString tmp;
for (uint i = 0; i < target.count(); i++) {
if (target[i]->isEmpty())
continue;
tmp += suitToString(target[i]->top()->suit()) + "-" + rankToString(target[i]->top()->rank()) + " ";
}
if (!tmp.isEmpty())
- output += QString::fromLatin1("Foundations: %1\n").arg(tmp);
+ output += TQString::fromLatin1("Foundations: %1\n").arg(tmp);
tmp.truncate(0);
for (uint i = 0; i < freecell.count(); i++) {
@@ -389,7 +389,7 @@ QString FreecellBase::solverFormat() const
tmp += rankToString(freecell[i]->top()->rank()) + suitToString(freecell[i]->top()->suit()) + " ";
}
if (!tmp.isEmpty())
- output += QString::fromLatin1("Freecells: %1\n").arg(tmp);
+ output += TQString::fromLatin1("Freecells: %1\n").arg(tmp);
for (uint i = 0; i < store.count(); i++)
{
@@ -602,7 +602,7 @@ void FreecellBase::moveCards(CardList &c, FreecellPile *from, Pile *to)
from->moveCardsBack(c);
waitfor = c.first();
- connect(waitfor, SIGNAL(stoped(Card*)), SLOT(waitForMoving(Card*)));
+ connect(waitfor, TQT_SIGNAL(stoped(Card*)), TQT_SLOT(waitForMoving(Card*)));
PileList fcs;
@@ -625,7 +625,7 @@ void FreecellBase::moveCards(CardList &c, FreecellPile *from, Pile *to)
movePileToPile(c, to, fss, fcs, 0, c.count(), 0);
if (!waitfor->animated())
- QTimer::singleShot(0, this, SLOT(startMoving()));
+ TQTimer::singleShot(0, this, TQT_SLOT(startMoving()));
}
struct MoveAway {
@@ -645,7 +645,7 @@ void FreecellBase::movePileToPile(CardList &c, Pile *to, PileList fss, PileList
}
kdDebug(11111) << debug_level << " moveaway " << moveaway << endl;
- QValueList<MoveAway> moves_away;
+ TQValueList<MoveAway> moves_away;
if (count - moveaway < (fcs.count() + 1) && (count <= 2 * (fcs.count() + 1))) {
moveaway = count - (fcs.count() + 1);
@@ -707,7 +707,7 @@ void FreecellBase::startMoving()
mh->pile()->moveCardsBack(empty, true);
waitfor = mh->card();
kdDebug(11111) << "wait for moving end " << mh->card()->name() << endl;
- connect(mh->card(), SIGNAL(stoped(Card*)), SLOT(waitForMoving(Card*)));
+ connect(mh->card(), TQT_SIGNAL(stoped(Card*)), TQT_SLOT(waitForMoving(Card*)));
delete mh;
}