diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:47:36 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:47:36 -0600 |
commit | 97d1732e257f8700488d7ca1660ae7eba8fc6065 (patch) | |
tree | 4c6397ed2c1dd6f7c3354b5b87f313547d92a35f /kpoker/kpoker.cpp | |
parent | 9c27a1a03e02fd53aedc1a182444b35fd8e14967 (diff) | |
download | tdegames-97d1732e257f8700488d7ca1660ae7eba8fc6065.tar.gz tdegames-97d1732e257f8700488d7ca1660ae7eba8fc6065.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kpoker/kpoker.cpp')
-rw-r--r-- | kpoker/kpoker.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/kpoker/kpoker.cpp b/kpoker/kpoker.cpp index 92a7df5c..38a62579 100644 --- a/kpoker/kpoker.cpp +++ b/kpoker/kpoker.cpp @@ -22,7 +22,7 @@ #include <tqtimer.h> #include <tqpainter.h> #include <tqtooltip.h> -#include <tqlayout.h> +#include <layout.h> // KDE includes #include <kmessagebox.h> @@ -178,7 +178,7 @@ kpok::kpok(TQWidget *parent, const char *name) // ...and the rest to computer players. for (int unsigned i = 1; i < m_numPlayers; i++) - m_players[i].setName(TQString("Computer %1").tqarg(i-1)); + m_players[i].setName(TQString("Computer %1").arg(i-1)); lastHandText = ""; @@ -269,13 +269,13 @@ void kpok::initWindow() mWonWidget = new TQWidget(this); inputLayout->addWidget(mWonWidget, 2); mWonWidget->setMinimumHeight(50); //FIXME hardcoded value for the wave - mWonWidget->setMinimumWidth(tmp.width(i18n("You won %1").tqarg(KGlobal::locale()->formatMoney(100))) + 20); // workaround for width problem in wave + mWonWidget->setMinimumWidth(tmp.width(i18n("You won %1").arg(KGlobal::locale()->formatMoney(100))) + 20); // workaround for width problem in wave TQHBoxLayout* wonLayout = new TQHBoxLayout(mWonWidget); wonLayout->setAutoAdd(true); wonLabel = new TQLabel(mWonWidget); wonLabel->setFont(wonFont); - wonLabel->tqsetAlignment(AlignCenter); + wonLabel->setAlignment(AlignCenter); wonLabel->hide(); inputLayout->addStretch(1); @@ -686,7 +686,7 @@ void kpok::paintCash() for (unsigned int i = 0; i < m_numPlayers; i++) { playerBox[i]->showCash(); } - potLabel->setText(i18n("Pot: %1").tqarg(KGlobal::locale()->formatMoney(m_game.getPot()))); + potLabel->setText(i18n("Pot: %1").arg(KGlobal::locale()->formatMoney(m_game.getPot()))); } @@ -805,9 +805,9 @@ void kpok::displayWinner_Computer(PokerPlayer* winner, bool othersPassed) // Generate a string with winner info and show it. TQString label; if (winner->getHuman()) - label = i18n("You won %1").tqarg(KGlobal::locale()->formatMoney(m_game.getPot())); + label = i18n("You won %1").arg(KGlobal::locale()->formatMoney(m_game.getPot())); else - label = i18n("%1 won %2").tqarg(winner->getName()).tqarg(KGlobal::locale()->formatMoney(m_game.getPot())); + label = i18n("%1 won %2").arg(winner->getName()).arg(KGlobal::locale()->formatMoney(m_game.getPot())); wonLabel->setText(label); // Start the waving motion of the text. @@ -1028,7 +1028,7 @@ void kpok::stopWave() { waveTimer->stop(); fCount = -1; /* clear image */ - tqrepaint ( FALSE ); + repaint ( FALSE ); waveActive = false; } @@ -1042,7 +1042,7 @@ void kpok::stopDrawing() void kpok::waveTimerEvent() { fCount = (fCount + 1) & 15; - tqrepaint( FALSE ); + repaint( FALSE ); } @@ -1072,7 +1072,7 @@ void kpok::displayWin(const TQString& hand, int cashWon) if (cashWon) { playSound("win.wav"); - buf = i18n("You won %1!").tqarg(KGlobal::locale()->formatMoney(cashWon)); + buf = i18n("You won %1!").arg(KGlobal::locale()->formatMoney(cashWon)); } else { playSound("lose.wav"); buf = i18n("Game Over"); // locale @@ -1307,9 +1307,9 @@ void kpok::saveGame(KConfig* conf) conf->writeEntry("lastHandText", lastHandText); for (int i = 0; i < players; i++) { - conf->writeEntry(TQString("Name_%1").tqarg(i), m_players[i].getName()); - conf->writeEntry(TQString("Human_%1").tqarg(i), m_players[i].getHuman()); - conf->writeEntry(TQString("Cash_%1").tqarg(i), m_players[i].getCash()); + conf->writeEntry(TQString("Name_%1").arg(i), m_players[i].getName()); + conf->writeEntry(TQString("Human_%1").arg(i), m_players[i].getHuman()); + conf->writeEntry(TQString("Cash_%1").arg(i), m_players[i].getCash()); } m_game.clearDirty(); @@ -1407,14 +1407,14 @@ bool kpok::loadGame(KConfig* conf) if (numPlayers > 0) { for (int i = 0; i < numPlayers; i++) { - TQString buf = conf->readEntry(TQString("Name_%1").tqarg(i), + TQString buf = conf->readEntry(TQString("Name_%1").arg(i), "Player"); m_players[i].setName(buf); - bool human = conf->readBoolEntry(TQString("Human_%1").tqarg(i), + bool human = conf->readBoolEntry(TQString("Human_%1").arg(i), false); if (human) m_players[i].setHuman(); // i == 0 - int cash = conf->readNumEntry(TQString("Cash_%1").tqarg(i), + int cash = conf->readNumEntry(TQString("Cash_%1").arg(i), START_MONEY); m_players[i].setCash(cash); m_game.setDirty(); |