summaryrefslogtreecommitdiffstats
path: root/kblackbox/kbbgame.cpp
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 /kblackbox/kbbgame.cpp
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 'kblackbox/kbbgame.cpp')
-rw-r--r--kblackbox/kbbgame.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/kblackbox/kbbgame.cpp b/kblackbox/kbbgame.cpp
index 82028871..6370291d 100644
--- a/kblackbox/kbbgame.cpp
+++ b/kblackbox/kbbgame.cpp
@@ -10,12 +10,12 @@
#include <config.h>
-#include <qpopupmenu.h>
-#include <qkeycode.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qtooltip.h>
-#include <qstring.h>
+#include <tqpopupmenu.h>
+#include <tqkeycode.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqtooltip.h>
+#include <tqstring.h>
#include <kmessagebox.h>
#include <kdebug.h>
@@ -58,8 +58,8 @@ KBBGame::KBBGame()
{
int i;
- QPixmap **pix = new QPixmap * [NROFTYPES];
- pix[0] = new QPixmap();
+ TQPixmap **pix = new TQPixmap * [NROFTYPES];
+ pix[0] = new TQPixmap();
*pix[0] = BarIcon( pFNames[0] );
if (!pix[0]->isNull()) {
kdDebug(12009) << "Pixmap \"" << pFNames[0] << "\" loaded." << endl;
@@ -89,15 +89,15 @@ KBBGame::KBBGame()
initKAction();
- connect( gr, SIGNAL(inputAt(int,int,int)),
- this, SLOT(gotInputAt(int,int,int)) );
- connect( this, SIGNAL(gameRuns(bool)),
- gr, SLOT(setInputAccepted(bool)) );
- connect( gr, SIGNAL(endMouseClicked()),
- this, SLOT(gameFinished()) );
+ connect( gr, TQT_SIGNAL(inputAt(int,int,int)),
+ this, TQT_SLOT(gotInputAt(int,int,int)) );
+ connect( this, TQT_SIGNAL(gameRuns(bool)),
+ gr, TQT_SLOT(setInputAccepted(bool)) );
+ connect( gr, TQT_SIGNAL(endMouseClicked()),
+ this, TQT_SLOT(gameFinished()) );
/*
- QToolTip::add( doneButton, i18n(
+ TQToolTip::add( doneButton, i18n(
"Click here when you think you placed all the balls.") );
*/
@@ -164,7 +164,7 @@ KBBGame::KBBGame()
KBBGame::~KBBGame()
{
KConfig *kConf;
- QString s;
+ TQString s;
kConf = kapp->config();
kConf->setGroup( "KBlackBox Setup" );
@@ -266,7 +266,7 @@ void KBBGame::newGame()
if (running) {
bool cancel;
cancel = KMessageBox::warningContinueCancel(0,
- i18n("Do you really want to give up this game?"),QString::null,i18n("Give Up"))
+ i18n("Do you really want to give up this game?"),TQString::null,i18n("Give Up"))
== KMessageBox::Cancel;
if (cancel)
return;
@@ -314,7 +314,7 @@ void KBBGame::newGame()
void KBBGame::gameFinished()
{
if (running) {
- QString s;
+ TQString s;
if (ballsPlaced == balls) {
getResults();
abortGame();
@@ -388,7 +388,7 @@ void KBBGame::giveUp()
bool stop;
stop = KMessageBox::warningContinueCancel(0,
i18n(
- "Do you really want to give up this game?"),QString::null,i18n("Give Up"))
+ "Do you really want to give up this game?"),TQString::null,i18n("Give Up"))
== KMessageBox::Continue;
if (stop) {
@@ -404,8 +404,8 @@ void KBBGame::giveUp()
void KBBGame::updateStats()
{
- QString tmp;
- QString s = i18n("Run: ");
+ TQString tmp;
+ TQString s = i18n("Run: ");
if (running)
s += i18n("Yes");
else
@@ -442,7 +442,7 @@ bool KBBGame::setSize( int w, int h )
if (running) {
ok = KMessageBox::warningContinueCancel(0,
i18n(
- "This will be the end of the current game!"),QString::null,i18n("End Game"))
+ "This will be the end of the current game!"),TQString::null,i18n("End Game"))
== KMessageBox::Continue;
} else ok = TRUE;
@@ -470,7 +470,7 @@ bool KBBGame::setBalls( int n )
if (balls != n) {
if (running) {
ok = KMessageBox::warningContinueCancel(0,
- i18n("This will be the end of the current game!"),QString::null,i18n("End Game"))
+ i18n("This will be the end of the current game!"),TQString::null,i18n("End Game"))
== KMessageBox::Continue;
} else ok = TRUE;
if (ok) {
@@ -698,37 +698,37 @@ void KBBGame::gotInputAt( int col, int row, int state )
void KBBGame::initKAction()
{
// game
- KStdGameAction::gameNew(this, SLOT(newGame()), actionCollection());
- (void)new KAction( i18n("&Give Up"), SmallIcon("giveup"), 0, this, SLOT(giveUp()), actionCollection(), "game_giveup" );
- (void)new KAction( i18n("&Done"), SmallIcon("done"), 0, this, SLOT(gameFinished()), actionCollection(), "game_done" );
- (void)new KAction( i18n("&Resize"), 0, this, SLOT(slotResize()), actionCollection(), "game_resize" );
- KStdGameAction::quit(this, SLOT(close()), actionCollection());
+ KStdGameAction::gameNew(this, TQT_SLOT(newGame()), actionCollection());
+ (void)new KAction( i18n("&Give Up"), SmallIcon("giveup"), 0, this, TQT_SLOT(giveUp()), actionCollection(), "game_giveup" );
+ (void)new KAction( i18n("&Done"), SmallIcon("done"), 0, this, TQT_SLOT(gameFinished()), actionCollection(), "game_done" );
+ (void)new KAction( i18n("&Resize"), 0, this, TQT_SLOT(slotResize()), actionCollection(), "game_resize" );
+ KStdGameAction::quit(this, TQT_SLOT(close()), actionCollection());
// settings
- sizeAction = new KSelectAction( i18n("&Size"), 0, this, SLOT(slotSize()), actionCollection(), "options_size");
- QStringList list;
+ sizeAction = new KSelectAction( i18n("&Size"), 0, this, TQT_SLOT(slotSize()), actionCollection(), "options_size");
+ TQStringList list;
list.append(i18n(" 8 x 8 "));
list.append(i18n(" 10 x 10 "));
list.append(i18n(" 12 x 12 "));
sizeAction->setItems(list);
- ballsAction = new KSelectAction( i18n("&Balls"), 0, this, SLOT(slotBalls()), actionCollection(), "options_balls");
+ ballsAction = new KSelectAction( i18n("&Balls"), 0, this, TQT_SLOT(slotBalls()), actionCollection(), "options_balls");
list.clear();
list.append(i18n(" 4 "));
list.append(i18n(" 6 "));
list.append(i18n(" 8 "));
ballsAction->setItems(list);
- tutorialAction = new KToggleAction( i18n("&Tutorial"), 0, this, SLOT(tutorialSwitch()), actionCollection(), "options_tutorial" );
-// KStdAction::keyBindings(guiFactory(), SLOT(configureShortcuts()),
+ tutorialAction = new KToggleAction( i18n("&Tutorial"), 0, this, TQT_SLOT(tutorialSwitch()), actionCollection(), "options_tutorial" );
+// KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()),
//actionCollection());
// keyboard only
- (void)new KAction( i18n("Move Down"), Qt::Key_Down, gr, SLOT(slotDown()), actionCollection(), "move_down" );
- (void)new KAction( i18n("Move Up"), Qt::Key_Up, gr, SLOT(slotUp()), actionCollection(), "move_up" );
- (void)new KAction( i18n("Move Left"), Qt::Key_Left, gr, SLOT(slotLeft()), actionCollection(), "move_left" );
- (void)new KAction( i18n("Move Right"), Qt::Key_Right, gr, SLOT(slotRight()), actionCollection(), "move_right" );
- (void)new KAction( i18n("Trigger Action"), Qt::Key_Return, gr, SLOT(slotInput()), actionCollection(), "move_trigger" );
+ (void)new KAction( i18n("Move Down"), Qt::Key_Down, gr, TQT_SLOT(slotDown()), actionCollection(), "move_down" );
+ (void)new KAction( i18n("Move Up"), Qt::Key_Up, gr, TQT_SLOT(slotUp()), actionCollection(), "move_up" );
+ (void)new KAction( i18n("Move Left"), Qt::Key_Left, gr, TQT_SLOT(slotLeft()), actionCollection(), "move_left" );
+ (void)new KAction( i18n("Move Right"), Qt::Key_Right, gr, TQT_SLOT(slotRight()), actionCollection(), "move_right" );
+ (void)new KAction( i18n("Trigger Action"), Qt::Key_Return, gr, TQT_SLOT(slotInput()), actionCollection(), "move_trigger" );
}
void KBBGame::slotResize()