diff options
Diffstat (limited to 'katomic/gamewidget.cpp')
-rw-r--r-- | katomic/gamewidget.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/katomic/gamewidget.cpp b/katomic/gamewidget.cpp index 165e55c0..2c9ccf0a 100644 --- a/katomic/gamewidget.cpp +++ b/katomic/gamewidget.cpp @@ -23,11 +23,11 @@ #include "feld.h" #include "molek.h" -#include <qscrollbar.h> -#include <qgroupbox.h> -#include <qlayout.h> -#include <qvbox.h> -#include <qlabel.h> +#include <tqscrollbar.h> +#include <tqgroupbox.h> +#include <tqlayout.h> +#include <tqvbox.h> +#include <tqlabel.h> #include <kapplication.h> #include <kscoredialog.h> @@ -99,7 +99,7 @@ void GameWidget::gameOver(int moves) { KScoreDialog high(KScoreDialog::Name | KScoreDialog::Score, this); high.setCaption(i18n("Level %1 Highscores").arg(level)); - high.setConfigGroup(QString("Highscores Level %1").arg(level)); + high.setConfigGroup(TQString("Highscores Level %1").arg(level)); KScoreDialog::FieldInfo scoreInfo; @@ -118,16 +118,16 @@ void GameWidget::getMoves(int moves) void GameWidget::mergeHighScores(int l) { - KConfigGroup oldConfig(kapp->config(), QString("High Scores Level %1").arg(l).utf8()); - KConfigGroup newConfig(kapp->config(), QString("Highscores Level %1").arg(l).utf8()); + KConfigGroup oldConfig(kapp->config(), TQString("High Scores Level %1").arg(l).utf8()); + KConfigGroup newConfig(kapp->config(), TQString("Highscores Level %1").arg(l).utf8()); newConfig.writeEntry("LastPlayer", oldConfig.readEntry("LastPlayer")); - QString num; + TQString num; for (int i = 1; i <= 10; ++i) { num.setNum(i); - QString key = "Pos" + num + "Name"; + TQString key = "Pos" + num + "Name"; newConfig.writeEntry(key, oldConfig.readEntry(key, "-")); key = "Pos" + num + "Score"; newConfig.writeEntry(key, oldConfig.readEntry(key, "-")); @@ -138,7 +138,7 @@ void GameWidget::mergeHighScores(int l) void GameWidget::updateLevel (int l) { level=l; - QString levelFile = locate("appdata", QString("levels/level_%1").arg(l)); + TQString levelFile = locate("appdata", TQString("levels/level_%1").arg(l)); if (levelFile.isNull()) { return updateLevel(1); } @@ -147,11 +147,11 @@ void GameWidget::updateLevel (int l) cfg.setGroup("Level"); feld->load(cfg); - if (!kapp->config()->hasGroup(QString("Highscores Level %1").arg(level)) && - kapp->config()->hasGroup(QString("High Scores Level %1").arg(level))) + if (!kapp->config()->hasGroup(TQString("Highscores Level %1").arg(level)) && + kapp->config()->hasGroup(TQString("High Scores Level %1").arg(level))) mergeHighScores(level); - highScore->setConfigGroup(QString("Highscores Level %1").arg(level)); + highScore->setConfigGroup(TQString("Highscores Level %1").arg(level)); highest.setNum(highScore->highScore()); if (highest != "0" ) hs->setText(highest); @@ -167,14 +167,14 @@ void GameWidget::restartLevel() updateLevel(level); } -GameWidget::GameWidget ( QWidget *parent, const char* name ) - : QWidget( parent, name ) +GameWidget::GameWidget ( TQWidget *parent, const char* name ) + : TQWidget( parent, name ) { level = 1; nlevels = KGlobal::dirs()->findAllResources("appdata", "levels/level_*", false, true).count(); - QHBoxLayout *top = new QHBoxLayout(this, 10); + TQHBoxLayout *top = new TQHBoxLayout(this, 10); // spielfeld feld = new Feld (this, "feld"); @@ -182,47 +182,47 @@ GameWidget::GameWidget ( QWidget *parent, const char* name ) top->addWidget(feld); - QVBox *vb = new QVBox(this); + TQVBox *vb = new TQVBox(this); vb->setSpacing(20); top->addWidget(vb); // scrollbar - scrl = new QScrollBar(1, nlevels, 1, - 5, 1, QScrollBar::Horizontal, vb, "scrl" ); - connect (scrl, SIGNAL (valueChanged (int)), SLOT (updateLevel (int))); + scrl = new TQScrollBar(1, nlevels, 1, + 5, 1, TQScrollBar::Horizontal, vb, "scrl" ); + connect (scrl, TQT_SIGNAL (valueChanged (int)), TQT_SLOT (updateLevel (int))); // molek�l molek = new Molek (vb, "molek"); feld->setMolek(molek); - connect (feld, SIGNAL (gameOver(int)), SLOT(gameOver(int))); - connect (feld, SIGNAL (sendMoves(int)), SLOT(getMoves(int))); - connect (feld, SIGNAL (enableRedo(bool)), SIGNAL(enableRedo(bool))); - connect (feld, SIGNAL (enableUndo(bool)), SIGNAL(enableUndo(bool))); + connect (feld, TQT_SIGNAL (gameOver(int)), TQT_SLOT(gameOver(int))); + connect (feld, TQT_SIGNAL (sendMoves(int)), TQT_SLOT(getMoves(int))); + connect (feld, TQT_SIGNAL (enableRedo(bool)), TQT_SIGNAL(enableRedo(bool))); + connect (feld, TQT_SIGNAL (enableUndo(bool)), TQT_SIGNAL(enableUndo(bool))); highScore = new KScoreDialog(KScoreDialog::Name | KScoreDialog::Score, this); // the score group - QGroupBox *bg = new QGroupBox (i18n("Score"), vb, "bg"); - QBoxLayout *slay = new QVBoxLayout (bg, 10); + TQGroupBox *bg = new TQGroupBox (i18n("Score"), vb, "bg"); + TQBoxLayout *slay = new TQVBoxLayout (bg, 10); slay->addSpacing(10); - slay->addWidget(new QLabel(i18n("Highscore:"), bg)); + slay->addWidget(new TQLabel(i18n("Highscore:"), bg)); - QFont headerFont = KGlobalSettings::generalFont(); + TQFont headerFont = KGlobalSettings::generalFont(); headerFont.setBold(true); - hs = new QLabel (highest, bg); + hs = new TQLabel (highest, bg); hs->setAlignment(Qt::AlignRight); hs->setFont(headerFont); slay->addWidget(hs); slay->addSpacing(10); - slay->addWidget(new QLabel(i18n("Your score so far:"), bg)); + slay->addWidget(new TQLabel(i18n("Your score so far:"), bg)); - ys = new QLabel (current, bg); + ys = new TQLabel (current, bg); ys->setAlignment(Qt::AlignRight); ys->setFont(headerFont); slay->addWidget(ys); @@ -246,7 +246,7 @@ void GameWidget::showHighscores () { KScoreDialog high(KScoreDialog::Name | KScoreDialog::Score, this); high.setCaption(i18n("Level %1 Highscores").arg(level)); - high.setConfigGroup(QString("Highscores Level %1").arg(level)); + high.setConfigGroup(TQString("Highscores Level %1").arg(level)); high.exec(); } |