diff options
Diffstat (limited to 'kbackgammon/kbg.cpp')
-rw-r--r-- | kbackgammon/kbg.cpp | 108 |
1 files changed, 54 insertions, 54 deletions
diff --git a/kbackgammon/kbg.cpp b/kbackgammon/kbg.cpp index 696d9b7f..2c966059 100644 --- a/kbackgammon/kbg.cpp +++ b/kbackgammon/kbg.cpp @@ -88,7 +88,7 @@ KBg::KBg() /* * The main view is shared between the board and a small text window */ - panner = new TQSplitter(Qt::Vertical, this, "panner"); + panner = new TQSplitter(TQt::Vertical, this, "panner"); board = new KBgBoardSetup(panner, "board"); status = new KBgTextView(panner, "status"); setCentralWidget(panner); @@ -96,45 +96,45 @@ KBg::KBg() /* * Create all actions needed by the application */ - newAction = KStdGameAction::gameNew(TQT_TQOBJECT(this), TQT_SLOT(openNew()), actionCollection()); + newAction = KStdGameAction::gameNew(this, TQ_SLOT(openNew()), actionCollection()); newAction->setEnabled(false); - KStdGameAction::print(TQT_TQOBJECT(this), TQT_SLOT(print()), actionCollection()); - KStdGameAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection()); + KStdGameAction::print(this, TQ_SLOT(print()), actionCollection()); + KStdGameAction::quit(this, TQ_SLOT(close()), actionCollection()); TQStringList list; for (int i = 0; i < MaxEngine; i++) list.append(engineString[i]); - engineSet = new TDESelectAction(i18n("&Engine"), 0, TQT_TQOBJECT(this), TQT_SLOT(setupEngine()), actionCollection(), + engineSet = new TDESelectAction(i18n("&Engine"), 0, this, TQ_SLOT(setupEngine()), actionCollection(), "move_engine"); engineSet->setItems(list); // AB: what the heck has this to do with redisplay? perhaps use reload instead? - loadAction = KStdAction::redisplay(TQT_TQOBJECT(this), TQT_SLOT(load()), actionCollection(), "move_load"); + loadAction = KStdAction::redisplay(this, TQ_SLOT(load()), actionCollection(), "move_load"); loadAction->setEnabled(false); - undoAction = KStdGameAction::undo(TQT_TQOBJECT(this), TQT_SLOT(undo()), actionCollection()); + undoAction = KStdGameAction::undo(this, TQ_SLOT(undo()), actionCollection()); undoAction->setEnabled(false); - redoAction = KStdGameAction::redo(TQT_TQOBJECT(this), TQT_SLOT(redo()), actionCollection()); + redoAction = KStdGameAction::redo(this, TQ_SLOT(redo()), actionCollection()); redoAction->setEnabled(false); - rollAction = KStdGameAction::roll(TQT_TQOBJECT(this), TQT_SLOT(roll()), actionCollection()); + rollAction = KStdGameAction::roll(this, TQ_SLOT(roll()), actionCollection()); rollAction->setEnabled(false); - endAction = KStdGameAction::endTurn(TQT_TQOBJECT(this), TQT_SLOT(done()), actionCollection()); + endAction = KStdGameAction::endTurn(this, TQ_SLOT(done()), actionCollection()); endAction->setEnabled(false); - cubeAction = new TDEAction(i18n("Double Cube"), TQIconSet(kapp->iconLoader()->loadIcon + cubeAction = new TDEAction(i18n("Double Cube"), TQIconSet(tdeApp->iconLoader()->loadIcon (PROG_NAME "-double.xpm", TDEIcon::Toolbar)), - 0, TQT_TQOBJECT(this), TQT_SLOT(cube()), actionCollection(), "move_cube"); + 0, this, TQ_SLOT(cube()), actionCollection(), "move_cube"); cubeAction->setEnabled(false); - KStdAction::showMenubar(TQT_TQOBJECT(this), TQT_SLOT(toggleMenubar()), actionCollection()); - KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(setupDlg()), actionCollection()); - KStdAction::saveOptions(TQT_TQOBJECT(this), TQT_SLOT(saveConfig()), actionCollection()); + KStdAction::showMenubar(this, TQ_SLOT(toggleMenubar()), actionCollection()); + KStdAction::preferences(this, TQ_SLOT(setupDlg()), actionCollection()); + KStdAction::saveOptions(this, TQ_SLOT(saveConfig()), actionCollection()); TDEPopupMenu *p = (new TDEActionMenu(i18n("&Backgammon on the Web"), actionCollection(), "help_www"))->popupMenu(); - (new TDEAction(helpTopic[FIBSHome][0], 0, TQT_TQOBJECT(this), TQT_SLOT(wwwFIBS()), + (new TDEAction(helpTopic[FIBSHome][0], 0, this, TQ_SLOT(wwwFIBS()), actionCollection(), "help_www_fibs"))->plug(p); - (new TDEAction(helpTopic[RuleHome][0], 0, TQT_TQOBJECT(this), TQT_SLOT(wwwRule()), + (new TDEAction(helpTopic[RuleHome][0], 0, this, TQ_SLOT(wwwRule()), actionCollection(), "help_www_rule"))->plug(p); /* @@ -148,7 +148,7 @@ KBg::KBg() actionCmdLine->setAutoSized(true); cmdLine->completionObject()->setOrder(TDECompletion::Weighted); - connect(cmdLine, TQT_SIGNAL(returnPressed(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(handleCmd(const TQString &))); + connect(cmdLine, TQ_SIGNAL(returnPressed(const TQString &)), this, TQ_SLOT(handleCmd(const TQString &))); /* * Done with the actions, create the XML-defined parts of the * user interface @@ -172,8 +172,8 @@ KBg::KBg() * Set up configuration handling. * FIXME: support session management */ - connect(this, TQT_SIGNAL(readSettings()), board, TQT_SLOT(readConfig())); - connect(this, TQT_SIGNAL(saveSettings()), board, TQT_SLOT(saveConfig())); + connect(this, TQ_SIGNAL(readSettings()), board, TQ_SLOT(readConfig())); + connect(this, TQ_SIGNAL(saveSettings()), board, TQ_SLOT(saveConfig())); /* * Set up some whatis messages for the online help @@ -267,33 +267,33 @@ void KBg::setupEngine() } statusBar()->message(engineString[currEngine]); - TDEConfig* config = kapp->config(); + TDEConfig* config = tdeApp->config(); config->setGroup("global settings"); if (config->readBoolEntry("enable timeout", true)) engine[currEngine]->setCommit(config->readDoubleNumEntry("timeout", 2.5)); newAction->setEnabled(engine[currEngine]->haveNewGame()); // engine -> this - connect(engine[currEngine], TQT_SIGNAL(statText(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(updateCaption(const TQString &))); - connect(engine[currEngine], TQT_SIGNAL(infoText(const TQString &)), status, TQT_SLOT(write(const TQString &))); - connect(engine[currEngine], TQT_SIGNAL(allowCommand(int, bool)), this, TQT_SLOT(allowCommand(int, bool))); + connect(engine[currEngine], TQ_SIGNAL(statText(const TQString &)), this, TQ_SLOT(updateCaption(const TQString &))); + connect(engine[currEngine], TQ_SIGNAL(infoText(const TQString &)), status, TQ_SLOT(write(const TQString &))); + connect(engine[currEngine], TQ_SIGNAL(allowCommand(int, bool)), this, TQ_SLOT(allowCommand(int, bool))); // this -> engine - connect(this, TQT_SIGNAL(readSettings()), engine[currEngine], TQT_SLOT(readConfig())); - connect(this, TQT_SIGNAL(saveSettings()), engine[currEngine], TQT_SLOT(saveConfig())); + connect(this, TQ_SIGNAL(readSettings()), engine[currEngine], TQ_SLOT(readConfig())); + connect(this, TQ_SIGNAL(saveSettings()), engine[currEngine], TQ_SLOT(saveConfig())); // board -> engine - connect(board, TQT_SIGNAL(rollDice(const int)), engine[currEngine], TQT_SLOT(rollDice(const int))); - connect(board, TQT_SIGNAL(doubleCube(const int)), engine[currEngine], TQT_SLOT(doubleCube(const int))); - connect(board, TQT_SIGNAL(currentMove(TQString *)), engine[currEngine], TQT_SLOT(handleMove(TQString *))); + connect(board, TQ_SIGNAL(rollDice(const int)), engine[currEngine], TQ_SLOT(rollDice(const int))); + connect(board, TQ_SIGNAL(doubleCube(const int)), engine[currEngine], TQ_SLOT(doubleCube(const int))); + connect(board, TQ_SIGNAL(currentMove(TQString *)), engine[currEngine], TQ_SLOT(handleMove(TQString *))); // engine -> board - connect(engine[currEngine], TQT_SIGNAL(undoMove()), board, TQT_SLOT(undoMove())); - connect(engine[currEngine], TQT_SIGNAL(redoMove()), board, TQT_SLOT(redoMove())); - connect(engine[currEngine], TQT_SIGNAL(setEditMode(const bool)), board, TQT_SLOT(setEditMode(const bool))); - connect(engine[currEngine], TQT_SIGNAL(allowMoving(const bool)), board, TQT_SLOT(allowMoving(const bool))); - connect(engine[currEngine], TQT_SIGNAL(getState(KBgStatus *)), board, TQT_SLOT(getState(KBgStatus *))); - connect(engine[currEngine], TQT_SIGNAL(newState(const KBgStatus &)), board, TQT_SLOT(setState(const KBgStatus &))); + connect(engine[currEngine], TQ_SIGNAL(undoMove()), board, TQ_SLOT(undoMove())); + connect(engine[currEngine], TQ_SIGNAL(redoMove()), board, TQ_SLOT(redoMove())); + connect(engine[currEngine], TQ_SIGNAL(setEditMode(const bool)), board, TQ_SLOT(setEditMode(const bool))); + connect(engine[currEngine], TQ_SIGNAL(allowMoving(const bool)), board, TQ_SLOT(allowMoving(const bool))); + connect(engine[currEngine], TQ_SIGNAL(getState(KBgStatus *)), board, TQ_SLOT(getState(KBgStatus *))); + connect(engine[currEngine], TQ_SIGNAL(newState(const KBgStatus &)), board, TQ_SLOT(setState(const KBgStatus &))); // now that all signals are connected, start the engine engine[currEngine]->start(); @@ -307,7 +307,7 @@ void KBg::setupEngine() */ void KBg::saveConfig() { - TDEConfig* config = kapp->config(); + TDEConfig* config = tdeApp->config(); config->setGroup("global settings"); /* @@ -351,7 +351,7 @@ void KBg::saveConfig() */ void KBg::readConfig() { - TDEConfig* config = kapp->config(); + TDEConfig* config = tdeApp->config(); config->setGroup("global settings"); /* @@ -363,7 +363,7 @@ void KBg::readConfig() config->setGroup("main window"); TQPoint pos, defpos(10, 10); - TQFont kappFont = kapp->font(); + TQFont kappFont = tdeApp->font(); pos = config->readPointEntry("origin", &defpos); @@ -406,7 +406,7 @@ void KBg::readConfig() void KBg::setupOk() { // global settings - TDEConfig* config = kapp->config(); + TDEConfig* config = tdeApp->config(); config->setGroup("global settings"); config->writeEntry("enable timeout", cbt->isChecked()); @@ -499,15 +499,15 @@ void KBg::setupDlg() KDialogBase::Apply|KDialogBase::Help, KDialogBase::Ok, this, "setup", true, true); - TDEConfig* config = kapp->config(); + TDEConfig* config = tdeApp->config(); config->setGroup("global settings"); /* * Main Widget */ TQVBox *w = nb->addVBoxPage(i18n("General"), i18n("Here you can configure general settings of %1"). - arg(kapp->aboutData()->programName()), - kapp->iconLoader()->loadIcon("go", TDEIcon::Desktop)); + arg(tdeApp->aboutData()->programName()), + tdeApp->iconLoader()->loadIcon("go", TDEIcon::Desktop)); /* * Group boxes @@ -535,7 +535,7 @@ void KBg::setupDlg() sbt->setLabel(i18n("Move timeout in seconds:")); sbt->setValue(config->readDoubleNumEntry("timeout", 2.5)); - connect(cbt, TQT_SIGNAL(toggled(bool)), sbt, TQT_SLOT(setEnabled(bool))); + connect(cbt, TQ_SIGNAL(toggled(bool)), sbt, TQ_SLOT(setEnabled(bool))); sbt->setEnabled(cbt->isChecked()); TQGridLayout *gl = new TQGridLayout(gbt, 2, 1, 20); @@ -569,7 +569,7 @@ void KBg::setupDlg() TQWhatsThis::add(gbe, i18n("Event notification of %1 is configured as part of the " "system-wide notification process. Click here, and you " "will be able to configure system sounds, etc."). - arg(kapp->aboutData()->programName())); + arg(tdeApp->aboutData()->programName())); TQGridLayout *gle = new TQGridLayout(gbe, 1, 1, nb->spacingHint()); KURLLabel *lab = new KURLLabel("tdecmshell kcmnotify", @@ -577,7 +577,7 @@ void KBg::setupDlg() lab->setMaximumSize(lab->sizeHint()); gle->addWidget(lab, 0, 0); - connect(lab, TQT_SIGNAL(leftClickedURL(const TQString &)), TQT_SLOT(startKCM(const TQString &))); + connect(lab, TQ_SIGNAL(leftClickedURL(const TQString &)), TQ_SLOT(startKCM(const TQString &))); /* * Board settings @@ -606,7 +606,7 @@ void KBg::setupDlg() engine[i] = new KBgEngineNg(nb, &s, dummyPopup); break; } - connect(this, TQT_SIGNAL(saveSettings()), engine[i], TQT_SLOT(saveConfig())); + connect(this, TQ_SIGNAL(saveSettings()), engine[i], TQ_SLOT(saveConfig())); } engine[i]->getSetupPages(nb); } @@ -614,12 +614,12 @@ void KBg::setupDlg() /* * Connect the signals of nb */ - connect(nb, TQT_SIGNAL(okClicked()), this, TQT_SLOT(setupOk())); - connect(nb, TQT_SIGNAL(applyClicked()), this, TQT_SLOT(setupOk())); - connect(nb, TQT_SIGNAL(cancelClicked()), TQT_TQOBJECT(this), TQT_SLOT(setupCancel())); - connect(nb, TQT_SIGNAL(defaultClicked()),this, TQT_SLOT(setupDefault())); + connect(nb, TQ_SIGNAL(okClicked()), this, TQ_SLOT(setupOk())); + connect(nb, TQ_SIGNAL(applyClicked()), this, TQ_SLOT(setupOk())); + connect(nb, TQ_SIGNAL(cancelClicked()), this, TQ_SLOT(setupCancel())); + connect(nb, TQ_SIGNAL(defaultClicked()),this, TQ_SLOT(setupDefault())); - connect(nb, TQT_SIGNAL(finished()), TQT_TQOBJECT(this), TQT_SLOT(setupDone())); + connect(nb, TQ_SIGNAL(finished()), this, TQ_SLOT(setupDone())); nb->resize(nb->minimumSize()); nb->show(); @@ -636,7 +636,7 @@ void KBg::print() { KPrinter *prt = new KPrinter(); - TDEConfig* config = kapp->config(); + TDEConfig* config = tdeApp->config(); config->setGroup("printing"); prt->setNumCopies(config->readNumEntry("numcopies", 1)); @@ -685,7 +685,7 @@ void KBg::configureToolbars() { saveMainWindowSettings(TDEGlobal::config(), "kedittoolbar settings"); // temp group KEditToolbar dlg(actionCollection(), xmlFile(), true, this); - connect(&dlg,TQT_SIGNAL(newToolbarConfig()),this,TQT_SLOT(newToolbarConfig())); + connect(&dlg,TQ_SIGNAL(newToolbarConfig()),this,TQ_SLOT(newToolbarConfig())); dlg.exec(); TDEGlobal::config()->deleteGroup( "kedittoolbar settings" ); // delete temp group } @@ -707,7 +707,7 @@ void KBg::wwwRule() {showWWW(RuleHome);} void KBg::showWWW(int t) { - kapp->invokeBrowser(helpTopic[t][1]); + tdeApp->invokeBrowser(helpTopic[t][1]); } /* |