summaryrefslogtreecommitdiffstats
path: root/libksirtet/common/field.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 /libksirtet/common/field.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 'libksirtet/common/field.cpp')
-rw-r--r--libksirtet/common/field.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/libksirtet/common/field.cpp b/libksirtet/common/field.cpp
index 2d67062e..4c00ba4e 100644
--- a/libksirtet/common/field.cpp
+++ b/libksirtet/common/field.cpp
@@ -1,9 +1,9 @@
#include "field.h"
#include "field.moc"
-#include <qwhatsthis.h>
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqwhatsthis.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kprogress.h>
@@ -19,7 +19,7 @@
#include "commonprefs.h"
-Field::Field(QWidget *parent)
+Field::Field(TQWidget *parent)
: MPSimpleBoard(parent), BaseField(this)
{
// column 1
@@ -38,20 +38,20 @@ Field::Field(QWidget *parent)
lcds->setRowStretch(4, 1);
// level progress
- levelLabel = new QLabel(this);
+ levelLabel = new TQLabel(this);
levelLabel->setAlignment(AlignCenter);
lcds->addWidget(levelLabel, 5, 0);
toLevel = new KProgress(this);
toLevel->setTextEnabled(true);
toLevel->setFormat("1");
- QWhatsThis::add(toLevel, i18n("Display the progress to complete the current level or stage."));
+ TQWhatsThis::add(toLevel, i18n("Display the progress to complete the current level or stage."));
lcds->addWidget(toLevel, 6, 0);
lcds->setRowStretch(7, 1);
// column 2
// previous player height
prevHeight = new PlayerProgress(board, this, "prev_progress");
- QWhatsThis::add(prevHeight, i18n("Previous player's height"));
+ TQWhatsThis::add(prevHeight, i18n("Previous player's height"));
top->addWidget(prevHeight, 1, 1, AlignHCenter);
// column 3
@@ -61,22 +61,22 @@ Field::Field(QWidget *parent)
// shadow piece
shadow = new Shadow(board, this);
- QWhatsThis::add(shadow, i18n("Shadow of the current piece"));
+ TQWhatsThis::add(shadow, i18n("Shadow of the current piece"));
top->addWidget(shadow, 2, 2);
// column 4
// next player height
nextHeight = new PlayerProgress(board, this, "next_progress");
- QWhatsThis::add(nextHeight, i18n("Next player's height"));
+ TQWhatsThis::add(nextHeight, i18n("Next player's height"));
top->addWidget(nextHeight, 1, 3, AlignHCenter);
// column 5
// next piece shower
- QVBoxLayout *vbl = new QVBoxLayout(10);
+ TQVBoxLayout *vbl = new TQVBoxLayout(10);
top->addLayout(vbl, 1, 4);
vbl->addStretch(1);
- labShowNext = new QLabel(i18n("Next Tile"), this);
+ labShowNext = new TQLabel(i18n("Next Tile"), this);
labShowNext->setAlignment(AlignCenter);
vbl->addWidget(labShowNext, 0);
showNext = new ShowNextPiece(board, this);
@@ -85,16 +85,16 @@ Field::Field(QWidget *parent)
vbl->addWidget(showNext, 0);
vbl->addStretch(4);
- connect(board, SIGNAL(scoreUpdated()), SLOT(scoreUpdatedSlot()));
- connect(board, SIGNAL(levelUpdated()), SLOT(levelUpdated()));
- connect(board, SIGNAL(removedUpdated()), SLOT(removedUpdated()));
+ connect(board, TQT_SIGNAL(scoreUpdated()), TQT_SLOT(scoreUpdatedSlot()));
+ connect(board, TQT_SIGNAL(levelUpdated()), TQT_SLOT(levelUpdated()));
+ connect(board, TQT_SIGNAL(removedUpdated()), TQT_SLOT(removedUpdated()));
initVariableGUI();
}
void Field::levelUpdated()
{
- toLevel->setFormat(QString::number(board->level()));
+ toLevel->setFormat(TQString::number(board->level()));
// necessary to update string ...
int p = toLevel->progress();
toLevel->setProgress(p+1);
@@ -125,7 +125,7 @@ void Field::showOpponents(bool show)
void Field::settingsChanged()
{
BaseField::settingsChanged();
- QColor color = BasePrefs::fadeColor();
+ TQColor color = BasePrefs::fadeColor();
double s = BasePrefs::fadeIntensity();
_snRootPixmap->setFadeEffect(s, color);
showNext->canvas()->setBackgroundColor(color);
@@ -143,14 +143,14 @@ void Field::settingsChanged()
}
void Field::_init(bool AI, bool multiplayer, bool server, bool first,
- const QString &name)
+ const TQString &name)
{
BaseField::init(AI, multiplayer, server, first, name);
showOpponents(multiplayer);
static_cast<Board *>(board)->setType(AI);
}
-void Field::_initFlag(QDataStream &s)
+void Field::_initFlag(TQDataStream &s)
{
ServerInitData sid;
s >> sid;
@@ -173,20 +173,20 @@ void Field::initVariableGUI()
scoreList->title()->setText(i18n("Elapsed time"));
showScore->hide();
showTime->show();
- QWhatsThis::add(scoreList, i18n("Display the elapsed time."));
+ TQWhatsThis::add(scoreList, i18n("Display the elapsed time."));
levelLabel->setText(i18n("Stage"));
toLevel->setTotalSteps( board->arcadeTodo() );
} else {
scoreList->title()->setText(i18n("Score"));
showScore->show();
showTime->hide();
- QWhatsThis::add(scoreList, i18n("<qt>Display the current score.<br/>It turns <font color=\"blue\">blue</font> if it is a highscore and <font color=\"red\">red</font> if it is the best local score.</qt>"));
+ TQWhatsThis::add(scoreList, i18n("<qt>Display the current score.<br/>It turns <font color=\"blue\">blue</font> if it is a highscore and <font color=\"red\">red</font> if it is the best local score.</qt>"));
levelLabel->setText(i18n("Level"));
toLevel->setTotalSteps(cfactory->cbi.nbRemovedToLevel);
}
}
-void Field::_playFlag(QDataStream &s)
+void Field::_playFlag(TQDataStream &s)
{
ServerPlayData spd;
s >> spd;
@@ -210,7 +210,7 @@ void Field::_stopFlag(bool gameover)
showTime->stop();
}
-void Field::_dataOut(QDataStream &s)
+void Field::_dataOut(TQDataStream &s)
{
_cpd.height = board->firstClearLine();
_cpd.end = static_cast<Board *>(board)->isGameOver();
@@ -227,7 +227,7 @@ KExtHighscore::Score Field::currentScore() const
return score;
}
-void Field::_gameOverDataOut(QDataStream &s)
+void Field::_gameOverDataOut(TQDataStream &s)
{
s << currentScore();
}