summaryrefslogtreecommitdiffstats
path: root/libksirtet/common/ai.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libksirtet/common/ai.cpp')
-rw-r--r--libksirtet/common/ai.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/libksirtet/common/ai.cpp b/libksirtet/common/ai.cpp
index bc1c6722..78f9d5af 100644
--- a/libksirtet/common/ai.cpp
+++ b/libksirtet/common/ai.cpp
@@ -3,12 +3,12 @@
#include <assert.h>
-#include <qlabel.h>
-#include <qhbox.h>
-#include <qvbox.h>
-#include <qlayout.h>
-#include <qgrid.h>
-#include <qwhatsthis.h>
+#include <tqlabel.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
+#include <tqlayout.h>
+#include <tqgrid.h>
+#include <tqwhatsthis.h>
#include <klocale.h>
#include <kconfig.h>
@@ -61,7 +61,7 @@ bool AIPiece::increment()
// nbRot = _current->nbConfigurations() - 1;
// curRot = 0;
}
- _current->rotate(true, QPoint(0, 0));
+ _current->rotate(true, TQPoint(0, 0));
nbPos = _board->matrix().width() - _current->size().first + 1;
curRot++;
curPos = 0;
@@ -89,7 +89,7 @@ AI::AI(uint tTime, uint oTime, const Data *DATA)
: timer(this), thinkTime(tTime), orderTime(oTime), stopped(false),
board(0)
{
- connect(&timer, SIGNAL(timeout()), SLOT(timeout()));
+ connect(&timer, TQT_SIGNAL(timeout()), TQT_SLOT(timeout()));
for (uint i=0; DATA[i].name; i++) {
Element element;
@@ -295,13 +295,13 @@ double AI::nbRemoved(const Board &main, const Board &current)
const uint AIConfig::minThinkingDepth = 1;
const uint AIConfig::maxThinkingDepth = 2;
-AIConfig::AIConfig(const QValueVector<AI::Element> &elements)
- : QWidget(0, "ai config")
+AIConfig::AIConfig(const TQValueVector<AI::Element> &elements)
+ : TQWidget(0, "ai config")
{
- QGridLayout *top = new QGridLayout(this, 3, 2, KDialog::marginHint(),
+ TQGridLayout *top = new TQGridLayout(this, 3, 2, KDialog::marginHint(),
KDialog::spacingHint());
- QLabel *label = new QLabel(i18n("Thinking depth:"), this);
+ TQLabel *label = new TQLabel(i18n("Thinking depth:"), this);
top->addWidget(label, 0, 0);
KIntNumInput *in = new KIntNumInput(this, "kcfg_ThinkingDepth");
in->setRange(minThinkingDepth, maxThinkingDepth);
@@ -309,19 +309,19 @@ AIConfig::AIConfig(const QValueVector<AI::Element> &elements)
top->addRowSpacing(1, KDialog::spacingHint());
- QGrid *grid = new QGrid(2, this);
+ TQGrid *grid = new TQGrid(2, this);
top->addMultiCellWidget(grid, 2, 2, 0, 1);
for (uint i=0; i<elements.size(); i++) {
const AI::Data &data = *elements.at(i).data;
- QLabel *label = new QLabel(i18n(data.label), grid);
- if (data.whatsthis) QWhatsThis::add(label, i18n(data.whatsthis));
- label->setFrameStyle(QFrame::Panel | QFrame::Plain);
+ TQLabel *label = new TQLabel(i18n(data.label), grid);
+ if (data.whatsthis) TQWhatsThis::add(label, i18n(data.whatsthis));
+ label->setFrameStyle(TQFrame::Panel | TQFrame::Plain);
- QVBox *vb = new QVBox(grid);
- if (data.whatsthis) QWhatsThis::add(vb, i18n(data.whatsthis));
+ TQVBox *vb = new TQVBox(grid);
+ if (data.whatsthis) TQWhatsThis::add(vb, i18n(data.whatsthis));
vb->setMargin(KDialog::spacingHint());
vb->setSpacing(KDialog::spacingHint());
- vb->setFrameStyle(QFrame::Panel | QFrame::Plain);
+ vb->setFrameStyle(TQFrame::Panel | TQFrame::Plain);
if (data.triggered) {
KIntNumInput *trig = new KIntNumInput(vb, triggerKey(data.name));
trig->setRange(0, 10, 1, true);
@@ -331,26 +331,26 @@ AIConfig::AIConfig(const QValueVector<AI::Element> &elements)
}
}
-QCString AIConfig::triggerKey(const char *name)
+TQCString AIConfig::triggerKey(const char *name)
{
- return "kcfg_Trigger_" + QCString(name);
+ return "kcfg_Trigger_" + TQCString(name);
}
-QCString AIConfig::coefficientKey(const char *name)
+TQCString AIConfig::coefficientKey(const char *name)
{
- return "kcfg_Coefficient_" + QCString(name);
+ return "kcfg_Coefficient_" + TQCString(name);
}
double AIConfig::coefficient(const AI::Data &data)
{
- KConfigSkeletonItem *item = CommonPrefs::self()->findItem( QString("Coefficient_%1").arg(data.name) );
+ KConfigSkeletonItem *item = CommonPrefs::self()->findItem( TQString("Coefficient_%1").arg(data.name) );
assert(item);
return item->property().toDouble();
}
int AIConfig::trigger(const AI::Data &data)
{
- KConfigSkeletonItem *item = CommonPrefs::self()->findItem( QString("Trigger_%1").arg(data.name) );
+ KConfigSkeletonItem *item = CommonPrefs::self()->findItem( TQString("Trigger_%1").arg(data.name) );
assert(item);
return item->property().toInt();
}