From 97d1732e257f8700488d7ca1660ae7eba8fc6065 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 15 Dec 2011 15:47:36 -0600 Subject: Rename a number of old tq methods that are no longer tq specific --- kpoker/betbox.cpp | 10 +++++----- kpoker/defines.h | 2 +- kpoker/kpaint.cpp | 6 +++--- kpoker/kpoker.cpp | 32 ++++++++++++++++---------------- kpoker/kpoker.h | 2 +- kpoker/newgamedlg.cpp | 6 +++--- kpoker/optionsdlg.cpp | 2 +- kpoker/playerbox.cpp | 16 ++++++++-------- 8 files changed, 38 insertions(+), 38 deletions(-) (limited to 'kpoker') diff --git a/kpoker/betbox.cpp b/kpoker/betbox.cpp index cbdcad12..52bb39cb 100644 --- a/kpoker/betbox.cpp +++ b/kpoker/betbox.cpp @@ -16,7 +16,7 @@ #include -#include +#include #include #include @@ -46,10 +46,10 @@ BetBox::BetBox(TQWidget* parent, const char* name) foldButton = new TQPushButton(this); l->addWidget(foldButton, 0); - bet5Up->setText(TQString("+%1").tqarg(KGlobal::locale()->formatMoney(5))); - bet10Up->setText(TQString("+%1").tqarg(KGlobal::locale()->formatMoney(10))); - bet5Down->setText(TQString("-%1").tqarg(KGlobal::locale()->formatMoney(5))); - bet10Down->setText(TQString("-%1").tqarg(KGlobal::locale()->formatMoney(10))); + bet5Up->setText(TQString("+%1").arg(KGlobal::locale()->formatMoney(5))); + bet10Up->setText(TQString("+%1").arg(KGlobal::locale()->formatMoney(10))); + bet5Down->setText(TQString("-%1").arg(KGlobal::locale()->formatMoney(5))); + bet10Down->setText(TQString("-%1").arg(KGlobal::locale()->formatMoney(10))); adjustBet->setText(i18n("Adjust Bet")); foldButton->setText(i18n("Fold")); diff --git a/kpoker/defines.h b/kpoker/defines.h index d4b827de..3da071f6 100644 --- a/kpoker/defines.h +++ b/kpoker/defines.h @@ -21,7 +21,7 @@ // ---------------------------------------------------------------- -// Graphical tqlayout +// Graphical layout #define cardHeight 96 diff --git a/kpoker/kpaint.cpp b/kpoker/kpaint.cpp index 2dcc5dbf..99c54145 100644 --- a/kpoker/kpaint.cpp +++ b/kpoker/kpaint.cpp @@ -17,7 +17,7 @@ // QT includes #include -#include +#include // KDE includes //#include @@ -173,8 +173,8 @@ void CardWidget::repaintDeck() setPixmap(*m_pm); setFixedSize(cardImages->getWidth(), cardImages->getHeight()); - ((TQWidget*) parent())->tqlayout()->tqinvalidate(); - ((TQWidget*) parent())->setFixedSize( ((TQWidget*) parent())->tqsizeHint()); + ((TQWidget*) parent())->layout()->invalidate(); + ((TQWidget*) parent())->setFixedSize( ((TQWidget*) parent())->sizeHint()); } 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 #include #include -#include +#include // KDE includes #include @@ -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(); diff --git a/kpoker/kpoker.h b/kpoker/kpoker.h index 7eec697a..732a2af5 100644 --- a/kpoker/kpoker.h +++ b/kpoker/kpoker.h @@ -325,7 +325,7 @@ class kpok : public TQWidget int drawDelay; - // Graphical tqlayout. + // Graphical layout. TQVBoxLayout *topLayout; TQHBoxLayout *inputLayout; TQLabel *potLabel; diff --git a/kpoker/newgamedlg.cpp b/kpoker/newgamedlg.cpp index ef2bfe0a..d21b7da5 100644 --- a/kpoker/newgamedlg.cpp +++ b/kpoker/newgamedlg.cpp @@ -20,7 +20,7 @@ #include #include #include -#include +#include // KDE includes #include @@ -75,7 +75,7 @@ NewGameDlg::NewGameDlg(TQWidget* parent) l = new TQHBoxLayout(topLayout); l->addWidget(new TQLabel(i18n("Players' starting money:"), plainPage())); - moneyOfPlayers = new TQLineEdit(TQString("%1").tqarg(money), plainPage()); + moneyOfPlayers = new TQLineEdit(TQString("%1").arg(money), plainPage()); moneyOfPlayers->setValidator( new KIntValidator( 0,999999,moneyOfPlayers ) ); l->addWidget(moneyOfPlayers); @@ -127,7 +127,7 @@ void NewGameDlg::setPlayerNames(int no, TQString playerName) player1Name->setText(kapp->config()->readEntry("Name_0", i18n("You"))); computerNames->clear(); for (int i = 1; i < MAX_PLAYERS; i++) { - computerNames->insertItem(kapp->config()->readEntry(TQString("Name_%1").tqarg(i), i18n("Computer %1").tqarg(i))); + computerNames->insertItem(kapp->config()->readEntry(TQString("Name_%1").arg(i), i18n("Computer %1").arg(i))); } } else if (no == 0) { player1Name->setText(playerName); diff --git a/kpoker/optionsdlg.cpp b/kpoker/optionsdlg.cpp index 5fdfbfcf..d969e00f 100644 --- a/kpoker/optionsdlg.cpp +++ b/kpoker/optionsdlg.cpp @@ -17,7 +17,7 @@ // QT includes #include -#include +#include // KDE includes #include diff --git a/kpoker/playerbox.cpp b/kpoker/playerbox.cpp index 530ebd81..608f49f8 100644 --- a/kpoker/playerbox.cpp +++ b/kpoker/playerbox.cpp @@ -17,7 +17,7 @@ #include #include -#include +#include #include #include @@ -52,7 +52,7 @@ PlayerBox::PlayerBox(bool playerOne, TQWidget* parent, const char* name) vl->addWidget(cardBox, 0); cardBox->setFrameStyle(Box | Sunken); m_cardWidgets[i] = new CardWidget(cardBox); - cardBox->setFixedSize(cardBox->tqsizeHint()); + cardBox->setFixedSize(cardBox->sizeHint()); // Only add the "held" labels if this is the first player (the human one). if (playerOne) { @@ -60,7 +60,7 @@ PlayerBox::PlayerBox(bool playerOne, TQWidget* parent, const char* name) m_heldLabels[i] = new TQLabel(b); m_heldLabels[i]->setText(i18n("Held")); b->setFrameStyle(Box | Sunken); - b->setFixedSize(b->tqsizeHint()); + b->setFixedSize(b->sizeHint()); m_cardWidgets[i]->heldLabel = m_heldLabels[i]; TQHBoxLayout* heldLayout = new TQHBoxLayout(0); @@ -91,7 +91,7 @@ PlayerBox::PlayerBox(bool playerOne, TQWidget* parent, const char* name) } TQToolTip::add(m_cashLabel, - i18n("Money of %1").tqarg("Player"));//change via showName() + i18n("Money of %1").arg("Player"));//change via showName() // Assume that we have a multiplayer game. m_singlePlayer = false; @@ -122,7 +122,7 @@ void PlayerBox::showCash() { // Show the amount of cash the player has. m_cashLabel->setText(i18n("Cash: %1") - .tqarg(KGlobal::locale()->formatMoney(m_player->getCash()))); + .arg(KGlobal::locale()->formatMoney(m_player->getCash()))); // Show how much we have bet during this round. if (m_player->out()) @@ -130,10 +130,10 @@ void PlayerBox::showCash() else { if (m_singlePlayer) m_betLabel->setText(i18n("Cash per round: %1") - .tqarg(KGlobal::locale()->formatMoney(m_cashPerRound))); + .arg(KGlobal::locale()->formatMoney(m_cashPerRound))); else m_betLabel->setText(i18n("Bet: %1") - .tqarg(KGlobal::locale()-> formatMoney(m_player->getCurrentBet()))); + .arg(KGlobal::locale()-> formatMoney(m_player->getCurrentBet()))); } } @@ -145,7 +145,7 @@ void PlayerBox::showName() { setTitle(m_player->getName()); TQToolTip::remove(m_cashLabel); - TQToolTip::add(m_cashLabel, i18n("Money of %1").tqarg(m_player->getName())); + TQToolTip::add(m_cashLabel, i18n("Money of %1").arg(m_player->getName())); } -- cgit v1.2.3