summaryrefslogtreecommitdiffstats
path: root/kolf
diff options
context:
space:
mode:
Diffstat (limited to 'kolf')
-rw-r--r--kolf/game.cpp2
-rw-r--r--kolf/kolf.cpp108
2 files changed, 55 insertions, 55 deletions
diff --git a/kolf/game.cpp b/kolf/game.cpp
index e29e9932..d2b61221 100644
--- a/kolf/game.cpp
+++ b/kolf/game.cpp
@@ -2202,7 +2202,7 @@ KolfGame::KolfGame(ObjectList *obj, PlayerList *players, TQString filename, TQWi
setMargins(margin, margin, margin, margin);
- course = new TQCanvas(TQT_TQOBJECT(this));
+ course = new TQCanvas(this);
course->setBackgroundColor(white);
course->resize(width, height);
diff --git a/kolf/kolf.cpp b/kolf/kolf.cpp
index a68a1c9e..7151a197 100644
--- a/kolf/kolf.cpp
+++ b/kolf/kolf.cpp
@@ -79,75 +79,75 @@ Kolf::~Kolf()
void Kolf::initGUI()
{
- newAction = KStdGameAction::gameNew(TQT_TQOBJECT(this), TQT_SLOT(newGame()), actionCollection());
+ newAction = KStdGameAction::gameNew(this, TQT_SLOT(newGame()), actionCollection());
newAction->setText(newAction->text() + TQString("..."));
- endAction = KStdGameAction::end(TQT_TQOBJECT(this), TQT_SLOT(closeGame()), actionCollection());
- printAction = KStdGameAction::print(TQT_TQOBJECT(this), TQT_SLOT(print()), actionCollection());
+ endAction = KStdGameAction::end(this, TQT_SLOT(closeGame()), actionCollection());
+ printAction = KStdGameAction::print(this, TQT_SLOT(print()), actionCollection());
- (void) KStdGameAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection());
- saveAction = KStdAction::save(TQT_TQOBJECT(this), TQT_SLOT(save()), actionCollection(), "game_save");
+ (void) KStdGameAction::quit(this, TQT_SLOT(close()), actionCollection());
+ saveAction = KStdAction::save(this, TQT_SLOT(save()), actionCollection(), "game_save");
saveAction->setText(i18n("Save &Course"));
- saveAsAction = KStdAction::saveAs(TQT_TQOBJECT(this), TQT_SLOT(saveAs()), actionCollection(), "game_save_as");
+ saveAsAction = KStdAction::saveAs(this, TQT_SLOT(saveAs()), actionCollection(), "game_save_as");
saveAsAction->setText(i18n("Save &Course As..."));
- saveGameAction = new TDEAction(i18n("&Save Game"), 0, TQT_TQOBJECT(this), TQT_SLOT(saveGame()), actionCollection(), "savegame");
- saveGameAsAction = new TDEAction(i18n("&Save Game As..."), 0, TQT_TQOBJECT(this), TQT_SLOT(saveGameAs()), actionCollection(), "savegameas");
+ saveGameAction = new TDEAction(i18n("&Save Game"), 0, this, TQT_SLOT(saveGame()), actionCollection(), "savegame");
+ saveGameAsAction = new TDEAction(i18n("&Save Game As..."), 0, this, TQT_SLOT(saveGameAs()), actionCollection(), "savegameas");
- loadGameAction = KStdGameAction::load(TQT_TQOBJECT(this), TQT_SLOT(loadGame()), actionCollection());
+ loadGameAction = KStdGameAction::load(this, TQT_SLOT(loadGame()), actionCollection());
loadGameAction->setText(i18n("Load Saved Game..."));
- highScoreAction = KStdGameAction::highscores(TQT_TQOBJECT(this), TQT_SLOT(showHighScores()), actionCollection());
+ highScoreAction = KStdGameAction::highscores(this, TQT_SLOT(showHighScores()), actionCollection());
- editingAction = new TDEToggleAction(i18n("&Edit"), "pencil", CTRL+Key_E, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "editing");
- newHoleAction = new TDEAction(i18n("&New"), "document-new", CTRL+SHIFT+Key_N, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "newhole");
- clearHoleAction = new TDEAction(KStdGuiItem::clear().text(), "locationbar_erase", CTRL+Key_Delete, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "clearhole");
- resetHoleAction = new TDEAction(i18n("&Reset"), CTRL+Key_R, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "resethole");
- undoShotAction = KStdAction::undo(TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "undoshot");
+ editingAction = new TDEToggleAction(i18n("&Edit"), "pencil", CTRL+Key_E, this, TQT_SLOT(emptySlot()), actionCollection(), "editing");
+ newHoleAction = new TDEAction(i18n("&New"), "document-new", CTRL+SHIFT+Key_N, this, TQT_SLOT(emptySlot()), actionCollection(), "newhole");
+ clearHoleAction = new TDEAction(KStdGuiItem::clear().text(), "locationbar_erase", CTRL+Key_Delete, this, TQT_SLOT(emptySlot()), actionCollection(), "clearhole");
+ resetHoleAction = new TDEAction(i18n("&Reset"), CTRL+Key_R, this, TQT_SLOT(emptySlot()), actionCollection(), "resethole");
+ undoShotAction = KStdAction::undo(this, TQT_SLOT(emptySlot()), actionCollection(), "undoshot");
undoShotAction->setText(i18n("&Undo Shot"));
- //replayShotAction = new TDEAction(i18n("&Replay Shot"), 0, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "replay");
+ //replayShotAction = new TDEAction(i18n("&Replay Shot"), 0, this, TQT_SLOT(emptySlot()), actionCollection(), "replay");
- holeAction = new TDEListAction(i18n("Switch to Hole"), 0, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "switchhole");
- nextAction = new TDEAction(i18n("&Next Hole"), "forward", TDEStdAccel::shortcut(TDEStdAccel::Forward), TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "nexthole");
- prevAction = new TDEAction(i18n("&Previous Hole"), "back", TDEStdAccel::shortcut(TDEStdAccel::Back), TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "prevhole");
- firstAction = new TDEAction(i18n("&First Hole"), "go-home", TDEStdAccel::shortcut(TDEStdAccel::Home), TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "firsthole");
- lastAction = new TDEAction(i18n("&Last Hole"), CTRL+SHIFT+Key_End, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "lasthole");
- randAction = new TDEAction(i18n("&Random Hole"), "goto", 0, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "randhole");
+ holeAction = new TDEListAction(i18n("Switch to Hole"), 0, this, TQT_SLOT(emptySlot()), actionCollection(), "switchhole");
+ nextAction = new TDEAction(i18n("&Next Hole"), "forward", TDEStdAccel::shortcut(TDEStdAccel::Forward), this, TQT_SLOT(emptySlot()), actionCollection(), "nexthole");
+ prevAction = new TDEAction(i18n("&Previous Hole"), "back", TDEStdAccel::shortcut(TDEStdAccel::Back), this, TQT_SLOT(emptySlot()), actionCollection(), "prevhole");
+ firstAction = new TDEAction(i18n("&First Hole"), "go-home", TDEStdAccel::shortcut(TDEStdAccel::Home), this, TQT_SLOT(emptySlot()), actionCollection(), "firsthole");
+ lastAction = new TDEAction(i18n("&Last Hole"), CTRL+SHIFT+Key_End, this, TQT_SLOT(emptySlot()), actionCollection(), "lasthole");
+ randAction = new TDEAction(i18n("&Random Hole"), "goto", 0, this, TQT_SLOT(emptySlot()), actionCollection(), "randhole");
- useMouseAction = new TDEToggleAction(i18n("Enable &Mouse for Moving Putter"), 0, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "usemouse");
+ useMouseAction = new TDEToggleAction(i18n("Enable &Mouse for Moving Putter"), 0, this, TQT_SLOT(emptySlot()), actionCollection(), "usemouse");
useMouseAction->setCheckedState(i18n("Disable &Mouse for Moving Putter"));
- connect(useMouseAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(useMouseChanged(bool)));
+ connect(useMouseAction, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(useMouseChanged(bool)));
TDEConfig *config = kapp->config();
config->setGroup("Settings");
useMouseAction->setChecked(config->readBoolEntry("useMouse", true));
- useAdvancedPuttingAction = new TDEToggleAction(i18n("Enable &Advanced Putting"), 0, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "useadvancedputting");
+ useAdvancedPuttingAction = new TDEToggleAction(i18n("Enable &Advanced Putting"), 0, this, TQT_SLOT(emptySlot()), actionCollection(), "useadvancedputting");
useAdvancedPuttingAction->setCheckedState(i18n("Disable &Advanced Putting"));
- connect(useAdvancedPuttingAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(useAdvancedPuttingChanged(bool)));
+ connect(useAdvancedPuttingAction, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(useAdvancedPuttingChanged(bool)));
useAdvancedPuttingAction->setChecked(config->readBoolEntry("useAdvancedPutting", false));
- showInfoAction = new TDEToggleAction(i18n("Show &Info"), "application-vnd.tde.info", CTRL+Key_I, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "showinfo");
+ showInfoAction = new TDEToggleAction(i18n("Show &Info"), "application-vnd.tde.info", CTRL+Key_I, this, TQT_SLOT(emptySlot()), actionCollection(), "showinfo");
showInfoAction->setCheckedState(i18n("Hide &Info"));
- connect(showInfoAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(showInfoChanged(bool)));
+ connect(showInfoAction, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(showInfoChanged(bool)));
showInfoAction->setChecked(config->readBoolEntry("showInfo", false));
- showGuideLineAction = new TDEToggleAction(i18n("Show Putter &Guideline"), 0, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "showguideline");
+ showGuideLineAction = new TDEToggleAction(i18n("Show Putter &Guideline"), 0, this, TQT_SLOT(emptySlot()), actionCollection(), "showguideline");
showGuideLineAction->setCheckedState(i18n("Hide Putter &Guideline"));
- connect(showGuideLineAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(showGuideLineChanged(bool)));
+ connect(showGuideLineAction, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(showGuideLineChanged(bool)));
showGuideLineAction->setChecked(config->readBoolEntry("showGuideLine", true));
- TDEToggleAction *act=new TDEToggleAction(i18n("Enable All Dialog Boxes"), 0, TQT_TQOBJECT(this), TQT_SLOT(enableAllMessages()), actionCollection(), "enableAll");
+ TDEToggleAction *act=new TDEToggleAction(i18n("Enable All Dialog Boxes"), 0, this, TQT_SLOT(enableAllMessages()), actionCollection(), "enableAll");
act->setCheckedState(i18n("Disable All Dialog Boxes"));
- soundAction = new TDEToggleAction(i18n("Play &Sounds"), 0, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "audio-x-generic");
- connect(soundAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(soundChanged(bool)));
+ soundAction = new TDEToggleAction(i18n("Play &Sounds"), 0, this, TQT_SLOT(emptySlot()), actionCollection(), "audio-x-generic");
+ connect(soundAction, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(soundChanged(bool)));
soundAction->setChecked(config->readBoolEntry("sound", true));
- (void) new TDEAction(i18n("&Reload Plugins"), 0, TQT_TQOBJECT(this), TQT_SLOT(initPlugins()), actionCollection(), "reloadplugins");
- (void) new TDEAction(i18n("Show &Plugins"), 0, TQT_TQOBJECT(this), TQT_SLOT(showPlugins()), actionCollection(), "showplugins");
+ (void) new TDEAction(i18n("&Reload Plugins"), 0, this, TQT_SLOT(initPlugins()), actionCollection(), "reloadplugins");
+ (void) new TDEAction(i18n("Show &Plugins"), 0, this, TQT_SLOT(showPlugins()), actionCollection(), "showplugins");
- aboutAction = new TDEAction(i18n("&About Course"), 0, TQT_TQOBJECT(this), TQT_SLOT(emptySlot()), actionCollection(), "aboutcourse");
- tutorialAction = new TDEAction(i18n("&Tutorial"), 0, TQT_TQOBJECT(this), TQT_SLOT(tutorial()), actionCollection(), "tutorial");
+ aboutAction = new TDEAction(i18n("&About Course"), 0, this, TQT_SLOT(emptySlot()), actionCollection(), "aboutcourse");
+ tutorialAction = new TDEAction(i18n("&Tutorial"), 0, this, TQT_SLOT(tutorial()), actionCollection(), "tutorial");
statusBar();
setupGUI();
@@ -226,19 +226,19 @@ void Kolf::startNewGame()
connect(game, TQT_SIGNAL(newHole(int)), scoreboard, TQT_SLOT(newHole(int)));
connect(game, TQT_SIGNAL(scoreChanged(int, int, int)), scoreboard, TQT_SLOT(setScore(int, int, int)));
connect(game, TQT_SIGNAL(parChanged(int, int)), scoreboard, TQT_SLOT(parChanged(int, int)));
- connect(game, TQT_SIGNAL(modifiedChanged(bool)), TQT_TQOBJECT(this), TQT_SLOT(updateModified(bool)));
- connect(game, TQT_SIGNAL(newPlayersTurn(Player *)), TQT_TQOBJECT(this), TQT_SLOT(newPlayersTurn(Player *)));
- connect(game, TQT_SIGNAL(holesDone()), TQT_TQOBJECT(this), TQT_SLOT(gameOver()));
- connect(game, TQT_SIGNAL(checkEditing()), TQT_TQOBJECT(this), TQT_SLOT(checkEditing()));
- connect(game, TQT_SIGNAL(editingStarted()), TQT_TQOBJECT(this), TQT_SLOT(editingStarted()));
- connect(game, TQT_SIGNAL(editingEnded()), TQT_TQOBJECT(this), TQT_SLOT(editingEnded()));
- connect(game, TQT_SIGNAL(inPlayStart()), TQT_TQOBJECT(this), TQT_SLOT(inPlayStart()));
- connect(game, TQT_SIGNAL(inPlayEnd()), TQT_TQOBJECT(this), TQT_SLOT(inPlayEnd()));
- connect(game, TQT_SIGNAL(maxStrokesReached(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(maxStrokesReached(const TQString &)));
- connect(game, TQT_SIGNAL(largestHole(int)), TQT_TQOBJECT(this), TQT_SLOT(updateHoleMenu(int)));
- connect(game, TQT_SIGNAL(titleChanged(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(titleChanged(const TQString &)));
- connect(game, TQT_SIGNAL(newStatusText(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(newStatusText(const TQString &)));
- connect(game, TQT_SIGNAL(currentHole(int)), TQT_TQOBJECT(this), TQT_SLOT(setCurrentHole(int)));
+ connect(game, TQT_SIGNAL(modifiedChanged(bool)), this, TQT_SLOT(updateModified(bool)));
+ connect(game, TQT_SIGNAL(newPlayersTurn(Player *)), this, TQT_SLOT(newPlayersTurn(Player *)));
+ connect(game, TQT_SIGNAL(holesDone()), this, TQT_SLOT(gameOver()));
+ connect(game, TQT_SIGNAL(checkEditing()), this, TQT_SLOT(checkEditing()));
+ connect(game, TQT_SIGNAL(editingStarted()), this, TQT_SLOT(editingStarted()));
+ connect(game, TQT_SIGNAL(editingEnded()), this, TQT_SLOT(editingEnded()));
+ connect(game, TQT_SIGNAL(inPlayStart()), this, TQT_SLOT(inPlayStart()));
+ connect(game, TQT_SIGNAL(inPlayEnd()), this, TQT_SLOT(inPlayEnd()));
+ connect(game, TQT_SIGNAL(maxStrokesReached(const TQString &)), this, TQT_SLOT(maxStrokesReached(const TQString &)));
+ connect(game, TQT_SIGNAL(largestHole(int)), this, TQT_SLOT(updateHoleMenu(int)));
+ connect(game, TQT_SIGNAL(titleChanged(const TQString &)), this, TQT_SLOT(titleChanged(const TQString &)));
+ connect(game, TQT_SIGNAL(newStatusText(const TQString &)), this, TQT_SLOT(newStatusText(const TQString &)));
+ connect(game, TQT_SIGNAL(currentHole(int)), this, TQT_SLOT(setCurrentHole(int)));
connect(holeAction, TQT_SIGNAL(activated(const TQString &)), game, TQT_SLOT(switchHole(const TQString &)));
connect(nextAction, TQT_SIGNAL(activated()), game, TQT_SLOT(nextHole()));
connect(prevAction, TQT_SIGNAL(activated()), game, TQT_SLOT(prevHole()));
@@ -356,7 +356,7 @@ void Kolf::closeGame()
titleChanged(TQString());
updateModified(false);
- TQTimer::singleShot(100, TQT_TQOBJECT(this), TQT_SLOT(createSpacer()));
+ TQTimer::singleShot(100, this, TQT_SLOT(createSpacer()));
}
void Kolf::createSpacer()
@@ -463,7 +463,7 @@ void Kolf::gameOver()
scoreDialog->show();
}
- TQTimer::singleShot(700, TQT_TQOBJECT(this), TQT_SLOT(closeGame()));
+ TQTimer::singleShot(700, this, TQT_SLOT(closeGame()));
}
void Kolf::showHighScores()
@@ -564,7 +564,7 @@ void Kolf::openURL(KURL url)
return;
}
- TQTimer::singleShot(10, TQT_TQOBJECT(this), TQT_SLOT(startNewGame()));
+ TQTimer::singleShot(10, this, TQT_SLOT(startNewGame()));
}
else
closeGame();
@@ -596,7 +596,7 @@ void Kolf::editingStarted()
editor = new Editor(obj, dummy, "Editor");
connect(editor, TQT_SIGNAL(addNewItem(Object *)), game, TQT_SLOT(addNewObject(Object *)));
connect(editor, TQT_SIGNAL(changed()), game, TQT_SLOT(setModified()));
- connect(editor, TQT_SIGNAL(addNewItem(Object *)), TQT_TQOBJECT(this), TQT_SLOT(setHoleFocus()));
+ connect(editor, TQT_SIGNAL(addNewItem(Object *)), this, TQT_SLOT(setHoleFocus()));
connect(game, TQT_SIGNAL(newSelectedItem(CanvasItem *)), editor, TQT_SLOT(setItem(CanvasItem *)));
scoreboard->hide();