diff options
Diffstat (limited to 'kenolaba/AbTop.cpp')
-rw-r--r-- | kenolaba/AbTop.cpp | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/kenolaba/AbTop.cpp b/kenolaba/AbTop.cpp index 51a54532..83dcea36 100644 --- a/kenolaba/AbTop.cpp +++ b/kenolaba/AbTop.cpp @@ -63,12 +63,12 @@ AbTop::AbTop() timer = new TQTimer; - connect( timer, TQT_SIGNAL(timeout()), TQT_TQOBJECT(this), TQT_SLOT(timerDone()) ); + connect( timer, TQ_SIGNAL(timeout()), this, TQ_SLOT(timerDone()) ); board = new Board(); setMoveNo(0); - connect( board, TQT_SIGNAL(searchBreak()), TQT_TQOBJECT(this), TQT_SLOT(searchBreak()) ); + connect( board, TQ_SIGNAL(searchBreak()), this, TQ_SLOT(searchBreak()) ); TQ_CHECK_PTR(board); boardWidget = new BoardWidget(*board,this); @@ -76,8 +76,8 @@ AbTop::AbTop() spy = new Spy(*board); #endif - connect( boardWidget, TQT_SIGNAL(updateSpy(TQString)), - TQT_TQOBJECT(this), TQT_SLOT(updateSpy(TQString)) ); + connect( boardWidget, TQ_SIGNAL(updateSpy(TQString)), + this, TQ_SLOT(updateSpy(TQString)) ); setCentralWidget(boardWidget); boardWidget->show(); @@ -88,17 +88,17 @@ AbTop::AbTop() setMinimumSize(200,300); // RMB context menu - connect( boardWidget, TQT_SIGNAL(rightButtonPressed(int,const TQPoint&)), - TQT_TQOBJECT(this), TQT_SLOT(rightButtonPressed(int,const TQPoint&)) ); + connect( boardWidget, TQ_SIGNAL(rightButtonPressed(int,const TQPoint&)), + this, TQ_SLOT(rightButtonPressed(int,const TQPoint&)) ); - connect( boardWidget, TQT_SIGNAL(edited(int)), - TQT_TQOBJECT(this), TQT_SLOT(edited(int)) ); + connect( boardWidget, TQ_SIGNAL(edited(int)), + this, TQ_SLOT(edited(int)) ); - connect( board, TQT_SIGNAL(updateBestMove(Move&,int)), - TQT_TQOBJECT(this), TQT_SLOT(updateBestMove(Move&,int)) ); + connect( board, TQ_SIGNAL(updateBestMove(Move&,int)), + this, TQ_SLOT(updateBestMove(Move&,int)) ); - connect( boardWidget, TQT_SIGNAL(moveChoosen(Move&)), - TQT_TQOBJECT(this), TQT_SLOT(moveChoosen(Move&)) ); + connect( boardWidget, TQ_SIGNAL(moveChoosen(Move&)), + this, TQ_SLOT(moveChoosen(Move&)) ); /* default */ setLevel(Easy); @@ -132,61 +132,61 @@ AbTop::~AbTop() void AbTop::setupActions() { - newAction = KStdGameAction::gameNew( TQT_TQOBJECT(this), TQT_SLOT(newGame()), actionCollection() ); - KStdGameAction::quit( TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection() ); + newAction = KStdGameAction::gameNew( this, TQ_SLOT(newGame()), actionCollection() ); + KStdGameAction::quit( this, TQ_SLOT(close()), actionCollection() ); - stopAction = new TDEAction( i18n("&Stop Search"), "process-stop", Key_S, TQT_TQOBJECT(this), - TQT_SLOT(stopSearch()), actionCollection(), "move_stop"); + stopAction = new TDEAction( i18n("&Stop Search"), "process-stop", Key_S, this, + TQ_SLOT(stopSearch()), actionCollection(), "move_stop"); backAction = new TDEAction( i18n("Take &Back"), "back", - TDEStdAccel::shortcut(TDEStdAccel::Prior), TQT_TQOBJECT(this), - TQT_SLOT(back()), actionCollection(), "move_back"); + TDEStdAccel::shortcut(TDEStdAccel::Prior), this, + TQ_SLOT(back()), actionCollection(), "move_back"); forwardAction = new TDEAction( i18n("&Forward"), "forward", - TDEStdAccel::shortcut(TDEStdAccel::Next), TQT_TQOBJECT(this), - TQT_SLOT(forward()), actionCollection(), "move_forward"); + TDEStdAccel::shortcut(TDEStdAccel::Next), this, + TQ_SLOT(forward()), actionCollection(), "move_forward"); - hintAction = KStdGameAction::hint(TQT_TQOBJECT(this), TQT_SLOT(suggestion()), actionCollection()); + hintAction = KStdGameAction::hint(this, TQ_SLOT(suggestion()), actionCollection()); - KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT(copy()), actionCollection()); - pasteAction = KStdAction::paste( TQT_TQOBJECT(this), TQT_SLOT(paste()), actionCollection()); + KStdAction::copy( this, TQ_SLOT(copy()), actionCollection()); + pasteAction = KStdAction::paste( this, TQ_SLOT(paste()), actionCollection()); (void) new TDEAction( i18n("&Restore Position"), TDEStdAccel::shortcut(TDEStdAccel::Open), - TQT_TQOBJECT(this), TQT_SLOT(restorePosition()), + this, TQ_SLOT(restorePosition()), actionCollection(), "edit_restore" ); (void) new TDEAction( i18n("&Save Position"), TDEStdAccel::shortcut(TDEStdAccel::Save), - TQT_TQOBJECT(this), TQT_SLOT(savePosition()), + this, TQ_SLOT(savePosition()), actionCollection(), "edit_save" ); TDEToggleAction *ta; ta = new TDEToggleAction( i18n("&Network Play"), "network", Key_N, actionCollection(), "game_net"); - connect(ta, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(gameNetwork(bool))); + connect(ta, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(gameNetwork(bool))); editAction = new TDEToggleAction( i18n("&Modify"), "edit", CTRL+Key_Insert, actionCollection(), "edit_modify"); - connect(editAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT( editModify(bool))); + connect(editAction, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT( editModify(bool))); - showMenubar = KStdAction::showMenubar(TQT_TQOBJECT(this), TQT_SLOT(toggleMenubar()), actionCollection()); - KStdAction::saveOptions( TQT_TQOBJECT(this), TQT_SLOT(writeConfig()), actionCollection()); + showMenubar = KStdAction::showMenubar(this, TQ_SLOT(toggleMenubar()), actionCollection()); + KStdAction::saveOptions( this, TQ_SLOT(writeConfig()), actionCollection()); - KStdAction::preferences( TQT_TQOBJECT(this), TQT_SLOT(configure()), actionCollection()); + KStdAction::preferences( this, TQ_SLOT(configure()), actionCollection()); moveSlowAction = new TDEToggleAction( i18n("&Move Slow"), 0, actionCollection(), "options_moveSlow"); - connect(moveSlowAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(optionMoveSlow(bool))); + connect(moveSlowAction, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(optionMoveSlow(bool))); renderBallsAction = new TDEToggleAction( i18n("&Render Balls"), 0, actionCollection(), "options_renderBalls"); - connect(renderBallsAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(optionRenderBalls(bool))); + connect(renderBallsAction, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(optionRenderBalls(bool))); showSpyAction = new TDEToggleAction( i18n("&Spy"), 0, actionCollection(), "options_showSpy"); - connect(showSpyAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(optionShowSpy(bool))); + connect(showSpyAction, TQ_SIGNAL(toggled(bool)), this, TQ_SLOT(optionShowSpy(bool))); levelAction = KStdGameAction::chooseGameType(0, 0, actionCollection()); @@ -194,14 +194,14 @@ void AbTop::setupActions() for (uint i=0; i<Nb_Levels; i++) list.append( i18n(LEVEL[i].label) ); levelAction->setItems(list); - connect(levelAction, TQT_SIGNAL(activated(int)), TQT_SLOT(setLevel(int))); + connect(levelAction, TQ_SIGNAL(activated(int)), TQ_SLOT(setLevel(int))); iplayAction = new TDESelectAction(i18n("&Computer Play"), 0, actionCollection(), "options_iplay"); list.clear(); for (uint i=0; i<Nb_IPlays; i++) list.append( i18n(IPLAY[i].label) ); iplayAction->setItems(list); - connect(iplayAction, TQT_SIGNAL(activated(int)), TQT_SLOT(setIPlay(int))); + connect(iplayAction, TQ_SIGNAL(activated(int)), TQ_SLOT(setIPlay(int))); } void AbTop::toggleMenubar() @@ -244,7 +244,7 @@ void AbTop::readConfig() { kdDebug(12011) << "Reading config..." << endl; - TDEConfig* config = kapp->config(); + TDEConfig* config = tdeApp->config(); config->setGroup("Options"); readOptions(config); @@ -312,7 +312,7 @@ void AbTop::writeConfig() { kdDebug(12011) << "Writing config..." << endl; - TDEConfig* config = kapp->config(); + TDEConfig* config = tdeApp->config(); config->setGroup("Options"); writeOptions(config); @@ -352,14 +352,14 @@ void AbTop::saveProperties(TDEConfig *config) void AbTop::savePosition() { - TDEConfig* config = kapp->config(); + TDEConfig* config = tdeApp->config(); config->setGroup("SavedPosition"); config->writeEntry("Position", board->getState(moveNo)); } void AbTop::restorePosition() { - TDEConfig* config = kapp->config(); + TDEConfig* config = tdeApp->config(); config->setGroup("SavedPosition"); TQString entry = config->readEntry("Position"); @@ -421,10 +421,10 @@ void AbTop::setupStatusBar() spyPopup->insertItem(spy1, 1); spyPopup->insertItem(spy2, 2); spyPopup->insertItem(spy3, 3); - connect( spyPopup, TQT_SIGNAL(activated(int)), - TQT_TQOBJECT(this), TQT_SLOT(setSpy(int)) ); + connect( spyPopup, TQ_SIGNAL(activated(int)), + this, TQ_SLOT(setSpy(int)) ); tb->insertButton(spy0, 30, spyPopup, - TRUE, i18n("Spy")); + true, i18n("Spy")); } #endif @@ -453,7 +453,7 @@ void AbTop::updateBestMove(Move& m, int value) TQString tmp; tmp.sprintf("%s : %+d", (const char*) m.name().utf8(), value-actValue); updateSpy(tmp); - kapp->processEvents(); + tdeApp->processEvents(); } } @@ -559,7 +559,7 @@ void AbTop::updateActions() /* let the program be responsive even in a long search... */ void AbTop::searchBreak() { - kapp->processEvents(); + tdeApp->processEvents(); } @@ -608,7 +608,7 @@ void AbTop::timerDone() return; } timerState++; - timer->start(interval,TRUE); + timer->start(interval,true); } void AbTop::userMove() @@ -673,7 +673,7 @@ void AbTop::playGame() return; } boardWidget->setCursor(waitCursor); - kapp->processEvents(); + tdeApp->processEvents(); if (moveNo <4) { /* Chose a random move making the position better for actual color */ @@ -800,8 +800,8 @@ void AbTop::gameNetwork(bool on) h2[i]=0; net->addListener(h2, p); } - TQObject::connect(net, TQT_SIGNAL(gotPosition(const char *)), - TQT_TQOBJECT(this), TQT_SLOT(pastePosition(const char *)) ); + TQObject::connect(net, TQ_SIGNAL(gotPosition(const char *)), + this, TQ_SLOT(pastePosition(const char *)) ); } |