diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:42:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:42:31 +0000 |
commit | 576eb4299a00bc053db35414406f46372a0f70f2 (patch) | |
tree | 4c030922d533821db464af566188e7d40cc8848c /kpoker/top.cpp | |
parent | 0718336b6017d1a4fc1d626544180a5a2a29ddec (diff) | |
download | tdegames-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/top.cpp')
-rw-r--r-- | kpoker/top.cpp | 72 |
1 files changed, 36 insertions, 36 deletions
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; |