summaryrefslogtreecommitdiffstats
path: root/kbackgammon/engines/offline
diff options
context:
space:
mode:
Diffstat (limited to 'kbackgammon/engines/offline')
-rw-r--r--kbackgammon/engines/offline/kbgoffline.cpp84
-rw-r--r--kbackgammon/engines/offline/kbgoffline.h6
2 files changed, 45 insertions, 45 deletions
diff --git a/kbackgammon/engines/offline/kbgoffline.cpp b/kbackgammon/engines/offline/kbgoffline.cpp
index 920dc741..4a9e1755 100644
--- a/kbackgammon/engines/offline/kbgoffline.cpp
+++ b/kbackgammon/engines/offline/kbgoffline.cpp
@@ -24,14 +24,14 @@
#include "kbgoffline.moc"
#include "kbgoffline.h"
-#include <qlayout.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qtimer.h>
-#include <qspinbox.h>
-#include <qwhatsthis.h>
-#include <qlineedit.h>
-#include <qvbox.h>
+#include <tqlayout.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqtimer.h>
+#include <tqspinbox.h>
+#include <tqwhatsthis.h>
+#include <tqlineedit.h>
+#include <tqvbox.h>
#include <kapplication.h>
#include <kmessagebox.h>
@@ -76,7 +76,7 @@ public:
/*
* Player's names
*/
- QString mName[2];
+ TQString mName[2];
/*
* Who did the last roll
@@ -96,7 +96,7 @@ public:
/*
* Entry fields for the names
*/
- QLineEdit *mLe[2];
+ TQLineEdit *mLe[2];
};
@@ -106,7 +106,7 @@ public:
/*
* Constructor
*/
-KBgEngineOffline::KBgEngineOffline(QWidget *parent, QString *name, QPopupMenu *pmenu)
+KBgEngineOffline::KBgEngineOffline(TQWidget *parent, TQString *name, TQPopupMenu *pmenu)
: KBgEngine(parent, name, pmenu)
{
d = new KBgEngineOfflinePrivate();
@@ -120,11 +120,11 @@ KBgEngineOffline::KBgEngineOffline(QWidget *parent, QString *name, QPopupMenu *p
/*
* Create engine specific actions
*/
- d->mNew = new KAction(i18n("&New Game..."), 0, this, SLOT(newGame()), this);
- d->mSwap = new KAction(i18n("&Swap Colors"), 0, this, SLOT(swapColors()), this);
+ d->mNew = new KAction(i18n("&New Game..."), 0, this, TQT_SLOT(newGame()), this);
+ d->mSwap = new KAction(i18n("&Swap Colors"), 0, this, TQT_SLOT(swapColors()), this);
d->mEdit = new KToggleAction(i18n("&Edit Mode"), 0, this,
- SLOT(toggleEditMode()), this);
+ TQT_SLOT(toggleEditMode()), this);
d->mEdit->setChecked(false);
/*
@@ -143,14 +143,14 @@ KBgEngineOffline::KBgEngineOffline(QWidget *parent, QString *name, QPopupMenu *p
/*
* initialize the commit timeout
*/
- ct = new QTimer(this);
- connect(ct, SIGNAL(timeout()), this, SLOT(done()));
+ ct = new TQTimer(this);
+ connect(ct, TQT_SIGNAL(timeout()), this, TQT_SLOT(done()));
/*
* internal statue variables
*/
d->mRollFlag = d->mUndoFlag = d->mGameFlag = d->mDoneFlag = false;
- connect(this, SIGNAL(allowCommand(int, bool)), this, SLOT(setAllowed(int, bool)));
+ connect(this, TQT_SIGNAL(allowCommand(int, bool)), this, TQT_SLOT(setAllowed(int, bool)));
/*
* Restore last stored settings
@@ -179,7 +179,7 @@ void KBgEngineOffline::getSetupPages(KDialogBase *nb)
/*
* Main Widget
*/
- QVBox *vbp = nb->addVBoxPage(i18n("Offline Engine"), i18n("Use this to configure the Offline engine"),
+ TQVBox *vbp = nb->addVBoxPage(i18n("Offline Engine"), i18n("Use this to configure the Offline engine"),
kapp->iconLoader()->loadIcon(PROG_NAME "_engine", KIcon::Desktop));
/*
@@ -190,32 +190,32 @@ void KBgEngineOffline::getSetupPages(KDialogBase *nb)
/*
* Player names
*/
- QWidget *w = new QWidget(tc);
- QGridLayout *gl = new QGridLayout(w, 2, 1, nb->spacingHint());
+ TQWidget *w = new TQWidget(tc);
+ TQGridLayout *gl = new TQGridLayout(w, 2, 1, nb->spacingHint());
/*
* Group boxes
*/
- QGroupBox *gbn = new QGroupBox(i18n("Names"), w);
+ TQGroupBox *gbn = new TQGroupBox(i18n("Names"), w);
gl->addWidget(gbn, 0, 0);
- gl = new QGridLayout(gbn, 2, 2, 20);
+ gl = new TQGridLayout(gbn, 2, 2, 20);
- d->mLe[0] = new QLineEdit(d->mName[0], gbn);
- d->mLe[1] = new QLineEdit(d->mName[1], gbn);
+ d->mLe[0] = new TQLineEdit(d->mName[0], gbn);
+ d->mLe[1] = new TQLineEdit(d->mName[1], gbn);
- QLabel *lb[2];
- lb[0] = new QLabel(i18n("First player:"), gbn);
- lb[1] = new QLabel(i18n("Second player:"), gbn);
+ TQLabel *lb[2];
+ lb[0] = new TQLabel(i18n("First player:"), gbn);
+ lb[1] = new TQLabel(i18n("Second player:"), gbn);
for (int i = 0; i < 2; i++) {
gl->addWidget(lb[i], i, 0);
gl->addWidget(d->mLe[i], i, 1);
}
- QWhatsThis::add(d->mLe[0], i18n("Enter the name of the first player."));
- QWhatsThis::add(d->mLe[1], i18n("Enter the name of the second player."));
+ TQWhatsThis::add(d->mLe[0], i18n("Enter the name of the first player."));
+ TQWhatsThis::add(d->mLe[1], i18n("Enter the name of the second player."));
/*
* Done with the page, put it in
@@ -282,10 +282,10 @@ void KBgEngineOffline::newGame()
/*
* If there is a game running we warn the user first
*/
- if (d->mGameFlag && (KMessageBox::warningYesNo((QWidget *)parent(),
+ if (d->mGameFlag && (KMessageBox::warningYesNo((TQWidget *)parent(),
i18n("A game is currently in progress. "
"Starting a new one will terminate it."),
- QString::null, i18n("Start New Game"),
+ TQString::null, i18n("Start New Game"),
i18n("Continue Old Game"))
== KMessageBox::No))
return;
@@ -383,8 +383,8 @@ void KBgEngineOffline::initGame()
bool KBgEngineOffline::queryPlayerName(int w)
{
bool ret = false;
- QString *name;
- QString text;
+ TQString *name;
+ TQString text;
if (w == US) {
name = &d->mName[0];
@@ -397,7 +397,7 @@ bool KBgEngineOffline::queryPlayerName(int w)
}
do {
- *name = KLineEditDlg::getText(text, *name, &ret, (QWidget *)parent());
+ *name = KLineEditDlg::getText(text, *name, &ret, (TQWidget *)parent());
if (!ret) break;
} while (name->isEmpty());
@@ -481,10 +481,10 @@ void KBgEngineOffline::redo()
* Take the move string and make the changes on the working copy
* of the state.
*/
-void KBgEngineOffline::handleMove(QString *s)
+void KBgEngineOffline::handleMove(TQString *s)
{
int index = 0;
- QString t = s->mid(index, s->find(' ', index));
+ TQString t = s->mid(index, s->find(' ', index));
index += 1 + t.length();
int moves = t.toInt();
@@ -517,7 +517,7 @@ void KBgEngineOffline::handleMove(QString *s)
c = '+';
kick = true;
}
- QString r = t.left(t.find(c));
+ TQString r = t.left(t.find(c));
if (r.contains("bar")) {
d->mGame[0].setBar(d->mRoll, abs(d->mGame[0].bar(d->mRoll)) - 1);
} else {
@@ -626,7 +626,7 @@ void KBgEngineOffline::rollDiceBackend(const int w, const int a, const int b)
break;
// case 1:
default:
- emit infoText(QString((w == US) ? d->mName[0] : d->mName[1]) +
+ emit infoText(TQString((w == US) ? d->mName[0] : d->mName[1]) +
i18n(", please move 1 piece.",", please move %n pieces.",d->mMove));
emit allowMoving(true);
break;
@@ -645,7 +645,7 @@ void KBgEngineOffline::cube()
if (d->mRollFlag && d->mGame[0].cube(w) > 0) {
emit allowCommand(Cube, false);
- if (KMessageBox::questionYesNo((QWidget *)parent(),
+ if (KMessageBox::questionYesNo((TQWidget *)parent(),
i18n("%1 has doubled. %2, do you accept the double?").
arg((w == THEM) ? d->mName[1] : d->mName[0]).
arg((w == US) ? d->mName[1] : d->mName[0]),
@@ -695,9 +695,9 @@ bool KBgEngineOffline::queryClose()
if (!d->mGameFlag)
return true;
- switch (KMessageBox::warningContinueCancel((QWidget *)parent(),
+ switch (KMessageBox::warningContinueCancel((TQWidget *)parent(),
i18n("In the middle of a game. "
- "Really quit?"), QString::null, KStdGuiItem::quit())) {
+ "Really quit?"), TQString::null, KStdGuiItem::quit())) {
case KMessageBox::Continue :
return TRUE;
case KMessageBox::Cancel :
@@ -719,7 +719,7 @@ bool KBgEngineOffline::queryExit()
/*
* Handle textual commands. Right now, all commands are ignored
*/
-void KBgEngineOffline::handleCommand(const QString& cmd)
+void KBgEngineOffline::handleCommand(const TQString& cmd)
{
emit infoText(i18n("Text commands are not yet working. "
"The command '%1' has been ignored.").arg(cmd));
diff --git a/kbackgammon/engines/offline/kbgoffline.h b/kbackgammon/engines/offline/kbgoffline.h
index db2bdc03..8a6448fb 100644
--- a/kbackgammon/engines/offline/kbgoffline.h
+++ b/kbackgammon/engines/offline/kbgoffline.h
@@ -55,7 +55,7 @@ public:
/**
* Constructor
*/
- KBgEngineOffline(QWidget *parent = 0, QString *name = 0, QPopupMenu *pmenu = 0);
+ KBgEngineOffline(TQWidget *parent = 0, TQString *name = 0, TQPopupMenu *pmenu = 0);
/**
* Destructor
@@ -119,7 +119,7 @@ public slots:
* A move has been made on the board - see the board class
* for the format of the string s
*/
- virtual void handleMove(QString *s);
+ virtual void handleMove(TQString *s);
/**
* Undo the last move
@@ -154,7 +154,7 @@ public slots:
/**
* Process the string cmd
*/
- virtual void handleCommand(const QString& cmd);
+ virtual void handleCommand(const TQString& cmd);
/**
* Start a new game.