diff options
Diffstat (limited to 'kgoldrunner/src/kgoldrunner.cpp')
-rw-r--r-- | kgoldrunner/src/kgoldrunner.cpp | 112 |
1 files changed, 56 insertions, 56 deletions
diff --git a/kgoldrunner/src/kgoldrunner.cpp b/kgoldrunner/src/kgoldrunner.cpp index 13300f9e..7d5676c5 100644 --- a/kgoldrunner/src/kgoldrunner.cpp +++ b/kgoldrunner/src/kgoldrunner.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2003 Ian Wadham and Marco Krüger <ianw2@optusnet.com.au> + * Copyright (C) 2003 Ian Wadham and Marco Kr�ger <ianw2@optusnet.com.au> */ #include <kprinter.h> @@ -130,7 +130,7 @@ KGoldrunner::KGoldrunner() show(); // Force the main widget to appear before the "Start Game" dialog does. - qApp->processEvents(); + tqApp->processEvents(); // Call the "Start Game" function and pop up the "Start Game" dialog. game->startLevelOne(); @@ -193,7 +193,7 @@ void KGoldrunner::setupActions() myPause = KStdGameAction:: pause ( - this, TQT_SLOT(stopStart()), actionCollection()); + TQT_TQOBJECT(this), TQT_SLOT(stopStart()), actionCollection()); myPause-> setShortcut (Key_Escape); // Alternate key. highScore = KStdGameAction:: highscores ( @@ -214,7 +214,7 @@ void KGoldrunner::setupActions() (void) KStdGameAction:: quit ( - this, TQT_SLOT(close()), actionCollection()); + TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection()); /**************************************************************************/ /*************************** GAME EDITOR MENU **************************/ @@ -228,17 +228,17 @@ void KGoldrunner::setupActions() (void) new KAction ( i18n("&Create Level"), 0, - game, TQT_SLOT(createLevel()), actionCollection(), + TQT_TQOBJECT(game), TQT_SLOT(createLevel()), actionCollection(), "create"); (void) new KAction ( i18n("&Edit Any Level..."), 0, - game, TQT_SLOT(updateLevel()), actionCollection(), + TQT_TQOBJECT(game), TQT_SLOT(updateLevel()), actionCollection(), "edit_any"); (void) new KAction ( i18n("Edit &Next Level..."), 0, - game, TQT_SLOT(updateNext()), actionCollection(), + TQT_TQOBJECT(game), TQT_SLOT(updateNext()), actionCollection(), "edit_next"); // Save Edits... @@ -249,19 +249,19 @@ void KGoldrunner::setupActions() saveEdits = new KAction ( i18n("&Save Edits..."), 0, - game, TQT_SLOT(saveLevelFile()), actionCollection(), + TQT_TQOBJECT(game), TQT_SLOT(saveLevelFile()), actionCollection(), "save_edits"); saveEdits->setEnabled (FALSE); // Nothing to save, yet. (void) new KAction ( i18n("&Move Level..."), 0, - game, TQT_SLOT(moveLevelFile()), actionCollection(), + TQT_TQOBJECT(game), TQT_SLOT(moveLevelFile()), actionCollection(), "move_level"); (void) new KAction ( i18n("&Delete Level..."), 0, - game, + TQT_TQOBJECT(game), TQT_SLOT(deleteLevelFile()), actionCollection(), "delete_level"); @@ -272,12 +272,12 @@ void KGoldrunner::setupActions() (void) new KAction ( i18n("Create Game..."), 0, - this, TQT_SLOT(createGame()), actionCollection(), + TQT_TQOBJECT(this), TQT_SLOT(createGame()), actionCollection(), "create_game"); (void) new KAction ( i18n("Edit Game Info..."), 0, - this, + TQT_TQOBJECT(this), TQT_SLOT(editGameInfo()), actionCollection(), "edit_game"); @@ -290,27 +290,27 @@ void KGoldrunner::setupActions() setKGoldrunner = new KRadioAction ( "K&Goldrunner", 0, // Default Shift+G - this, TQT_SLOT(lsKGoldrunner()), actionCollection(), + TQT_TQOBJECT(this), TQT_SLOT(lsKGoldrunner()), actionCollection(), "kgoldrunner"); setAppleII = new KRadioAction ( "&Apple II", 0, // Default Shift+A - this, TQT_SLOT(lsApple2()), actionCollection(), + TQT_TQOBJECT(this), TQT_SLOT(lsApple2()), actionCollection(), "apple_2"); setIceCave = new KRadioAction ( i18n("&Ice Cave"), 0, // Default Shift+I - this, TQT_SLOT(lsIceCave()), actionCollection(), + TQT_TQOBJECT(this), TQT_SLOT(lsIceCave()), actionCollection(), "ice_cave"); setMidnight = new KRadioAction ( i18n("&Midnight"), 0, // Default Shift+M - this, TQT_SLOT(lsMidnight()), actionCollection(), + TQT_TQOBJECT(this), TQT_SLOT(lsMidnight()), actionCollection(), "midnight"); setKDEKool = new KRadioAction ( i18n("&KDE Kool"), 0, // Default Shift+K - this, TQT_SLOT(lsKDEKool()), actionCollection(), + TQT_TQOBJECT(this), TQT_SLOT(lsKDEKool()), actionCollection(), "kde_kool"); setKGoldrunner-> setExclusiveGroup ("landscapes"); @@ -331,13 +331,13 @@ void KGoldrunner::setupActions() setMouse = new KRadioAction ( i18n("&Mouse Controls Hero"), 0, - this, + TQT_TQOBJECT(this), TQT_SLOT(setMouseMode()), actionCollection(), "mouse_mode"); setKeyboard = new KRadioAction ( i18n("&Keyboard Controls Hero"), 0, - this, + TQT_TQOBJECT(this), TQT_SLOT(setKeyBoardMode()), actionCollection(), "keyboard_mode"); @@ -355,27 +355,27 @@ void KGoldrunner::setupActions() KRadioAction * nSpeed = new KRadioAction ( i18n("Normal Speed"), 0, - this, TQT_SLOT(normalSpeed()), actionCollection(), + TQT_TQOBJECT(this), TQT_SLOT(normalSpeed()), actionCollection(), "normal_speed"); KRadioAction * bSpeed = new KRadioAction ( i18n("Beginner Speed"), 0, - this, TQT_SLOT(beginSpeed()), actionCollection(), + TQT_TQOBJECT(this), TQT_SLOT(beginSpeed()), actionCollection(), "beginner_speed"); KRadioAction * cSpeed = new KRadioAction ( i18n("Champion Speed"), 0, - this, TQT_SLOT(champSpeed()), actionCollection(), + TQT_TQOBJECT(this), TQT_SLOT(champSpeed()), actionCollection(), "champion_speed"); (void) new KAction ( // Repeatable action. i18n("Increase Speed"), Key_Plus, - this, TQT_SLOT(incSpeed()), actionCollection(), + TQT_TQOBJECT(this), TQT_SLOT(incSpeed()), actionCollection(), "increase_speed"); (void) new KAction ( // Repeatable action. i18n("Decrease Speed"), Key_Minus, - this, TQT_SLOT(decSpeed()), actionCollection(), + TQT_TQOBJECT(this), TQT_SLOT(decSpeed()), actionCollection(), "decrease_speed"); nSpeed-> setExclusiveGroup ("speed"); @@ -390,12 +390,12 @@ void KGoldrunner::setupActions() tradRules = new KRadioAction ( i18n("&Traditional Rules"), 0, - this, TQT_SLOT(setTradRules()), actionCollection(), + TQT_TQOBJECT(this), TQT_SLOT(setTradRules()), actionCollection(), "trad_rules"); kgrRules = new KRadioAction ( i18n("K&Goldrunner Rules"), 0, - this, TQT_SLOT(setKGrRules()), actionCollection(), + TQT_TQOBJECT(this), TQT_SLOT(setKGrRules()), actionCollection(), "kgr_rules"); tradRules-> setExclusiveGroup ("rules"); @@ -409,12 +409,12 @@ void KGoldrunner::setupActions() (void) new KAction ( i18n("Larger Playing Area"), 0, - this, TQT_SLOT(makeLarger()), actionCollection(), + TQT_TQOBJECT(this), TQT_SLOT(makeLarger()), actionCollection(), "larger_area"); (void) new KAction ( i18n("Smaller Playing Area"), 0, - this, TQT_SLOT(makeSmaller()), actionCollection(), + TQT_TQOBJECT(this), TQT_SLOT(makeSmaller()), actionCollection(), "smaller_area"); // Configure Shortcuts... @@ -422,7 +422,7 @@ void KGoldrunner::setupActions() // -------------------------- KStdAction::keyBindings ( - this, TQT_SLOT(optionsConfigureKeys()), + TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureKeys()), actionCollection()); // KStdAction::configureToolbars ( // this, TQT_SLOT(optionsConfigureToolbars()), @@ -435,19 +435,19 @@ void KGoldrunner::setupActions() // Two-handed KB controls and alternate one-handed controls for the hero. (void) new KAction (i18n("Move Up"), Key_Up, - this, TQT_SLOT(goUp()), actionCollection(), "move_up"); + TQT_TQOBJECT(this), TQT_SLOT(goUp()), actionCollection(), "move_up"); (void) new KAction (i18n("Move Right"), Key_Right, - this, TQT_SLOT(goR()), actionCollection(), "move_right"); + TQT_TQOBJECT(this), TQT_SLOT(goR()), actionCollection(), "move_right"); (void) new KAction (i18n("Move Down"), Key_Down, - this, TQT_SLOT(goDown()), actionCollection(), "move_down"); + TQT_TQOBJECT(this), TQT_SLOT(goDown()), actionCollection(), "move_down"); (void) new KAction (i18n("Move Left"), Key_Left, - this, TQT_SLOT(goL()), actionCollection(), "move_left"); + TQT_TQOBJECT(this), TQT_SLOT(goL()), actionCollection(), "move_left"); (void) new KAction (i18n("Stop"), Key_Space, - this, TQT_SLOT(stop()), actionCollection(), "stop"); + TQT_TQOBJECT(this), TQT_SLOT(stop()), actionCollection(), "stop"); (void) new KAction (i18n("Dig Right"), Key_C, - this, TQT_SLOT(digR()), actionCollection(), "dig_right"); + TQT_TQOBJECT(this), TQT_SLOT(digR()), actionCollection(), "dig_right"); (void) new KAction (i18n("Dig Left"), Key_Z, - this, TQT_SLOT(digL()), actionCollection(), "dig_left"); + TQT_TQOBJECT(this), TQT_SLOT(digL()), actionCollection(), "dig_left"); // Alternate one-handed controls. Set up in "kgoldrunnerui.rc". @@ -522,7 +522,7 @@ void KGoldrunner::initStatusBar() // Set the PAUSE/RESUME key-names into the status bar message. pauseKeys = myPause->shortcut().toString(); - pauseKeys = pauseKeys.replace (';', "\" " + i18n("or") + " \""); + pauseKeys = pauseKeys.tqreplace (';', "\" " + i18n("or") + " \""); gameFreeze (FALSE); statusBar()->setItemFixed (ID_LIVES, -1); // Fix current sizes. @@ -572,10 +572,10 @@ void KGoldrunner::gameFreeze (bool on_off) { if (on_off) statusBar()->changeItem - (i18n("Press \"%1\" to RESUME").arg(pauseKeys), ID_MSG); + (i18n("Press \"%1\" to RESUME").tqarg(pauseKeys), ID_MSG); else statusBar()->changeItem - (i18n("Press \"%1\" to PAUSE").arg(pauseKeys), ID_MSG); + (i18n("Press \"%1\" to PAUSE").tqarg(pauseKeys), ID_MSG); } void KGoldrunner::adjustHintAction (bool hintAvailable) @@ -760,7 +760,7 @@ void KGoldrunner::optionsConfigureKeys() // Update the PAUSE/RESUME message in the status bar. pauseKeys = myPause->shortcut().toString(); - pauseKeys = pauseKeys.replace (';', "\" " + i18n("or") + " \""); + pauseKeys = pauseKeys.tqreplace (';', "\" " + i18n("or") + " \""); gameFreeze (KGrObject::frozen); // Refresh the status bar text. } @@ -849,7 +849,7 @@ bool KGoldrunner::getDirectories() KGrMessage::information (this, i18n("Get Folders"), i18n("Cannot find documentation sub-folder 'en/%1/' " "in area '%2' of the KDE folder ($KDEDIRS).") - .arg(myDir).arg(dirs->kde_default ("html"))); + .tqarg(myDir).tqarg(dirs->kde_default ("html"))); // result = FALSE; // Don't abort if the doc is missing. } else @@ -861,7 +861,7 @@ bool KGoldrunner::getDirectories() KGrMessage::information (this, i18n("Get Folders"), i18n("Cannot find system games sub-folder '%1/system/' " "in area '%2' of the KDE folder ($KDEDIRS).") - .arg(myDir).arg(dirs->kde_default ("data"))); + .tqarg(myDir).tqarg(dirs->kde_default ("data"))); result = FALSE; // ABORT if the games data is missing. } else @@ -874,7 +874,7 @@ bool KGoldrunner::getDirectories() KGrMessage::information (this, i18n("Get Folders"), i18n("Cannot find or create user games sub-folder '%1/user/' " "in area '%2' of the KDE user area ($KDEHOME).") - .arg(myDir).arg(dirs->kde_default ("data"))); + .tqarg(myDir).tqarg(dirs->kde_default ("data"))); // result = FALSE; // Don't abort if user area is missing. } else { @@ -882,7 +882,7 @@ bool KGoldrunner::getDirectories() if (! create) { KGrMessage::information (this, i18n("Get Folders"), i18n("Cannot find or create 'levels/' folder in " - "sub-folder '%1/user/' in the KDE user area ($KDEHOME).").arg(myDir)); + "sub-folder '%1/user/' in the KDE user area ($KDEHOME).").tqarg(myDir)); // result = FALSE; // Don't abort if user area is missing. } } @@ -987,7 +987,7 @@ void KGoldrunner::makeEditToolbar() edenemybg = edenemybg.xForm (w); } - editToolbar = new KToolBar (this, Qt::DockTop, TRUE, "Editor", TRUE); + editToolbar = new KToolBar (this, TQt::DockTop, TRUE, "Editor", TRUE); // Choose a colour that enhances visibility of the KGoldrunner pixmaps. // editToolbar->setPalette (TQPalette (TQColor (150, 150, 230))); @@ -995,7 +995,7 @@ void KGoldrunner::makeEditToolbar() // editToolbar->setHorizontallyStretchable (TRUE); // Not effective in KDE. // All those separators are just to get reasonable visual spacing of the - // pixmaps in KDE. "setHorizontallyStretchable(TRUE)" does it in Qt. + // pixmaps in KDE. "setHorizontallyStretchable(TRUE)" does it in TQt. editToolbar->insertSeparator(); @@ -1015,34 +1015,34 @@ void KGoldrunner::makeEditToolbar() editToolbar->insertSeparator(); editToolbar->insertSeparator(); - editToolbar->insertButton (freebg, (int)FREE, TQT_SIGNAL(clicked()), this, + editToolbar->insertButton (freebg, (int)FREE, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(freeSlot()), TRUE, i18n("Empty space")); editToolbar->insertSeparator(); - editToolbar->insertButton (edherobg, (int)HERO, TQT_SIGNAL(clicked()), this, + editToolbar->insertButton (edherobg, (int)HERO, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT (edheroSlot()), TRUE, i18n("Hero")); editToolbar->insertSeparator(); - editToolbar->insertButton (edenemybg, (int)ENEMY, TQT_SIGNAL(clicked()), this, + editToolbar->insertButton (edenemybg, (int)ENEMY, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT (edenemySlot()), TRUE, i18n("Enemy")); editToolbar->insertSeparator(); - editToolbar->insertButton (brickbg, (int)BRICK, TQT_SIGNAL(clicked()), this, + editToolbar->insertButton (brickbg, (int)BRICK, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT (brickSlot()), TRUE, i18n("Brick (can dig)")); editToolbar->insertSeparator(); - editToolbar->insertButton (betonbg, (int)BETON, TQT_SIGNAL(clicked()), this, + editToolbar->insertButton (betonbg, (int)BETON, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT (betonSlot()), TRUE, i18n("Concrete (cannot dig)")); editToolbar->insertSeparator(); - editToolbar->insertButton (fbrickbg, (int)FBRICK, TQT_SIGNAL(clicked()), this, + editToolbar->insertButton (fbrickbg, (int)FBRICK, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT (fbrickSlot()), TRUE, i18n("Trap (can fall through)")); editToolbar->insertSeparator(); - editToolbar->insertButton (ladderbg, (int)LADDER, TQT_SIGNAL(clicked()), this, + editToolbar->insertButton (ladderbg, (int)LADDER, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT (ladderSlot()), TRUE, i18n("Ladder")); editToolbar->insertSeparator(); - editToolbar->insertButton (hladderbg, (int)HLADDER, TQT_SIGNAL(clicked()), this, + editToolbar->insertButton (hladderbg, (int)HLADDER, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT (hladderSlot()), TRUE, i18n("Hidden ladder")); editToolbar->insertSeparator(); - editToolbar->insertButton (polebg, (int)POLE, TQT_SIGNAL(clicked()), this, + editToolbar->insertButton (polebg, (int)POLE, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT (poleSlot()), TRUE, i18n("Pole (or bar)")); editToolbar->insertSeparator(); - editToolbar->insertButton (nuggetbg, (int)NUGGET, TQT_SIGNAL(clicked()), this, + editToolbar->insertButton (nuggetbg, (int)NUGGET, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT (nuggetSlot()), TRUE, i18n("Gold nugget")); editToolbar->setToggle ((int) FREE, TRUE); |