summaryrefslogtreecommitdiffstats
path: root/kpoker
diff options
context:
space:
mode:
authorTimothy Pearson <[email protected]>2011-12-16 09:58:53 -0600
committerTimothy Pearson <[email protected]>2011-12-16 09:58:53 -0600
commit84ace1135cac57993b72fee7105b92def1638d32 (patch)
treeb8871eb76e3db4a062731b0ce7c99c24fac119e8 /kpoker
parent97d1732e257f8700488d7ca1660ae7eba8fc6065 (diff)
downloadtdegames-84ace1135cac57993b72fee7105b92def1638d32.tar.gz
tdegames-84ace1135cac57993b72fee7105b92def1638d32.zip
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 97d1732e257f8700488d7ca1660ae7eba8fc6065.
Diffstat (limited to 'kpoker')
-rw-r--r--kpoker/betbox.cpp10
-rw-r--r--kpoker/defines.h2
-rw-r--r--kpoker/kpaint.cpp6
-rw-r--r--kpoker/kpoker.cpp32
-rw-r--r--kpoker/kpoker.h2
-rw-r--r--kpoker/newgamedlg.cpp6
-rw-r--r--kpoker/optionsdlg.cpp2
-rw-r--r--kpoker/playerbox.cpp16
8 files changed, 38 insertions, 38 deletions
diff --git a/kpoker/betbox.cpp b/kpoker/betbox.cpp
index 52bb39cb..cbdcad12 100644
--- a/kpoker/betbox.cpp
+++ b/kpoker/betbox.cpp
@@ -16,7 +16,7 @@
#include <tqpushbutton.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <kglobal.h>
#include <klocale.h>
@@ -46,10 +46,10 @@ BetBox::BetBox(TQWidget* parent, const char* name)
foldButton = new TQPushButton(this);
l->addWidget(foldButton, 0);
- 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)));
+ 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)));
adjustBet->setText(i18n("Adjust Bet"));
foldButton->setText(i18n("Fold"));
diff --git a/kpoker/defines.h b/kpoker/defines.h
index 3da071f6..d4b827de 100644
--- a/kpoker/defines.h
+++ b/kpoker/defines.h
@@ -21,7 +21,7 @@
// ----------------------------------------------------------------
-// Graphical layout
+// Graphical tqlayout
#define cardHeight 96
diff --git a/kpoker/kpaint.cpp b/kpoker/kpaint.cpp
index 99c54145..2dcc5dbf 100644
--- a/kpoker/kpaint.cpp
+++ b/kpoker/kpaint.cpp
@@ -17,7 +17,7 @@
// QT includes
#include <tqdir.h>
-#include <layout.h>
+#include <tqlayout.h>
// KDE includes
//#include <kglobal.h>
@@ -173,8 +173,8 @@ void CardWidget::repaintDeck()
setPixmap(*m_pm);
setFixedSize(cardImages->getWidth(), cardImages->getHeight());
- ((TQWidget*) parent())->layout()->invalidate();
- ((TQWidget*) parent())->setFixedSize( ((TQWidget*) parent())->sizeHint());
+ ((TQWidget*) parent())->tqlayout()->tqinvalidate();
+ ((TQWidget*) parent())->setFixedSize( ((TQWidget*) parent())->tqsizeHint());
}
diff --git a/kpoker/kpoker.cpp b/kpoker/kpoker.cpp
index 38a62579..92a7df5c 100644
--- a/kpoker/kpoker.cpp
+++ b/kpoker/kpoker.cpp
@@ -22,7 +22,7 @@
#include <tqtimer.h>
#include <tqpainter.h>
#include <tqtooltip.h>
-#include <layout.h>
+#include <tqlayout.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").arg(i-1));
+ m_players[i].setName(TQString("Computer %1").tqarg(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").arg(KGlobal::locale()->formatMoney(100))) + 20); // workaround for width problem in wave
+ mWonWidget->setMinimumWidth(tmp.width(i18n("You won %1").tqarg(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->setAlignment(AlignCenter);
+ wonLabel->tqsetAlignment(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").arg(KGlobal::locale()->formatMoney(m_game.getPot())));
+ potLabel->setText(i18n("Pot: %1").tqarg(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").arg(KGlobal::locale()->formatMoney(m_game.getPot()));
+ label = i18n("You won %1").tqarg(KGlobal::locale()->formatMoney(m_game.getPot()));
else
- label = i18n("%1 won %2").arg(winner->getName()).arg(KGlobal::locale()->formatMoney(m_game.getPot()));
+ label = i18n("%1 won %2").tqarg(winner->getName()).tqarg(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 */
- repaint ( FALSE );
+ tqrepaint ( FALSE );
waveActive = false;
}
@@ -1042,7 +1042,7 @@ void kpok::stopDrawing()
void kpok::waveTimerEvent()
{
fCount = (fCount + 1) & 15;
- repaint( FALSE );
+ tqrepaint( FALSE );
}
@@ -1072,7 +1072,7 @@ void kpok::displayWin(const TQString& hand, int cashWon)
if (cashWon) {
playSound("win.wav");
- buf = i18n("You won %1!").arg(KGlobal::locale()->formatMoney(cashWon));
+ buf = i18n("You won %1!").tqarg(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").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());
+ 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());
}
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").arg(i),
+ TQString buf = conf->readEntry(TQString("Name_%1").tqarg(i),
"Player");
m_players[i].setName(buf);
- bool human = conf->readBoolEntry(TQString("Human_%1").arg(i),
+ bool human = conf->readBoolEntry(TQString("Human_%1").tqarg(i),
false);
if (human)
m_players[i].setHuman(); // i == 0
- int cash = conf->readNumEntry(TQString("Cash_%1").arg(i),
+ int cash = conf->readNumEntry(TQString("Cash_%1").tqarg(i),
START_MONEY);
m_players[i].setCash(cash);
m_game.setDirty();
diff --git a/kpoker/kpoker.h b/kpoker/kpoker.h
index 732a2af5..7eec697a 100644
--- a/kpoker/kpoker.h
+++ b/kpoker/kpoker.h
@@ -325,7 +325,7 @@ class kpok : public TQWidget
int drawDelay;
- // Graphical layout.
+ // Graphical tqlayout.
TQVBoxLayout *topLayout;
TQHBoxLayout *inputLayout;
TQLabel *potLabel;
diff --git a/kpoker/newgamedlg.cpp b/kpoker/newgamedlg.cpp
index d21b7da5..ef2bfe0a 100644
--- a/kpoker/newgamedlg.cpp
+++ b/kpoker/newgamedlg.cpp
@@ -20,7 +20,7 @@
#include <tqlineedit.h>
#include <tqcheckbox.h>
#include <tqcombobox.h>
-#include <layout.h>
+#include <tqlayout.h>
// KDE includes
#include <klocale.h>
@@ -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").arg(money), plainPage());
+ moneyOfPlayers = new TQLineEdit(TQString("%1").tqarg(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").arg(i), i18n("Computer %1").arg(i)));
+ computerNames->insertItem(kapp->config()->readEntry(TQString("Name_%1").tqarg(i), i18n("Computer %1").tqarg(i)));
}
} else if (no == 0) {
player1Name->setText(playerName);
diff --git a/kpoker/optionsdlg.cpp b/kpoker/optionsdlg.cpp
index d969e00f..5fdfbfcf 100644
--- a/kpoker/optionsdlg.cpp
+++ b/kpoker/optionsdlg.cpp
@@ -17,7 +17,7 @@
// QT includes
#include <tqlabel.h>
-#include <layout.h>
+#include <tqlayout.h>
// KDE includes
#include <klocale.h>
diff --git a/kpoker/playerbox.cpp b/kpoker/playerbox.cpp
index 608f49f8..530ebd81 100644
--- a/kpoker/playerbox.cpp
+++ b/kpoker/playerbox.cpp
@@ -17,7 +17,7 @@
#include <tqtooltip.h>
#include <tqlabel.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqhbox.h>
#include <kglobal.h>
@@ -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->sizeHint());
+ cardBox->setFixedSize(cardBox->tqsizeHint());
// 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->sizeHint());
+ b->setFixedSize(b->tqsizeHint());
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").arg("Player"));//change via showName()
+ i18n("Money of %1").tqarg("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")
- .arg(KGlobal::locale()->formatMoney(m_player->getCash())));
+ .tqarg(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")
- .arg(KGlobal::locale()->formatMoney(m_cashPerRound)));
+ .tqarg(KGlobal::locale()->formatMoney(m_cashPerRound)));
else
m_betLabel->setText(i18n("Bet: %1")
- .arg(KGlobal::locale()-> formatMoney(m_player->getCurrentBet())));
+ .tqarg(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").arg(m_player->getName()));
+ TQToolTip::add(m_cashLabel, i18n("Money of %1").tqarg(m_player->getName()));
}