summaryrefslogtreecommitdiffstats
path: root/kenolaba/AbTop.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kenolaba/AbTop.cpp')
-rw-r--r--kenolaba/AbTop.cpp102
1 files changed, 51 insertions, 51 deletions
diff --git a/kenolaba/AbTop.cpp b/kenolaba/AbTop.cpp
index a6ef7d05..f107408d 100644
--- a/kenolaba/AbTop.cpp
+++ b/kenolaba/AbTop.cpp
@@ -63,12 +63,12 @@ AbTop::AbTop()
timer = new TQTimer;
- connect( timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(timerDone()) );
+ connect( timer, TQT_SIGNAL(timeout()), TQT_TQOBJECT(this), TQT_SLOT(timerDone()) );
board = new Board();
setMoveNo(0);
- connect( board, TQT_SIGNAL(searchBreak()), this, TQT_SLOT(searchBreak()) );
+ connect( board, TQT_SIGNAL(searchBreak()), TQT_TQOBJECT(this), TQT_SLOT(searchBreak()) );
Q_CHECK_PTR(board);
boardWidget = new BoardWidget(*board,this);
@@ -77,7 +77,7 @@ AbTop::AbTop()
#endif
connect( boardWidget, TQT_SIGNAL(updateSpy(TQString)),
- this, TQT_SLOT(updateSpy(TQString)) );
+ TQT_TQOBJECT(this), TQT_SLOT(updateSpy(TQString)) );
setCentralWidget(boardWidget);
boardWidget->show();
@@ -89,16 +89,16 @@ AbTop::AbTop()
// RMB context menu
connect( boardWidget, TQT_SIGNAL(rightButtonPressed(int,const TQPoint&)),
- this, TQT_SLOT(rightButtonPressed(int,const TQPoint&)) );
+ TQT_TQOBJECT(this), TQT_SLOT(rightButtonPressed(int,const TQPoint&)) );
connect( boardWidget, TQT_SIGNAL(edited(int)),
- this, TQT_SLOT(edited(int)) );
+ TQT_TQOBJECT(this), TQT_SLOT(edited(int)) );
connect( board, TQT_SIGNAL(updateBestMove(Move&,int)),
- this, TQT_SLOT(updateBestMove(Move&,int)) );
+ TQT_TQOBJECT(this), TQT_SLOT(updateBestMove(Move&,int)) );
connect( boardWidget, TQT_SIGNAL(moveChoosen(Move&)),
- this, TQT_SLOT(moveChoosen(Move&)) );
+ TQT_TQOBJECT(this), TQT_SLOT(moveChoosen(Move&)) );
/* default */
setLevel(Easy);
@@ -107,7 +107,7 @@ AbTop::AbTop()
showSpy = false;
renderBalls = true;
- updateStatus();
+ updatetqStatus();
updateActions();
setupGUI();
}
@@ -132,61 +132,61 @@ AbTop::~AbTop()
void AbTop::setupActions()
{
- newAction = KStdGameAction::gameNew( this, TQT_SLOT(newGame()), actionCollection() );
- KStdGameAction::quit( this, TQT_SLOT(close()), actionCollection() );
+ newAction = KStdGameAction::gameNew( TQT_TQOBJECT(this), TQT_SLOT(newGame()), actionCollection() );
+ KStdGameAction::quit( TQT_TQOBJECT(this), TQT_SLOT(close()), actionCollection() );
- stopAction = new KAction( i18n("&Stop Search"), "stop", Key_S, this,
+ stopAction = new KAction( i18n("&Stop Search"), "stop", Key_S, TQT_TQOBJECT(this),
TQT_SLOT(stopSearch()), actionCollection(), "move_stop");
backAction = new KAction( i18n("Take &Back"), "back",
- KStdAccel::shortcut(KStdAccel::Prior), this,
+ KStdAccel::shortcut(KStdAccel::Prior), TQT_TQOBJECT(this),
TQT_SLOT(back()), actionCollection(), "move_back");
forwardAction = new KAction( i18n("&Forward"), "forward",
- KStdAccel::shortcut(KStdAccel::Next), this,
+ KStdAccel::shortcut(KStdAccel::Next), TQT_TQOBJECT(this),
TQT_SLOT(forward()), actionCollection(), "move_forward");
- hintAction = KStdGameAction::hint(this, TQT_SLOT(suggestion()), actionCollection());
+ hintAction = KStdGameAction::hint(TQT_TQOBJECT(this), TQT_SLOT(suggestion()), actionCollection());
- KStdAction::copy( this, TQT_SLOT(copy()), actionCollection());
- pasteAction = KStdAction::paste( this, TQT_SLOT(paste()), actionCollection());
+ KStdAction::copy( TQT_TQOBJECT(this), TQT_SLOT(copy()), actionCollection());
+ pasteAction = KStdAction::paste( TQT_TQOBJECT(this), TQT_SLOT(paste()), actionCollection());
(void) new KAction( i18n("&Restore Position"),
KStdAccel::shortcut(KStdAccel::Open),
- this, TQT_SLOT(restorePosition()),
+ TQT_TQOBJECT(this), TQT_SLOT(restorePosition()),
actionCollection(), "edit_restore" );
(void) new KAction( i18n("&Save Position"),
KStdAccel::shortcut(KStdAccel::Save),
- this, TQT_SLOT(savePosition()),
+ TQT_TQOBJECT(this), TQT_SLOT(savePosition()),
actionCollection(), "edit_save" );
KToggleAction *ta;
ta = new KToggleAction( i18n("&Network Play"), "network", Key_N,
actionCollection(), "game_net");
- connect(ta, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(gameNetwork(bool)));
+ connect(ta, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(gameNetwork(bool)));
editAction = new KToggleAction( i18n("&Modify"), "edit",
CTRL+Key_Insert, actionCollection(), "edit_modify");
- connect(editAction, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT( editModify(bool)));
+ connect(editAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT( editModify(bool)));
- showMenubar = KStdAction::showMenubar(this, TQT_SLOT(toggleMenubar()), actionCollection());
- KStdAction::saveOptions( this, TQT_SLOT(writeConfig()), actionCollection());
+ showMenubar = KStdAction::showMenubar(TQT_TQOBJECT(this), TQT_SLOT(toggleMenubar()), actionCollection());
+ KStdAction::saveOptions( TQT_TQOBJECT(this), TQT_SLOT(writeConfig()), actionCollection());
- KStdAction::preferences( this, TQT_SLOT(configure()), actionCollection());
+ KStdAction::preferences( TQT_TQOBJECT(this), TQT_SLOT(configure()), actionCollection());
moveSlowAction = new KToggleAction( i18n("&Move Slow"), 0,
actionCollection(), "options_moveSlow");
- connect(moveSlowAction, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(optionMoveSlow(bool)));
+ connect(moveSlowAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(optionMoveSlow(bool)));
renderBallsAction = new KToggleAction( i18n("&Render Balls"), 0,
actionCollection(), "options_renderBalls");
- connect(renderBallsAction, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(optionRenderBalls(bool)));
+ connect(renderBallsAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(optionRenderBalls(bool)));
showSpyAction = new KToggleAction( i18n("&Spy"), 0,
actionCollection(), "options_showSpy");
- connect(showSpyAction, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(optionShowSpy(bool)));
+ connect(showSpyAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(optionShowSpy(bool)));
levelAction = KStdGameAction::chooseGameType(0, 0, actionCollection());
@@ -381,7 +381,7 @@ void AbTop::setupStatusBar()
{
TQString tmp;
- TQString t = i18n("Press %1 for a new game").arg( newAction->shortcut().toString());
+ TQString t = i18n("Press %1 for a new game").tqarg( newAction->shortcut().toString());
statusLabel = new TQLabel( t, statusBar(), "statusLabel" );
statusBar()->addWidget(statusLabel,1,false);
@@ -391,8 +391,8 @@ void AbTop::setupStatusBar()
warningPix = BarIcon( "warning" );
okPix = BarIcon( "ok" );
validLabel = new TQLabel( "", statusBar(), "validLabel" );
- validLabel->setFixedSize( 18, statusLabel->sizeHint().height() );
- validLabel->setAlignment( AlignCenter );
+ validLabel->setFixedSize( 18, statusLabel->tqsizeHint().height() );
+ validLabel->tqsetAlignment( AlignCenter );
validLabel->hide();
validShown = false;
@@ -401,11 +401,11 @@ void AbTop::setupStatusBar()
noBall = BarIcon( "noball" );
ballLabel = new TQLabel( "", statusBar(), "ballLabel" );
ballLabel->setPixmap(noBall);
- ballLabel->setFixedSize( 18, statusLabel->sizeHint().height() );
- ballLabel->setAlignment( AlignCenter );
+ ballLabel->setFixedSize( 18, statusLabel->tqsizeHint().height() );
+ ballLabel->tqsetAlignment( AlignCenter );
statusBar()->addWidget(ballLabel, 0, true);
- moveLabel = new TQLabel( i18n("Move %1").arg("--"), statusBar(), "moveLabel" );
+ moveLabel = new TQLabel( i18n("Move %1").tqarg("--"), statusBar(), "moveLabel" );
statusBar()->addWidget(moveLabel, 0, true);
#ifdef MYTRACE
@@ -422,7 +422,7 @@ void AbTop::setupStatusBar()
spyPopup->insertItem(spy2, 2);
spyPopup->insertItem(spy3, 3);
connect( spyPopup, TQT_SIGNAL(activated(int)),
- this, TQT_SLOT(setSpy(int)) );
+ TQT_TQOBJECT(this), TQT_SLOT(setSpy(int)) );
tb->insertButton(spy0, 30, spyPopup,
TRUE, i18n("Spy"));
}
@@ -436,7 +436,7 @@ void AbTop::updateSpy(TQString s)
{
if (showSpy) {
if (s.isEmpty()) {
- updateStatus();
+ updatetqStatus();
// statusBar()->clear();
}
else
@@ -458,17 +458,17 @@ void AbTop::updateBestMove(Move& m, int value)
}
-void AbTop::updateStatus()
+void AbTop::updatetqStatus()
{
TQString tmp;
bool showValid = false;
if (!editMode && timerState == noGame) {
- tmp = i18n("Move %1").arg("--");
+ tmp = i18n("Move %1").tqarg("--");
ballLabel->setPixmap(noBall);
}
else {
- tmp = i18n("Move %1").arg(moveNo/2 + 1);
+ tmp = i18n("Move %1").tqarg(moveNo/2 + 1);
ballLabel->setPixmap( (board->actColor() == Board::color1)
? redBall : yellowBall);
}
@@ -476,15 +476,15 @@ void AbTop::updateStatus()
if (editMode) {
tmp = TQString("%1: %2 %3 - %4 %5")
- .arg( i18n("Edit") )
- .arg( i18n("Red") ).arg(boardWidget->getColor1Count())
- .arg( i18n("Yellow") ).arg(boardWidget->getColor2Count());
+ .tqarg( i18n("Edit") )
+ .tqarg( i18n("Red") ).tqarg(boardWidget->getColor1Count())
+ .tqarg( i18n("Yellow") ).tqarg(boardWidget->getColor2Count());
validLabel->setPixmap( (board->validState() == Board::invalid)
? warningPix:okPix );
showValid = true;
}
else if (timerState == noGame) {
- tmp = i18n("Press %1 for a new game").arg( newAction->shortcut().toString());
+ tmp = i18n("Press %1 for a new game").tqarg( newAction->shortcut().toString());
}
else {
if (timerState == gameOver) {
@@ -495,9 +495,9 @@ void AbTop::updateStatus()
}
else {
tmp = TQString("%1 - %2")
- .arg( (board->actColor() == Board::color1) ?
+ .tqarg( (board->actColor() == Board::color1) ?
i18n("Red"):i18n("Yellow") )
- .arg( iPlayNow() ?
+ .tqarg( iPlayNow() ?
i18n("I am thinking...") : i18n("It is your turn!") );
}
}
@@ -514,7 +514,7 @@ void AbTop::updateStatus()
validShown = showValid;
}
statusBar()->clear();
- statusBar()->repaint();
+ statusBar()->tqrepaint();
}
void AbTop::edited(int vState)
@@ -522,7 +522,7 @@ void AbTop::edited(int vState)
if (vState == Board::empty)
timerState = noGame;
- updateStatus();
+ updatetqStatus();
}
/* only <stop search>, <hint>, <take back> have to be updated */
@@ -662,7 +662,7 @@ void AbTop::playGame()
timerState = gameOver;
}
- updateStatus();
+ updatetqStatus();
updateActions();
boardWidget->setCursor(crossCursor);
if (stop) return;
@@ -733,7 +733,7 @@ void AbTop::newGame()
/* Copy ASCII representation into Clipboard */
void AbTop::copy()
{
- QClipboard *cb = TQApplication::clipboard();
+ TQClipboard *cb = TQApplication::tqclipboard();
cb->setText( board->getASCIIState( moveNo ).ascii() );
}
@@ -741,7 +741,7 @@ void AbTop::paste()
{
if (!pastePossible) return;
- QClipboard *cb = TQApplication::clipboard();
+ TQClipboard *cb = TQApplication::tqclipboard();
pastePosition( cb->text().ascii() );
/* don't do this in pastePosition: RECURSION !! */
@@ -801,7 +801,7 @@ void AbTop::gameNetwork(bool on)
net->addListener(h2, p);
}
TQObject::connect(net, TQT_SIGNAL(gotPosition(const char *)),
- this, TQT_SLOT(pastePosition(const char *)) );
+ TQT_TQOBJECT(this), TQT_SLOT(pastePosition(const char *)) );
}
@@ -814,7 +814,7 @@ void AbTop::editModify(bool on)
timerState = noGame;
updateActions();
- updateStatus();
+ updatetqStatus();
if (!editMode && vState == Board::valid) {
actMove.type = Move::none;
timerState = moveShown;
@@ -864,7 +864,7 @@ void AbTop::setMoveNo(int m, bool updateGUI)
board->setActColor( ((moveNo%2)==0) ? Board::color1 : Board::color2 );
if (updateGUI) {
- updateStatus();
+ updatetqStatus();
updateActions();
}
}