summaryrefslogtreecommitdiffstats
path: root/kpoker
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:42:31 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:42:31 +0000
commit576eb4299a00bc053db35414406f46372a0f70f2 (patch)
tree4c030922d533821db464af566188e7d40cc8848c /kpoker
parent0718336b6017d1a4fc1d626544180a5a2a29ddec (diff)
downloadtdegames-576eb4299a00bc053db35414406f46372a0f70f2.tar.gz
tdegames-576eb4299a00bc053db35414406f46372a0f70f2.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1157643 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kpoker')
-rw-r--r--kpoker/betbox.cpp46
-rw-r--r--kpoker/betbox.h18
-rw-r--r--kpoker/kpaint.cpp34
-rw-r--r--kpoker/kpaint.h26
-rw-r--r--kpoker/kpoker.cpp124
-rw-r--r--kpoker/kpoker.h48
-rw-r--r--kpoker/newgamedlg.cpp56
-rw-r--r--kpoker/newgamedlg.h18
-rw-r--r--kpoker/optionsdlg.cpp10
-rw-r--r--kpoker/optionsdlg.h8
-rw-r--r--kpoker/player.h8
-rw-r--r--kpoker/playerbox.cpp52
-rw-r--r--kpoker/playerbox.h12
-rw-r--r--kpoker/poker.cpp2
-rw-r--r--kpoker/poker.h4
-rw-r--r--kpoker/sound.cpp4
-rw-r--r--kpoker/top.cpp72
-rw-r--r--kpoker/top.h8
18 files changed, 275 insertions, 275 deletions
diff --git a/kpoker/betbox.cpp b/kpoker/betbox.cpp
index e152573f..91fcab8b 100644
--- a/kpoker/betbox.cpp
+++ b/kpoker/betbox.cpp
@@ -15,8 +15,8 @@
*/
-#include <qpushbutton.h>
-#include <qlayout.h>
+#include <tqpushbutton.h>
+#include <tqlayout.h>
#include <kglobal.h>
#include <klocale.h>
@@ -24,42 +24,42 @@
#include "betbox.h"
-BetBox::BetBox(QWidget* parent, const char* name)
- : QGroupBox(parent, name)
+BetBox::BetBox(TQWidget* parent, const char* name)
+ : TQGroupBox(parent, name)
{
- QVBoxLayout* topLayout = new QVBoxLayout(this, 1, 1);
- QGridLayout* g = new QGridLayout(topLayout, 2, 2, 1);
- QHBoxLayout* l = new QHBoxLayout(topLayout, 1);
+ TQVBoxLayout* topLayout = new TQVBoxLayout(this, 1, 1);
+ TQGridLayout* g = new TQGridLayout(topLayout, 2, 2, 1);
+ TQHBoxLayout* l = new TQHBoxLayout(topLayout, 1);
- bet5Up = new QPushButton(this);
+ bet5Up = new TQPushButton(this);
g->addWidget(bet5Up, 0, 0);
- bet10Up = new QPushButton(this);
+ bet10Up = new TQPushButton(this);
g->addWidget(bet10Up, 0, 1);
- bet5Down = new QPushButton(this);
+ bet5Down = new TQPushButton(this);
g->addWidget(bet5Down, 1, 0);
- bet10Down = new QPushButton(this);
+ bet10Down = new TQPushButton(this);
g->addWidget(bet10Down, 1, 1);
- adjustBet = new QPushButton(this);
+ adjustBet = new TQPushButton(this);
l->addWidget(adjustBet, 0);
l->addStretch(1);
- foldButton = new QPushButton(this);
+ foldButton = new TQPushButton(this);
l->addWidget(foldButton, 0);
- bet5Up->setText(QString("+%1").arg(KGlobal::locale()->formatMoney(5)));
- bet10Up->setText(QString("+%1").arg(KGlobal::locale()->formatMoney(10)));
- bet5Down->setText(QString("-%1").arg(KGlobal::locale()->formatMoney(5)));
- bet10Down->setText(QString("-%1").arg(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"));
//connects
- connect(bet5Up, SIGNAL(clicked()), SLOT(bet5UpClicked()));
- connect(bet10Up, SIGNAL(clicked()), SLOT(bet10UpClicked()));
- connect(bet5Down, SIGNAL(clicked()), SLOT(bet5DownClicked()));
- connect(bet10Down, SIGNAL(clicked()), SLOT(bet10DownClicked()));
- connect(foldButton, SIGNAL(clicked()), SLOT(foldClicked()));
- connect(adjustBet, SIGNAL(clicked()), SLOT(adjustBetClicked()));
+ connect(bet5Up, TQT_SIGNAL(clicked()), TQT_SLOT(bet5UpClicked()));
+ connect(bet10Up, TQT_SIGNAL(clicked()), TQT_SLOT(bet10UpClicked()));
+ connect(bet5Down, TQT_SIGNAL(clicked()), TQT_SLOT(bet5DownClicked()));
+ connect(bet10Down, TQT_SIGNAL(clicked()), TQT_SLOT(bet10DownClicked()));
+ connect(foldButton, TQT_SIGNAL(clicked()), TQT_SLOT(foldClicked()));
+ connect(adjustBet, TQT_SIGNAL(clicked()), TQT_SLOT(adjustBetClicked()));
stopRaise();
}
diff --git a/kpoker/betbox.h b/kpoker/betbox.h
index 2aa54894..3a639277 100644
--- a/kpoker/betbox.h
+++ b/kpoker/betbox.h
@@ -18,13 +18,13 @@
#ifndef BETBOX_H
#define BETBOX_H
-#include <qgroupbox.h>
+#include <tqgroupbox.h>
class QPushButton;
/**
- * This class provides a QGroupBox with several button
+ * This class provides a TQGroupBox with several button
*
* The bet up / down buttons are used to change the player bet directly,
* the adjustBet and out buttons depend on the computers bet
@@ -35,7 +35,7 @@ class BetBox : public QGroupBox
Q_OBJECT
public:
- BetBox(QWidget* parent = 0, const char* name = 0);
+ BetBox(TQWidget* parent = 0, const char* name = 0);
~BetBox();
@@ -102,12 +102,12 @@ class BetBox : public QGroupBox
private:
- QPushButton *bet5Up;
- QPushButton *bet10Up;
- QPushButton *bet5Down;
- QPushButton *bet10Down;
- QPushButton *adjustBet;
- QPushButton *foldButton;
+ TQPushButton *bet5Up;
+ TQPushButton *bet10Up;
+ TQPushButton *bet5Down;
+ TQPushButton *bet10Down;
+ TQPushButton *adjustBet;
+ TQPushButton *foldButton;
};
diff --git a/kpoker/kpaint.cpp b/kpoker/kpaint.cpp
index c6322aee..83012ab0 100644
--- a/kpoker/kpaint.cpp
+++ b/kpoker/kpaint.cpp
@@ -16,8 +16,8 @@
// QT includes
-#include <qdir.h>
-#include <qlayout.h>
+#include <tqdir.h>
+#include <tqlayout.h>
// KDE includes
//#include <kglobal.h>
@@ -34,12 +34,12 @@
// class CardImages
-QPixmap *CardImages::m_cardPixmaps;
-QPixmap *CardImages::m_deck;
+TQPixmap *CardImages::m_cardPixmaps;
+TQPixmap *CardImages::m_deck;
-CardImages::CardImages(QWidget* parent, const char* name)
- : QWidget(parent, name)
+CardImages::CardImages(TQWidget* parent, const char* name)
+ : TQWidget(parent, name)
{
m_cardPixmaps = new QPixmap[numCards];
m_deck = new QPixmap;
@@ -58,7 +58,7 @@ CardImages::~CardImages()
}
-QPixmap *
+TQPixmap *
CardImages::getCardImage(int card) const
{
if (card == 0)
@@ -71,10 +71,10 @@ CardImages::getCardImage(int card) const
// Load all the card images from the directory 'cardDir'.
void
-CardImages::loadCards(QString cardDir)
+CardImages::loadCards(TQString cardDir)
{
for (int i = 0; i < numCards; i++) {
- QString card = KCardDialog::getCardPath(cardDir, i + 1);
+ TQString card = KCardDialog::getCardPath(cardDir, i + 1);
if (card.isEmpty() || !m_cardPixmaps[i].load(card)) {
if (!card.isEmpty())
@@ -91,7 +91,7 @@ CardImages::loadCards(QString cardDir)
// Load the backside of the card deck from the file name in 'path'.
void
-CardImages::loadDeck(QString path)
+CardImages::loadDeck(TQString path)
{
if (!m_deck->load(path)) {
kdWarning() << "Could not load deck - loading default deck" << endl;
@@ -109,13 +109,13 @@ CardImages::loadDeck(QString path)
extern CardImages *cardImages;
-CardWidget::CardWidget( QWidget *parent, const char *name )
- : QPushButton( parent, name )
+CardWidget::CardWidget( TQWidget *parent, const char *name )
+ : TQPushButton( parent, name )
{
m_held = false;
setBackgroundMode( NoBackground ); // disables flickering
- connect(this, SIGNAL(clicked()), this, SLOT(ownClick()));
+ connect(this, TQT_SIGNAL(clicked()), this, TQT_SLOT(ownClick()));
setFixedSize(cardWidth, cardHeight);
}
@@ -161,8 +161,8 @@ void CardWidget::paintCard(int cardType)
m_pm = cardImages->getCardImage(card);
#endif
- // Set the pixmap in the QPushButton that we inherit from.
- if ( m_pm->size() != QSize( 0, 0 ) ) { // is an image loaded?
+ // Set the pixmap in the TQPushButton that we inherit from.
+ if ( m_pm->size() != TQSize( 0, 0 ) ) { // is an image loaded?
setPixmap(*m_pm);
}
}
@@ -173,8 +173,8 @@ void CardWidget::repaintDeck()
setPixmap(*m_pm);
setFixedSize(cardImages->getWidth(), cardImages->getHeight());
- ((QWidget*) parent())->layout()->invalidate();
- ((QWidget*) parent())->setFixedSize( ((QWidget*) parent())->sizeHint());
+ ((TQWidget*) parent())->layout()->invalidate();
+ ((TQWidget*) parent())->setFixedSize( ((TQWidget*) parent())->sizeHint());
}
diff --git a/kpoker/kpaint.h b/kpoker/kpaint.h
index ae4c1d29..21dbf097 100644
--- a/kpoker/kpaint.h
+++ b/kpoker/kpaint.h
@@ -21,8 +21,8 @@
#include <assert.h>
-#include <qpushbutton.h>
-#include <qpixmap.h>
+#include <tqpushbutton.h>
+#include <tqpixmap.h>
class QLabel;
@@ -38,28 +38,28 @@ class CardImages : public QWidget
Q_OBJECT
public:
- CardImages( QWidget *parent = 0, const char *name = 0 );
+ CardImages( TQWidget *parent = 0, const char *name = 0 );
~CardImages();
// FIXME: Use CardValue instead of int when the cards are in their
// own file.
- QPixmap *getCardImage(int card) const;
- QPixmap *getDeck() const { return m_deck; }
+ TQPixmap *getCardImage(int card) const;
+ TQPixmap *getDeck() const { return m_deck; }
int getWidth() const { return m_cardPixmaps[0].width(); }
int getHeight() const { return m_cardPixmaps[0].height(); }
- void loadDeck(QString path);
- void loadCards(QString cardDir);
+ void loadDeck(TQString path);
+ void loadCards(TQString cardDir);
private:
- static QPixmap *m_cardPixmaps;
- static QPixmap *m_deck;
+ static TQPixmap *m_cardPixmaps;
+ static TQPixmap *m_deck;
};
/**
- * This class extends the QPushButton by some methods / variables to provide a card with held labels and so on
+ * This class extends the TQPushButton by some methods / variables to provide a card with held labels and so on
*
* @short The cards
**/
@@ -68,7 +68,7 @@ class CardWidget : public QPushButton
Q_OBJECT
public:
- CardWidget( QWidget *parent=0, const char *name=0 );
+ CardWidget( TQWidget *parent=0, const char *name=0 );
/**
* Paints the deck if cardType = 0 or the card specified in cardType
@@ -110,11 +110,11 @@ class CardWidget : public QPushButton
private:
- QPixmap *m_pm; // the loaded pixmap
+ TQPixmap *m_pm; // the loaded pixmap
bool m_held;
public:
- QLabel *heldLabel;
+ TQLabel *heldLabel;
};
diff --git a/kpoker/kpoker.cpp b/kpoker/kpoker.cpp
index 2956b42c..a6f51772 100644
--- a/kpoker/kpoker.cpp
+++ b/kpoker/kpoker.cpp
@@ -18,11 +18,11 @@
#include <stdlib.h>
// QT includes
-#include <qlabel.h>
-#include <qtimer.h>
-#include <qpainter.h>
-#include <qtooltip.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqtimer.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
+#include <tqlayout.h>
// KDE includes
#include <kmessagebox.h>
@@ -159,11 +159,11 @@ CardImages *cardImages;
// Class kpok
-kpok::kpok(QWidget *parent, const char *name)
- : QWidget(parent, name),
+kpok::kpok(TQWidget *parent, const char *name)
+ : TQWidget(parent, name),
m_game(&m_random)
{
- QString version;
+ TQString version;
m_random.setSeed(0);
@@ -178,7 +178,7 @@ kpok::kpok(QWidget *parent, const char *name)
// ...and the rest to computer players.
for (int unsigned i = 1; i < m_numPlayers; i++)
- m_players[i].setName(QString("Computer %1").arg(i-1));
+ m_players[i].setName(TQString("Computer %1").arg(i-1));
lastHandText = "";
@@ -237,78 +237,78 @@ void kpok::initWindow()
m_blinkingBox = 0;
// General font stuff. Define myFixedFont and wonFont.
- QFont myFixedFont;
+ TQFont myFixedFont;
myFixedFont.setPointSize(12);
- QFont wonFont;
+ TQFont wonFont;
wonFont.setPointSize(14);
wonFont.setBold(true);
- topLayout = new QVBoxLayout(this, BORDER);
- QVBoxLayout* topInputLayout = new QVBoxLayout;
+ topLayout = new TQVBoxLayout(this, BORDER);
+ TQVBoxLayout* topInputLayout = new QVBoxLayout;
topLayout->addLayout(topInputLayout);
- QHBoxLayout* betLayout = new QHBoxLayout;
+ TQHBoxLayout* betLayout = new QHBoxLayout;
inputLayout = new QHBoxLayout;
inputLayout->addLayout(betLayout);
topInputLayout->addLayout(inputLayout);
// The draw button
- drawButton = new QPushButton(this);
+ drawButton = new TQPushButton(this);
drawButton->setText(i18n("&Deal"));
- connect(drawButton, SIGNAL(clicked()), this, SLOT(drawClick()));
+ connect(drawButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(drawClick()));
inputLayout->addWidget(drawButton);
inputLayout->addStretch(1);
// The waving text
- QFont waveFont;
+ TQFont waveFont;
waveFont.setPointSize(16);
waveFont.setBold(true);
- QFontMetrics tmp(waveFont);
+ TQFontMetrics tmp(waveFont);
// The widget where the winner is announced.
- mWonWidget = new QWidget(this);
+ 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
- QHBoxLayout* wonLayout = new QHBoxLayout(mWonWidget);
+ TQHBoxLayout* wonLayout = new TQHBoxLayout(mWonWidget);
wonLayout->setAutoAdd(true);
- wonLabel = new QLabel(mWonWidget);
+ wonLabel = new TQLabel(mWonWidget);
wonLabel->setFont(wonFont);
wonLabel->setAlignment(AlignCenter);
wonLabel->hide();
inputLayout->addStretch(1);
// The pot view
- potLabel = new QLabel(this);
+ potLabel = new TQLabel(this);
potLabel->setFont(myFixedFont);
- potLabel->setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
+ potLabel->setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
inputLayout->addWidget(potLabel, 0, AlignCenter);
// Label widget in the lower left.
- clickToHold = new QLabel(this);
+ clickToHold = new TQLabel(this);
clickToHold->hide();
// Timers
- blinkTimer = new QTimer(this);
- connect( blinkTimer, SIGNAL(timeout()), SLOT(bTimerEvent()) );
+ blinkTimer = new TQTimer(this);
+ connect( blinkTimer, TQT_SIGNAL(timeout()), TQT_SLOT(bTimerEvent()) );
- waveTimer = new QTimer(this);
- connect( waveTimer, SIGNAL(timeout()), SLOT(waveTimerEvent()) );
+ waveTimer = new TQTimer(this);
+ connect( waveTimer, TQT_SIGNAL(timeout()), TQT_SLOT(waveTimerEvent()) );
- drawTimer = new QTimer(this);
- connect (drawTimer, SIGNAL(timeout()), SLOT(drawCardsEvent()) );
+ drawTimer = new TQTimer(this);
+ connect (drawTimer, TQT_SIGNAL(timeout()), TQT_SLOT(drawCardsEvent()) );
// and now the betUp/Down Buttons
betBox = new BetBox(this, 0);
betLayout->addWidget(betBox);
- connect(betBox, SIGNAL(betChanged(int)), this, SLOT(betChange(int)));
- connect(betBox, SIGNAL(betAdjusted()), this, SLOT(adjustBet()));
- connect(betBox, SIGNAL(fold()), this, SLOT(out()));
+ connect(betBox, TQT_SIGNAL(betChanged(int)), this, TQT_SLOT(betChange(int)));
+ connect(betBox, TQT_SIGNAL(betAdjusted()), this, TQT_SLOT(adjustBet()));
+ connect(betBox, TQT_SIGNAL(fold()), this, TQT_SLOT(out()));
// some tips
- QToolTip::add(drawButton, i18n("Continue the round"));
- QToolTip::add(potLabel, i18n("The current pot"));
+ TQToolTip::add(drawButton, i18n("Continue the round"));
+ TQToolTip::add(potLabel, i18n("The current pot"));
// Load all cards into pixmaps first -> in the constructor.
cardImages = new CardImages(this, 0);
@@ -644,7 +644,7 @@ void kpok::initPoker(unsigned int numPlayers)
//
// FIXME: Make CardWidget::toggleHeld() work.
playerBox[0]->activateToggleHeld();
- connect(playerBox[0], SIGNAL(toggleHeld()), this, SLOT(toggleHeld()));
+ connect(playerBox[0], TQT_SIGNAL(toggleHeld()), this, TQT_SLOT(toggleHeld()));
// hide some things
playerBox[0]->showHelds(false);
@@ -701,7 +701,7 @@ void kpok::updateLHLabel()
}
-void kpok::setHand(const QString& newHand, bool lastHand)
+void kpok::setHand(const TQString& newHand, bool lastHand)
{
emit changeLastHand(newHand, lastHand);
@@ -803,7 +803,7 @@ void kpok::displayWinner_Computer(PokerPlayer* winner, bool othersPassed)
m_game.setDirty();
// Generate a string with winner info and show it.
- QString label;
+ TQString label;
if (winner->getHuman())
label = i18n("You won %1").arg(KGlobal::locale()->formatMoney(m_game.getPot()));
else
@@ -811,10 +811,10 @@ void kpok::displayWinner_Computer(PokerPlayer* winner, bool othersPassed)
wonLabel->setText(label);
// Start the waving motion of the text.
- QFont waveFont;
+ TQFont waveFont;
waveFont.setBold(true);
waveFont.setPointSize(16);
- QFontMetrics tmp(waveFont);
+ TQFontMetrics tmp(waveFont);
mWonWidget->setMinimumWidth(tmp.width(label) + 20);
// Play a suitable sound.
@@ -1060,9 +1060,9 @@ void kpok::bTimerEvent()
}
-void kpok::displayWin(const QString& hand, int cashWon)
+void kpok::displayWin(const TQString& hand, int cashWon)
{
- QString buf;
+ TQString buf;
setHand(hand);
m_game.getActivePlayer(0)->setCash(m_game.getActivePlayer(0)->getCash()
@@ -1090,7 +1090,7 @@ void kpok::displayWin(const QString& hand, int cashWon)
}
-void kpok::paintEvent( QPaintEvent *)
+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
@@ -1101,7 +1101,7 @@ void kpok::paintEvent( QPaintEvent *)
return;
}
- QString txt = wonLabel->text();
+ TQString txt = wonLabel->text();
wonLabel->hide();
static int sin_tbl[16] = {
@@ -1111,17 +1111,17 @@ void kpok::paintEvent( QPaintEvent *)
return;
}
- QFont wonFont;
+ TQFont wonFont;
wonFont.setPointSize(18);
wonFont.setBold(true);
- QFontMetrics fm = QFontMetrics(wonFont);
+ TQFontMetrics fm = TQFontMetrics(wonFont);
int w = fm.width(txt) + 20;
int h = fm.height() * 2;
while (w > mWonWidget->width() && wonFont.pointSize() > 6) {// > 6 for emergency abort...
wonFont.setPointSize(wonFont.pointSize() - 1);
- fm = QFontMetrics(wonFont);
+ fm = TQFontMetrics(wonFont);
w = fm.width(txt) + 20;
h = fm.height() * 2;
}
@@ -1130,7 +1130,7 @@ void kpok::paintEvent( QPaintEvent *)
int pmy = 0;
// int pmy = (playerBox[0]->x() + playerBox[0]->height() + 10) - h / 4;
- QPixmap pm( w, h );
+ TQPixmap pm( w, h );
pm.fill( mWonWidget, pmx, pmy );
if (fCount == -1) { /* clear area */
@@ -1138,18 +1138,18 @@ void kpok::paintEvent( QPaintEvent *)
return;
}
- QPainter p;
+ TQPainter p;
int x = 10;
int y = h/2 + fm.descent();
unsigned int i = 0;
p.begin( &pm );
p.setFont( wonFont );
- p.setPen( QColor(0,0,0) );
+ p.setPen( TQColor(0,0,0) );
while ( i < txt.length() ) {
int i16 = (fCount+i) & 15;
- p.drawText( x, y-sin_tbl[i16]*h/800, QString(txt[i]), 1 );
+ p.drawText( x, y-sin_tbl[i16]*h/800, TQString(txt[i]), 1 );
x += fm.width( txt[i] );
i++;
}
@@ -1307,9 +1307,9 @@ void kpok::saveGame(KConfig* conf)
conf->writeEntry("lastHandText", lastHandText);
for (int i = 0; i < players; i++) {
- conf->writeEntry(QString("Name_%1").arg(i), m_players[i].getName());
- conf->writeEntry(QString("Human_%1").arg(i), m_players[i].getHuman());
- conf->writeEntry(QString("Cash_%1").arg(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();
@@ -1360,10 +1360,10 @@ bool kpok::initSound()
}
-void kpok::playSound(const QString &soundname)
+void kpok::playSound(const TQString &soundname)
{
if (sound)
- KAudioPlayer::play(locate("data", QString("kpoker/sounds/")+soundname));
+ KAudioPlayer::play(locate("data", TQString("kpoker/sounds/")+soundname));
}
@@ -1407,14 +1407,14 @@ bool kpok::loadGame(KConfig* conf)
if (numPlayers > 0) {
for (int i = 0; i < numPlayers; i++) {
- QString buf = conf->readEntry(QString("Name_%1").arg(i),
+ TQString buf = conf->readEntry(TQString("Name_%1").arg(i),
"Player");
m_players[i].setName(buf);
- bool human = conf->readBoolEntry(QString("Human_%1").arg(i),
+ bool human = conf->readBoolEntry(TQString("Human_%1").arg(i),
false);
if (human)
m_players[i].setHuman(); // i == 0
- int cash = conf->readNumEntry(QString("Cash_%1").arg(i),
+ int cash = conf->readNumEntry(TQString("Cash_%1").arg(i),
START_MONEY);
m_players[i].setCash(cash);
m_game.setDirty();
@@ -1451,15 +1451,15 @@ void kpok::exchangeCard5() { playerBox[0]->cardClicked(5); }
void kpok::slotCardDeck()
{
kapp->config()->setGroup("General");
- QString deckPath = kapp->config()->readPathEntry("DeckPath", 0);
- QString cardPath = kapp->config()->readPathEntry("CardPath", 0);
+ TQString deckPath = kapp->config()->readPathEntry("DeckPath", 0);
+ TQString cardPath = kapp->config()->readPathEntry("CardPath", 0);
bool randomDeck, randomCardDir;
// Show the "Select Card Deck" dialog and load the images for the
// selected deck, if any.
if (KCardDialog::getCardDeck(deckPath, cardPath, this, KCardDialog::Both,
&randomDeck, &randomCardDir)
- == QDialog::Accepted) {
+ == TQDialog::Accepted) {
// Load backside and front images.
if (playerBox && m_blinking && (m_blinkStat == 0))
diff --git a/kpoker/kpoker.h b/kpoker/kpoker.h
index 21a41ebc..cd0bd42a 100644
--- a/kpoker/kpoker.h
+++ b/kpoker/kpoker.h
@@ -20,8 +20,8 @@
// QT includes
-#include <qwidget.h>
-#include <qptrlist.h>
+#include <tqwidget.h>
+#include <tqptrlist.h>
// KDE includes
#include <krandomsequence.h>
@@ -158,8 +158,8 @@ public:
int m_pot; // The amount of money people have bet.
// The players in the game.
- QPtrList<PokerPlayer> m_activePlayers; // players still in the round
- QPtrList<PokerPlayer> m_removedPlayers; // players out of this round
+ TQPtrList<PokerPlayer> m_activePlayers; // players still in the round
+ TQPtrList<PokerPlayer> m_removedPlayers; // players out of this round
};
@@ -172,10 +172,10 @@ class kpok : public QWidget
Q_OBJECT
public:
- kpok(QWidget * parent = 0, const char *name = 0);
+ kpok(TQWidget * parent = 0, const char *name = 0);
virtual ~kpok();
- QString getName (int playerNr);
+ TQString getName (int playerNr);
void paintCash();
bool isDirty() const { return m_game.isDirty(); }
@@ -191,9 +191,9 @@ class kpok : public QWidget
bool getAdjust() const { return adjust; }
signals:
- void changeLastHand(const QString &newHand, bool lastHand = true);
+ void changeLastHand(const TQString &newHand, bool lastHand = true);
void showClickToHold(bool show);
- void statusBarMessage(QString);
+ void statusBarMessage(TQString);
void clearStatusBar();
protected:
@@ -202,11 +202,11 @@ class kpok : public QWidget
void drawCards(PokerPlayer* p, bool skip[]);
void newRound();
void noMoney();
- void paintEvent( QPaintEvent * );
- void playSound(const QString &filename);
+ void paintEvent( TQPaintEvent * );
+ void playSound(const TQString &filename);
void setBetButtonEnabled(bool enabled);
- void setHand(const QString& newHand, bool lastHand = true);
- void setLastWinner(const QString& lastWinner);
+ void setHand(const TQString& newHand, bool lastHand = true);
+ void setLastWinner(const TQString& lastWinner);
void startBlinking();
void stopBlinking();
void stopDrawing();
@@ -215,7 +215,7 @@ class kpok : public QWidget
void bet();
- void displayWin(const QString& hand, int cashWon);
+ void displayWin(const TQString& hand, int cashWon);
/**
* Displays the winner, adds the pot to his money
@@ -325,14 +325,14 @@ class kpok : public QWidget
int drawDelay;
// Graphical layout.
- QVBoxLayout *topLayout;
- QHBoxLayout *inputLayout;
- QLabel *potLabel;
+ TQVBoxLayout *topLayout;
+ TQHBoxLayout *inputLayout;
+ TQLabel *potLabel;
BetBox *betBox;
- QPushButton *drawButton; // the main Button
- QLabel *wonLabel; // the winner
- QLabel *clickToHold;
- QWidget *mWonWidget;
+ TQPushButton *drawButton; // the main Button
+ TQLabel *wonLabel; // the winner
+ TQLabel *clickToHold;
+ TQWidget *mWonWidget;
PlayerBox **playerBox; //one box per player
@@ -342,9 +342,9 @@ class kpok : public QWidget
// Other stuff
KRandomSequence m_random;
- QTimer *blinkTimer; // the winning cards will blink
- QTimer *drawTimer; // delay between drawing of the cards
- QTimer *waveTimer; // for displaying of the win (if winner == human)
+ TQTimer *blinkTimer; // the winning cards will blink
+ TQTimer *drawTimer; // delay between drawing of the cards
+ TQTimer *waveTimer; // for displaying of the win (if winner == human)
bool adjust; // allow user to adjust the bet.
int drawStat; // status of drawing (which card already was drawn etc.
@@ -358,7 +358,7 @@ class kpok : public QWidget
bool waveActive;
int fCount;
- QString lastHandText;
+ TQString lastHandText;
};
#endif
diff --git a/kpoker/newgamedlg.cpp b/kpoker/newgamedlg.cpp
index 002833b6..80a9a501 100644
--- a/kpoker/newgamedlg.cpp
+++ b/kpoker/newgamedlg.cpp
@@ -16,11 +16,11 @@
// QT includes
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqlayout.h>
// KDE includes
#include <klocale.h>
@@ -34,12 +34,12 @@
#include "newgamedlg.h"
-NewGameDlg::NewGameDlg(QWidget* parent)
+NewGameDlg::NewGameDlg(TQWidget* parent)
: KDialogBase(Plain, i18n("New Game"),
Ok|Cancel, Ok, parent, 0, true, true)
{
- QVBoxLayout *topLayout = new QVBoxLayout(plainPage(), spacingHint());
- QHBoxLayout *l = new QHBoxLayout(topLayout);
+ TQVBoxLayout *topLayout = new TQVBoxLayout(plainPage(), spacingHint());
+ TQHBoxLayout *l = new TQHBoxLayout(topLayout);
KConfig* conf = kapp->config();
conf->setGroup("NewGameDlg");
@@ -50,46 +50,46 @@ NewGameDlg::NewGameDlg(QWidget* parent)
int playerNr = conf->readNumEntry("players", DEFAULT_PLAYERS);
int money = conf->readNumEntry("startMoney", START_MONEY);
- readFromConfig = new QCheckBox(i18n("Try loading a game"), plainPage());
+ readFromConfig = new TQCheckBox(i18n("Try loading a game"), plainPage());
readFromConfig->adjustSize();
readFromConfig->setChecked(readConfig);
l->addWidget(readFromConfig);
- readFromConfigLabel = new QLabel(i18n("The following values are used if loading from config fails"), plainPage());
+ readFromConfigLabel = new TQLabel(i18n("The following values are used if loading from config fails"), plainPage());
if (!readFromConfig->isChecked())
readFromConfigLabel->hide();
readFromConfigLabel->adjustSize();
l->addWidget(readFromConfigLabel);
- connect(readFromConfig, SIGNAL(toggled(bool)),
- this, SLOT(changeReadFromConfig(bool)));
+ connect(readFromConfig, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(changeReadFromConfig(bool)));
players = new KIntNumInput(playerNr, plainPage());
players->setRange(1, MAX_PLAYERS);
players->setLabel(i18n("How many players do you want?"));
topLayout->addWidget(players);
- l = new QHBoxLayout(topLayout);
- l->addWidget(new QLabel(i18n("Your name:"), plainPage()));
- player1Name = new QLineEdit(plainPage());
+ l = new TQHBoxLayout(topLayout);
+ l->addWidget(new TQLabel(i18n("Your name:"), plainPage()));
+ player1Name = new TQLineEdit(plainPage());
l->addWidget(player1Name);
- l = new QHBoxLayout(topLayout);
- l->addWidget(new QLabel(i18n("Players' starting money:"), plainPage()));
- moneyOfPlayers = new QLineEdit(QString("%1").arg(money), plainPage());
+ l = new TQHBoxLayout(topLayout);
+ l->addWidget(new TQLabel(i18n("Players' starting money:"), plainPage()));
+ moneyOfPlayers = new TQLineEdit(TQString("%1").arg(money), plainPage());
moneyOfPlayers->setValidator( new KIntValidator( 0,999999,moneyOfPlayers ) );
l->addWidget(moneyOfPlayers);
- l = new QHBoxLayout(topLayout);
- l->addWidget(new QLabel(i18n("The names of your opponents:"), plainPage()));
- computerNames = new QComboBox(true, plainPage());
- computerNames->setInsertionPolicy(QComboBox::AtCurrent);
+ l = new TQHBoxLayout(topLayout);
+ l->addWidget(new TQLabel(i18n("The names of your opponents:"), plainPage()));
+ computerNames = new TQComboBox(true, plainPage());
+ computerNames->setInsertionPolicy(TQComboBox::AtCurrent);
l->addWidget(computerNames);
- l = new QHBoxLayout(topLayout);
- l->addWidget(new QLabel(i18n("Show this dialog every time on startup"),
+ l = new TQHBoxLayout(topLayout);
+ l->addWidget(new TQLabel(i18n("Show this dialog every time on startup"),
plainPage()));
- showDialogOnStartup = new QCheckBox(plainPage());
+ showDialogOnStartup = new TQCheckBox(plainPage());
showDialogOnStartup->setChecked(showNewGameDlg);
l->addWidget(showDialogOnStartup);
@@ -120,14 +120,14 @@ NewGameDlg::~NewGameDlg()
}
-void NewGameDlg::setPlayerNames(int no, QString playerName)
+void NewGameDlg::setPlayerNames(int no, TQString playerName)
{
if (no < 0) {
kapp->config()->setGroup("Save");
player1Name->setText(kapp->config()->readEntry("Name_0", i18n("You")));
computerNames->clear();
for (int i = 1; i < MAX_PLAYERS; i++) {
- computerNames->insertItem(kapp->config()->readEntry(QString("Name_%1").arg(i), i18n("Computer %1").arg(i)));
+ computerNames->insertItem(kapp->config()->readEntry(TQString("Name_%1").arg(i), i18n("Computer %1").arg(i)));
}
} else if (no == 0) {
player1Name->setText(playerName);
@@ -178,7 +178,7 @@ int NewGameDlg::money()
}
-QString NewGameDlg::name(int nr)
+TQString NewGameDlg::name(int nr)
{
if (computerNames->currentText() != computerNames->text(computerNames->currentItem()))
computerNames->changeItem(computerNames->currentText(), computerNames->currentItem());
diff --git a/kpoker/newgamedlg.h b/kpoker/newgamedlg.h
index 5588f0aa..1dc73057 100644
--- a/kpoker/newgamedlg.h
+++ b/kpoker/newgamedlg.h
@@ -41,7 +41,7 @@ class NewGameDlg : public KDialogBase
Q_OBJECT
public:
- NewGameDlg(QWidget* parent = 0);
+ NewGameDlg(TQWidget* parent = 0);
~NewGameDlg();
/**
@@ -69,7 +69,7 @@ class NewGameDlg : public KDialogBase
* @param nr The number of the player
* @return The name of the player specified in nr
**/
- QString name(int nr);
+ TQString name(int nr);
/**
* This method hides the button where the user can choose to read values from config file
@@ -78,7 +78,7 @@ class NewGameDlg : public KDialogBase
**/
void hideReadingFromConfig();
- void setPlayerNames(int no = -1, QString playerName = 0);
+ void setPlayerNames(int no = -1, TQString playerName = 0);
protected slots:
@@ -91,13 +91,13 @@ class NewGameDlg : public KDialogBase
private:
- QLabel *readFromConfigLabel;
- QCheckBox *readFromConfig;
+ TQLabel *readFromConfigLabel;
+ TQCheckBox *readFromConfig;
KIntNumInput *players;
- QLineEdit *moneyOfPlayers;
- QCheckBox *showDialogOnStartup;
- QLineEdit *player1Name;
- QComboBox *computerNames;
+ TQLineEdit *moneyOfPlayers;
+ TQCheckBox *showDialogOnStartup;
+ TQLineEdit *player1Name;
+ TQComboBox *computerNames;
};
diff --git a/kpoker/optionsdlg.cpp b/kpoker/optionsdlg.cpp
index e009c3d2..5fdfbfcf 100644
--- a/kpoker/optionsdlg.cpp
+++ b/kpoker/optionsdlg.cpp
@@ -16,8 +16,8 @@
// QT includes
-#include <qlabel.h>
-#include <qlayout.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
// KDE includes
#include <klocale.h>
@@ -28,11 +28,11 @@
#include "defines.h"
-OptionsDlg::OptionsDlg(QWidget* parent, const char* name, int _players)
+OptionsDlg::OptionsDlg(TQWidget* parent, const char* name, int _players)
: KDialogBase(Plain, i18n("Options")/*?*/, Ok|Cancel, Ok,
parent, name, true, true)
{
- QVBoxLayout* topLayout = new QVBoxLayout(plainPage(), spacingHint());
+ TQVBoxLayout* topLayout = new TQVBoxLayout(plainPage(), spacingHint());
maxBet = 0;
minBet = 0;
@@ -41,7 +41,7 @@ OptionsDlg::OptionsDlg(QWidget* parent, const char* name, int _players)
else
players = _players;
- topLayout->addWidget(new QLabel(i18n("All changes will be activated in the next round."), plainPage()));
+ topLayout->addWidget(new TQLabel(i18n("All changes will be activated in the next round."), plainPage()));
drawDelay = new KIntNumInput(0, plainPage());
drawDelay->setLabel(i18n("Draw delay:"));
diff --git a/kpoker/optionsdlg.h b/kpoker/optionsdlg.h
index c1573133..fdc556a8 100644
--- a/kpoker/optionsdlg.h
+++ b/kpoker/optionsdlg.h
@@ -41,7 +41,7 @@ class OptionsDlg : public KDialogBase
Q_OBJECT
public:
- OptionsDlg(QWidget* parent = 0, const char* name = 0, int _players = 1);
+ OptionsDlg(TQWidget* parent = 0, const char* name = 0, int _players = 1);
~OptionsDlg();
void init(int _drawDelay, int _maxBetOrCashPerRound, int minBet = -1);
@@ -56,9 +56,9 @@ class OptionsDlg : public KDialogBase
int defaultMinBet;
int defaultCashPerRound;
int defaultDrawDelay;
- // QLineEdit* maxBet;
- // QLineEdit* minBet;
- // QLineEdit* drawDelay;
+ // TQLineEdit* maxBet;
+ // TQLineEdit* minBet;
+ // TQLineEdit* drawDelay;
KIntNumInput* maxBet;
KIntNumInput* minBet;
KIntNumInput* drawDelay;
diff --git a/kpoker/player.h b/kpoker/player.h
index 7d3988cf..56399151 100644
--- a/kpoker/player.h
+++ b/kpoker/player.h
@@ -19,7 +19,7 @@
#define PLAYER_H
// QT includes
-#include <qstring.h>
+#include <tqstring.h>
// KDE includes
#include <krandomsequence.h>
@@ -100,7 +100,7 @@ class PokerPlayer
* Sets a new name
* @param newName The new name of the player
**/
- void setName(const QString &newName) { m_name = newName; }
+ void setName(const TQString &newName) { m_name = newName; }
/**
* Informs the player that he is out (or is not out anymore)
@@ -165,7 +165,7 @@ class PokerPlayer
/**
* @return The name of the player
**/
- QString getName() const { return m_name; }
+ TQString getName() const { return m_name; }
// FIXME: Rename to hasFolded?
/**
@@ -194,7 +194,7 @@ class PokerPlayer
private:
// Basic data:
- QString m_name; // The name of the player.
+ TQString m_name; // The name of the player.
bool m_isHuman; // True if the player is human.
// The hand itself
diff --git a/kpoker/playerbox.cpp b/kpoker/playerbox.cpp
index cdfb216c..4927fd7c 100644
--- a/kpoker/playerbox.cpp
+++ b/kpoker/playerbox.cpp
@@ -15,10 +15,10 @@
*/
-#include <qtooltip.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qhbox.h>
+#include <tqtooltip.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqhbox.h>
#include <kglobal.h>
#include <klocale.h>
@@ -30,25 +30,25 @@
#include "kpaint.h"
-PlayerBox::PlayerBox(bool playerOne, QWidget* parent, const char* name)
- : QGroupBox(parent, name)
+PlayerBox::PlayerBox(bool playerOne, TQWidget* parent, const char* name)
+ : TQGroupBox(parent, name)
{
- QHBoxLayout* l = new QHBoxLayout(this, PLAYERBOX_BORDERS,
+ TQHBoxLayout* l = new TQHBoxLayout(this, PLAYERBOX_BORDERS,
PLAYERBOX_HDISTANCEOFWIDGETS);
// The card and "held" label arrays.
m_cardWidgets = new CardWidget *[PokerHandSize];
- m_heldLabels = new QLabel *[PokerHandSize];
+ m_heldLabels = new TQLabel *[PokerHandSize];
- QFont myFixedFont;
+ TQFont myFixedFont;
myFixedFont.setPointSize(12);
// Generate the 5 cards
for (int i = 0; i < PokerHandSize; i++) {
- QVBoxLayout* vl = new QVBoxLayout(0);
+ TQVBoxLayout* vl = new TQVBoxLayout(0);
l->addLayout(vl, 0);
- QHBox* cardBox = new QHBox(this);
+ TQHBox* cardBox = new TQHBox(this);
vl->addWidget(cardBox, 0);
cardBox->setFrameStyle(Box | Sunken);
m_cardWidgets[i] = new CardWidget(cardBox);
@@ -56,14 +56,14 @@ PlayerBox::PlayerBox(bool playerOne, QWidget* parent, const char* name)
// Only add the "held" labels if this is the first player (the human one).
if (playerOne) {
- QHBox* b = new QHBox(this);
- m_heldLabels[i] = new QLabel(b);
+ TQHBox* b = new TQHBox(this);
+ m_heldLabels[i] = new TQLabel(b);
m_heldLabels[i]->setText(i18n("Held"));
b->setFrameStyle(Box | Sunken);
b->setFixedSize(b->sizeHint());
m_cardWidgets[i]->heldLabel = m_heldLabels[i];
- QHBoxLayout* heldLayout = new QHBoxLayout(0);
+ TQHBoxLayout* heldLayout = new TQHBoxLayout(0);
heldLayout->addWidget(b, 0, AlignCenter);
vl->insertLayout(0, heldLayout, 0);
vl->insertStretch(0, 1);
@@ -73,24 +73,24 @@ PlayerBox::PlayerBox(bool playerOne, QWidget* parent, const char* name)
// Add the cash and bet labels.
{
- QVBoxLayout* vl = new QVBoxLayout;
+ TQVBoxLayout* vl = new QVBoxLayout;
l->addLayout(vl);
vl->addStretch();
- m_cashLabel = new QLabel(this);
- m_cashLabel->setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
+ m_cashLabel = new TQLabel(this);
+ m_cashLabel->setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
m_cashLabel->setFont(myFixedFont);
vl->addWidget(m_cashLabel, 0, AlignHCenter);
vl->addStretch();
- m_betLabel = new QLabel(this);
- m_betLabel->setFrameStyle(QFrame::WinPanel | QFrame::Sunken);
+ m_betLabel = new TQLabel(this);
+ m_betLabel->setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
m_betLabel->setFont(myFixedFont);
vl->addWidget(m_betLabel, 0, AlignHCenter);
vl->addStretch();
}
- QToolTip::add(m_cashLabel,
+ TQToolTip::add(m_cashLabel,
i18n("Money of %1").arg("Player"));//change via showName()
// Assume that we have a multiplayer game.
@@ -109,9 +109,9 @@ PlayerBox::~PlayerBox()
-void PlayerBox::resizeEvent(QResizeEvent* e)
+void PlayerBox::resizeEvent(TQResizeEvent* e)
{
- QGroupBox::resizeEvent(e);
+ TQGroupBox::resizeEvent(e);
showCash();
showName();
@@ -144,8 +144,8 @@ void PlayerBox::showCash()
void PlayerBox::showName()
{
setTitle(m_player->getName());
- QToolTip::remove(m_cashLabel);
- QToolTip::add(m_cashLabel, i18n("Money of %1").arg(m_player->getName()));
+ TQToolTip::remove(m_cashLabel);
+ TQToolTip::add(m_cashLabel, i18n("Money of %1").arg(m_player->getName()));
}
@@ -176,8 +176,8 @@ void PlayerBox::paintCard(int nr)
void PlayerBox::activateToggleHeld()
{
for (int i = 0; i < PokerHandSize; i++) {
- connect(m_cardWidgets[i], SIGNAL(pClicked(CardWidget*)),
- this, SLOT(cardClicked(CardWidget*)));
+ connect(m_cardWidgets[i], TQT_SIGNAL(pClicked(CardWidget*)),
+ this, TQT_SLOT(cardClicked(CardWidget*)));
}
}
diff --git a/kpoker/playerbox.h b/kpoker/playerbox.h
index 4d769170..86ab8d2f 100644
--- a/kpoker/playerbox.h
+++ b/kpoker/playerbox.h
@@ -19,7 +19,7 @@
#define PLAYERBOX_H
-#include <qgroupbox.h>
+#include <tqgroupbox.h>
class QLabel;
@@ -34,7 +34,7 @@ class PlayerBox : public QGroupBox
Q_OBJECT
public:
- PlayerBox(bool playerOne, QWidget* parent = 0, const char* name = 0);
+ PlayerBox(bool playerOne, TQWidget* parent = 0, const char* name = 0);
~PlayerBox();
void cardClicked(int no);
@@ -121,7 +121,7 @@ class PlayerBox : public QGroupBox
protected:
- virtual void resizeEvent( QResizeEvent* e );
+ virtual void resizeEvent( TQResizeEvent* e );
protected slots:
@@ -141,12 +141,12 @@ class PlayerBox : public QGroupBox
// The card widgets and "held" widgets
CardWidget **m_cardWidgets;
- QLabel **m_heldLabels;
+ TQLabel **m_heldLabels;
bool m_enableHeldLabels; // True if held labels are enabled.
// The labels at the right hand side of the box.
- QLabel *m_cashLabel;
- QLabel *m_betLabel;
+ TQLabel *m_cashLabel;
+ TQLabel *m_betLabel;
};
diff --git a/kpoker/poker.cpp b/kpoker/poker.cpp
index 6143d342..d5d70f80 100644
--- a/kpoker/poker.cpp
+++ b/kpoker/poker.cpp
@@ -89,7 +89,7 @@ CardDeck::getTopCard()
// Poker types
-QString PokerHandNames[] = {
+TQString PokerHandNames[] = {
"High Card",
"Pair",
"Two Pairs",
diff --git a/kpoker/poker.h b/kpoker/poker.h
index 5a944d99..ff388950 100644
--- a/kpoker/poker.h
+++ b/kpoker/poker.h
@@ -18,7 +18,7 @@
#ifndef POKER_H
#define POKER_H
-#include <qstring.h>
+#include <tqstring.h>
#include <krandomsequence.h>
#include <kdebug.h>
@@ -167,7 +167,7 @@ typedef enum {
} PokerHandType;
// Name strings for all the hands
-extern QString PokerHandNames[];
+extern TQString PokerHandNames[];
// Number of cards in the hand.
diff --git a/kpoker/sound.cpp b/kpoker/sound.cpp
index f029d03a..3835c3fb 100644
--- a/kpoker/sound.cpp
+++ b/kpoker/sound.cpp
@@ -14,7 +14,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
+#include <tqstring.h>
#include <kstandarddirs.h>
@@ -36,7 +36,7 @@ void kpok::playSound(const char *soundname)
if (!sound)
return;
- KAudioPlayer::play(locate("data", QString("kpoker/sounds/")+soundname));
+ KAudioPlayer::play(locate("data", TQString("kpoker/sounds/")+soundname));
}
diff --git a/kpoker/top.cpp b/kpoker/top.cpp
index b2e8137f..a58d5666 100644
--- a/kpoker/top.cpp
+++ b/kpoker/top.cpp
@@ -16,8 +16,8 @@
// QT includes
-#include <qkeycode.h>
-#include <qcursor.h>
+#include <tqkeycode.h>
+#include <tqcursor.h>
// KDE includes
#include <kapplication.h>
@@ -47,17 +47,17 @@ PokerWindow::PokerWindow()
clickToHoldIsShown = false;
- LHLabel = new QLabel(statusBar());
+ LHLabel = new TQLabel(statusBar());
LHLabel->adjustSize();
- connect(m_kpok, SIGNAL(changeLastHand(const QString &, bool)),
- this, SLOT(setHand(const QString &, bool)));
- connect(m_kpok, SIGNAL(showClickToHold(bool)),
- this, SLOT(showClickToHold(bool)));
- connect(m_kpok, SIGNAL(clearStatusBar()),
- this, SLOT(clearStatusBar()));
- connect(m_kpok, SIGNAL(statusBarMessage(QString)),
- this, SLOT(statusBarMessage(QString)));
+ connect(m_kpok, TQT_SIGNAL(changeLastHand(const TQString &, bool)),
+ this, TQT_SLOT(setHand(const TQString &, bool)));
+ connect(m_kpok, TQT_SIGNAL(showClickToHold(bool)),
+ this, TQT_SLOT(showClickToHold(bool)));
+ connect(m_kpok, TQT_SIGNAL(clearStatusBar()),
+ this, TQT_SLOT(clearStatusBar()));
+ connect(m_kpok, TQT_SIGNAL(statusBarMessage(TQString)),
+ this, TQT_SLOT(statusBarMessage(TQString)));
statusBar()->addWidget(LHLabel, 0, true);
m_kpok->updateLHLabel();
@@ -79,47 +79,47 @@ PokerWindow::~PokerWindow()
void PokerWindow::initKAction()
{
//Game
- KStdGameAction::gameNew(m_kpok, SLOT(newGame()), actionCollection());
- KStdGameAction::save(m_kpok, SLOT(saveGame()), actionCollection());
- KStdGameAction::quit(this, SLOT(close()), actionCollection());
+ KStdGameAction::gameNew(m_kpok, TQT_SLOT(newGame()), actionCollection());
+ KStdGameAction::save(m_kpok, TQT_SLOT(saveGame()), actionCollection());
+ KStdGameAction::quit(this, TQT_SLOT(close()), actionCollection());
//Settings
showMenubarAction =
- KStdAction::showMenubar(this, SLOT(toggleMenubar()), actionCollection());
+ KStdAction::showMenubar(this, TQT_SLOT(toggleMenubar()), actionCollection());
soundAction = new KToggleAction(i18n("Soun&d"), 0, m_kpok,
- SLOT(toggleSound()), actionCollection(), "options_sound");
+ TQT_SLOT(toggleSound()), actionCollection(), "options_sound");
if (m_kpok->getSound())
m_kpok->toggleSound();
blinkingAction = new KToggleAction(i18n("&Blinking Cards"), 0, m_kpok,
- SLOT(toggleBlinking()), actionCollection(), "options_blinking");
+ TQT_SLOT(toggleBlinking()), actionCollection(), "options_blinking");
if (m_kpok->getBlinking())
m_kpok->toggleBlinking();
adjustAction = new KToggleAction(i18n("&Adjust Bet is Default"), 0,
- m_kpok, SLOT(toggleAdjust()), actionCollection(), "options_adjust");
+ m_kpok, TQT_SLOT(toggleAdjust()), actionCollection(), "options_adjust");
if (m_kpok->getAdjust())
m_kpok->toggleAdjust();
showStatusbarAction =
- KStdAction::showStatusbar(this, SLOT(toggleStatusbar()), actionCollection());
+ KStdAction::showStatusbar(this, TQT_SLOT(toggleStatusbar()), actionCollection());
- KStdAction::saveOptions(this, SLOT(saveOptions()), actionCollection());
- KStdGameAction::carddecks(m_kpok, SLOT(slotCardDeck()), actionCollection());
- KStdAction::preferences(m_kpok, SLOT(slotPreferences()), actionCollection());
+ KStdAction::saveOptions(this, TQT_SLOT(saveOptions()), actionCollection());
+ KStdGameAction::carddecks(m_kpok, TQT_SLOT(slotCardDeck()), actionCollection());
+ KStdAction::preferences(m_kpok, TQT_SLOT(slotPreferences()), actionCollection());
// Keyboard shortcuts.
(void)new KAction(i18n("Draw"), KShortcut(Qt::Key_Return), m_kpok,
- SLOT(drawClick()), actionCollection(), "draw");
+ TQT_SLOT(drawClick()), actionCollection(), "draw");
(void)new KAction(i18n("Exchange Card 1"), KShortcut(Qt::Key_1), m_kpok,
- SLOT(exchangeCard1()), actionCollection(), "exchange_card_1");
+ TQT_SLOT(exchangeCard1()), actionCollection(), "exchange_card_1");
(void)new KAction(i18n("Exchange Card 2"), KShortcut(Qt::Key_2), m_kpok,
- SLOT(exchangeCard2()), actionCollection(), "exchange_card_2");
+ TQT_SLOT(exchangeCard2()), actionCollection(), "exchange_card_2");
(void)new KAction(i18n("Exchange Card 3"), KShortcut(Qt::Key_3), m_kpok,
- SLOT(exchangeCard3()), actionCollection(), "exchange_card_3");
+ TQT_SLOT(exchangeCard3()), actionCollection(), "exchange_card_3");
(void)new KAction(i18n("Exchange Card 4"), KShortcut(Qt::Key_4), m_kpok,
- SLOT(exchangeCard4()), actionCollection(), "exchange_card_4");
+ TQT_SLOT(exchangeCard4()), actionCollection(), "exchange_card_4");
(void)new KAction(i18n("Exchange Card 5"), KShortcut(Qt::Key_5), m_kpok,
- SLOT(exchangeCard5()), actionCollection(), "exchange_card_5");
+ 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?"), QString::null, KStdGuiItem::save(), KStdGuiItem::dontSave())) {
+ switch(KMessageBox::warningYesNoCancel(this, i18n("Do you want to save this game?"), TQString::null, KStdGuiItem::save(), KStdGuiItem::dontSave())) {
case KMessageBox::Yes :
m_kpok->saveGame();
return true;
@@ -195,7 +195,7 @@ bool PokerWindow::queryClose()
* player game.
*/
-void PokerWindow::setHand(const QString &newHand, bool lastHand)
+void PokerWindow::setHand(const TQString &newHand, bool lastHand)
{
if (lastHand)
LHLabel->setText(i18n("Last hand: ") + newHand);
@@ -218,7 +218,7 @@ void PokerWindow::showClickToHold(bool show)
}
-void PokerWindow::statusBarMessage(QString s)
+void PokerWindow::statusBarMessage(TQString s)
{
clearStatusBar();
statusBar()->message(s);
@@ -246,14 +246,14 @@ void PokerWindow::saveOptions()
}
-bool PokerWindow::eventFilter(QObject*, QEvent* e)
+bool PokerWindow::eventFilter(TQObject*, TQEvent* e)
{
- if (e->type() == QEvent::MouseButtonPress) {
+ if (e->type() == TQEvent::MouseButtonPress) {
- if (((QMouseEvent*)e)->button() == RightButton) {
- QPopupMenu* popup = (QPopupMenu*) factory()->container("popup", this);
+ if (((TQMouseEvent*)e)->button() == RightButton) {
+ TQPopupMenu* popup = (TQPopupMenu*) factory()->container("popup", this);
if (popup)
- popup->popup(QCursor::pos());
+ popup->popup(TQCursor::pos());
return true;
} else
return false;
diff --git a/kpoker/top.h b/kpoker/top.h
index 715aa20d..e09054fe 100644
--- a/kpoker/top.h
+++ b/kpoker/top.h
@@ -37,16 +37,16 @@ class PokerWindow : public KMainWindow
protected:
virtual bool queryClose();
- bool eventFilter(QObject*, QEvent*);
+ bool eventFilter(TQObject*, TQEvent*);
void initKAction();
void readOptions();
protected slots:
// void saveProperties(KConfig*);
// void readProperties(KConfig*);
- void setHand(const QString &newHand, bool lastHand = true);
+ void setHand(const TQString &newHand, bool lastHand = true);
void showClickToHold(bool show);
- void statusBarMessage(QString);
+ void statusBarMessage(TQString);
void clearStatusBar();
void saveOptions();
void toggleMenubar();
@@ -62,7 +62,7 @@ class PokerWindow : public KMainWindow
KToggleAction *showStatusbarAction;
// statusbar elements:
- QLabel *LHLabel;
+ TQLabel *LHLabel;
bool clickToHoldIsShown;
};