summaryrefslogtreecommitdiffstats
path: root/kshisen
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:47:36 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2011-12-15 15:47:36 -0600
commit97d1732e257f8700488d7ca1660ae7eba8fc6065 (patch)
tree4c6397ed2c1dd6f7c3354b5b87f313547d92a35f /kshisen
parent9c27a1a03e02fd53aedc1a182444b35fd8e14967 (diff)
downloadtdegames-97d1732e257f8700488d7ca1660ae7eba8fc6065.tar.gz
tdegames-97d1732e257f8700488d7ca1660ae7eba8fc6065.zip
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kshisen')
-rw-r--r--kshisen/app.cpp64
-rw-r--r--kshisen/board.cpp6
-rw-r--r--kshisen/board.h2
-rw-r--r--kshisen/settings.ui14
4 files changed, 43 insertions, 43 deletions
diff --git a/kshisen/app.cpp b/kshisen/app.cpp
index 47f59f1b..5b371c5f 100644
--- a/kshisen/app.cpp
+++ b/kshisen/app.cpp
@@ -52,7 +52,7 @@
#include <kstdguiitem.h>
#include <kconfigdialog.h>
-#include <tqlayout.h>
+#include <layout.h>
#include <tqtimer.h>
#include <tqlineedit.h>
@@ -299,9 +299,9 @@ void App::slotEndOfGame()
else
{
TQString s = i18n("Congratulations! You made it in %1:%2:%3")
- .tqarg(TQString().sprintf("%02d", board->getTimeForGame()/3600))
- .tqarg(TQString().sprintf("%02d", (board->getTimeForGame() / 60) % 60))
- .tqarg(TQString().sprintf("%02d", board->getTimeForGame() % 60));
+ .arg(TQString().sprintf("%02d", board->getTimeForGame()/3600))
+ .arg(TQString().sprintf("%02d", (board->getTimeForGame() / 60) % 60))
+ .arg(TQString().sprintf("%02d", board->getTimeForGame() % 60));
KMessageBox::information(this, s, i18n("End of Game"));
}
@@ -315,18 +315,18 @@ void App::updateScore()
{
int t = board->getTimeForGame();
TQString s = i18n(" Your time: %1:%2:%3 %4")
- .tqarg(TQString().sprintf("%02d", t / 3600 ))
- .tqarg(TQString().sprintf("%02d", (t / 60) % 60 ))
- .tqarg(TQString().sprintf("%02d", t % 60 ))
- .tqarg(board->isPaused()?i18n("(Paused) "):TQString());
+ .arg(TQString().sprintf("%02d", t / 3600 ))
+ .arg(TQString().sprintf("%02d", (t / 60) % 60 ))
+ .arg(TQString().sprintf("%02d", t % 60 ))
+ .arg(board->isPaused()?i18n("(Paused) "):TQString());
statusBar()->changeItem(s, SBI_TIME);
// Number of tiles
int tl = (board->x_tiles() * board->y_tiles());
s = i18n(" Removed: %1/%2 ")
- .tqarg(TQString().sprintf("%d", tl - board->tilesLeft()))
- .tqarg(TQString().sprintf("%d", tl ));
+ .arg(TQString().sprintf("%d", tl - board->tilesLeft()))
+ .arg(TQString().sprintf("%d", tl ));
statusBar()->changeItem(s, SBI_TILES);
}
@@ -356,26 +356,26 @@ TQString App::getPlayerName()
TQDialog *dlg = new TQDialog(this, "Hall of Fame", true);
TQLabel *l1 = new TQLabel(i18n("You've made it into the \"Hall Of Fame\". Type in\nyour name so mankind will always remember\nyour cool rating."), dlg);
- l1->setFixedSize(l1->tqsizeHint());
+ l1->setFixedSize(l1->sizeHint());
TQLabel *l2 = new TQLabel(i18n("Your name:"), dlg);
- l2->setFixedSize(l2->tqsizeHint());
+ l2->setFixedSize(l2->sizeHint());
TQLineEdit *e = new TQLineEdit(dlg);
e->setText("XXXXXXXXXXXXXXXX");
- e->setMinimumWidth(e->tqsizeHint().width());
- e->setFixedHeight(e->tqsizeHint().height());
+ e->setMinimumWidth(e->sizeHint().width());
+ e->setFixedHeight(e->sizeHint().height());
e->setText( lastPlayerName );
e->setFocus();
TQPushButton *b = new KPushButton(KStdGuiItem::ok(), dlg);
b->setDefault(true);
- b->setFixedSize(b->tqsizeHint());
+ b->setFixedSize(b->sizeHint());
connect(b, TQT_SIGNAL(released()), dlg, TQT_SLOT(accept()));
connect(e, TQT_SIGNAL(returnPressed()), dlg, TQT_SLOT(accept()));
- // create tqlayout
+ // create layout
TQVBoxLayout *tl = new TQVBoxLayout(dlg, 10);
TQHBoxLayout *tl1 = new TQHBoxLayout();
tl->addWidget(l1);
@@ -603,12 +603,12 @@ void App::showHighscore(int focusitem)
f.setPointSize(24);
f.setBold(true);
l->setFont(f);
- l->setFixedSize(l->tqsizeHint());
+ l->setFixedSize(l->sizeHint());
l->setFixedWidth(l->width() + 32);
- l->tqsetAlignment(AlignCenter);
+ l->setAlignment(AlignCenter);
tl->addWidget(l);
- // insert highscores in a gridtqlayout
+ // insert highscores in a gridlayout
TQGridLayout *table = new TQGridLayout(12, 5, 5);
tl->addLayout(table, 1);
@@ -621,23 +621,23 @@ void App::showHighscore(int focusitem)
f.setBold(true);
l = new TQLabel(i18n("Rank"), dlg);
l->setFont(f);
- l->setMinimumSize(l->tqsizeHint());
+ l->setMinimumSize(l->sizeHint());
table->addWidget(l, 0, 0);
l = new TQLabel(i18n("Name"), dlg);
l->setFont(f);
- l->setMinimumSize(l->tqsizeHint());
+ l->setMinimumSize(l->sizeHint());
table->addWidget(l, 0, 1);
l = new TQLabel(i18n("Time"), dlg);
l->setFont(f);
- l->setMinimumSize(l->tqsizeHint());
+ l->setMinimumSize(l->sizeHint());
table->addWidget(l, 0, 2);
l = new TQLabel(i18n("Size"), dlg);
l->setFont(f);
- l->setMinimumSize(l->tqsizeHint());
+ l->setMinimumSize(l->sizeHint());
table->addWidget(l, 0, 3);
l = new TQLabel(i18n("Score"), dlg);
l->setFont(f);
- l->setMinimumSize(l->tqsizeHint().width()*3, l->tqsizeHint().height());
+ l->setMinimumSize(l->sizeHint().width()*3, l->sizeHint().height());
table->addWidget(l, 0, 4);
TQString s;
@@ -685,8 +685,8 @@ void App::showHighscore(int focusitem)
if(i < highscore.size())
{
s = TQString("%1 %2")
- .tqarg(getScore(hs))
- .tqarg(hs.gravity ? i18n("(gravity)") : TQString(""));
+ .arg(getScore(hs))
+ .arg(hs.gravity ? i18n("(gravity)") : TQString(""));
}
else
{
@@ -694,7 +694,7 @@ void App::showHighscore(int focusitem)
}
e[i][4] = new TQLabel(s, dlg);
- e[i][4]->tqsetAlignment(AlignRight);
+ e[i][4]->setAlignment(AlignRight);
}
f = font();
@@ -704,12 +704,12 @@ void App::showHighscore(int focusitem)
{
for(j = 0; j < 5; j++)
{
- e[i][j]->setMinimumHeight(e[i][j]->tqsizeHint().height());
+ e[i][j]->setMinimumHeight(e[i][j]->sizeHint().height());
if(j == 1)
- e[i][j]->setMinimumWidth(std::max(e[i][j]->tqsizeHint().width(), 100));
+ e[i][j]->setMinimumWidth(std::max(e[i][j]->sizeHint().width(), 100));
else
- e[i][j]->setMinimumWidth(std::max(e[i][j]->tqsizeHint().width(), 60));
+ e[i][j]->setMinimumWidth(std::max(e[i][j]->sizeHint().width(), 60));
if((int)i == focusitem)
e[i][j]->setFont(f);
@@ -720,14 +720,14 @@ void App::showHighscore(int focusitem)
TQPushButton *b = new KPushButton(KStdGuiItem::close(), dlg);
- b->setFixedSize(b->tqsizeHint());
+ b->setFixedSize(b->sizeHint());
// connect the "Close"-button to done
connect(b, TQT_SIGNAL(clicked()), dlg, TQT_SLOT(accept()));
b->setDefault(true);
b->setFocus();
- // make tqlayout
+ // make layout
tl->addSpacing(10);
tl->addWidget(b);
tl->activate();
diff --git a/kshisen/board.cpp b/kshisen/board.cpp
index 4173ad4e..ae2fd750 100644
--- a/kshisen/board.cpp
+++ b/kshisen/board.cpp
@@ -444,7 +444,7 @@ void Board::updateField(int x, int y, bool erase)
tiles.tileWidth(),
tiles.tileHeight());
- tqrepaint(r, erase);
+ repaint(r, erase);
}
void Board::paintEvent(TQPaintEvent *e)
@@ -900,7 +900,7 @@ void Board::dumpBoard() const
if(tile == EMPTY)
row += " --";
else
- row += TQString("%1").tqarg(getField(x, y), 3);
+ row += TQString("%1").arg(getField(x, y), 3);
}
kdDebug() << row << endl;
}
@@ -1071,7 +1071,7 @@ bool Board::pause()
return paused;
}
-TQSize Board::tqsizeHint() const
+TQSize Board::sizeHint() const
{
int dpi = TQPaintDeviceMetrics(this).logicalDpiX();
if (dpi < 75)
diff --git a/kshisen/board.h b/kshisen/board.h
index 1a1f5ab6..634878ed 100644
--- a/kshisen/board.h
+++ b/kshisen/board.h
@@ -135,7 +135,7 @@ private slots:
void gravity(int, bool);
protected:
- virtual TQSize tqsizeHint() const;
+ virtual TQSize sizeHint() const;
private: // functions
void initBoard();
diff --git a/kshisen/settings.ui b/kshisen/settings.ui
index 773b75a5..9fdac201 100644
--- a/kshisen/settings.ui
+++ b/kshisen/settings.ui
@@ -78,7 +78,7 @@
<property name="text">
<string>Hard</string>
</property>
- <property name="tqalignment">
+ <property name="alignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
@@ -130,7 +130,7 @@
<property name="text">
<string>Fast</string>
</property>
- <property name="tqalignment">
+ <property name="alignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
@@ -170,7 +170,7 @@
<property name="text">
<string>18x8</string>
</property>
- <property name="tqalignment">
+ <property name="alignment">
<set>AlignCenter</set>
</property>
</widget>
@@ -181,7 +181,7 @@
<property name="text">
<string>26x14</string>
</property>
- <property name="tqalignment">
+ <property name="alignment">
<set>AlignCenter</set>
</property>
</widget>
@@ -192,7 +192,7 @@
<property name="text">
<string>30x16</string>
</property>
- <property name="tqalignment">
+ <property name="alignment">
<set>AlignVCenter|AlignRight</set>
</property>
</widget>
@@ -226,7 +226,7 @@
<property name="text">
<string>24x12</string>
</property>
- <property name="tqalignment">
+ <property name="alignment">
<set>AlignCenter</set>
</property>
</widget>
@@ -242,7 +242,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="tqsizeHint">
+ <property name="sizeHint">
<size>
<width>20</width>
<height>20</height>