diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:12:46 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-02-01 15:12:46 -0600 |
commit | 58a97ed3af5e4df6c4a58d043b0c267bd97056a9 (patch) | |
tree | 5a2fde6842fd422cae2d8670d382be965098cc32 /kgoldrunner/src | |
parent | 2ce15ee76fd2d9d18a63c035a0f5b00b94c60cdc (diff) | |
download | tdegames-58a97ed3af5e4df6c4a58d043b0c267bd97056a9.tar.gz tdegames-58a97ed3af5e4df6c4a58d043b0c267bd97056a9.zip |
Rename a number of classes to enhance compatibility with KDE4
Diffstat (limited to 'kgoldrunner/src')
-rw-r--r-- | kgoldrunner/src/kgoldrunner.cpp | 106 | ||||
-rw-r--r-- | kgoldrunner/src/kgoldrunner.h | 38 |
2 files changed, 72 insertions, 72 deletions
diff --git a/kgoldrunner/src/kgoldrunner.cpp b/kgoldrunner/src/kgoldrunner.cpp index f793af47..b7a31d78 100644 --- a/kgoldrunner/src/kgoldrunner.cpp +++ b/kgoldrunner/src/kgoldrunner.cpp @@ -34,7 +34,7 @@ #include "kgoldrunner.h" KGoldrunner::KGoldrunner() - : KMainWindow (0, "KGoldrunner"), + : TDEMainWindow (0, "KGoldrunner"), view (new KGrCanvas (this)) { /******************************************************************************/ @@ -78,7 +78,7 @@ KGoldrunner::KGoldrunner() // Get catalog for translation TDEGlobal::locale()->insertCatalogue("libtdegames"); - // Tell the KMainWindow that this is the main widget + // Tell the TDEMainWindow that this is the main widget setCentralWidget (view); // Set up our actions (menu, toolbar and keystrokes) ... @@ -154,21 +154,21 @@ void KGoldrunner::setupActions() // Tutorial // -------------------------- - KAction * newAction = KStdGameAction:: + TDEAction * newAction = KStdGameAction:: gameNew ( game, TQT_SLOT(startLevelOne()), actionCollection()); newAction-> setText (i18n("&New Game...")); - KAction * loadGame = KStdGameAction:: + TDEAction * loadGame = KStdGameAction:: load ( game, TQT_SLOT(loadGame()), actionCollection()); loadGame-> setText (i18n("&Load Saved Game...")); - (void) new KAction ( + (void) new TDEAction ( i18n("&Play Any Level..."), 0, game, TQT_SLOT(startAnyLevel()), actionCollection(), "play_any"); - (void) new KAction ( + (void) new TDEAction ( i18n("Play &Next Level..."), 0, game, @@ -198,12 +198,12 @@ void KGoldrunner::setupActions() highScore = KStdGameAction:: highscores ( game, TQT_SLOT(showHighScores()), actionCollection()); - hintAction = new KAction ( + hintAction = new TDEAction ( i18n("&Get Hint"), "ktip", 0, game, TQT_SLOT(showHint()), actionCollection(), "get_hint"); - killHero = new KAction ( + killHero = new TDEAction ( i18n("&Kill Hero"), Key_Q, game, TQT_SLOT(herosDead()), actionCollection(), @@ -225,17 +225,17 @@ void KGoldrunner::setupActions() // Edit Next Level... // -------------------------- - (void) new KAction ( + (void) new TDEAction ( i18n("&Create Level"), 0, TQT_TQOBJECT(game), TQT_SLOT(createLevel()), actionCollection(), "create"); - (void) new KAction ( + (void) new TDEAction ( i18n("&Edit Any Level..."), 0, TQT_TQOBJECT(game), TQT_SLOT(updateLevel()), actionCollection(), "edit_any"); - (void) new KAction ( + (void) new TDEAction ( i18n("Edit &Next Level..."), 0, TQT_TQOBJECT(game), TQT_SLOT(updateNext()), actionCollection(), @@ -246,19 +246,19 @@ void KGoldrunner::setupActions() // Delete Level... // -------------------------- - saveEdits = new KAction ( + saveEdits = new TDEAction ( i18n("&Save Edits..."), 0, TQT_TQOBJECT(game), TQT_SLOT(saveLevelFile()), actionCollection(), "save_edits"); saveEdits->setEnabled (FALSE); // Nothing to save, yet. - (void) new KAction ( + (void) new TDEAction ( i18n("&Move Level..."), 0, TQT_TQOBJECT(game), TQT_SLOT(moveLevelFile()), actionCollection(), "move_level"); - (void) new KAction ( + (void) new TDEAction ( i18n("&Delete Level..."), 0, TQT_TQOBJECT(game), @@ -269,12 +269,12 @@ void KGoldrunner::setupActions() // Edit Game Info... // -------------------------- - (void) new KAction ( + (void) new TDEAction ( i18n("Create Game..."), 0, TQT_TQOBJECT(this), TQT_SLOT(createGame()), actionCollection(), "create_game"); - (void) new KAction ( + (void) new TDEAction ( i18n("Edit Game Info..."), 0, TQT_TQOBJECT(this), @@ -287,27 +287,27 @@ void KGoldrunner::setupActions() // Default shortcut keys are set by "kgoldrunnerui.rc". - setKGoldrunner = new KRadioAction ( + setKGoldrunner = new TDERadioAction ( "K&Goldrunner", 0, // Default Shift+G TQT_TQOBJECT(this), TQT_SLOT(lsKGoldrunner()), actionCollection(), "kgoldrunner"); - setAppleII = new KRadioAction ( + setAppleII = new TDERadioAction ( "&Apple II", 0, // Default Shift+A TQT_TQOBJECT(this), TQT_SLOT(lsApple2()), actionCollection(), "apple_2"); - setIceCave = new KRadioAction ( + setIceCave = new TDERadioAction ( i18n("&Ice Cave"), 0, // Default Shift+I TQT_TQOBJECT(this), TQT_SLOT(lsIceCave()), actionCollection(), "ice_cave"); - setMidnight = new KRadioAction ( + setMidnight = new TDERadioAction ( i18n("&Midnight"), 0, // Default Shift+M TQT_TQOBJECT(this), TQT_SLOT(lsMidnight()), actionCollection(), "midnight"); - setKDEKool = new KRadioAction ( + setKDEKool = new TDERadioAction ( i18n("&TDE Kool"), 0, // Default Shift+K TQT_TQOBJECT(this), TQT_SLOT(lsKDEKool()), actionCollection(), @@ -328,13 +328,13 @@ void KGoldrunner::setupActions() // Keyboard Controls Hero // -------------------------- - setMouse = new KRadioAction ( + setMouse = new TDERadioAction ( i18n("&Mouse Controls Hero"), 0, TQT_TQOBJECT(this), TQT_SLOT(setMouseMode()), actionCollection(), "mouse_mode"); - setKeyboard = new KRadioAction ( + setKeyboard = new TDERadioAction ( i18n("&Keyboard Controls Hero"), 0, TQT_TQOBJECT(this), @@ -352,27 +352,27 @@ void KGoldrunner::setupActions() // Decrease Speed // -------------------------- - KRadioAction * nSpeed = new KRadioAction ( + TDERadioAction * nSpeed = new TDERadioAction ( i18n("Normal Speed"), 0, TQT_TQOBJECT(this), TQT_SLOT(normalSpeed()), actionCollection(), "normal_speed"); - KRadioAction * bSpeed = new KRadioAction ( + TDERadioAction * bSpeed = new TDERadioAction ( i18n("Beginner Speed"), 0, TQT_TQOBJECT(this), TQT_SLOT(beginSpeed()), actionCollection(), "beginner_speed"); - KRadioAction * cSpeed = new KRadioAction ( + TDERadioAction * cSpeed = new TDERadioAction ( i18n("Champion Speed"), 0, TQT_TQOBJECT(this), TQT_SLOT(champSpeed()), actionCollection(), "champion_speed"); - (void) new KAction ( // Repeatable action. + (void) new TDEAction ( // Repeatable action. i18n("Increase Speed"), Key_Plus, TQT_TQOBJECT(this), TQT_SLOT(incSpeed()), actionCollection(), "increase_speed"); - (void) new KAction ( // Repeatable action. + (void) new TDEAction ( // Repeatable action. i18n("Decrease Speed"), Key_Minus, TQT_TQOBJECT(this), TQT_SLOT(decSpeed()), actionCollection(), @@ -387,12 +387,12 @@ void KGoldrunner::setupActions() // KGoldrunner Rules // -------------------------- - tradRules = new KRadioAction ( + tradRules = new TDERadioAction ( i18n("&Traditional Rules"), 0, TQT_TQOBJECT(this), TQT_SLOT(setTradRules()), actionCollection(), "trad_rules"); - kgrRules = new KRadioAction ( + kgrRules = new TDERadioAction ( i18n("K&Goldrunner Rules"), 0, TQT_TQOBJECT(this), TQT_SLOT(setKGrRules()), actionCollection(), @@ -406,12 +406,12 @@ void KGoldrunner::setupActions() // Smaller Playing Area // -------------------------- - (void) new KAction ( + (void) new TDEAction ( i18n("Larger Playing Area"), 0, TQT_TQOBJECT(this), TQT_SLOT(makeLarger()), actionCollection(), "larger_area"); - (void) new KAction ( + (void) new TDEAction ( i18n("Smaller Playing Area"), 0, TQT_TQOBJECT(this), TQT_SLOT(makeSmaller()), actionCollection(), @@ -434,19 +434,19 @@ void KGoldrunner::setupActions() // Two-handed KB controls and alternate one-handed controls for the hero. - (void) new KAction (i18n("Move Up"), Key_Up, + (void) new TDEAction (i18n("Move Up"), Key_Up, TQT_TQOBJECT(this), TQT_SLOT(goUp()), actionCollection(), "move_up"); - (void) new KAction (i18n("Move Right"), Key_Right, + (void) new TDEAction (i18n("Move Right"), Key_Right, TQT_TQOBJECT(this), TQT_SLOT(goR()), actionCollection(), "move_right"); - (void) new KAction (i18n("Move Down"), Key_Down, + (void) new TDEAction (i18n("Move Down"), Key_Down, TQT_TQOBJECT(this), TQT_SLOT(goDown()), actionCollection(), "move_down"); - (void) new KAction (i18n("Move Left"), Key_Left, + (void) new TDEAction (i18n("Move Left"), Key_Left, TQT_TQOBJECT(this), TQT_SLOT(goL()), actionCollection(), "move_left"); - (void) new KAction (i18n("Stop"), Key_Space, + (void) new TDEAction (i18n("Stop"), Key_Space, TQT_TQOBJECT(this), TQT_SLOT(stop()), actionCollection(), "stop"); - (void) new KAction (i18n("Dig Right"), Key_C, + (void) new TDEAction (i18n("Dig Right"), Key_C, TQT_TQOBJECT(this), TQT_SLOT(digR()), actionCollection(), "dig_right"); - (void) new KAction (i18n("Dig Left"), Key_Z, + (void) new TDEAction (i18n("Dig Left"), Key_Z, TQT_TQOBJECT(this), TQT_SLOT(digL()), actionCollection(), "dig_left"); // Alternate one-handed controls. Set up in "kgoldrunnerui.rc". @@ -462,31 +462,31 @@ void KGoldrunner::setupActions() #ifdef KGR_DEBUG // Authors' debugging aids. - (void) new KAction (i18n("Step"), Key_Period, + (void) new TDEAction (i18n("Step"), Key_Period, game, TQT_SLOT(doStep()), actionCollection(), "do_step"); - (void) new KAction (i18n("Test Bug Fix"), Key_B, + (void) new TDEAction (i18n("Test Bug Fix"), Key_B, game, TQT_SLOT(bugFix()), actionCollection(), "bug_fix"); - (void) new KAction (i18n("Show Positions"), Key_D, + (void) new TDEAction (i18n("Show Positions"), Key_D, game, TQT_SLOT(showFigurePositions()), actionCollection(), "step"); - (void) new KAction (i18n("Start Logging"), Key_G, + (void) new TDEAction (i18n("Start Logging"), Key_G, game, TQT_SLOT(startLogging()), actionCollection(), "logging"); - (void) new KAction (i18n("Show Hero"), Key_H, + (void) new TDEAction (i18n("Show Hero"), Key_H, game, TQT_SLOT(showHeroState()), actionCollection(), "show_hero"); - (void) new KAction (i18n("Show Object"), Key_Question, + (void) new TDEAction (i18n("Show Object"), Key_Question, game, TQT_SLOT(showObjectState()), actionCollection(), "show_obj"); - (void) new KAction (i18n("Show Enemy") + "0", Key_0, + (void) new TDEAction (i18n("Show Enemy") + "0", Key_0, this, TQT_SLOT(showEnemy0()), actionCollection(), "show_enemy_0"); - (void) new KAction (i18n("Show Enemy") + "1", Key_1, + (void) new TDEAction (i18n("Show Enemy") + "1", Key_1, this, TQT_SLOT(showEnemy1()), actionCollection(), "show_enemy_1"); - (void) new KAction (i18n("Show Enemy") + "2", Key_2, + (void) new TDEAction (i18n("Show Enemy") + "2", Key_2, this, TQT_SLOT(showEnemy2()), actionCollection(), "show_enemy_2"); - (void) new KAction (i18n("Show Enemy") + "3", Key_3, + (void) new TDEAction (i18n("Show Enemy") + "3", Key_3, this, TQT_SLOT(showEnemy3()), actionCollection(), "show_enemy_3"); - (void) new KAction (i18n("Show Enemy") + "4", Key_4, + (void) new TDEAction (i18n("Show Enemy") + "4", Key_4, this, TQT_SLOT(showEnemy4()), actionCollection(), "show_enemy_4"); - (void) new KAction (i18n("Show Enemy") + "5", Key_5, + (void) new TDEAction (i18n("Show Enemy") + "5", Key_5, this, TQT_SLOT(showEnemy5()), actionCollection(), "show_enemy_5"); - (void) new KAction (i18n("Show Enemy") + "6", Key_6, + (void) new TDEAction (i18n("Show Enemy") + "6", Key_6, this, TQT_SLOT(showEnemy6()), actionCollection(), "show_enemy_6"); #endif @@ -987,7 +987,7 @@ void KGoldrunner::makeEditToolbar() edenemybg = edenemybg.xForm (w); } - editToolbar = new KToolBar (this, TQt::DockTop, TRUE, "Editor", TRUE); + editToolbar = new TDEToolBar (this, TQt::DockTop, TRUE, "Editor", TRUE); // Choose a colour that enhances visibility of the KGoldrunner pixmaps. // editToolbar->setPalette (TQPalette (TQColor (150, 150, 230))); diff --git a/kgoldrunner/src/kgoldrunner.h b/kgoldrunner/src/kgoldrunner.h index e498c570..d96fd707 100644 --- a/kgoldrunner/src/kgoldrunner.h +++ b/kgoldrunner/src/kgoldrunner.h @@ -37,7 +37,7 @@ class KGrHero; * @author $AUTHOR <$EMAIL> * @version $APP_VERSION */ -class KGoldrunner : public KMainWindow +class KGoldrunner : public TDEMainWindow { Q_OBJECT @@ -161,35 +161,35 @@ private: TQString systemDataDir; // Where the system levels are stored. TQString userDataDir; // Where the user levels are stored. - KAction * saveGame; // Save game, level, lives and score. + TDEAction * saveGame; // Save game, level, lives and score. - KAction * myPause; // Pause or resume the game. + TDEAction * myPause; // Pause or resume the game. TQString pauseKeys; // Keystroke names to put in status bar. - KAction * hintAction; // Display a hint, if available. - KAction * killHero; // Kill hero (disabled during edits). - KAction * highScore; // High scores (disabled during edits). + TDEAction * hintAction; // Display a hint, if available. + TDEAction * killHero; // Kill hero (disabled during edits). + TDEAction * highScore; // High scores (disabled during edits). - KAction * saveEdits; // Save a level that has been edited. + TDEAction * saveEdits; // Save a level that has been edited. - KRadioAction * setKGoldrunner; // Show default "KGoldrunner" landscape. - KRadioAction * setAppleII; // Show "Apple II" landscape. - KRadioAction * setIceCave; // Show "Ice Cave" landscape. - KRadioAction * setMidnight; // Show "Midnight" landscape. - KRadioAction * setKDEKool; // Show "KDE Kool" landscape. + TDERadioAction * setKGoldrunner; // Show default "KGoldrunner" landscape. + TDERadioAction * setAppleII; // Show "Apple II" landscape. + TDERadioAction * setIceCave; // Show "Ice Cave" landscape. + TDERadioAction * setMidnight; // Show "Midnight" landscape. + TDERadioAction * setKDEKool; // Show "KDE Kool" landscape. - KRadioAction * setMouse; // Show mouse/keyboard mode on menu. - KRadioAction * setKeyboard; // Show mouse/keyboard mode on menu. + TDERadioAction * setMouse; // Show mouse/keyboard mode on menu. + TDERadioAction * setKeyboard; // Show mouse/keyboard mode on menu. - KRadioAction * tradRules; // Set Traditional rules. - KRadioAction * kgrRules; // Set KGoldrunner rules. + TDERadioAction * tradRules; // Set Traditional rules. + TDERadioAction * kgrRules; // Set KGoldrunner rules. KGrHero * hero; // Pointer to the hero. - // KToggleAction * m_toolbarAction; - // KToggleAction * m_statusbarAction; + // TDEToggleAction * m_toolbarAction; + // TDEToggleAction * m_statusbarAction; - KToolBar * editToolbar; // Toolbar for creating/editing levels. + TDEToolBar * editToolbar; // Toolbar for creating/editing levels. int pressedButton; // ID of currently set toolbar button. private slots: |