diff options
Diffstat (limited to 'konquest/gameboard.cc')
-rw-r--r-- | konquest/gameboard.cc | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/konquest/gameboard.cc b/konquest/gameboard.cc index f4b0e25a..9f1d1a7f 100644 --- a/konquest/gameboard.cc +++ b/konquest/gameboard.cc @@ -1,4 +1,4 @@ -#include <layout.h> +#include <tqlayout.h> #include <tqcolor.h> #include <tqlabel.h> #include <tqslider.h> @@ -8,7 +8,7 @@ #include <tqpushbutton.h> #include <tqlineedit.h> #include <tqvalidator.h> -#include <textedit.h> +#include <tqtextedit.h> #include <kapplication.h> #include <klocale.h> @@ -60,10 +60,10 @@ GameBoard::GameBoard( TQWidget *parent ) turnCounter = new TQLabel( this ); turnCounter->setPalette( palette ); turnCounter->setText( "Turn" ); - turnCounter->setMaximumHeight( turnCounter->sizeHint().height() ); + turnCounter->setMaximumHeight( turnCounter->tqsizeHint().height() ); endTurn = new TQPushButton( i18n("End Turn"), this ); - endTurn->setFixedSize( endTurn->sizeHint() ); + endTurn->setFixedSize( endTurn->tqsizeHint() ); endTurn->setPalette( palette ); shipCountEdit = new TQLineEdit( this ); @@ -88,33 +88,33 @@ GameBoard::GameBoard( TQWidget *parent ) //******************************************************************** // Layout the main window //******************************************************************** - TQHBoxLayout *layout1 = new TQHBoxLayout( this ); - TQVBoxLayout *layout2 = new TQVBoxLayout; - TQHBoxLayout *layout3 = new TQHBoxLayout; - TQVBoxLayout *layout4 = new TQVBoxLayout; + TQHBoxLayout *tqlayout1 = new TQHBoxLayout( this ); + TQVBoxLayout *tqlayout2 = new TQVBoxLayout; + TQHBoxLayout *tqlayout3 = new TQHBoxLayout; + TQVBoxLayout *tqlayout4 = new TQVBoxLayout; - layout1->addLayout( layout2 ); - layout2->addLayout( layout3 ); + tqlayout1->addLayout( tqlayout2 ); + tqlayout2->addLayout( tqlayout3 ); - layout3->addSpacing( 5 ); - layout3->addWidget( gameMessage, 10 ); - layout3->addWidget( shipCountEdit, 1 ); - layout3->addWidget( endTurn, 1 ); + tqlayout3->addSpacing( 5 ); + tqlayout3->addWidget( gameMessage, 10 ); + tqlayout3->addWidget( shipCountEdit, 1 ); + tqlayout3->addWidget( endTurn, 1 ); - layout2->addSpacing( 5 ); - layout2->addWidget( mapWidget, 0, AlignTop ); - layout2->addWidget( msgWidget ); - layout2->addStretch( 1 ); + tqlayout2->addSpacing( 5 ); + tqlayout2->addWidget( mapWidget, 0, AlignTop ); + tqlayout2->addWidget( msgWidget ); + tqlayout2->addStretch( 1 ); - layout1->addSpacing( 5 ); - layout1->addLayout( layout4, 10 ); + tqlayout1->addSpacing( 5 ); + tqlayout1->addLayout( tqlayout4, 10 ); - layout4->addWidget( planetInfo, 1 ); - layout4->addSpacing( 10 ); - layout4->addWidget( turnCounter, 1 ); - layout4->addStretch( 1 ); + tqlayout4->addWidget( planetInfo, 1 ); + tqlayout4->addSpacing( 10 ); + tqlayout4->addWidget( turnCounter, 1 ); + tqlayout4->addStretch( 1 ); - layout1->addStretch( 1 ); + tqlayout1->addStretch( 1 ); //********************************************************************** // Set up signal/slot connections @@ -137,7 +137,7 @@ GameBoard::~GameBoard() } #if 0 -TQSize GameBoard::sizeHint() const +TQSize GameBoard::tqsizeHint() const { return TQSize( 600, 550 ); } @@ -315,10 +315,10 @@ GameBoard::turn() TQString msg; msg = i18n("The distance from Planet %1 to Planet %2 is %3 light years.\n" "A ship leaving this turn will arrive on turn %4") - .arg(sourcePlanet->getName()) - .arg(destPlanet->getName()) - .arg(KGlobal::locale()->formatNumber( dist, 2 )) - .arg(KGlobal::locale()->formatNumber( turnNumber + (int)dist, 0 )); + .tqarg(sourcePlanet->getName()) + .tqarg(destPlanet->getName()) + .tqarg(KGlobal::locale()->formatNumber( dist, 2 )) + .tqarg(KGlobal::locale()->formatNumber( turnNumber + (int)dist, 0 )); KMessageBox::information( this, msg, i18n("Distance")); gameState = NONE; @@ -431,7 +431,7 @@ GameBoard::turn() } TQString turnStr; - turnStr = i18n("Turn #: %1 of %2").arg(turnNumber).arg(lastTurn); + turnStr = i18n("Turn #: %1 of %2").tqarg(turnNumber).tqarg(lastTurn); turnCounter->setText( turnStr ); @@ -470,15 +470,15 @@ GameBoard::nextTurn() Player *winner = findWinner(); if (winner) { - mapWidget->repaint(true); + mapWidget->tqrepaint(true); KMessageBox::information(this, - i18n("The mighty %1 has conquered the galaxy!").arg(winner->getName()), + i18n("The mighty %1 has conquered the galaxy!").tqarg(winner->getName()), i18n("Game Over")); } if( (turnNumber == lastTurn) && !winner ) { - mapWidget->repaint(true); + mapWidget->tqrepaint(true); GameEndDlg *dlg = new GameEndDlg( this ); if( dlg->exec() == KDialogBase::Yes ) { @@ -492,7 +492,7 @@ GameBoard::nextTurn() { // Game over, man! Game over. - mapWidget->repaint(true); + mapWidget->tqrepaint(true); gameOver(); }; @@ -565,8 +565,8 @@ GameBoard::gameMsg(const TQString &msg, Player *player, Planet *planet, Player * { if (!player->isAiPlayer()) isHumanInvolved = true; - colorMsg = colorMsg.arg(playerString(player)); - plainMsg = plainMsg.arg(player->getName()); + colorMsg = colorMsg.tqarg(playerString(player)); + plainMsg = plainMsg.tqarg(player->getName()); } if (planet) @@ -577,15 +577,15 @@ GameBoard::gameMsg(const TQString &msg, Player *player, Planet *planet, Player * isHumanInvolved = true; TQString color = planetPlayer->getColor().name(); - colorMsg = colorMsg.arg(TQString("<font color=\"%1\">%2</font>").arg(color, planet->getName())); - plainMsg = plainMsg.arg(planet->getName()); + colorMsg = colorMsg.tqarg(TQString("<font color=\"%1\">%2</font>").tqarg(color, planet->getName())); + plainMsg = plainMsg.tqarg(planet->getName()); } - msgWidget->append(("<qt><font color=\"white\">Turn %1:</font> <font color=\""+color+"\">").arg(turnNumber)+colorMsg+"</font></qt>"); + msgWidget->append(("<qt><font color=\"white\">Turn %1:</font> <font color=\""+color+"\">").tqarg(turnNumber)+colorMsg+"</font></qt>"); msgWidget->scrollToBottom(); if (isHumanInvolved) { - mapWidget->repaint(true); + mapWidget->tqrepaint(true); KMessageBox::information(this, plainMsg); } } @@ -660,7 +660,7 @@ GameBoard::doFleetArrival( AttackFleet *arrivingFleet ) TQString msg; msg = i18n("Reinforcements (%1 ships) have arrived for planet %2.") - .arg(arrivingFleet->getShipCount()); + .tqarg(arrivingFleet->getShipCount()); gameMsg(msg, 0, arrivingFleet->destination); } } else { @@ -717,7 +717,7 @@ GameBoard::doFleetArrival( AttackFleet *arrivingFleet ) } } - mapWidget->repaint(true); + mapWidget->tqrepaint(true); } //************************************************************************ |