diff options
Diffstat (limited to 'kgoldrunner/src/kgoldrunner.cpp')
-rw-r--r-- | kgoldrunner/src/kgoldrunner.cpp | 184 |
1 files changed, 92 insertions, 92 deletions
diff --git a/kgoldrunner/src/kgoldrunner.cpp b/kgoldrunner/src/kgoldrunner.cpp index ca98b30f..8d417c8d 100644 --- a/kgoldrunner/src/kgoldrunner.cpp +++ b/kgoldrunner/src/kgoldrunner.cpp @@ -88,10 +88,10 @@ KGoldrunner::KGoldrunner() initStatusBar(); // Connect the game actions to the menu and toolbar displays. - connect(game, TQT_SIGNAL (setEditMenu (bool)), TQT_SLOT (setEditMenu (bool))); - connect(game, TQT_SIGNAL (markRuleType (char)), TQT_SLOT (markRuleType (char))); - connect(game, TQT_SIGNAL (hintAvailable(bool)), TQT_SLOT (adjustHintAction(bool))); - connect(game, TQT_SIGNAL (defaultEditObj()), TQT_SLOT (defaultEditObj())); + connect(game, TQ_SIGNAL (setEditMenu (bool)), TQ_SLOT (setEditMenu (bool))); + connect(game, TQ_SIGNAL (markRuleType (char)), TQ_SLOT (markRuleType (char))); + connect(game, TQ_SIGNAL (hintAvailable(bool)), TQ_SLOT (adjustHintAction(bool))); + connect(game, TQ_SIGNAL (defaultEditObj()), TQ_SLOT (defaultEditObj())); // Apply the saved mainwindow settings, if any, and ask the mainwindow // to automatically save settings if changed: window size, toolbar @@ -157,22 +157,22 @@ void KGoldrunner::setupActions() TDEAction * newAction = KStdGameAction:: gameNew ( game, - TQT_SLOT(startLevelOne()), actionCollection()); + TQ_SLOT(startLevelOne()), actionCollection()); newAction-> setText (i18n("&New Game...")); TDEAction * loadGame = KStdGameAction:: load ( - game, TQT_SLOT(loadGame()), actionCollection()); + game, TQ_SLOT(loadGame()), actionCollection()); loadGame-> setText (i18n("&Load Saved Game...")); (void) new TDEAction ( i18n("&Play Any Level..."), 0, - game, TQT_SLOT(startAnyLevel()), actionCollection(), + game, TQ_SLOT(startAnyLevel()), actionCollection(), "play_any"); (void) new TDEAction ( i18n("Play &Next Level..."), 0, game, - TQT_SLOT(startNextLevel()), actionCollection(), + TQ_SLOT(startNextLevel()), actionCollection(), "play_next"); // Save Game... @@ -181,7 +181,7 @@ void KGoldrunner::setupActions() saveGame = KStdGameAction:: save ( - game, TQT_SLOT(saveGame()), actionCollection()); + game, TQ_SLOT(saveGame()), actionCollection()); saveGame-> setText (i18n("&Save Game...")); saveGame-> setShortcut (Key_S); // Alternate key. @@ -193,20 +193,20 @@ void KGoldrunner::setupActions() myPause = KStdGameAction:: pause ( - this, TQT_SLOT(stopStart()), actionCollection()); + this, TQ_SLOT(stopStart()), actionCollection()); myPause-> setShortcut (Key_Escape); // Alternate key. highScore = KStdGameAction:: highscores ( - game, TQT_SLOT(showHighScores()), actionCollection()); + game, TQ_SLOT(showHighScores()), actionCollection()); hintAction = new TDEAction ( i18n("&Get Hint"), "ktip", 0, - game, TQT_SLOT(showHint()), actionCollection(), + game, TQ_SLOT(showHint()), actionCollection(), "get_hint"); killHero = new TDEAction ( i18n("&Kill Hero"), Key_Q, - game, TQT_SLOT(herosDead()), actionCollection(), + game, TQ_SLOT(herosDead()), actionCollection(), "kill_hero"); // Quit @@ -214,7 +214,7 @@ void KGoldrunner::setupActions() (void) KStdGameAction:: quit ( - this, TQT_SLOT(close()), actionCollection()); + this, TQ_SLOT(close()), actionCollection()); /**************************************************************************/ /*************************** GAME EDITOR MENU **************************/ @@ -228,17 +228,17 @@ void KGoldrunner::setupActions() (void) new TDEAction ( i18n("&Create Level"), 0, - game, TQT_SLOT(createLevel()), actionCollection(), + game, TQ_SLOT(createLevel()), actionCollection(), "create"); (void) new TDEAction ( i18n("&Edit Any Level..."), 0, - game, TQT_SLOT(updateLevel()), actionCollection(), + game, TQ_SLOT(updateLevel()), actionCollection(), "edit_any"); (void) new TDEAction ( i18n("Edit &Next Level..."), 0, - game, TQT_SLOT(updateNext()), actionCollection(), + game, TQ_SLOT(updateNext()), actionCollection(), "edit_next"); // Save Edits... @@ -249,20 +249,20 @@ void KGoldrunner::setupActions() saveEdits = new TDEAction ( i18n("&Save Edits..."), 0, - game, TQT_SLOT(saveLevelFile()), actionCollection(), + game, TQ_SLOT(saveLevelFile()), actionCollection(), "save_edits"); saveEdits->setEnabled (FALSE); // Nothing to save, yet. (void) new TDEAction ( i18n("&Move Level..."), 0, - game, TQT_SLOT(moveLevelFile()), actionCollection(), + game, TQ_SLOT(moveLevelFile()), actionCollection(), "move_level"); (void) new TDEAction ( i18n("&Delete Level..."), 0, game, - TQT_SLOT(deleteLevelFile()), actionCollection(), + TQ_SLOT(deleteLevelFile()), actionCollection(), "delete_level"); // Create a Game @@ -272,13 +272,13 @@ void KGoldrunner::setupActions() (void) new TDEAction ( i18n("Create Game..."), 0, - this, TQT_SLOT(createGame()), actionCollection(), + this, TQ_SLOT(createGame()), actionCollection(), "create_game"); (void) new TDEAction ( i18n("Edit Game Info..."), 0, this, - TQT_SLOT(editGameInfo()), actionCollection(), + TQ_SLOT(editGameInfo()), actionCollection(), "edit_game"); /**************************************************************************/ @@ -290,27 +290,27 @@ void KGoldrunner::setupActions() setKGoldrunner = new TDERadioAction ( "K&Goldrunner", 0, // Default Shift+G - this, TQT_SLOT(lsKGoldrunner()), actionCollection(), + this, TQ_SLOT(lsKGoldrunner()), actionCollection(), "kgoldrunner"); setAppleII = new TDERadioAction ( "&Apple II", 0, // Default Shift+A - this, TQT_SLOT(lsApple2()), actionCollection(), + this, TQ_SLOT(lsApple2()), actionCollection(), "apple_2"); setIceCave = new TDERadioAction ( i18n("&Ice Cave"), 0, // Default Shift+I - this, TQT_SLOT(lsIceCave()), actionCollection(), + this, TQ_SLOT(lsIceCave()), actionCollection(), "ice_cave"); setMidnight = new TDERadioAction ( i18n("&Midnight"), 0, // Default Shift+M - this, TQT_SLOT(lsMidnight()), actionCollection(), + this, TQ_SLOT(lsMidnight()), actionCollection(), "midnight"); setKDEKool = new TDERadioAction ( i18n("&TDE Kool"), 0, // Default Shift+K - this, TQT_SLOT(lsKDEKool()), actionCollection(), + this, TQ_SLOT(lsKDEKool()), actionCollection(), "kde_kool"); setKGoldrunner-> setExclusiveGroup ("landscapes"); @@ -332,13 +332,13 @@ void KGoldrunner::setupActions() i18n("&Mouse Controls Hero"), 0, this, - TQT_SLOT(setMouseMode()), actionCollection(), + TQ_SLOT(setMouseMode()), actionCollection(), "mouse_mode"); setKeyboard = new TDERadioAction ( i18n("&Keyboard Controls Hero"), 0, this, - TQT_SLOT(setKeyBoardMode()), actionCollection(), + TQ_SLOT(setKeyBoardMode()), actionCollection(), "keyboard_mode"); setMouse-> setExclusiveGroup ("control"); @@ -355,27 +355,27 @@ void KGoldrunner::setupActions() TDERadioAction * nSpeed = new TDERadioAction ( i18n("Normal Speed"), 0, - this, TQT_SLOT(normalSpeed()), actionCollection(), + this, TQ_SLOT(normalSpeed()), actionCollection(), "normal_speed"); TDERadioAction * bSpeed = new TDERadioAction ( i18n("Beginner Speed"), 0, - this, TQT_SLOT(beginSpeed()), actionCollection(), + this, TQ_SLOT(beginSpeed()), actionCollection(), "beginner_speed"); TDERadioAction * cSpeed = new TDERadioAction ( i18n("Champion Speed"), 0, - this, TQT_SLOT(champSpeed()), actionCollection(), + this, TQ_SLOT(champSpeed()), actionCollection(), "champion_speed"); (void) new TDEAction ( // Repeatable action. i18n("Increase Speed"), Key_Plus, - this, TQT_SLOT(incSpeed()), actionCollection(), + this, TQ_SLOT(incSpeed()), actionCollection(), "increase_speed"); (void) new TDEAction ( // Repeatable action. i18n("Decrease Speed"), Key_Minus, - this, TQT_SLOT(decSpeed()), actionCollection(), + this, TQ_SLOT(decSpeed()), actionCollection(), "decrease_speed"); nSpeed-> setExclusiveGroup ("speed"); @@ -390,12 +390,12 @@ void KGoldrunner::setupActions() tradRules = new TDERadioAction ( i18n("&Traditional Rules"), 0, - this, TQT_SLOT(setTradRules()), actionCollection(), + this, TQ_SLOT(setTradRules()), actionCollection(), "trad_rules"); kgrRules = new TDERadioAction ( i18n("K&Goldrunner Rules"), 0, - this, TQT_SLOT(setKGrRules()), actionCollection(), + this, TQ_SLOT(setKGrRules()), actionCollection(), "kgr_rules"); tradRules-> setExclusiveGroup ("rules"); @@ -409,12 +409,12 @@ void KGoldrunner::setupActions() (void) new TDEAction ( i18n("Larger Playing Area"), 0, - this, TQT_SLOT(makeLarger()), actionCollection(), + this, TQ_SLOT(makeLarger()), actionCollection(), "larger_area"); (void) new TDEAction ( i18n("Smaller Playing Area"), 0, - this, TQT_SLOT(makeSmaller()), actionCollection(), + this, TQ_SLOT(makeSmaller()), actionCollection(), "smaller_area"); // Configure Shortcuts... @@ -422,10 +422,10 @@ void KGoldrunner::setupActions() // -------------------------- KStdAction::keyBindings ( - this, TQT_SLOT(optionsConfigureKeys()), + this, TQ_SLOT(optionsConfigureKeys()), actionCollection()); // KStdAction::configureToolbars ( - // this, TQT_SLOT(optionsConfigureToolbars()), + // this, TQ_SLOT(optionsConfigureToolbars()), // actionCollection()); /**************************************************************************/ @@ -435,19 +435,19 @@ void KGoldrunner::setupActions() // Two-handed KB controls and alternate one-handed controls for the hero. (void) new TDEAction (i18n("Move Up"), Key_Up, - this, TQT_SLOT(goUp()), actionCollection(), "move_up"); + this, TQ_SLOT(goUp()), actionCollection(), "move_up"); (void) new TDEAction (i18n("Move Right"), Key_Right, - this, TQT_SLOT(goR()), actionCollection(), "move_right"); + this, TQ_SLOT(goR()), actionCollection(), "move_right"); (void) new TDEAction (i18n("Move Down"), Key_Down, - this, TQT_SLOT(goDown()), actionCollection(), "move_down"); + this, TQ_SLOT(goDown()), actionCollection(), "move_down"); (void) new TDEAction (i18n("Move Left"), Key_Left, - this, TQT_SLOT(goL()), actionCollection(), "move_left"); + this, TQ_SLOT(goL()), actionCollection(), "move_left"); (void) new TDEAction (i18n("Stop"), Key_Space, - this, TQT_SLOT(stop()), actionCollection(), "stop"); + this, TQ_SLOT(stop()), actionCollection(), "stop"); (void) new TDEAction (i18n("Dig Right"), Key_C, - this, TQT_SLOT(digR()), actionCollection(), "dig_right"); + this, TQ_SLOT(digR()), actionCollection(), "dig_right"); (void) new TDEAction (i18n("Dig Left"), Key_Z, - this, TQT_SLOT(digL()), actionCollection(), "dig_left"); + this, TQ_SLOT(digL()), actionCollection(), "dig_left"); // Alternate one-handed controls. Set up in "kgoldrunnerui.rc". @@ -463,31 +463,31 @@ void KGoldrunner::setupActions() // Authors' debugging aids. (void) new TDEAction (i18n("Step"), Key_Period, - game, TQT_SLOT(doStep()), actionCollection(), "do_step"); + game, TQ_SLOT(doStep()), actionCollection(), "do_step"); (void) new TDEAction (i18n("Test Bug Fix"), Key_B, - game, TQT_SLOT(bugFix()), actionCollection(), "bug_fix"); + game, TQ_SLOT(bugFix()), actionCollection(), "bug_fix"); (void) new TDEAction (i18n("Show Positions"), Key_D, - game, TQT_SLOT(showFigurePositions()), actionCollection(), "step"); + game, TQ_SLOT(showFigurePositions()), actionCollection(), "step"); (void) new TDEAction (i18n("Start Logging"), Key_G, - game, TQT_SLOT(startLogging()), actionCollection(), "logging"); + game, TQ_SLOT(startLogging()), actionCollection(), "logging"); (void) new TDEAction (i18n("Show Hero"), Key_H, - game, TQT_SLOT(showHeroState()), actionCollection(), "show_hero"); + game, TQ_SLOT(showHeroState()), actionCollection(), "show_hero"); (void) new TDEAction (i18n("Show Object"), Key_Question, - game, TQT_SLOT(showObjectState()), actionCollection(), "show_obj"); + game, TQ_SLOT(showObjectState()), actionCollection(), "show_obj"); (void) new TDEAction (i18n("Show Enemy") + "0", Key_0, - this, TQT_SLOT(showEnemy0()), actionCollection(), "show_enemy_0"); + this, TQ_SLOT(showEnemy0()), actionCollection(), "show_enemy_0"); (void) new TDEAction (i18n("Show Enemy") + "1", Key_1, - this, TQT_SLOT(showEnemy1()), actionCollection(), "show_enemy_1"); + this, TQ_SLOT(showEnemy1()), actionCollection(), "show_enemy_1"); (void) new TDEAction (i18n("Show Enemy") + "2", Key_2, - this, TQT_SLOT(showEnemy2()), actionCollection(), "show_enemy_2"); + this, TQ_SLOT(showEnemy2()), actionCollection(), "show_enemy_2"); (void) new TDEAction (i18n("Show Enemy") + "3", Key_3, - this, TQT_SLOT(showEnemy3()), actionCollection(), "show_enemy_3"); + this, TQ_SLOT(showEnemy3()), actionCollection(), "show_enemy_3"); (void) new TDEAction (i18n("Show Enemy") + "4", Key_4, - this, TQT_SLOT(showEnemy4()), actionCollection(), "show_enemy_4"); + this, TQ_SLOT(showEnemy4()), actionCollection(), "show_enemy_4"); (void) new TDEAction (i18n("Show Enemy") + "5", Key_5, - this, TQT_SLOT(showEnemy5()), actionCollection(), "show_enemy_5"); + this, TQ_SLOT(showEnemy5()), actionCollection(), "show_enemy_5"); (void) new TDEAction (i18n("Show Enemy") + "6", Key_6, - this, TQT_SLOT(showEnemy6()), actionCollection(), "show_enemy_6"); + this, TQ_SLOT(showEnemy6()), actionCollection(), "show_enemy_6"); #endif /**************************************************************************/ @@ -529,10 +529,10 @@ void KGoldrunner::initStatusBar() statusBar()->setItemFixed (ID_SCORE, -1); statusBar()->setItemFixed (ID_LEVEL, -1); - connect(game, TQT_SIGNAL (showLives (long)), TQT_SLOT (showLives (long))); - connect(game, TQT_SIGNAL (showScore (long)), TQT_SLOT (showScore (long))); - connect(game, TQT_SIGNAL (showLevel (int)), TQT_SLOT (showLevel (int))); - connect(game, TQT_SIGNAL (gameFreeze (bool)), TQT_SLOT (gameFreeze (bool))); + connect(game, TQ_SIGNAL (showLives (long)), TQ_SLOT (showLives (long))); + connect(game, TQ_SIGNAL (showScore (long)), TQ_SLOT (showScore (long))); + connect(game, TQ_SIGNAL (showLevel (int)), TQ_SLOT (showLevel (int))); + connect(game, TQ_SIGNAL (gameFreeze (bool)), TQ_SLOT (gameFreeze (bool))); } void KGoldrunner::showLives (long newLives) @@ -999,51 +999,51 @@ void KGoldrunner::makeEditToolbar() editToolbar->insertSeparator(); - editToolbar->insertButton ("document-new", 0, TQT_SIGNAL(clicked()), game, - TQT_SLOT(createLevel()), TRUE, i18n("&Create a Level")); - editToolbar->insertButton ("document-open", 1, TQT_SIGNAL(clicked()), game, - TQT_SLOT(updateLevel()), TRUE, i18n("&Edit Any Level...")); - editToolbar->insertButton ("document-save", 2, TQT_SIGNAL(clicked()), game, - TQT_SLOT(saveLevelFile()),TRUE, i18n("&Save Edits...")); + editToolbar->insertButton ("document-new", 0, TQ_SIGNAL(clicked()), game, + TQ_SLOT(createLevel()), TRUE, i18n("&Create a Level")); + editToolbar->insertButton ("document-open", 1, TQ_SIGNAL(clicked()), game, + TQ_SLOT(updateLevel()), TRUE, i18n("&Edit Any Level...")); + editToolbar->insertButton ("document-save", 2, TQ_SIGNAL(clicked()), game, + TQ_SLOT(saveLevelFile()),TRUE, i18n("&Save Edits...")); editToolbar->insertSeparator(); editToolbar->insertSeparator(); - editToolbar->insertButton ("ktip", 3, TQT_SIGNAL(clicked()), game, - TQT_SLOT(editNameAndHint()),TRUE,i18n("Edit Name/Hint")); + editToolbar->insertButton ("ktip", 3, TQ_SIGNAL(clicked()), game, + TQ_SLOT(editNameAndHint()),TRUE,i18n("Edit Name/Hint")); editToolbar->insertSeparator(); editToolbar->insertSeparator(); - editToolbar->insertButton (freebg, (int)FREE, TQT_SIGNAL(clicked()), this, - TQT_SLOT(freeSlot()), TRUE, i18n("Empty space")); + editToolbar->insertButton (freebg, (int)FREE, TQ_SIGNAL(clicked()), this, + TQ_SLOT(freeSlot()), TRUE, i18n("Empty space")); editToolbar->insertSeparator(); - editToolbar->insertButton (edherobg, (int)HERO, TQT_SIGNAL(clicked()), this, - TQT_SLOT (edheroSlot()), TRUE, i18n("Hero")); + editToolbar->insertButton (edherobg, (int)HERO, TQ_SIGNAL(clicked()), this, + TQ_SLOT (edheroSlot()), TRUE, i18n("Hero")); editToolbar->insertSeparator(); - editToolbar->insertButton (edenemybg, (int)ENEMY, TQT_SIGNAL(clicked()), this, - TQT_SLOT (edenemySlot()), TRUE, i18n("Enemy")); + editToolbar->insertButton (edenemybg, (int)ENEMY, TQ_SIGNAL(clicked()), this, + TQ_SLOT (edenemySlot()), TRUE, i18n("Enemy")); editToolbar->insertSeparator(); - editToolbar->insertButton (brickbg, (int)BRICK, TQT_SIGNAL(clicked()), this, - TQT_SLOT (brickSlot()), TRUE, i18n("Brick (can dig)")); + editToolbar->insertButton (brickbg, (int)BRICK, TQ_SIGNAL(clicked()), this, + TQ_SLOT (brickSlot()), TRUE, i18n("Brick (can dig)")); editToolbar->insertSeparator(); - editToolbar->insertButton (betonbg, (int)BETON, TQT_SIGNAL(clicked()), this, - TQT_SLOT (betonSlot()), TRUE, i18n("Concrete (cannot dig)")); + editToolbar->insertButton (betonbg, (int)BETON, TQ_SIGNAL(clicked()), this, + TQ_SLOT (betonSlot()), TRUE, i18n("Concrete (cannot dig)")); editToolbar->insertSeparator(); - editToolbar->insertButton (fbrickbg, (int)FBRICK, TQT_SIGNAL(clicked()), this, - TQT_SLOT (fbrickSlot()), TRUE, i18n("Trap (can fall through)")); + editToolbar->insertButton (fbrickbg, (int)FBRICK, TQ_SIGNAL(clicked()), this, + TQ_SLOT (fbrickSlot()), TRUE, i18n("Trap (can fall through)")); editToolbar->insertSeparator(); - editToolbar->insertButton (ladderbg, (int)LADDER, TQT_SIGNAL(clicked()), this, - TQT_SLOT (ladderSlot()), TRUE, i18n("Ladder")); + editToolbar->insertButton (ladderbg, (int)LADDER, TQ_SIGNAL(clicked()), this, + TQ_SLOT (ladderSlot()), TRUE, i18n("Ladder")); editToolbar->insertSeparator(); - editToolbar->insertButton (hladderbg, (int)HLADDER, TQT_SIGNAL(clicked()), this, - TQT_SLOT (hladderSlot()), TRUE, i18n("Hidden ladder")); + editToolbar->insertButton (hladderbg, (int)HLADDER, TQ_SIGNAL(clicked()), this, + TQ_SLOT (hladderSlot()), TRUE, i18n("Hidden ladder")); editToolbar->insertSeparator(); - editToolbar->insertButton (polebg, (int)POLE, TQT_SIGNAL(clicked()), this, - TQT_SLOT (poleSlot()), TRUE, i18n("Pole (or bar)")); + editToolbar->insertButton (polebg, (int)POLE, TQ_SIGNAL(clicked()), this, + TQ_SLOT (poleSlot()), TRUE, i18n("Pole (or bar)")); editToolbar->insertSeparator(); - editToolbar->insertButton (nuggetbg, (int)NUGGET, TQT_SIGNAL(clicked()), this, - TQT_SLOT (nuggetSlot()), TRUE, i18n("Gold nugget")); + editToolbar->insertButton (nuggetbg, (int)NUGGET, TQ_SIGNAL(clicked()), this, + TQ_SLOT (nuggetSlot()), TRUE, i18n("Gold nugget")); editToolbar->setToggle ((int) FREE, TRUE); editToolbar->setToggle ((int) HERO, TRUE); |