summaryrefslogtreecommitdiffstats
path: root/kpoker
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:58:26 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:58:26 +0000
commit838baf3f99ec5ab81b063eb5449a3381d860f377 (patch)
treedd31abcfde08ca92e4623b8f50b3d762a87c997a /kpoker
parent2bf598bafa22fac4126fc8842df6b0119aadc0e9 (diff)
downloadtdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.tar.gz
tdegames-838baf3f99ec5ab81b063eb5449a3381d860f377.zip
TQt4 port kdegames
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1236074 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpoker')
-rw-r--r--kpoker/betbox.cpp12
-rw-r--r--kpoker/betbox.h5
-rw-r--r--kpoker/defines.h2
-rw-r--r--kpoker/kpaint.cpp18
-rw-r--r--kpoker/kpaint.h12
-rw-r--r--kpoker/kpoker.cpp46
-rw-r--r--kpoker/kpoker.h9
-rw-r--r--kpoker/newgamedlg.cpp8
-rw-r--r--kpoker/newgamedlg.h3
-rw-r--r--kpoker/optionsdlg.cpp4
-rw-r--r--kpoker/optionsdlg.h3
-rw-r--r--kpoker/playerbox.cpp22
-rw-r--r--kpoker/playerbox.h7
-rw-r--r--kpoker/poker.h4
-rw-r--r--kpoker/top.cpp40
-rw-r--r--kpoker/top.h1
16 files changed, 102 insertions, 94 deletions
diff --git a/kpoker/betbox.cpp b/kpoker/betbox.cpp
index 91fcab8b..304c4543 100644
--- a/kpoker/betbox.cpp
+++ b/kpoker/betbox.cpp
@@ -24,8 +24,8 @@
#include "betbox.h"
-BetBox::BetBox(TQWidget* parent, const char* name)
- : TQGroupBox(parent, name)
+BetBox::BetBox(TQWidget* tqparent, const char* name)
+ : TQGroupBox(tqparent, name)
{
TQVBoxLayout* topLayout = new TQVBoxLayout(this, 1, 1);
TQGridLayout* g = new TQGridLayout(topLayout, 2, 2, 1);
@@ -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/betbox.h b/kpoker/betbox.h
index 69fd741d..e3c52ce9 100644
--- a/kpoker/betbox.h
+++ b/kpoker/betbox.h
@@ -30,12 +30,13 @@ class TQPushButton;
* the adjustBet and out buttons depend on the computers bet
* @short This is a box with several buttons used to bet / raise
**/
-class BetBox : public QGroupBox
+class BetBox : public TQGroupBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- BetBox(TQWidget* parent = 0, const char* name = 0);
+ BetBox(TQWidget* tqparent = 0, const char* name = 0);
~BetBox();
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 5ba74f40..15ce5935 100644
--- a/kpoker/kpaint.cpp
+++ b/kpoker/kpaint.cpp
@@ -38,14 +38,14 @@ TQPixmap *CardImages::m_cardPixmaps;
TQPixmap *CardImages::m_deck;
-CardImages::CardImages(TQWidget* parent, const char* name)
- : TQWidget(parent, name)
+CardImages::CardImages(TQWidget* tqparent, const char* name)
+ : TQWidget(tqparent, name)
{
- m_cardPixmaps = new QPixmap[numCards];
+ m_cardPixmaps = new TQPixmap[numCards];
m_deck = new TQPixmap;
// Hide the window.
- // FIXME: Why is this a QWidget?
+ // FIXME: Why is this a TQWidget?
hide();
// loadCards();
}
@@ -109,8 +109,8 @@ CardImages::loadDeck(TQString path)
extern CardImages *cardImages;
-CardWidget::CardWidget( TQWidget *parent, const char *name )
- : TQPushButton( parent, name )
+CardWidget::CardWidget( TQWidget *tqparent, const char *name )
+ : TQPushButton( tqparent, name )
{
m_held = false;
@@ -168,13 +168,13 @@ void CardWidget::paintCard(int cardType)
}
-void CardWidget::repaintDeck()
+void CardWidget::tqrepaintDeck()
{
setPixmap(*m_pm);
setFixedSize(cardImages->getWidth(), cardImages->getHeight());
- ((TQWidget*) parent())->layout()->invalidate();
- ((TQWidget*) parent())->setFixedSize( ((TQWidget*) parent())->sizeHint());
+ ((TQWidget*) tqparent())->tqlayout()->tqinvalidate();
+ ((TQWidget*) tqparent())->setFixedSize( ((TQWidget*) tqparent())->tqsizeHint());
}
diff --git a/kpoker/kpaint.h b/kpoker/kpaint.h
index 2300e8b1..8c480fd5 100644
--- a/kpoker/kpaint.h
+++ b/kpoker/kpaint.h
@@ -33,12 +33,13 @@ class TQLabel;
* @short A help class for loading the pictures
**/
-class CardImages : public QWidget
+class CardImages : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- CardImages( TQWidget *parent = 0, const char *name = 0 );
+ CardImages( TQWidget *tqparent = 0, const char *name = 0 );
~CardImages();
// FIXME: Use CardValue instead of int when the cards are in their
@@ -63,12 +64,13 @@ class CardImages : public QWidget
*
* @short The cards
**/
-class CardWidget : public QPushButton
+class CardWidget : public TQPushButton
{
Q_OBJECT
+ TQ_OBJECT
public:
- CardWidget( TQWidget *parent=0, const char *name=0 );
+ CardWidget( TQWidget *tqparent=0, const char *name=0 );
/**
* Paints the deck if cardType = 0 or the card specified in cardType
@@ -93,7 +95,7 @@ class CardWidget : public QPushButton
bool toggleHeld(); /* returns the new value of held*/
- void repaintDeck();
+ void tqrepaintDeck();
signals:
/**
diff --git a/kpoker/kpoker.cpp b/kpoker/kpoker.cpp
index 0a293118..0c826c14 100644
--- a/kpoker/kpoker.cpp
+++ b/kpoker/kpoker.cpp
@@ -88,7 +88,7 @@ PokerGame::dealCards(PokerPlayer *player, bool skip[])
void
PokerGame::activatePlayer(PokerPlayer *player)
{
- if (!m_activePlayers.contains(player)) {
+ if (!m_activePlayers.tqcontains(player)) {
m_activePlayers.append(player);
m_removedPlayers.remove(player);
}
@@ -98,7 +98,7 @@ PokerGame::activatePlayer(PokerPlayer *player)
void
PokerGame::inactivatePlayer(PokerPlayer *player)
{
- if (m_activePlayers.contains(player)) {
+ if (m_activePlayers.tqcontains(player)) {
m_activePlayers.remove(player);
m_removedPlayers.append(player);
}
@@ -159,8 +159,8 @@ CardImages *cardImages;
// Class kpok
-kpok::kpok(TQWidget *parent, const char *name)
- : TQWidget(parent, name),
+kpok::kpok(TQWidget *tqparent, const char *name)
+ : TQWidget(tqparent, name),
m_game(&m_random)
{
TQString version;
@@ -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);
@@ -554,7 +554,7 @@ void kpok::bet()
// Check if player 1 is out -> for players > 2
- // TODO: maybe if (!m_activePlayers.contains(humanPlayer))
+ // TODO: maybe if (!m_activePlayers.tqcontains(humanPlayer))
// {exchangeCards(); bet(); displayerWinner_computer();return;}
@@ -674,7 +674,7 @@ void kpok::initPoker(unsigned int numPlayers)
m_game.clearPot();
drawAllDecks();
for (unsigned int i = 0; i < m_numPlayers; i++) {
- playerBox[i]->repaintCard();
+ playerBox[i]->tqrepaintCard();
}
paintCash();
playerBox[0]->setHeldEnabled(false);
@@ -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
@@ -1093,7 +1093,7 @@ void kpok::displayWin(const TQString& hand, int cashWon)
void kpok::paintEvent( TQPaintEvent *)
{
/* NOTE: This was shamelessy stolen from the "hello world" example
- * coming with Qt Thanks to the Qt-Guys for doing such a cool
+ * coming with TQt Thanks to the TQt-Guys for doing such a cool
* example 8-)
*/
@@ -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();
@@ -1469,7 +1469,7 @@ void kpok::slotCardDeck()
cardImages->loadCards(cardPath);
for (int i = 0; i < m_game.getNumActivePlayers(); i++) {
- playerBox[i]->repaintCard();
+ playerBox[i]->tqrepaintCard();
}
// Save selected stuff in the configuration.
diff --git a/kpoker/kpoker.h b/kpoker/kpoker.h
index bb33773d..379ac26c 100644
--- a/kpoker/kpoker.h
+++ b/kpoker/kpoker.h
@@ -116,7 +116,7 @@ public:
PokerPlayer * getActivePlayer(unsigned int nr) { return m_activePlayers.at(nr); }
void activatePlayer(PokerPlayer *player);
void inactivatePlayer(PokerPlayer *player);
- bool isActivePlayer(PokerPlayer *player) const { return m_activePlayers.contains(player); }
+ bool isActivePlayer(PokerPlayer *player) const { return m_activePlayers.tqcontains(player); }
// Misc
// FIXME: clearDirty should only be called by a save method
@@ -167,12 +167,13 @@ public:
// Poker Game View
-class kpok : public QWidget
+class kpok : public TQWidget
{
Q_OBJECT
+ TQ_OBJECT
public:
- kpok(TQWidget * parent = 0, const char *name = 0);
+ kpok(TQWidget * tqparent = 0, const char *name = 0);
virtual ~kpok();
TQString getName (int playerNr);
@@ -324,7 +325,7 @@ class kpok : public QWidget
int drawDelay;
- // Graphical layout.
+ // Graphical tqlayout.
TQVBoxLayout *topLayout;
TQHBoxLayout *inputLayout;
TQLabel *potLabel;
diff --git a/kpoker/newgamedlg.cpp b/kpoker/newgamedlg.cpp
index 80a9a501..7237567a 100644
--- a/kpoker/newgamedlg.cpp
+++ b/kpoker/newgamedlg.cpp
@@ -34,9 +34,9 @@
#include "newgamedlg.h"
-NewGameDlg::NewGameDlg(TQWidget* parent)
+NewGameDlg::NewGameDlg(TQWidget* tqparent)
: KDialogBase(Plain, i18n("New Game"),
- Ok|Cancel, Ok, parent, 0, true, true)
+ Ok|Cancel, Ok, tqparent, 0, true, true)
{
TQVBoxLayout *topLayout = new TQVBoxLayout(plainPage(), spacingHint());
TQHBoxLayout *l = new TQHBoxLayout(topLayout);
@@ -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/newgamedlg.h b/kpoker/newgamedlg.h
index d62f9612..09b9460d 100644
--- a/kpoker/newgamedlg.h
+++ b/kpoker/newgamedlg.h
@@ -39,9 +39,10 @@ class TQComboBox;
class NewGameDlg : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- NewGameDlg(TQWidget* parent = 0);
+ NewGameDlg(TQWidget* tqparent = 0);
~NewGameDlg();
/**
diff --git a/kpoker/optionsdlg.cpp b/kpoker/optionsdlg.cpp
index 5fdfbfcf..85c00b2c 100644
--- a/kpoker/optionsdlg.cpp
+++ b/kpoker/optionsdlg.cpp
@@ -28,9 +28,9 @@
#include "defines.h"
-OptionsDlg::OptionsDlg(TQWidget* parent, const char* name, int _players)
+OptionsDlg::OptionsDlg(TQWidget* tqparent, const char* name, int _players)
: KDialogBase(Plain, i18n("Options")/*?*/, Ok|Cancel, Ok,
- parent, name, true, true)
+ tqparent, name, true, true)
{
TQVBoxLayout* topLayout = new TQVBoxLayout(plainPage(), spacingHint());
maxBet = 0;
diff --git a/kpoker/optionsdlg.h b/kpoker/optionsdlg.h
index d559de15..8aa6b8ff 100644
--- a/kpoker/optionsdlg.h
+++ b/kpoker/optionsdlg.h
@@ -39,9 +39,10 @@ class KIntNumInput;
class OptionsDlg : public KDialogBase
{
Q_OBJECT
+ TQ_OBJECT
public:
- OptionsDlg(TQWidget* parent = 0, const char* name = 0, int _players = 1);
+ OptionsDlg(TQWidget* tqparent = 0, const char* name = 0, int _players = 1);
~OptionsDlg();
void init(int _drawDelay, int _maxBetOrCashPerRound, int minBet = -1);
diff --git a/kpoker/playerbox.cpp b/kpoker/playerbox.cpp
index 66ffd5a7..53123fbc 100644
--- a/kpoker/playerbox.cpp
+++ b/kpoker/playerbox.cpp
@@ -30,8 +30,8 @@
#include "kpaint.h"
-PlayerBox::PlayerBox(bool playerOne, TQWidget* parent, const char* name)
- : TQGroupBox(parent, name)
+PlayerBox::PlayerBox(bool playerOne, TQWidget* tqparent, const char* name)
+ : TQGroupBox(tqparent, name)
{
TQHBoxLayout* l = new TQHBoxLayout(this, PLAYERBOX_BORDERS,
PLAYERBOX_HDISTANCEOFWIDGETS);
@@ -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()));
}
@@ -252,10 +252,10 @@ void PlayerBox::cardClicked(int no)
}
-void PlayerBox::repaintCard()
+void PlayerBox::tqrepaintCard()
{
for (int i = 0; i < PokerHandSize; i++)
- m_cardWidgets[i]->repaintDeck();
+ m_cardWidgets[i]->tqrepaintDeck();
}
diff --git a/kpoker/playerbox.h b/kpoker/playerbox.h
index 5c401993..aeb5d3c8 100644
--- a/kpoker/playerbox.h
+++ b/kpoker/playerbox.h
@@ -29,12 +29,13 @@ class PokerPlayer;
class CardWidget;
-class PlayerBox : public QGroupBox
+class PlayerBox : public TQGroupBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- PlayerBox(bool playerOne, TQWidget* parent = 0, const char* name = 0);
+ PlayerBox(bool playerOne, TQWidget* tqparent = 0, const char* name = 0);
~PlayerBox();
void cardClicked(int no);
@@ -117,7 +118,7 @@ class PlayerBox : public QGroupBox
**/
void blinkOff();
- void repaintCard();
+ void tqrepaintCard();
protected:
diff --git a/kpoker/poker.h b/kpoker/poker.h
index ff388950..d139ea2b 100644
--- a/kpoker/poker.h
+++ b/kpoker/poker.h
@@ -43,7 +43,7 @@ typedef enum {
C_NINE, D_NINE, S_NINE, H_NINE,
C_TEN, D_TEN, S_TEN, H_TEN,
C_JACK, D_JACK, S_JACK, H_JACK,
- C_QUEEN, D_QUEEN, S_QUEEN, H_QUEEN,
+ C_TQUEEN, D_TQUEEN, S_TQUEEN, H_TQUEEN,
C_KING, D_KING, S_KING, H_KING,
C_ACE, D_ACE, S_ACE, H_ACE,
ROOF // to get a roof on the value.
@@ -73,7 +73,7 @@ typedef enum {
NINE,
TEN,
JACK,
- QUEEN,
+ TQUEEN,
KING,
ACE // The most valuable rank
} CardRank;
diff --git a/kpoker/top.cpp b/kpoker/top.cpp
index a58d5666..a1659954 100644
--- a/kpoker/top.cpp
+++ b/kpoker/top.cpp
@@ -61,7 +61,7 @@ PokerWindow::PokerWindow()
statusBar()->addWidget(LHLabel, 0, true);
m_kpok->updateLHLabel();
- //FIXME: LHLabel is shown twize until the bar is repainted!
+ //FIXME: LHLabel is shown twize until the bar is tqrepainted!
initKAction();
readOptions();
@@ -79,46 +79,46 @@ PokerWindow::~PokerWindow()
void PokerWindow::initKAction()
{
//Game
- KStdGameAction::gameNew(m_kpok, TQT_SLOT(newGame()), actionCollection());
- KStdGameAction::save(m_kpok, TQT_SLOT(saveGame()), actionCollection());
- KStdGameAction::quit(this, TQT_SLOT(close()), actionCollection());
+ KStdGameAction::gameNew(TQT_TQOBJECT(m_kpok), TQT_SLOT(newGame()), actionCollection());
+ KStdGameAction::save(TQT_TQOBJECT(m_kpok), TQT_SLOT(saveGame()), actionCollection());
+ KStdGameAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection());
//Settings
showMenubarAction =
- KStdAction::showMenubar(this, TQT_SLOT(toggleMenubar()), actionCollection());
+ KStdAction::showMenubar(TQT_TQOBJECT(this), TQT_SLOT(toggleMenubar()), actionCollection());
- soundAction = new KToggleAction(i18n("Soun&d"), 0, m_kpok,
+ soundAction = new KToggleAction(i18n("Soun&d"), 0, TQT_TQOBJECT(m_kpok),
TQT_SLOT(toggleSound()), actionCollection(), "options_sound");
if (m_kpok->getSound())
m_kpok->toggleSound();
- blinkingAction = new KToggleAction(i18n("&Blinking Cards"), 0, m_kpok,
+ blinkingAction = new KToggleAction(i18n("&Blinking Cards"), 0, TQT_TQOBJECT(m_kpok),
TQT_SLOT(toggleBlinking()), actionCollection(), "options_blinking");
if (m_kpok->getBlinking())
m_kpok->toggleBlinking();
adjustAction = new KToggleAction(i18n("&Adjust Bet is Default"), 0,
- m_kpok, TQT_SLOT(toggleAdjust()), actionCollection(), "options_adjust");
+ TQT_TQOBJECT(m_kpok), TQT_SLOT(toggleAdjust()), actionCollection(), "options_adjust");
if (m_kpok->getAdjust())
m_kpok->toggleAdjust();
showStatusbarAction =
- KStdAction::showStatusbar(this, TQT_SLOT(toggleStatusbar()), actionCollection());
+ KStdAction::showStatusbar(TQT_TQOBJECT(this), TQT_SLOT(toggleStatusbar()), actionCollection());
- KStdAction::saveOptions(this, TQT_SLOT(saveOptions()), actionCollection());
- KStdGameAction::carddecks(m_kpok, TQT_SLOT(slotCardDeck()), actionCollection());
- KStdAction::preferences(m_kpok, TQT_SLOT(slotPreferences()), actionCollection());
+ KStdAction::saveOptions(TQT_TQOBJECT(this), TQT_SLOT(saveOptions()), actionCollection());
+ KStdGameAction::carddecks(TQT_TQOBJECT(m_kpok), TQT_SLOT(slotCardDeck()), actionCollection());
+ KStdAction::preferences(TQT_TQOBJECT(m_kpok), TQT_SLOT(slotPreferences()), actionCollection());
// Keyboard shortcuts.
- (void)new KAction(i18n("Draw"), KShortcut(Qt::Key_Return), m_kpok,
+ (void)new KAction(i18n("Draw"), KShortcut(TQt::Key_Return), TQT_TQOBJECT(m_kpok),
TQT_SLOT(drawClick()), actionCollection(), "draw");
- (void)new KAction(i18n("Exchange Card 1"), KShortcut(Qt::Key_1), m_kpok,
+ (void)new KAction(i18n("Exchange Card 1"), KShortcut(TQt::Key_1), TQT_TQOBJECT(m_kpok),
TQT_SLOT(exchangeCard1()), actionCollection(), "exchange_card_1");
- (void)new KAction(i18n("Exchange Card 2"), KShortcut(Qt::Key_2), m_kpok,
+ (void)new KAction(i18n("Exchange Card 2"), KShortcut(TQt::Key_2), TQT_TQOBJECT(m_kpok),
TQT_SLOT(exchangeCard2()), actionCollection(), "exchange_card_2");
- (void)new KAction(i18n("Exchange Card 3"), KShortcut(Qt::Key_3), m_kpok,
+ (void)new KAction(i18n("Exchange Card 3"), KShortcut(TQt::Key_3), TQT_TQOBJECT(m_kpok),
TQT_SLOT(exchangeCard3()), actionCollection(), "exchange_card_3");
- (void)new KAction(i18n("Exchange Card 4"), KShortcut(Qt::Key_4), m_kpok,
+ (void)new KAction(i18n("Exchange Card 4"), KShortcut(TQt::Key_4), TQT_TQOBJECT(m_kpok),
TQT_SLOT(exchangeCard4()), actionCollection(), "exchange_card_4");
- (void)new KAction(i18n("Exchange Card 5"), KShortcut(Qt::Key_5), m_kpok,
+ (void)new KAction(i18n("Exchange Card 5"), KShortcut(TQt::Key_5), TQT_TQOBJECT(m_kpok),
TQT_SLOT(exchangeCard5()), actionCollection(), "exchange_card_5");
setupGUI( KMainWindow::Save | StatusBar | Keys | Create);
@@ -177,7 +177,7 @@ bool PokerWindow::queryClose()
return true;
// Only ask if the game is changed in some way.
- switch(KMessageBox::warningYesNoCancel(this, i18n("Do you want to save this game?"), TQString::null, KStdGuiItem::save(), KStdGuiItem::dontSave())) {
+ switch(KMessageBox::warningYesNoCancel(this, i18n("Do you want to save this game?"), TQString(), KStdGuiItem::save(), KStdGuiItem::dontSave())) {
case KMessageBox::Yes :
m_kpok->saveGame();
return true;
@@ -250,7 +250,7 @@ bool PokerWindow::eventFilter(TQObject*, TQEvent* e)
{
if (e->type() == TQEvent::MouseButtonPress) {
- if (((TQMouseEvent*)e)->button() == RightButton) {
+ if (((TQMouseEvent*)e)->button() == Qt::RightButton) {
TQPopupMenu* popup = (TQPopupMenu*) factory()->container("popup", this);
if (popup)
popup->popup(TQCursor::pos());
diff --git a/kpoker/top.h b/kpoker/top.h
index ec0d9681..843528cb 100644
--- a/kpoker/top.h
+++ b/kpoker/top.h
@@ -30,6 +30,7 @@ class kpok;
class PokerWindow : public KMainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
PokerWindow();