Remove additional unneeded tq method conversions

pull/1/head
Timothy Pearson 13 years ago
parent 0e2b76239f
commit c0f375feba

@ -475,12 +475,12 @@ void Atlantik::networkClosed(int status)
switch( status ) switch( status )
{ {
case KBufferedIO::involuntary: case KBufferedIO::involuntary:
slotMsgStatus( i18n("Connection with server %1:%2 lost.").tqarg(m_atlantikNetwork->host()).tqarg(m_atlantikNetwork->port()), TQString("connect_no") ); slotMsgStatus( i18n("Connection with server %1:%2 lost.").arg(m_atlantikNetwork->host()).arg(m_atlantikNetwork->port()), TQString("connect_no") );
showSelectServer(); showSelectServer();
break; break;
default: default:
if ( !m_atlantikNetwork->host().isEmpty() ) if ( !m_atlantikNetwork->host().isEmpty() )
slotMsgStatus( i18n("Disconnected from %1:%2.").tqarg(m_atlantikNetwork->host()).tqarg(m_atlantikNetwork->port()), TQString("connect_no") ); slotMsgStatus( i18n("Disconnected from %1:%2.").arg(m_atlantikNetwork->host()).arg(m_atlantikNetwork->port()), TQString("connect_no") );
break; break;
} }
} }
@ -636,7 +636,7 @@ void Atlantik::slotMsgChat(TQString player, TQString msg)
if (m_config.chatTimestamps) if (m_config.chatTimestamps)
{ {
TQTime time = TQTime::currentTime(); TQTime time = TQTime::currentTime();
serverMsgsAppend(TQString("[%1] %2: %3").tqarg(time.toString("hh:mm")).tqarg(player).tqarg(msg)); serverMsgsAppend(TQString("[%1] %2: %3").arg(time.toString("hh:mm")).arg(player).arg(msg));
} }
else else
serverMsgsAppend(player + ": " + msg); serverMsgsAppend(player + ": " + msg);

@ -113,7 +113,7 @@ void EventLogWidget::save()
{ {
TQTextStream stream(&file); TQTextStream stream(&file);
stream << i18n( "Atlantik log file, saved at %1." ).tqarg( TQDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss") ) << endl; stream << i18n( "Atlantik log file, saved at %1." ).arg( TQDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss") ) << endl;
TQPtrList<Event> events = m_eventLog->events(); TQPtrList<Event> events = m_eventLog->events();
for (TQPtrListIterator<Event> it( events ); (*it) ; ++it) for (TQPtrListIterator<Event> it( events ); (*it) ; ++it)

@ -80,13 +80,13 @@ void SelectGame::addGame(Game *game)
if (game->id() == -1) if (game->id() == -1)
{ {
TQListViewItem *item = new TQListViewItem( m_gameList, i18n("Create a new %1 Game").tqarg(game->name()), game->description(), TQString(), TQString(), game->type() ); TQListViewItem *item = new TQListViewItem( m_gameList, i18n("Create a new %1 Game").arg(game->name()), game->description(), TQString(), TQString(), game->type() );
item->setPixmap(0, TQPixmap(SmallIcon("filenew"))); item->setPixmap(0, TQPixmap(SmallIcon("filenew")));
} }
else else
{ {
Player *master = game->master(); Player *master = game->master();
TQListViewItem *item = new TQListViewItem( m_gameList, i18n("Join %1's %2 Game").tqarg( (master ? master->name() : TQString()), game->name() ), game->description(), TQString::number(game->id()), TQString::number(game->players()), game->type() ); TQListViewItem *item = new TQListViewItem( m_gameList, i18n("Join %1's %2 Game").arg( (master ? master->name() : TQString()), game->name() ), game->description(), TQString::number(game->id()), TQString::number(game->players()), game->type() );
item->setPixmap( 0, TQPixmap(SmallIcon("atlantik")) ); item->setPixmap( 0, TQPixmap(SmallIcon("atlantik")) );
item->setEnabled(game->canBeJoined()); item->setEnabled(game->canBeJoined());
@ -118,11 +118,11 @@ void SelectGame::updateGame(Game *game)
item->setText( 1, game->description() ); item->setText( 1, game->description() );
if (game->id() == -1) if (game->id() == -1)
item->setText(0, i18n("Create a new %1 Game").tqarg(game->name())); item->setText(0, i18n("Create a new %1 Game").arg(game->name()));
else else
{ {
Player *master = game->master(); Player *master = game->master();
item->setText( 0, i18n("Join %1's %2 Game").tqarg( (master ? master->name() : TQString()), game->name() ) ); item->setText( 0, i18n("Join %1's %2 Game").arg( (master ? master->name() : TQString()), game->name() ) );
item->setText( 3, TQString::number( game->players() ) ); item->setText( 3, TQString::number( game->players() ) );
item->setEnabled( game->canBeJoined() ); item->setEnabled( game->canBeJoined() );
@ -143,7 +143,7 @@ void SelectGame::playerChanged(Player *player)
game = m_atlanticCore->findGame( item->text(2).toInt() ); game = m_atlanticCore->findGame( item->text(2).toInt() );
if ( game && game->master() == player ) if ( game && game->master() == player )
{ {
item->setText( 0, i18n("Join %1's %2 Game").tqarg( player->name(), game->name() ) ); item->setText( 0, i18n("Join %1's %2 Game").arg( player->name(), game->name() ) );
return; return;
} }
item = item->nextSibling(); item = item->nextSibling();

@ -196,5 +196,5 @@ void TradeMoney::setMoney(unsigned int money)
TQString TradeMoney::text() const TQString TradeMoney::text() const
{ {
return TQString("$%1").tqarg(m_money); return TQString("$%1").arg(m_money);
} }

@ -95,37 +95,37 @@ void AtlantikNetwork::endTurn()
void AtlantikNetwork::setName(TQString name) void AtlantikNetwork::setName(TQString name)
{ {
// Almost deprecated, will be replaced by libmonopdprotocol // Almost deprecated, will be replaced by libmonopdprotocol
writeData(TQString(".n%1").tqarg(name)); writeData(TQString(".n%1").arg(name));
} }
void AtlantikNetwork::tokenConfirmation(Estate *estate) void AtlantikNetwork::tokenConfirmation(Estate *estate)
{ {
writeData(TQString(".t%1").tqarg(estate ? estate->id() : -1)); writeData(TQString(".t%1").arg(estate ? estate->id() : -1));
} }
void AtlantikNetwork::estateToggleMortgage(Estate *estate) void AtlantikNetwork::estateToggleMortgage(Estate *estate)
{ {
writeData(TQString(".em%1").tqarg(estate ? estate->id() : -1)); writeData(TQString(".em%1").arg(estate ? estate->id() : -1));
} }
void AtlantikNetwork::estateHouseBuy(Estate *estate) void AtlantikNetwork::estateHouseBuy(Estate *estate)
{ {
writeData(TQString(".hb%1").tqarg(estate ? estate->id() : -1)); writeData(TQString(".hb%1").arg(estate ? estate->id() : -1));
} }
void AtlantikNetwork::estateHouseSell(Estate *estate) void AtlantikNetwork::estateHouseSell(Estate *estate)
{ {
writeData(TQString(".hs%1").tqarg(estate ? estate->id() : -1)); writeData(TQString(".hs%1").arg(estate ? estate->id() : -1));
} }
void AtlantikNetwork::newGame(const TQString &gameType) void AtlantikNetwork::newGame(const TQString &gameType)
{ {
writeData(TQString(".gn%1").tqarg(gameType)); writeData(TQString(".gn%1").arg(gameType));
} }
void AtlantikNetwork::joinGame(int gameId) void AtlantikNetwork::joinGame(int gameId)
{ {
writeData(TQString(".gj%1").tqarg(gameId)); writeData(TQString(".gj%1").arg(gameId));
} }
void AtlantikNetwork::cmdChat(TQString msg) void AtlantikNetwork::cmdChat(TQString msg)
@ -135,42 +135,42 @@ void AtlantikNetwork::cmdChat(TQString msg)
void AtlantikNetwork::newTrade(Player *player) void AtlantikNetwork::newTrade(Player *player)
{ {
writeData(TQString(".Tn%1").tqarg(player ? player->id() : -1)); writeData(TQString(".Tn%1").arg(player ? player->id() : -1));
} }
void AtlantikNetwork::kickPlayer(Player *player) void AtlantikNetwork::kickPlayer(Player *player)
{ {
writeData(TQString(".gk%1").tqarg(player ? player->id() : -1)); writeData(TQString(".gk%1").arg(player ? player->id() : -1));
} }
void AtlantikNetwork::tradeUpdateEstate(Trade *trade, Estate *estate, Player *player) void AtlantikNetwork::tradeUpdateEstate(Trade *trade, Estate *estate, Player *player)
{ {
writeData(TQString(".Te%1:%2:%3").tqarg(trade ? trade->tradeId() : -1).tqarg(estate ? estate->id() : -1).tqarg(player ? player->id() : -1)); writeData(TQString(".Te%1:%2:%3").arg(trade ? trade->tradeId() : -1).arg(estate ? estate->id() : -1).arg(player ? player->id() : -1));
} }
void AtlantikNetwork::tradeUpdateMoney(Trade *trade, unsigned int money, Player *pFrom, Player *pTo) void AtlantikNetwork::tradeUpdateMoney(Trade *trade, unsigned int money, Player *pFrom, Player *pTo)
{ {
writeData(TQString(".Tm%1:%2:%3:%4").tqarg(trade ? trade->tradeId() : -1).tqarg(pFrom ? pFrom->id() : -1).tqarg(pTo ? pTo->id() : -1).tqarg(money)); writeData(TQString(".Tm%1:%2:%3:%4").arg(trade ? trade->tradeId() : -1).arg(pFrom ? pFrom->id() : -1).arg(pTo ? pTo->id() : -1).arg(money));
} }
void AtlantikNetwork::tradeReject(Trade *trade) void AtlantikNetwork::tradeReject(Trade *trade)
{ {
writeData(TQString(".Tr%1").tqarg(trade ? trade->tradeId() : -1)); writeData(TQString(".Tr%1").arg(trade ? trade->tradeId() : -1));
} }
void AtlantikNetwork::tradeAccept(Trade *trade) void AtlantikNetwork::tradeAccept(Trade *trade)
{ {
writeData(TQString(".Ta%1:%2").tqarg(trade ? trade->tradeId() : -1).tqarg(trade ? trade->revision() : -1)); writeData(TQString(".Ta%1:%2").arg(trade ? trade->tradeId() : -1).arg(trade ? trade->revision() : -1));
} }
void AtlantikNetwork::auctionBid(Auction *auction, int amount) void AtlantikNetwork::auctionBid(Auction *auction, int amount)
{ {
writeData(TQString(".ab%1:%2").tqarg(auction ? auction->auctionId() : -1).tqarg(amount)); writeData(TQString(".ab%1:%2").arg(auction ? auction->auctionId() : -1).arg(amount));
} }
void AtlantikNetwork::setImage(const TQString &name) void AtlantikNetwork::setImage(const TQString &name)
{ {
writeData(TQString(".pi%1").tqarg(name)); writeData(TQString(".pi%1").arg(name));
} }
void AtlantikNetwork::jailPay() void AtlantikNetwork::jailPay()
@ -190,7 +190,7 @@ void AtlantikNetwork::jailCard()
void AtlantikNetwork::changeOption(int configId, const TQString &value) void AtlantikNetwork::changeOption(int configId, const TQString &value)
{ {
writeData( TQString(".gc%1:%2").tqarg(configId).tqarg(value) ); writeData( TQString(".gc%1:%2").arg(configId).arg(value) );
} }
void AtlantikNetwork::writeData(TQString msg) void AtlantikNetwork::writeData(TQString msg)
@ -607,7 +607,7 @@ void AtlantikNetwork::processNode(TQDomNode n)
Estate *estate = 0; Estate *estate = 0;
bool b_newEstate = false; bool b_newEstate = false;
// FIXME: allow any estateId, GUI should not use it to determin its tqgeometry // FIXME: allow any estateId, GUI should not use it to determin its geometry
if (estateId >= 0 && estateId < 100 && !(estate = m_atlanticCore->findEstate(a.value().toInt()))) if (estateId >= 0 && estateId < 100 && !(estate = m_atlanticCore->findEstate(a.value().toInt())))
{ {
// Create estate object // Create estate object
@ -906,7 +906,7 @@ void AtlantikNetwork::serverConnect(const TQString host, int port)
{ {
setAddress(host, port); setAddress(host, port);
enableRead(true); enableRead(true);
emit msgStatus(i18n("Connecting to %1:%2...").tqarg(host).tqarg(TQString::number(port)), "connect_creating"); emit msgStatus(i18n("Connecting to %1:%2...").arg(host).arg(TQString::number(port)), "connect_creating");
startAsyncConnect(); startAsyncConnect();
} }
@ -917,12 +917,12 @@ void AtlantikNetwork::slotLookupFinished(int count)
void AtlantikNetwork::slotConnectionSuccess() void AtlantikNetwork::slotConnectionSuccess()
{ {
emit msgStatus(i18n("Connected to %1:%2.").tqarg(host()).tqarg(port()), "connect_established"); emit msgStatus(i18n("Connected to %1:%2.").arg(host()).arg(port()), "connect_established");
} }
void AtlantikNetwork::slotConnectionFailed(int error) void AtlantikNetwork::slotConnectionFailed(int error)
{ {
emit msgStatus(i18n("Connection failed! Error code: %1").tqarg(error), "connect_no"); emit msgStatus(i18n("Connection failed! Error code: %1").arg(error), "connect_no");
} }
#include "atlantik_network.moc" #include "atlantik_network.moc"

@ -47,7 +47,7 @@ AuctionWidget::AuctionWidget(AtlanticCore *atlanticCore, Auction *auction, TQWid
// Player list // Player list
Estate *estate = auction->estate(); Estate *estate = auction->estate();
m_playerGroupBox = new TQVGroupBox(estate ? i18n("Auction: %1").tqarg(estate->name()) : i18n("Auction"), this, "groupBox"); m_playerGroupBox = new TQVGroupBox(estate ? i18n("Auction: %1").arg(estate->name()) : i18n("Auction"), this, "groupBox");
m_mainLayout->addWidget(m_playerGroupBox); m_mainLayout->addWidget(m_playerGroupBox);
m_playerList = new KListView(m_playerGroupBox); m_playerList = new KListView(m_playerGroupBox);

@ -351,13 +351,13 @@ TQPoint AtlantikBoard::calculateTokenDestination(Token *token, Estate *eDest)
int x = 0, y = 0; int x = 0, y = 0;
if (token->player()->inJail()) if (token->player()->inJail())
{ {
x = evDest->tqgeometry().right() - token->width() - 2; x = evDest->geometry().right() - token->width() - 2;
y = evDest->tqgeometry().top(); y = evDest->geometry().top();
} }
else else
{ {
x = evDest->tqgeometry().center().x() - (token->width()/2); x = evDest->geometry().center().x() - (token->width()/2);
y = evDest->tqgeometry().center().y() - (token->height()/2); y = evDest->geometry().center().y() - (token->height()/2);
/* /*
// Re-center because of EstateView headers // Re-center because of EstateView headers
@ -394,8 +394,8 @@ void AtlantikBoard::slotMoveToken()
} }
// Where are we? // Where are we?
int xCurrent = m_movingToken->tqgeometry().x(); int xCurrent = m_movingToken->geometry().x();
int yCurrent = m_movingToken->tqgeometry().y(); int yCurrent = m_movingToken->geometry().y();
// Where do we want to go today? // Where do we want to go today?
Estate *eDest = m_atlanticCore->estateAfter(m_movingToken->location()); Estate *eDest = m_atlanticCore->estateAfter(m_movingToken->location());

@ -114,7 +114,7 @@ void EstateDetails::paintEvent(TQPaintEvent *)
TQColor greenHouse(0, 255, 0); TQColor greenHouse(0, 255, 0);
TQColor redHotel(255, 51, 51); TQColor redHotel(255, 51, 51);
TQPainter painter; TQPainter painter;
painter.tqbegin(TQT_TQPAINTDEVICE(m_pixmap), this); painter.begin(TQT_TQPAINTDEVICE(m_pixmap), this);
painter.setPen(TQt::black); painter.setPen(TQt::black);
@ -136,7 +136,7 @@ void EstateDetails::paintEvent(TQPaintEvent *)
quartzBuffer->resize(25, (height()/4)-2); quartzBuffer->resize(25, (height()/4)-2);
TQPainter quartzPainter; TQPainter quartzPainter;
quartzPainter.tqbegin(TQT_TQPAINTDEVICE(quartzBuffer), this); quartzPainter.begin(TQT_TQPAINTDEVICE(quartzBuffer), this);
painter.setBrush(titleColor); painter.setBrush(titleColor);
painter.drawRect(0, 0, width(), titleHeight); painter.drawRect(0, 0, width(), titleHeight);
@ -217,22 +217,22 @@ void EstateDetails::addDetails()
// Price // Price
if (m_estate->price()) if (m_estate->price())
{ {
infoText = new TQListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Price: %1").tqarg(m_estate->price())); infoText = new TQListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Price: %1").arg(m_estate->price()));
infoText->setPixmap(0, TQPixmap(SmallIcon("info"))); infoText->setPixmap(0, TQPixmap(SmallIcon("info")));
} }
// Owner, houses, isMortgaged // Owner, houses, isMortgaged
if (m_estate && m_estate->canBeOwned()) if (m_estate && m_estate->canBeOwned())
{ {
infoText = new TQListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Owner: %1").tqarg(m_estate->owner() ? m_estate->owner()->name() : i18n("unowned"))); infoText = new TQListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Owner: %1").arg(m_estate->owner() ? m_estate->owner()->name() : i18n("unowned")));
infoText->setPixmap(0, TQPixmap(SmallIcon("info"))); infoText->setPixmap(0, TQPixmap(SmallIcon("info")));
if (m_estate->isOwned()) if (m_estate->isOwned())
{ {
infoText = new TQListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Houses: %1").tqarg(m_estate->houses())); infoText = new TQListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Houses: %1").arg(m_estate->houses()));
infoText->setPixmap(0, TQPixmap(SmallIcon("info"))); infoText->setPixmap(0, TQPixmap(SmallIcon("info")));
infoText = new TQListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Mortgaged: %1").tqarg(m_estate->isMortgaged() ? i18n("Yes") : i18n("No"))); infoText = new TQListViewItem(m_infoListView, m_infoListView->lastItem(), i18n("Mortgaged: %1").arg(m_estate->isMortgaged() ? i18n("Yes") : i18n("No")));
infoText->setPixmap(0, TQPixmap(SmallIcon("info"))); infoText->setPixmap(0, TQPixmap(SmallIcon("info")));
} }
} }

@ -72,20 +72,20 @@ void EstateView::updateToolTip()
TQString toolTip = m_estate->name(); TQString toolTip = m_estate->name();
if ( m_estate->isOwned() ) if ( m_estate->isOwned() )
{ {
toolTip.append( "\n" + i18n("Owner: %1").tqarg( m_estate->owner()->name() ) ); toolTip.append( "\n" + i18n("Owner: %1").arg( m_estate->owner()->name() ) );
if ( m_estate->isMortgaged() ) if ( m_estate->isMortgaged() )
toolTip.append( "\n" + i18n("Unmortgage Price: %1").tqarg( m_estate->unmortgagePrice() ) ); toolTip.append( "\n" + i18n("Unmortgage Price: %1").arg( m_estate->unmortgagePrice() ) );
else else
toolTip.append( "\n" + i18n("Mortgage Value: %1").tqarg( m_estate->mortgagePrice() ) ); toolTip.append( "\n" + i18n("Mortgage Value: %1").arg( m_estate->mortgagePrice() ) );
if ( m_estate->canSellHouses() ) if ( m_estate->canSellHouses() )
toolTip.append( "\n" + i18n("House Value: %1").tqarg( m_estate->houseSellPrice() ) ); toolTip.append( "\n" + i18n("House Value: %1").arg( m_estate->houseSellPrice() ) );
if ( m_estate->canBuyHouses() ) if ( m_estate->canBuyHouses() )
toolTip.append( "\n" + i18n("House Price: %1").tqarg( m_estate->housePrice() ) ); toolTip.append( "\n" + i18n("House Price: %1").arg( m_estate->housePrice() ) );
} }
else if ( m_estate->canBeOwned() ) else if ( m_estate->canBeOwned() )
toolTip.append( "\n" + i18n("Price: %1").tqarg( m_estate->price() ) ); toolTip.append( "\n" + i18n("Price: %1").arg( m_estate->price() ) );
else if ( m_estate->money() ) else if ( m_estate->money() )
toolTip.append( "\n" + i18n("Money: %1").tqarg( m_estate->money() ) ); toolTip.append( "\n" + i18n("Money: %1").arg( m_estate->money() ) );
TQToolTip::add( this, toolTip ); TQToolTip::add( this, toolTip );
} }
@ -255,7 +255,7 @@ void EstateView::paintEvent(TQPaintEvent *)
TQColor greenHouse(0, 255, 0); TQColor greenHouse(0, 255, 0);
TQColor redHotel(255, 51, 51); TQColor redHotel(255, 51, 51);
TQPainter painter; TQPainter painter;
painter.tqbegin(TQT_TQPAINTDEVICE(qpixmap), this); painter.begin(TQT_TQPAINTDEVICE(qpixmap), this);
painter.setPen(TQt::black); painter.setPen(TQt::black);
@ -281,7 +281,7 @@ void EstateView::paintEvent(TQPaintEvent *)
quartzBuffer->resize(m_titleWidth-2, 25); quartzBuffer->resize(m_titleWidth-2, 25);
TQPainter quartzPainter; TQPainter quartzPainter;
quartzPainter.tqbegin(TQT_TQPAINTDEVICE(quartzBuffer), this); quartzPainter.begin(TQT_TQPAINTDEVICE(quartzBuffer), this);
painter.setBrush(m_estate->color()); painter.setBrush(m_estate->color());
switch(m_orientation) switch(m_orientation)
@ -477,7 +477,7 @@ void EstateView::mousePressEvent(TQMouseEvent *e)
{ {
// Request trade // Request trade
if (Player *player = m_estate->owner()) if (Player *player = m_estate->owner())
rmbMenu->insertItem(i18n("Request Trade with %1").tqarg(player->name()), 3); rmbMenu->insertItem(i18n("Request Trade with %1").arg(player->name()), 3);
} }
KPopupMenu *pm = dynamic_cast<KPopupMenu *>(rmbMenu); KPopupMenu *pm = dynamic_cast<KPopupMenu *>(rmbMenu);

@ -196,7 +196,7 @@ void PortfolioView::paintEvent(TQPaintEvent *)
qpixmap = new TQPixmap(width(), height()); qpixmap = new TQPixmap(width(), height());
TQPainter painter; TQPainter painter;
painter.tqbegin(TQT_TQPAINTDEVICE(qpixmap), this); painter.begin(TQT_TQPAINTDEVICE(qpixmap), this);
painter.setPen(TQt::white); painter.setPen(TQt::white);
painter.setBrush(TQt::white); painter.setBrush(TQt::white);
@ -260,12 +260,12 @@ void PortfolioView::mousePressEvent(TQMouseEvent *e)
if ( m_portfolioEstates.count() ) if ( m_portfolioEstates.count() )
{ {
// Start trade // Start trade
rmbMenu->insertItem(i18n("Request Trade with %1").tqarg(m_player->name()), 0); rmbMenu->insertItem(i18n("Request Trade with %1").arg(m_player->name()), 0);
} }
else else
{ {
// Kick player // Kick player
rmbMenu->insertItem(i18n("Boot Player %1 to Lounge").tqarg(m_player->name()), 0); rmbMenu->insertItem(i18n("Boot Player %1 to Lounge").arg(m_player->name()), 0);
rmbMenu->setItemEnabled( 0, m_atlanticCore->selfIsMaster() ); rmbMenu->setItemEnabled( 0, m_atlanticCore->selfIsMaster() );
} }

@ -127,7 +127,7 @@ void Token::paintEvent(TQPaintEvent *)
qpixmap = new TQPixmap(width(), height()); qpixmap = new TQPixmap(width(), height());
TQPainter painter; TQPainter painter;
painter.tqbegin(TQT_TQPAINTDEVICE(qpixmap), this); painter.begin(TQT_TQPAINTDEVICE(qpixmap), this);
if (m_image) if (m_image)
{ {

@ -52,7 +52,7 @@ TradeDisplay::TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, TQWidget *p
m_trade = trade; m_trade = trade;
m_atlanticCore = atlanticCore; m_atlanticCore = atlanticCore;
setCaption(i18n("Trade %1").tqarg(trade->tradeId())); setCaption(i18n("Trade %1").arg(trade->tradeId()));
TQVBoxLayout *listCompBox = new TQVBoxLayout(this, KDialog::marginHint()); TQVBoxLayout *listCompBox = new TQVBoxLayout(this, KDialog::marginHint());
@ -143,7 +143,7 @@ TradeDisplay::TradeDisplay(Trade *trade, AtlanticCore *atlanticCore, TQWidget *p
m_status = new TQLabel(this); m_status = new TQLabel(this);
listCompBox->addWidget(m_status); listCompBox->addWidget(m_status);
m_status->setText( i18n( "%1 out of %2 players accept current trade proposal." ).tqarg( m_trade->count( true ) ).tqarg( m_trade->count( false ) ) ); m_status->setText( i18n( "%1 out of %2 players accept current trade proposal." ).arg( m_trade->count( true ) ).arg( m_trade->count( false ) ) );
// mPlayerList->header()->hide(); // mPlayerList->header()->hide();
// mPlayerList->setRootIsDecorated(true); // mPlayerList->setRootIsDecorated(true);
@ -216,7 +216,7 @@ void TradeDisplay::tradeChanged()
{ {
// TODO: add notification whether playerSelf has accepted or not and // TODO: add notification whether playerSelf has accepted or not and
// enable/disable accept button based on that // enable/disable accept button based on that
m_status->setText( i18n( "%1 out of %2 players accept current trade proposal." ).tqarg( m_trade->count( true ) ).tqarg( m_trade->count( false ) ) ); m_status->setText( i18n( "%1 out of %2 players accept current trade proposal." ).arg( m_trade->count( true ) ).arg( m_trade->count( false ) ) );
} }
void TradeDisplay::playerChanged(Player *player) void TradeDisplay::playerChanged(Player *player)
@ -232,7 +232,7 @@ void TradeDisplay::playerChanged(Player *player)
void TradeDisplay::tradeRejected(Player *player) void TradeDisplay::tradeRejected(Player *player)
{ {
if (player) if (player)
m_status->setText(i18n("Trade proposal was rejected by %1.").tqarg(player->name())); m_status->setText(i18n("Trade proposal was rejected by %1.").arg(player->name()));
else else
m_status->setText(i18n("Trade proposal was rejected.")); m_status->setText(i18n("Trade proposal was rejected."));

@ -1,5 +1,5 @@
#include "colors.inc" #include "colors.inc"
#include "tqshapes.inc" #include "shapes.inc"
#include "textures.inc" #include "textures.inc"
// #include "stones.inc" // #include "stones.inc"

@ -1,5 +1,5 @@
#include "colors.inc" #include "colors.inc"
#include "tqshapes.inc" #include "shapes.inc"
#include "textures.inc" #include "textures.inc"
// #include "stones.inc" // #include "stones.inc"

@ -1,5 +1,5 @@
#include "colors.inc" #include "colors.inc"
#include "tqshapes.inc" #include "shapes.inc"
#include "textures.inc" #include "textures.inc"
// #include "stones.inc" // #include "stones.inc"

@ -484,7 +484,7 @@ void KAstTopLevel::slotNewGame()
view->setRockSpeed( levels[0].rockSpeed ); view->setRockSpeed( levels[0].rockSpeed );
view->addRocks( levels[0].nrocks ); view->addRocks( levels[0].nrocks );
view->showText( i18n( "Press %1 to launch." ) view->showText( i18n( "Press %1 to launch." )
.tqarg(launchAction->shortcut().seq(0).toString()), .arg(launchAction->shortcut().seq(0).toString()),
yellow ); yellow );
waitShip = true; waitShip = true;
gameOver = false; gameOver = false;
@ -509,7 +509,7 @@ void KAstTopLevel::slotShipKilled()
{ {
waitShip = true; waitShip = true;
view->showText( i18n( "Ship Destroyed. Press %1 to launch.") view->showText( i18n( "Ship Destroyed. Press %1 to launch.")
.tqarg(launchAction->shortcut().seq(0).toString()), .arg(launchAction->shortcut().seq(0).toString()),
yellow ); yellow );
} }
else else
@ -577,7 +577,7 @@ void KAstTopLevel::slotKeyConfig()
{ {
KKeyDialog::configure( actionCollection(), this ); KKeyDialog::configure( actionCollection(), this );
if ( waitShip ) view->showText( i18n( "Press %1 to launch." ) if ( waitShip ) view->showText( i18n( "Press %1 to launch." )
.tqarg(launchAction->shortcut().seq(0).toString()), .arg(launchAction->shortcut().seq(0).toString()),
yellow, false ); yellow, false );
} }
@ -637,9 +637,9 @@ void KAstTopLevel::doStats()
" Hit:\t%2\n" " Hit:\t%2\n"
" Missed:\t%3\n" " Missed:\t%3\n"
"Hit ratio:\t%4 %\t\t") "Hit ratio:\t%4 %\t\t")
.tqarg(view->shots()).tqarg(view->hits()) .arg(view->shots()).arg(view->hits())
.tqarg(view->shots() - view->hits()) .arg(view->shots() - view->hits())
.tqarg(r); .arg(r);
view->showText( s, green, FALSE ); view->showText( s, green, FALSE );
} }

@ -95,11 +95,11 @@ void GameWidget::doRedo ()
} }
void GameWidget::gameOver(int moves) { void GameWidget::gameOver(int moves) {
KMessageBox::information(this, i18n("You solved level %1 with %2 moves!").tqarg(level).tqarg(moves), i18n("Congratulations")); KMessageBox::information(this, i18n("You solved level %1 with %2 moves!").arg(level).arg(moves), i18n("Congratulations"));
KScoreDialog high(KScoreDialog::Name | KScoreDialog::Score, this); KScoreDialog high(KScoreDialog::Name | KScoreDialog::Score, this);
high.setCaption(i18n("Level %1 Highscores").tqarg(level)); high.setCaption(i18n("Level %1 Highscores").arg(level));
high.setConfigGroup(TQString("Highscores Level %1").tqarg(level)); high.setConfigGroup(TQString("Highscores Level %1").arg(level));
KScoreDialog::FieldInfo scoreInfo; KScoreDialog::FieldInfo scoreInfo;
@ -118,8 +118,8 @@ void GameWidget::getMoves(int moves)
void GameWidget::mergeHighScores(int l) void GameWidget::mergeHighScores(int l)
{ {
KConfigGroup oldConfig(kapp->config(), TQString("High Scores Level %1").tqarg(l).utf8()); KConfigGroup oldConfig(kapp->config(), TQString("High Scores Level %1").arg(l).utf8());
KConfigGroup newConfig(kapp->config(), TQString("Highscores Level %1").tqarg(l).utf8()); KConfigGroup newConfig(kapp->config(), TQString("Highscores Level %1").arg(l).utf8());
newConfig.writeEntry("LastPlayer", oldConfig.readEntry("LastPlayer")); newConfig.writeEntry("LastPlayer", oldConfig.readEntry("LastPlayer"));
@ -138,7 +138,7 @@ void GameWidget::mergeHighScores(int l)
void GameWidget::updateLevel (int l) void GameWidget::updateLevel (int l)
{ {
level=l; level=l;
TQString levelFile = locate("appdata", TQString("levels/level_%1").tqarg(l)); TQString levelFile = locate("appdata", TQString("levels/level_%1").arg(l));
if (levelFile.isNull()) { if (levelFile.isNull()) {
return updateLevel(1); return updateLevel(1);
} }
@ -147,11 +147,11 @@ void GameWidget::updateLevel (int l)
cfg.setGroup("Level"); cfg.setGroup("Level");
feld->load(cfg); feld->load(cfg);
if (!kapp->config()->hasGroup(TQString("Highscores Level %1").tqarg(level)) && if (!kapp->config()->hasGroup(TQString("Highscores Level %1").arg(level)) &&
kapp->config()->hasGroup(TQString("High Scores Level %1").tqarg(level))) kapp->config()->hasGroup(TQString("High Scores Level %1").arg(level)))
mergeHighScores(level); mergeHighScores(level);
highScore->setConfigGroup(TQString("Highscores Level %1").tqarg(level)); highScore->setConfigGroup(TQString("Highscores Level %1").arg(level));
highest.setNum(highScore->highScore()); highest.setNum(highScore->highScore());
if (highest != "0" ) hs->setText(highest); if (highest != "0" ) hs->setText(highest);
@ -159,7 +159,7 @@ void GameWidget::updateLevel (int l)
ys->setText("0"); ys->setText("0");
scrl->setValue(level); scrl->setValue(level);
feld->tqrepaint(); feld->repaint();
} }
void GameWidget::restartLevel() void GameWidget::restartLevel()
@ -245,8 +245,8 @@ GameWidget::~GameWidget()
void GameWidget::showHighscores () void GameWidget::showHighscores ()
{ {
KScoreDialog high(KScoreDialog::Name | KScoreDialog::Score, this); KScoreDialog high(KScoreDialog::Name | KScoreDialog::Score, this);
high.setCaption(i18n("Level %1 Highscores").tqarg(level)); high.setCaption(i18n("Level %1 Highscores").arg(level));
high.setConfigGroup(TQString("Highscores Level %1").tqarg(level)); high.setConfigGroup(TQString("Highscores Level %1").arg(level));
high.exec(); high.exec();
} }

@ -62,7 +62,7 @@ void Molek::load (const KSimpleConfig& config)
if (value.isEmpty()) if (value.isEmpty())
break; break;
current.obj = value.tqat(0).latin1(); current.obj = value.at(0).latin1();
value = value.mid(2); value = value.mid(2);
if (value.isNull()) if (value.isNull())
value = ""; value = "";
@ -82,7 +82,7 @@ void Molek::load (const KSimpleConfig& config)
line = config.readEntry(key); line = config.readEntry(key);
for (int i = 0; i < MOLEK_SIZE; i++) for (int i = 0; i < MOLEK_SIZE; i++)
molek[i][j] = atom2int(line.tqat(i).latin1()); molek[i][j] = atom2int(line.at(i).latin1());
} }
mname = i18n(config.readEntry("Name", I18N_NOOP("Noname")).latin1()); mname = i18n(config.readEntry("Name", I18N_NOOP("Noname")).latin1());
@ -103,12 +103,12 @@ void Molek::load (const KSimpleConfig& config)
height++; height++;
width++; width++;
tqrepaint (); repaint ();
} }
void Molek::paintEvent( TQPaintEvent * ) void Molek::paintEvent( TQPaintEvent * )
{ {
TQString st = i18n("Level: %1").tqarg(level); TQString st = i18n("Level: %1").arg(level);
TQPainter paint (this); TQPainter paint (this);
paint.setPen (TQColor (190, 190, 190)); paint.setPen (TQColor (190, 190, 190));

@ -81,7 +81,7 @@ void KBgEngineFIBS::start()
// == configuration handling =================================================== // == configuration handling ===================================================
/* /*
* Restore settings and ask tqchildren to do the same * Restore settings and ask children to do the same
*/ */
void KBgEngineFIBS::readConfig() void KBgEngineFIBS::readConfig()
{ {
@ -110,7 +110,7 @@ void KBgEngineFIBS::readConfig()
autoMsg[MsgLos] = config->readEntry("msg-los", ""); autoMsg[MsgLos] = config->readEntry("msg-los", "");
autoMsg[MsgWin] = config->readEntry("msg-win", ""); autoMsg[MsgWin] = config->readEntry("msg-win", "");
// ask the tqchildren to read their config options // ask the children to read their config options
playerlist->readConfig(); playerlist->readConfig();
chatWindow->readConfig(); chatWindow->readConfig();
} }
@ -145,7 +145,7 @@ void KBgEngineFIBS::saveConfig()
config->writeEntry("msg-los", autoMsg[MsgLos]); config->writeEntry("msg-los", autoMsg[MsgLos]);
config->writeEntry("msg-win", autoMsg[MsgWin]); config->writeEntry("msg-win", autoMsg[MsgWin]);
// ask the tqchildren to read their config options // ask the children to read their config options
playerlist->saveConfig(); playerlist->saveConfig();
chatWindow->saveConfig(); chatWindow->saveConfig();
} }
@ -343,7 +343,7 @@ void KBgEngineFIBS::getSetupPages(KDialogBase *nb)
TQWhatsThis::add(cbk, i18n("Usually, FIBS drops the connection after one hour of inactivity. When " TQWhatsThis::add(cbk, i18n("Usually, FIBS drops the connection after one hour of inactivity. When "
"you check this box, %1 will try to keep the connection alive, even " "you check this box, %1 will try to keep the connection alive, even "
"if you are not actually playing or chatting. Use this with caution " "if you are not actually playing or chatting. Use this with caution "
"if you do not have flat-rate Internet access.").tqarg(PROG_NAME)); "if you do not have flat-rate Internet access.").arg(PROG_NAME));
cbk->setChecked(keepalive); cbk->setChecked(keepalive);
@ -357,7 +357,7 @@ void KBgEngineFIBS::getSetupPages(KDialogBase *nb)
tc->addTab(w, i18n("&Connection")); tc->addTab(w, i18n("&Connection"));
/* /*
* Ask tqchildren for settings * Ask children for settings
*/ */
chatWindow->getSetupPages(tc, nb->spacingHint()); chatWindow->getSetupPages(tc, nb->spacingHint());
playerlist->getSetupPages(tc, nb->spacingHint()); playerlist->getSetupPages(tc, nb->spacingHint());
@ -431,28 +431,28 @@ void KBgEngineFIBS::changeJoin(const TQString &info)
TQString text, menu; TQString text, menu;
if ((*it).contains(TQRegExp(" r$"))) { if ((*it).contains(TQRegExp(" r$"))) {
menu = i18n("R means resume", "%1 (R)").tqarg(name); menu = i18n("R means resume", "%1 (R)").arg(name);
text = i18n("%1 (experience %2, rating %3) wants to resume a saved match with you. " text = i18n("%1 (experience %2, rating %3) wants to resume a saved match with you. "
"If you want to play, use the corresponding menu entry to join (or type " "If you want to play, use the corresponding menu entry to join (or type "
"'join %4').").tqarg(name).tqarg(expi_s).tqarg(rate_s).tqarg(name); "'join %4').").arg(name).arg(expi_s).arg(rate_s).arg(name);
KNotifyClient::event("invitation", i18n("%1 wants to resume a saved match with you"). KNotifyClient::event("invitation", i18n("%1 wants to resume a saved match with you").
arg(name)); arg(name));
} else if ((*it).contains(TQRegExp(" u$"))) { } else if ((*it).contains(TQRegExp(" u$"))) {
menu = i18n("U means unlimited", "%1 (U)").tqarg(name); menu = i18n("U means unlimited", "%1 (U)").arg(name);
text = i18n("%1 (experience %2, rating %3) wants to play an unlimited match with you. " text = i18n("%1 (experience %2, rating %3) wants to play an unlimited match with you. "
"If you want to play, use the corresponding menu entry to join (or type " "If you want to play, use the corresponding menu entry to join (or type "
"'join %4').").tqarg(name).tqarg(expi_s).tqarg(rate_s).tqarg(name); "'join %4').").arg(name).arg(expi_s).arg(rate_s).arg(name);
KNotifyClient::event("invitation", i18n("%1 has invited you to an unlimited match"). KNotifyClient::event("invitation", i18n("%1 has invited you to an unlimited match").
arg(name)); arg(name));
} else { } else {
TQString len = (*it).right((*it).length() - name.length() - 1); TQString len = (*it).right((*it).length() - name.length() - 1);
menu = i18n("If the format of the (U) and (R) strings is changed, it should also be changed here", menu = i18n("If the format of the (U) and (R) strings is changed, it should also be changed here",
"%1 (%2)").tqarg(name).tqarg(len); "%1 (%2)").arg(name).arg(len);
text = i18n("%1 (experience %2, rating %3) wants to play a %4 point match with you. " text = i18n("%1 (experience %2, rating %3) wants to play a %4 point match with you. "
"If you want to play, use the corresponding menu entry to join (or type " "If you want to play, use the corresponding menu entry to join (or type "
"'join %5').").tqarg(name).tqarg(expi_s).tqarg(rate_s).tqarg(len).tqarg(name); "'join %5').").arg(name).arg(expi_s).arg(rate_s).arg(len).arg(name);
KNotifyClient::event("invitation", i18n("%1 has invited you for a %2 point match"). KNotifyClient::event("invitation", i18n("%1 has invited you for a %2 point match").
tqarg(name).tqarg(len)); arg(name).arg(len));
} }
emit serverString("rawwho " + name); // this avoids a race emit serverString("rawwho " + name); // this avoids a race
if (whoisInvite) { if (whoisInvite) {
@ -877,7 +877,7 @@ void KBgEngineFIBS::connectFIBS()
/* /*
* Connect * Connect
*/ */
emit infoText(i18n("Looking up %1").tqarg(infoFIBS[FIBSHost])); emit infoText(i18n("Looking up %1").arg(infoFIBS[FIBSHost]));
connection->connectToHost(infoFIBS[FIBSHost], infoFIBS[FIBSPort].toUShort()); connection->connectToHost(infoFIBS[FIBSHost], infoFIBS[FIBSPort].toUShort());
return; return;
@ -888,7 +888,7 @@ void KBgEngineFIBS::connectFIBS()
*/ */
void KBgEngineFIBS::hostFound() void KBgEngineFIBS::hostFound()
{ {
emit infoText(i18n("Connecting to %1").tqarg(infoFIBS[FIBSHost])); emit infoText(i18n("Connecting to %1").arg(infoFIBS[FIBSHost]));
} }
/* /*
@ -1077,12 +1077,12 @@ bool KBgEngineFIBS::queryConnection(const bool newlogin)
text = i18n("Enter the login you would like to use on the server %1. The login may not\n" text = i18n("Enter the login you would like to use on the server %1. The login may not\n"
"contain spaces or colons. If the login you choose is not available, you'll later be\n" "contain spaces or colons. If the login you choose is not available, you'll later be\n"
"given the opportunity to pick another one.\n\n").tqarg(infoFIBS[FIBSHost]); "given the opportunity to pick another one.\n\n").arg(infoFIBS[FIBSHost]);
else else
text = i18n("Enter your login on the server %1. If you don't have a login, you\n" text = i18n("Enter your login on the server %1. If you don't have a login, you\n"
"should create one using the corresponding menu option.\n\n").tqarg(infoFIBS[FIBSHost]); "should create one using the corresponding menu option.\n\n").arg(infoFIBS[FIBSHost]);
first = true; first = true;
@ -1107,12 +1107,12 @@ bool KBgEngineFIBS::queryConnection(const bool newlogin)
text = i18n("Enter the password you would like to use with the login %1\n" text = i18n("Enter the password you would like to use with the login %1\n"
"on the server %2. It may not contain colons.\n\n"). "on the server %2. It may not contain colons.\n\n").
tqarg(infoFIBS[FIBSUser]).tqarg(infoFIBS[FIBSHost]); arg(infoFIBS[FIBSUser]).arg(infoFIBS[FIBSHost]);
else else
text = i18n("Enter the password for the login %1 on the server %2.\n\n"). text = i18n("Enter the password for the login %1 on the server %2.\n\n").
tqarg(infoFIBS[FIBSUser]).tqarg(infoFIBS[FIBSHost]); arg(infoFIBS[FIBSUser]).arg(infoFIBS[FIBSHost]);
first = true; first = true;
do { do {
@ -1435,7 +1435,7 @@ void KBgEngineFIBS::handleMessageConnect(const TQString &line, const TQString &r
int words = sscanf (line.latin1(), "%255s%255s%li%255s", p[0], p[1], &tmp, p[2]); int words = sscanf (line.latin1(), "%255s%255s%li%255s", p[0], p[1], &tmp, p[2]);
if (words >= 4) { if (words >= 4) {
TQDateTime d; d.setTime_t(tmp); TQDateTime d; d.setTime_t(tmp);
TQString text = i18n("%1, last logged in from %2 at %3.").tqarg(p[1]).tqarg(p[2]).tqarg(d.toString()); TQString text = i18n("%1, last logged in from %2 at %3.").arg(p[1]).arg(p[2]).arg(d.toString());
emit infoText("<hr><br>" + text); emit infoText("<hr><br>" + text);
playerlist->setName(p[1]); playerlist->setName(p[1]);
} }
@ -1610,7 +1610,7 @@ void KBgEngineFIBS::handleMessageNewLogin(const TQString &line)
TQString text = i18n("Your account has been created. Your new login is <u>%1</u>. To fully activate " TQString text = i18n("Your account has been created. Your new login is <u>%1</u>. To fully activate "
"this account, I will now close the connection. Once you reconnect, you can start " "this account, I will now close the connection. Once you reconnect, you can start "
"playing backgammon on FIBS.").tqarg(infoFIBS[FIBSUser]); "playing backgammon on FIBS.").arg(infoFIBS[FIBSUser]);
emit infoText("<br><hr><font color=\"blue\">" + text + "</font><br><hr>"); emit infoText("<br><hr><font color=\"blue\">" + text + "</font><br><hr>");
emit serverString("bye"); emit serverString("bye");
rxStatus = RxNormal; rxStatus = RxNormal;
@ -1736,15 +1736,15 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline)
* Update the caption string * Update the caption string
*/ */
if (st->turn() < 0) if (st->turn() < 0)
caption = i18n("%1 (%2) vs. %3 (%4) - game over").tqarg(pname[US]). caption = i18n("%1 (%2) vs. %3 (%4) - game over").arg(pname[US]).
tqarg(st->points(US)).tqarg(pname[THEM]).tqarg(st->points(THEM)); arg(st->points(US)).arg(pname[THEM]).arg(st->points(THEM));
else if (st->length() < 0) else if (st->length() < 0)
caption = i18n("%1 (%2) vs. %3 (%4) - unlimited match").tqarg(pname[US]). caption = i18n("%1 (%2) vs. %3 (%4) - unlimited match").arg(pname[US]).
tqarg(st->points(US)).tqarg(pname[THEM]).tqarg(st->points(THEM)); arg(st->points(US)).arg(pname[THEM]).arg(st->points(THEM));
else else
caption = i18n("%1 (%2) vs. %3 (%4) - %5 point match").tqarg(pname[US]). caption = i18n("%1 (%2) vs. %3 (%4) - %5 point match").arg(pname[US]).
tqarg(st->points(US)).tqarg(pname[THEM]).tqarg(st->points(THEM)). arg(st->points(US)).arg(pname[THEM]).arg(st->points(THEM)).
tqarg(st->length()); arg(st->length());
emit statText(caption); emit statText(caption);

@ -200,7 +200,7 @@ KBgChat::KBgChat(TQWidget *parent, const char *name)
d->mInvt = new TQPopupMenu(); d->mInvt = new TQPopupMenu();
setAutoAddMessages(false); // we get an echo from FIBS setAutoAddMessages(false); // we get an echo from FIBS
setFromNickname(i18n("%1 user").tqarg(PROG_NAME)); setFromNickname(i18n("%1 user").arg(PROG_NAME));
if (!addSendingEntry(i18n("Kibitz to watchers and players"), CLIP_YOU_KIBITZ)) if (!addSendingEntry(i18n("Kibitz to watchers and players"), CLIP_YOU_KIBITZ))
kdDebug(10500) << "adding kibitz" << endl; kdDebug(10500) << "adding kibitz" << endl;
@ -450,7 +450,7 @@ void KBgChat::startGame(const TQString &name)
if (!id) { if (!id) {
id = new int(nextId()); id = new int(nextId());
d->mName2ID->insert(name, id); d->mName2ID->insert(name, id);
addSendingEntry(i18n("Talk to %1").tqarg(name), *id); addSendingEntry(i18n("Talk to %1").arg(name), *id);
} }
setSendingEntry(CLIP_YOU_KIBITZ); setSendingEntry(CLIP_YOU_KIBITZ);
} }
@ -476,7 +476,7 @@ void KBgChat::fibsTalk(const TQString &name)
if (!id) { if (!id) {
id = new int(nextId()); id = new int(nextId());
d->mName2ID->insert(name, id); d->mName2ID->insert(name, id);
addSendingEntry(i18n("Talk to %1").tqarg(name), *id); addSendingEntry(i18n("Talk to %1").arg(name), *id);
} }
setSendingEntry(*id); setSendingEntry(*id);
} }
@ -549,7 +549,7 @@ void KBgChat::handleData(const TQString &msg)
switch (cmd) { switch (cmd) {
case CLIP_SAYS: case CLIP_SAYS:
if (!d->mGag.contains(user)) { if (!d->mGag.contains(user)) {
cMsg = i18n("<u>%1 tells you:</u> %2").tqarg(user).tqarg(cMsg.replace(TQRegExp("^" + user), "")); cMsg = i18n("<u>%1 tells you:</u> %2").arg(user).arg(cMsg.replace(TQRegExp("^" + user), ""));
cMsg = "<font color=\"red\">" + cMsg + "</font>"; cMsg = "<font color=\"red\">" + cMsg + "</font>";
emit personalMessage(cMsg); emit personalMessage(cMsg);
} else } else
@ -558,7 +558,7 @@ void KBgChat::handleData(const TQString &msg)
case CLIP_SHOUTS: case CLIP_SHOUTS:
if ((!((KToggleAction *)d->mAct[KBgChatPrivate::Silent])->isChecked()) && (!d->mGag.contains(user))) { if ((!((KToggleAction *)d->mAct[KBgChatPrivate::Silent])->isChecked()) && (!d->mGag.contains(user))) {
cMsg = i18n("<u>%1 shouts:</u> %2").tqarg(user).tqarg(cMsg.replace(TQRegExp("^" + user), "")); cMsg = i18n("<u>%1 shouts:</u> %2").arg(user).arg(cMsg.replace(TQRegExp("^" + user), ""));
cMsg = "<font color=\"black\">" + cMsg + "</font>"; cMsg = "<font color=\"black\">" + cMsg + "</font>";
} else } else
cMsg = ""; cMsg = "";
@ -566,7 +566,7 @@ void KBgChat::handleData(const TQString &msg)
case CLIP_WHISPERS: case CLIP_WHISPERS:
if (!d->mGag.contains(user)) { if (!d->mGag.contains(user)) {
cMsg = i18n("<u>%1 whispers:</u> %2").tqarg(user).tqarg(cMsg.replace(TQRegExp("^" + user), "")); cMsg = i18n("<u>%1 whispers:</u> %2").arg(user).arg(cMsg.replace(TQRegExp("^" + user), ""));
cMsg = "<font color=\"red\">" + cMsg + "</font>"; cMsg = "<font color=\"red\">" + cMsg + "</font>";
emit personalMessage(cMsg); emit personalMessage(cMsg);
} else } else
@ -575,7 +575,7 @@ void KBgChat::handleData(const TQString &msg)
case CLIP_KIBITZES: case CLIP_KIBITZES:
if (!d->mGag.contains(user)) { if (!d->mGag.contains(user)) {
cMsg = i18n("<u>%1 kibitzes:</u> %2").tqarg(user).tqarg(cMsg.replace(TQRegExp("^" + user), "")); cMsg = i18n("<u>%1 kibitzes:</u> %2").arg(user).arg(cMsg.replace(TQRegExp("^" + user), ""));
cMsg = "<font color=\"red\">" + cMsg + "</font>"; cMsg = "<font color=\"red\">" + cMsg + "</font>";
emit personalMessage(cMsg); emit personalMessage(cMsg);
} else } else
@ -583,28 +583,28 @@ void KBgChat::handleData(const TQString &msg)
break; break;
case CLIP_YOU_SAY: case CLIP_YOU_SAY:
cMsg = i18n("<u>You tell %1:</u> %2").tqarg(user).tqarg(cMsg.replace(TQRegExp("^" + user), "")); cMsg = i18n("<u>You tell %1:</u> %2").arg(user).arg(cMsg.replace(TQRegExp("^" + user), ""));
cMsg = "<font color=\"darkgreen\">" + cMsg + "</font>"; cMsg = "<font color=\"darkgreen\">" + cMsg + "</font>";
emit personalMessage(cMsg); emit personalMessage(cMsg);
user = TQString(); user = TQString();
break; break;
case CLIP_YOU_SHOUT: case CLIP_YOU_SHOUT:
cMsg = i18n("<u>You shout:</u> %1").tqarg(cMsg); cMsg = i18n("<u>You shout:</u> %1").arg(cMsg);
cMsg = "<font color=\"darkgreen\">" + cMsg + "</font>"; cMsg = "<font color=\"darkgreen\">" + cMsg + "</font>";
emit personalMessage(cMsg); emit personalMessage(cMsg);
user = TQString(); user = TQString();
break; break;
case CLIP_YOU_WHISPER: case CLIP_YOU_WHISPER:
cMsg = i18n("<u>You whisper:</u> %1").tqarg(cMsg); cMsg = i18n("<u>You whisper:</u> %1").arg(cMsg);
cMsg = "<font color=\"darkgreen\">" + cMsg + "</font>"; cMsg = "<font color=\"darkgreen\">" + cMsg + "</font>";
emit personalMessage(cMsg); emit personalMessage(cMsg);
user = TQString(); user = TQString();
break; break;
case CLIP_YOU_KIBITZ: case CLIP_YOU_KIBITZ:
cMsg = i18n("<u>You kibitz:</u> %1").tqarg(cMsg); cMsg = i18n("<u>You kibitz:</u> %1").arg(cMsg);
cMsg = "<font color=\"darkgreen\">" + cMsg + "</font>"; cMsg = "<font color=\"darkgreen\">" + cMsg + "</font>";
emit personalMessage(cMsg); emit personalMessage(cMsg);
user = TQString(); user = TQString();
@ -615,21 +615,21 @@ void KBgChat::handleData(const TQString &msg)
cMsg.remove(0, cMsg.find(' ')+1); cMsg.remove(0, cMsg.find(' ')+1);
date.setTime_t(cMsg.left(cMsg.find(' ')+1).toUInt()); date.setTime_t(cMsg.left(cMsg.find(' ')+1).toUInt());
cMsg.remove(0, cMsg.find(' ')); cMsg.remove(0, cMsg.find(' '));
cMsg = i18n("<u>User %1 left a message at %2</u>: %3").tqarg(user).tqarg(date.toString()).tqarg(cMsg); cMsg = i18n("<u>User %1 left a message at %2</u>: %3").arg(user).arg(date.toString()).arg(cMsg);
cMsg = "<font color=\"red\">" + cMsg + "</font>"; cMsg = "<font color=\"red\">" + cMsg + "</font>";
emit personalMessage(cMsg); emit personalMessage(cMsg);
user = TQString(); user = TQString();
break; break;
case CLIP_MESSAGE_DELIVERED: case CLIP_MESSAGE_DELIVERED:
cMsg = i18n("Your message for %1 has been delivered.").tqarg(user); cMsg = i18n("Your message for %1 has been delivered.").arg(user);
cMsg = TQString("<font color=\"darkgreen\">") + cMsg + "</font>"; cMsg = TQString("<font color=\"darkgreen\">") + cMsg + "</font>";
emit personalMessage(cMsg); emit personalMessage(cMsg);
user = TQString(); user = TQString();
break; break;
case CLIP_MESSAGE_SAVED: case CLIP_MESSAGE_SAVED:
cMsg = i18n("Your message for %1 has been saved.").tqarg(user); cMsg = i18n("Your message for %1 has been saved.").arg(user);
cMsg = TQString("<font color=\"darkgreen\">") + cMsg + "</font>"; cMsg = TQString("<font color=\"darkgreen\">") + cMsg + "</font>";
emit personalMessage(cMsg); emit personalMessage(cMsg);
user = TQString(); user = TQString();
@ -683,22 +683,22 @@ void KBgChat::contextMenu(TQListBoxItem *i, const TQPoint &p)
*/ */
if (!d->mName[0].isNull()) { if (!d->mName[0].isNull()) {
d->mAct[KBgChatPrivate::Talk]->setText(i18n("Talk to %1").tqarg(d->mName[0])); d->mAct[KBgChatPrivate::Talk]->setText(i18n("Talk to %1").arg(d->mName[0]));
d->mAct[KBgChatPrivate::Talk]->plug(d->mChat); d->mAct[KBgChatPrivate::Talk]->plug(d->mChat);
d->mAct[KBgChatPrivate::Inquire]->setText(i18n("Info on %1").tqarg(d->mName[0])); d->mAct[KBgChatPrivate::Inquire]->setText(i18n("Info on %1").arg(d->mName[0]));
d->mAct[KBgChatPrivate::Inquire]->plug(d->mChat); d->mAct[KBgChatPrivate::Inquire]->plug(d->mChat);
// invite menu is always the same // invite menu is always the same
d->mChat->insertItem(i18n("Invite %1").tqarg(d->mName[0]), d->mInvt); d->mChat->insertItem(i18n("Invite %1").arg(d->mName[0]), d->mInvt);
d->mChat->insertSeparator(); d->mChat->insertSeparator();
if (d->mGag.contains(d->mName[0]) <= 0) { if (d->mGag.contains(d->mName[0]) <= 0) {
d->mAct[KBgChatPrivate::Gag]->setText(i18n("Gag %1").tqarg(d->mName[0])); d->mAct[KBgChatPrivate::Gag]->setText(i18n("Gag %1").arg(d->mName[0]));
d->mAct[KBgChatPrivate::Gag]->plug(d->mChat); d->mAct[KBgChatPrivate::Gag]->plug(d->mChat);
} else { } else {
d->mAct[KBgChatPrivate::Ungag]->setText(i18n("Ungag %1").tqarg(d->mName[0])); d->mAct[KBgChatPrivate::Ungag]->setText(i18n("Ungag %1").arg(d->mName[0]));
d->mAct[KBgChatPrivate::Ungag]->plug(d->mChat); d->mAct[KBgChatPrivate::Ungag]->plug(d->mChat);
} }
} }
@ -741,7 +741,7 @@ void KBgChat::slotGag()
d->mGag.append(d->mName[0]); d->mGag.append(d->mName[0]);
TQString msg("<font color=\"blue\">"); TQString msg("<font color=\"blue\">");
msg += i18n("You won't hear what %1 says and shouts.").tqarg(d->mName[0]); msg += i18n("You won't hear what %1 says and shouts.").arg(d->mName[0]);
msg += "</font>"; msg += "</font>";
addMessage(TQString(), msg); addMessage(TQString(), msg);
@ -763,7 +763,7 @@ void KBgChat::slotUngag()
d->mGag.remove(d->mName[0]); d->mGag.remove(d->mName[0]);
TQString msg("<font color=\"blue\">"); TQString msg("<font color=\"blue\">");
msg += i18n("You will again hear what %1 says and shouts.").tqarg(d->mName[0]); msg += i18n("You will again hear what %1 says and shouts.").arg(d->mName[0]);
msg += "</font>"; msg += "</font>";
addMessage(TQString(), msg); addMessage(TQString(), msg);

@ -569,12 +569,12 @@ void KFibsPlayerList::showContextMenu(KListView *, TQListViewItem *i, const TQPo
*/ */
d->mUser = (i ? i->text(Player) : TQString()); d->mUser = (i ? i->text(Player) : TQString());
d->mAct[KFibsPlayerListPrivate::Info ]->setText(i18n("Info on %1" ).tqarg(d->mUser)); d->mAct[KFibsPlayerListPrivate::Info ]->setText(i18n("Info on %1" ).arg(d->mUser));
d->mAct[KFibsPlayerListPrivate::Talk ]->setText(i18n("Talk to %1" ).tqarg(d->mUser)); d->mAct[KFibsPlayerListPrivate::Talk ]->setText(i18n("Talk to %1" ).arg(d->mUser));
d->mAct[KFibsPlayerListPrivate::Mail ]->setText(i18n("Email to %1").tqarg(d->mUser)); d->mAct[KFibsPlayerListPrivate::Mail ]->setText(i18n("Email to %1").arg(d->mUser));
d->mAct[KFibsPlayerListPrivate::Look ]->setText(i18n("Look at %1" ).tqarg(d->mUser)); d->mAct[KFibsPlayerListPrivate::Look ]->setText(i18n("Look at %1" ).arg(d->mUser));
d->mAct[KFibsPlayerListPrivate::Watch ]->setText(i18n("Watch %1" ).tqarg(d->mUser)); d->mAct[KFibsPlayerListPrivate::Watch ]->setText(i18n("Watch %1" ).arg(d->mUser));
d->mAct[KFibsPlayerListPrivate::Update]->setText(i18n("Update %1" ).tqarg(d->mUser)); d->mAct[KFibsPlayerListPrivate::Update]->setText(i18n("Update %1" ).arg(d->mUser));
d->mAct[KFibsPlayerListPrivate::Info ]->setEnabled(i); d->mAct[KFibsPlayerListPrivate::Info ]->setEnabled(i);
d->mAct[KFibsPlayerListPrivate::Talk ]->setEnabled(i); d->mAct[KFibsPlayerListPrivate::Talk ]->setEnabled(i);
@ -587,7 +587,7 @@ void KFibsPlayerList::showContextMenu(KListView *, TQListViewItem *i, const TQPo
d->mAct[KFibsPlayerListPrivate::Unwatch]->setEnabled(d->mWatch); d->mAct[KFibsPlayerListPrivate::Unwatch]->setEnabled(d->mWatch);
d->mPm[0]->setItemEnabled(d->mInID, i && d->mName != d->mUser); d->mPm[0]->setItemEnabled(d->mInID, i && d->mName != d->mUser);
d->mPm[0]->changeItem(d->mInID, i18n("Invite %1").tqarg(d->mUser)); d->mPm[0]->changeItem(d->mInID, i18n("Invite %1").arg(d->mUser));
d->mMail = (i && d->mCol[Email]->show ? i->text(d->mCol[Email]->index) : TQString()); d->mMail = (i && d->mCol[Email]->show ? i->text(d->mCol[Email]->index) : TQString());
d->mAct[KFibsPlayerListPrivate::Mail]->setEnabled(!d->mMail.isEmpty()); d->mAct[KFibsPlayerListPrivate::Mail]->setEnabled(!d->mMail.isEmpty());
@ -595,7 +595,7 @@ void KFibsPlayerList::showContextMenu(KListView *, TQListViewItem *i, const TQPo
if (i && d->mCol[Status]->show) if (i && d->mCol[Status]->show)
d->mAct[KFibsPlayerListPrivate::BlindAct]->setText d->mAct[KFibsPlayerListPrivate::BlindAct]->setText
((i->text(d->mCol[Status]->index).contains(d->mAbrv[Blind])) ? ((i->text(d->mCol[Status]->index).contains(d->mAbrv[Blind])) ?
i18n("Unblind %1").tqarg(d->mUser) : i18n("Blind %1").tqarg(d->mUser)); i18n("Unblind %1").arg(d->mUser) : i18n("Blind %1").arg(d->mUser));
else else
d->mAct[KFibsPlayerListPrivate::BlindAct]->setText(i18n("Blind")); d->mAct[KFibsPlayerListPrivate::BlindAct]->setText(i18n("Blind"));
@ -886,7 +886,7 @@ void KFibsPlayerList::setName(const TQString &name)
*/ */
void KFibsPlayerList::updateCaption() void KFibsPlayerList::updateCaption()
{ {
setCaption(i18n("Player List - %1 - %2/%3").tqarg(childCount()).tqarg(d->mCount[0]).tqarg(d->mCount[1])); setCaption(i18n("Player List - %1 - %2/%3").arg(childCount()).arg(d->mCount[0]).arg(d->mCount[1]));
} }
/* /*

@ -131,7 +131,7 @@ void KBgEngineGNU::handleLine(const TQString &l)
KBgStatus st(board); KBgStatus st(board);
int ret = KMessageBox::warningYesNoCancel int ret = KMessageBox::warningYesNoCancel
(0, i18n("gnubg doubles the cube to %1.").tqarg(2*st.cube(THEM)), (0, i18n("gnubg doubles the cube to %1.").arg(2*st.cube(THEM)),
i18n("gnubg doubles"), i18n("gnubg doubles"),
i18n("&Accept"), i18n("Re&double"), i18n("&Reject"), true); i18n("&Accept"), i18n("Re&double"), i18n("&Reject"), true);
@ -199,7 +199,7 @@ void KBgEngineGNU::handleLine(const TQString &l)
case uMove: case uMove:
st.setDice(THEM, 0, 0); st.setDice(THEM, 0, 0);
st.setDice(THEM, 1, 0); st.setDice(THEM, 1, 0);
emit infoText(i18n("You roll %1 and %2.").tqarg(st.dice(US, 0)).tqarg(st.dice(US, 1))); emit infoText(i18n("You roll %1 and %2.").arg(st.dice(US, 0)).arg(st.dice(US, 1)));
switch (st.moves()) { switch (st.moves()) {
case 0: case 0:
// get a message // get a message
@ -208,7 +208,7 @@ void KBgEngineGNU::handleLine(const TQString &l)
emit infoText(i18n("Please move 1 piece.")); emit infoText(i18n("Please move 1 piece."));
break; break;
default: default:
emit infoText(i18n("Please move %1 pieces.").tqarg(st.moves())); emit infoText(i18n("Please move %1 pieces.").arg(st.moves()));
break; break;
} }
emit allowCommand(Roll, false); emit allowCommand(Roll, false);
@ -220,7 +220,7 @@ void KBgEngineGNU::handleLine(const TQString &l)
case tMove: case tMove:
st.setDice(US, 0, 0); st.setDice(US, 0, 0);
st.setDice(US, 1, 0); st.setDice(US, 1, 0);
emit infoText(i18n("gnubg rolls %1 and %2.").tqarg(st.dice(THEM, 0)).tqarg(st.dice(THEM, 1))); emit infoText(i18n("gnubg rolls %1 and %2.").arg(st.dice(THEM, 0)).arg(st.dice(THEM, 1)));
if (st.moves() == 0) if (st.moves() == 0)
emit infoText(i18n("gnubg cannot move.")); emit infoText(i18n("gnubg cannot move."));
@ -236,7 +236,7 @@ void KBgEngineGNU::handleLine(const TQString &l)
emit allowMoving(st.turn() == US); emit allowMoving(st.turn() == US);
emit newState(st); emit newState(st);
emit statText(i18n("%1 vs. %2").tqarg(st.player(US)).tqarg(st.player(THEM))); emit statText(i18n("%1 vs. %2").arg(st.player(US)).arg(st.player(THEM)));
emit allowCommand(Load, true ); emit allowCommand(Load, true );
emit allowCommand(Undo, false); emit allowCommand(Undo, false);
@ -533,7 +533,7 @@ void KBgEngineGNU::gnubgExit(KProcess *proc)
emit allowMoving(false); emit allowMoving(false);
emit infoText(TQString("<br/><font color=\"red\">") + i18n("The GNU Backgammon process (%1) has exited. ") emit infoText(TQString("<br/><font color=\"red\">") + i18n("The GNU Backgammon process (%1) has exited. ")
.tqarg(proc->pid()) + "</font><br/>"); .arg(proc->pid()) + "</font><br/>");
resAction->setEnabled(true); resAction->setEnabled(true);
} }

@ -150,7 +150,7 @@ void KBgEngineNg::setGame()
emit infoText(i18n("Now waiting for incoming connections on port %1."). emit infoText(i18n("Now waiting for incoming connections on port %1.").
arg(_port = port)); arg(_port = port));
else else
emit infoText(i18n("Failed to offer connections on port %1.").tqarg(port)); emit infoText(i18n("Failed to offer connections on port %1.").arg(port));
_game->addPlayer(createPlayer(0, _name[0])); _game->addPlayer(createPlayer(0, _name[0]));
break; break;
@ -165,7 +165,7 @@ void KBgEngineNg::setGame()
} while (host_s.isEmpty()); } while (host_s.isEmpty());
label = i18n("Type the port number on %1 you want to connect to.\nThe " label = i18n("Type the port number on %1 you want to connect to.\nThe "
"number should be between 1024 and 65535.").tqarg(host_s); "number should be between 1024 and 65535.").arg(host_s);
port_s.setNum(_port); port_s.setNum(_port);
do { do {
port_s = KLineEditDlg::getText(label, port_s, &ret, (TQWidget *)parent()); port_s = KLineEditDlg::getText(label, port_s, &ret, (TQWidget *)parent());
@ -183,10 +183,10 @@ void KBgEngineNg::setGame()
_game->addPlayer(createPlayer(0, _name[0])); _game->addPlayer(createPlayer(0, _name[0]));
if (_game->connectToServer(host_s, port)) if (_game->connectToServer(host_s, port))
emit infoText(i18n("Now connected to %1:%2.").tqarg(_host = host_s). emit infoText(i18n("Now connected to %1:%2.").arg(_host = host_s).
arg(_port = port)); arg(_port = port));
else else
emit infoText(i18n("Failed to connect to %1:%2.").tqarg(_host = host_s). emit infoText(i18n("Failed to connect to %1:%2.").arg(_host = host_s).
arg(_port = port)); arg(_port = port));
// <HERE> // <HERE>
@ -207,8 +207,8 @@ void KBgEngineNg::setGame()
void KBgEngineNg::slotPlayerJoinedGame(KPlayer *p) void KBgEngineNg::slotPlayerJoinedGame(KPlayer *p)
{ {
emit infoText(i18n("Player %1 (%2) has joined the game.").tqarg(p->name()).tqarg(p->id())); emit infoText(i18n("Player %1 (%2) has joined the game.").arg(p->name()).arg(p->id()));
cerr << i18n("Player %1 (%2) has joined the game.").tqarg(p->name()).tqarg(p->id()).latin1() << endl; cerr << i18n("Player %1 (%2) has joined the game.").arg(p->name()).arg(p->id()).latin1() << endl;
} }
void KBgEngineNg::slotCreatePlayer(KPlayer *&p, int rtti, int io, bool v, KGame *g) void KBgEngineNg::slotCreatePlayer(KPlayer *&p, int rtti, int io, bool v, KGame *g)
@ -216,7 +216,7 @@ void KBgEngineNg::slotCreatePlayer(KPlayer *&p, int rtti, int io, bool v, KGame
Q_UNUSED(rtti) Q_UNUSED(rtti)
Q_UNUSED(g) Q_UNUSED(g)
Q_UNUSED(io) Q_UNUSED(io)
emit infoText(i18n("creating player. virtual=%1").tqarg(v)); emit infoText(i18n("creating player. virtual=%1").arg(v));
p = createPlayer(1); p = createPlayer(1);
} }
@ -507,7 +507,7 @@ void KBgEngineNg::slotPropertyChanged(KGamePropertyBase *p, KPlayer *me)
case KGamePropertyBase::IdName: case KGamePropertyBase::IdName:
emit infoText(i18n("Player %1 has changed the name to %2.") emit infoText(i18n("Player %1 has changed the name to %2.")
.tqarg(_name[player]).tqarg(me->name())); .arg(_name[player]).arg(me->name()));
_name[player] = me->name(); _name[player] = me->name();
break; break;
@ -567,8 +567,8 @@ void KBgEngineNg::slotNetworkData(int msgid, const TQByteArray &msg, TQ_UINT32 r
case KBgGame::Cmd: case KBgGame::Cmd:
emit infoText(msg); emit infoText(msg);
emit infoText(i18n("Players are %1 and %2").tqarg(_player[0]->name()) emit infoText(i18n("Players are %1 and %2").arg(_player[0]->name())
.tqarg(_player[1]->name())); .arg(_player[1]->name()));
break; break;
default: default:

@ -318,14 +318,14 @@ void KBgEngineOffline::newGame()
u = getRandom(); u = getRandom();
t = getRandom(); t = getRandom();
emit infoText(i18n("%1 rolls %2, %3 rolls %4."). emit infoText(i18n("%1 rolls %2, %3 rolls %4.").
tqarg(d->mName[0]).tqarg(u).tqarg(d->mName[1]).tqarg(t)); arg(d->mName[0]).arg(u).arg(d->mName[1]).arg(t));
} }
if (u > t) { if (u > t) {
emit infoText(i18n("%1 makes the first move.").tqarg(d->mName[0])); emit infoText(i18n("%1 makes the first move.").arg(d->mName[0]));
d->mRoll = US; d->mRoll = US;
} else { } else {
emit infoText(i18n("%1 makes the first move.").tqarg(d->mName[1])); emit infoText(i18n("%1 makes the first move.").arg(d->mName[1]));
d->mRoll = THEM; d->mRoll = THEM;
int n = u; u = t; t = n; int n = u; u = t; t = n;
} }
@ -338,7 +338,7 @@ void KBgEngineOffline::newGame()
/* /*
* tell the user * tell the user
*/ */
emit statText(i18n("%1 vs. %2").tqarg(d->mName[0]).tqarg(d->mName[1])); emit statText(i18n("%1 vs. %2").arg(d->mName[0]).arg(d->mName[1]));
} }
/* /*
@ -722,7 +722,7 @@ bool KBgEngineOffline::queryExit()
void KBgEngineOffline::handleCommand(const TQString& cmd) void KBgEngineOffline::handleCommand(const TQString& cmd)
{ {
emit infoText(i18n("Text commands are not yet working. " emit infoText(i18n("Text commands are not yet working. "
"The command '%1' has been ignored.").tqarg(cmd)); "The command '%1' has been ignored.").arg(cmd));
} }
/* /*
@ -791,11 +791,11 @@ void KBgEngineOffline::toggleEditMode()
emit allowCommand(Roll, false); emit allowCommand(Roll, false);
emit allowCommand(Done, false); emit allowCommand(Done, false);
emit allowCommand(Cube, false); emit allowCommand(Cube, false);
emit statText(i18n("%1 vs. %2 - Edit Mode").tqarg(d->mName[0]).tqarg(d->mName[1])); emit statText(i18n("%1 vs. %2 - Edit Mode").arg(d->mName[0]).arg(d->mName[1]));
} else { } else {
d->mNew->setEnabled(true); d->mNew->setEnabled(true);
d->mSwap->setEnabled(true); d->mSwap->setEnabled(true);
emit statText(i18n("%1 vs. %2").tqarg(d->mName[0]).tqarg(d->mName[1])); emit statText(i18n("%1 vs. %2").arg(d->mName[0]).arg(d->mName[1]));
emit getState(&d->mGame[1]); emit getState(&d->mGame[1]);
d->mGame[0] = d->mGame[1]; d->mGame[0] = d->mGame[1];
emit allowCommand(Done, d->mDoneFlag); emit allowCommand(Done, d->mDoneFlag);

@ -421,7 +421,7 @@ void KBg::setupOk()
if (cbm->isChecked()) if (cbm->isChecked())
KMessageBox::enableAllMessages(); KMessageBox::enableAllMessages();
// tell tqchildren to read their changes // tell children to read their changes
board->setupOk(); board->setupOk();
// engines // engines
@ -646,7 +646,7 @@ void KBg::print()
prt->setPageSize((KPrinter::PageSize) config->readNumEntry("pagesize", KPrinter::A4)); prt->setPageSize((KPrinter::PageSize) config->readNumEntry("pagesize", KPrinter::A4));
prt->setOrientation((KPrinter::Orientation)config->readNumEntry("orientation", KPrinter::Landscape)); prt->setOrientation((KPrinter::Orientation)config->readNumEntry("orientation", KPrinter::Landscape));
if (prt->setup(this, i18n("Print %1").tqarg(baseCaption))) { if (prt->setup(this, i18n("Print %1").arg(baseCaption))) {
TQPainter p; TQPainter p;
p.begin(prt); p.begin(prt);
board->print(&p); board->print(&p);

@ -552,7 +552,7 @@ protected:
int cellID; int cellID;
/** /**
* Indicates whether this cell needs to tqrepaint itself after * Indicates whether this cell needs to repaint itself after
* the board has been processed. * the board has been processed.
*/ */
bool stateChanged; bool stateChanged;
@ -837,7 +837,7 @@ public:
protected: protected:
/** /**
* Spin boxes and buttons are tqchildren * Spin boxes and buttons are children
*/ */
TQSpinBox *sb[2]; TQSpinBox *sb[2];
TQPushButton *ok; TQPushButton *ok;
@ -871,7 +871,7 @@ public:
protected: protected:
/** /**
* Spin boxes and buttons are tqchildren * Spin boxes and buttons are children
*/ */
TQComboBox *cb[2]; TQComboBox *cb[2];
TQPushButton *ok; TQPushButton *ok;

@ -38,7 +38,7 @@
<property name="text"> <property name="text">
<string>&amp;Nick name:</string> <string>&amp;Nick name:</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignLeft</set> <set>AlignVCenter|AlignLeft</set>
</property> </property>
<property name="buddy" stdset="0"> <property name="buddy" stdset="0">
@ -73,7 +73,7 @@
<property name="text"> <property name="text">
<string>&amp;Server:</string> <string>&amp;Server:</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignLeft</set> <set>AlignVCenter|AlignLeft</set>
</property> </property>
<property name="buddy" stdset="0"> <property name="buddy" stdset="0">
@ -135,7 +135,7 @@
<property name="text"> <property name="text">
<string>&amp;Port:</string> <string>&amp;Port:</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignLeft</set> <set>AlignVCenter|AlignLeft</set>
</property> </property>
<property name="buddy" stdset="0"> <property name="buddy" stdset="0">

@ -63,7 +63,7 @@
<property name="text"> <property name="text">
<string>&amp;Port:</string> <string>&amp;Port:</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignLeft</set> <set>AlignVCenter|AlignLeft</set>
</property> </property>
<property name="buddy" stdset="0"> <property name="buddy" stdset="0">
@ -95,7 +95,7 @@
<property name="text"> <property name="text">
<string>&amp;Nick name:</string> <string>&amp;Nick name:</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignLeft</set> <set>AlignVCenter|AlignLeft</set>
</property> </property>
<property name="buddy" stdset="0"> <property name="buddy" stdset="0">

@ -97,7 +97,7 @@
<property name="text"> <property name="text">
<string>:</string> <string>:</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignCenter</set> <set>AlignCenter</set>
</property> </property>
<property name="hAlign" stdset="0"> <property name="hAlign" stdset="0">
@ -116,7 +116,7 @@
<property name="text"> <property name="text">
<string>0</string> <string>0</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
<property name="hAlign" stdset="0"> <property name="hAlign" stdset="0">

@ -84,8 +84,8 @@ void KBattleshipWindow::initStatusBar()
{ {
m_ownNickname = "-"; m_ownNickname = "-";
m_enemyNickname = "-"; m_enemyNickname = "-";
statusBar()->insertItem(i18n(" Player 1: %1 ").tqarg(m_ownNickname), ID_PLAYER_OWN, 0, true); statusBar()->insertItem(i18n(" Player 1: %1 ").arg(m_ownNickname), ID_PLAYER_OWN, 0, true);
statusBar()->insertItem(i18n(" Player 2: %1 ").tqarg(m_enemyNickname), ID_PLAYER_ENEMY, 0, true); statusBar()->insertItem(i18n(" Player 2: %1 ").arg(m_enemyNickname), ID_PLAYER_ENEMY, 0, true);
statusBar()->insertItem(i18n("Ready"), ID_STATUS_MSG, 1); statusBar()->insertItem(i18n("Ready"), ID_STATUS_MSG, 1);
statusBar()->setItemAlignment(ID_STATUS_MSG, AlignLeft); statusBar()->setItemAlignment(ID_STATUS_MSG, AlignLeft);
} }
@ -1075,14 +1075,14 @@ void KBattleshipWindow::parseCommandLine() {
if( !u.isValid()) { if( !u.isValid()) {
KMessageBox::sorry(this, KMessageBox::sorry(this,
i18n("The URL passed to KDE Battleship '%1' is not a valid url") i18n("The URL passed to KDE Battleship '%1' is not a valid url")
.tqarg(args->arg(0))); .arg(args->arg(0)));
return; return;
} }
if( u.protocol() != "kbattleship" ) { if( u.protocol() != "kbattleship" ) {
KMessageBox::sorry(this, KMessageBox::sorry(this,
i18n("The URL passed to KDE Battleship '%1' is not recognised " i18n("The URL passed to KDE Battleship '%1' is not recognised "
"as a Battleship game.") "as a Battleship game.")
.tqarg(args->arg(0))); .arg(args->arg(0)));
return; return;
} }
@ -1198,13 +1198,13 @@ void KBattleshipWindow::slotStatusMsg(const TQString &text)
void KBattleshipWindow::slotChangeOwnPlayer(const TQString &text) void KBattleshipWindow::slotChangeOwnPlayer(const TQString &text)
{ {
statusBar()->clear(); statusBar()->clear();
statusBar()->changeItem(i18n(" Player 1: %1 ").tqarg(text), ID_PLAYER_OWN); statusBar()->changeItem(i18n(" Player 1: %1 ").arg(text), ID_PLAYER_OWN);
} }
void KBattleshipWindow::slotChangeEnemyPlayer(const TQString &text) void KBattleshipWindow::slotChangeEnemyPlayer(const TQString &text)
{ {
statusBar()->clear(); statusBar()->clear();
statusBar()->changeItem(i18n(" Player 2: %1 ").tqarg(text), ID_PLAYER_ENEMY); statusBar()->changeItem(i18n(" Player 2: %1 ").arg(text), ID_PLAYER_ENEMY);
} }
void KBattleshipWindow::slotSinglePlayer() void KBattleshipWindow::slotSinglePlayer()

@ -41,7 +41,7 @@ void KBattleshipServer::init()
{ {
if(listen()) if(listen())
{ {
KMessageBox::error(0L, i18n("Failed to bind to local port \"%1\"\n\nPlease check if another KBattleship server instance\nis running or another application uses this port.").tqarg(m_port)); KMessageBox::error(0L, i18n("Failed to bind to local port \"%1\"\n\nPlease check if another KBattleship server instance\nis running or another application uses this port.").arg(m_port));
emit sigServerFailure(); emit sigServerFailure();
return; return;
} }

@ -106,11 +106,11 @@ void KBattleshipView::drawEnemyShipsHuman(KMessage *msg, KShipList *list)
int posx, posy, placedLeft; int posx, posy, placedLeft;
bool left; bool left;
int i = 3; int i = 3;
while (!msg->field(TQString("ship%1").tqarg(i)).isNull()) while (!msg->field(TQString("ship%1").arg(i)).isNull())
{ {
posx = msg->field(TQString("ship%1").tqarg(i)).section(" ", 0, 0).toInt(); posx = msg->field(TQString("ship%1").arg(i)).section(" ", 0, 0).toInt();
posy = msg->field(TQString("ship%1").tqarg(i)).section(" ", 1, 1).toInt(); posy = msg->field(TQString("ship%1").arg(i)).section(" ", 1, 1).toInt();
placedLeft = msg->field(TQString("ship%1").tqarg(i)).section(" ", 2, 2).toInt(); placedLeft = msg->field(TQString("ship%1").arg(i)).section(" ", 2, 2).toInt();
if (placedLeft == 0) left = false; if (placedLeft == 0) left = false;
else left = true; else left = true;
list->addNewShip(!left, posx, posy); list->addNewShip(!left, posx, posy);

@ -94,7 +94,7 @@ void KonnectionHandling::slotNewMessage(KMessage *msg)
case KMessage::DISCARD: case KMessage::DISCARD:
if(msg->field("kmversion") == TQString("true")) if(msg->field("kmversion") == TQString("true"))
{ {
KMessageBox::error(0L, i18n("Connection dropped by enemy. The client's protocol implementation (%1) is not compatible with our (%2) version.").tqarg(msg->field("reason")).tqarg(protocolVersion)); KMessageBox::error(0L, i18n("Connection dropped by enemy. The client's protocol implementation (%1) is not compatible with our (%2) version.").arg(msg->field("reason")).arg(protocolVersion));
emit sigAbortNetworkGame(); emit sigAbortNetworkGame();
} }
else else
@ -159,7 +159,7 @@ void KonnectionHandling::slotNewMessage(KMessage *msg)
if(msg->field("protocolVersion") != TQString::fromLatin1(protocolVersion)) if(msg->field("protocolVersion") != TQString::fromLatin1(protocolVersion))
{ {
m_kbserver->slotDiscardClient(protocolVersion, true, false); m_kbserver->slotDiscardClient(protocolVersion, true, false);
KMessageBox::error(0L, i18n("Connection to client dropped. The client's protocol implementation (%1) is not compatible with our (%2) version.").tqarg(msg->field("protocolVersion")).tqarg(protocolVersion)); KMessageBox::error(0L, i18n("Connection to client dropped. The client's protocol implementation (%1) is not compatible with our (%2) version.").arg(msg->field("protocolVersion")).arg(protocolVersion));
} }
else else
emit sigClientInformation(msg->field("clientName"), msg->field("clientVersion"), msg->field("clientDescription"), msg->field("protocolVersion")); emit sigClientInformation(msg->field("clientName"), msg->field("clientVersion"), msg->field("clientDescription"), msg->field("protocolVersion"));
@ -232,7 +232,7 @@ void KonnectionHandling::slotSocketError(int error)
break; break;
default: default:
KMessageBox::error(0L, i18n("Unknown error; No: %1").tqarg(error)); KMessageBox::error(0L, i18n("Unknown error; No: %1").arg(error));
break; break;
} }

@ -298,7 +298,7 @@ void KBBGame::newGame()
randomBalls( balls ); randomBalls( balls );
remap( gameBoard, gr->getGraphicBoard() ); remap( gameBoard, gr->getGraphicBoard() );
gr->tqrepaint( TRUE ); gr->repaint( TRUE );
setScore( 0 ); setScore( 0 );
detourCounter = -1; detourCounter = -1;
ballsPlaced = 0; ballsPlaced = 0;
@ -326,12 +326,12 @@ void KBBGame::gameFinished()
"I guess you need more practice."); "I guess you need more practice.");
KMessageBox::information(this, KMessageBox::information(this,
s.tqarg(KGlobal::locale()->formatNumber(score, 0))); s.arg(KGlobal::locale()->formatNumber(score, 0)));
} else { } else {
s = i18n( "You should place %1 balls!\n" s = i18n( "You should place %1 balls!\n"
"You have placed %2.") "You have placed %2.")
.tqarg(KGlobal::locale()->formatNumber(balls, 0)) .arg(KGlobal::locale()->formatNumber(balls, 0))
.tqarg(KGlobal::locale()->formatNumber(ballsPlaced, 0)); .arg(KGlobal::locale()->formatNumber(ballsPlaced, 0));
KMessageBox::sorry(this, s); KMessageBox::sorry(this, s);
} }
@ -428,7 +428,7 @@ void KBBGame::updateStats()
void KBBGame::setScore( int n ) void KBBGame::setScore( int n )
{ {
score = n; score = n;
statusBar()->changeItem( i18n("Score: %1").tqarg(n), SSCORE ); statusBar()->changeItem( i18n("Score: %1").arg(n), SSCORE );
} }
/* /*
@ -454,7 +454,7 @@ bool KBBGame::setSize( int w, int h )
gameBoard = new RectOnArray( gr->numC(), gr->numR() ); gameBoard = new RectOnArray( gr->numC(), gr->numR() );
if (running) abortGame(); if (running) abortGame();
newGame(); newGame();
// gr->tqrepaint( TRUE ); // gr->repaint( TRUE );
} }
} }
return ok; return ok;

@ -434,7 +434,7 @@ void KBBGraphic::moveSelection(int drow, int dcol)
void KBBGraphic::focusInEvent( TQFocusEvent* ) void KBBGraphic::focusInEvent( TQFocusEvent* )
{ {
tqrepaint( FALSE ); repaint( FALSE );
} }
@ -444,7 +444,7 @@ void KBBGraphic::focusInEvent( TQFocusEvent* )
void KBBGraphic::focusOutEvent( TQFocusEvent* ) void KBBGraphic::focusOutEvent( TQFocusEvent* )
{ {
tqrepaint( FALSE ); repaint( FALSE );
} }
/* /*

@ -406,7 +406,7 @@ JezzGame::JezzGame( const TQPixmap &background, int ballNum, TQWidget *parent, c
connect( m_clock, TQT_SIGNAL(timeout()), this, TQT_SLOT(tick()) ); connect( m_clock, TQT_SIGNAL(timeout()), this, TQT_SLOT(tick()) );
m_clock->start( GAME_DELAY ); m_clock->start( GAME_DELAY );
// setup tqgeometry // setup geometry
setFixedSize( m_view->size() ); setFixedSize( m_view->size() );
} }
@ -500,7 +500,7 @@ void JezzGame::makeBlack()
} }
m_field->update(); m_field->update();
m_view->tqrepaint(); m_view->repaint();
// count percent value of occupied area // count percent value of occupied area
int p = percent(); int p = percent();
@ -586,7 +586,7 @@ void JezzGame::ballCollision( Ball */*ball*/, int /*x*/, int /*y*/, int tile )
// update view // update view
m_field->update(); m_field->update();
m_view->tqrepaint(); m_view->repaint();
// send death msg // send death msg
emit died(); emit died();
@ -671,7 +671,7 @@ void JezzGame::wallFinished( Wall *wall, int tile )
} }
m_field->update(); m_field->update();
m_view->tqrepaint(); m_view->repaint();
makeBlack(); makeBlack();
} }

@ -100,7 +100,7 @@ KJezzball::KJezzball()
// create demo game // create demo game
createLevel( 1 ); createLevel( 1 );
statusBar()->message( i18n("Press %1 to start a game!") statusBar()->message( i18n("Press %1 to start a game!")
.tqarg(m_newAction->shortcut().toString()) ); .arg(m_newAction->shortcut().toString()) );
//m_gameWidget->display( i18n("Press <Space> to start a game!") ); //m_gameWidget->display( i18n("Press <Space> to start a game!") );
setFocusPolicy(TQ_StrongFocus); setFocusPolicy(TQ_StrongFocus);
@ -228,7 +228,7 @@ void KJezzball::gameOverNow()
TQString score; TQString score;
score.setNum( m_game.score ); score.setNum( m_game.score );
KMessageBox::information( this, i18n("Game Over! Score: %1").tqarg(score) ); KMessageBox::information( this, i18n("Game Over! Score: %1").arg(score) );
statusBar()->message( i18n("Game over. Press <Space> for a new game") ); statusBar()->message( i18n("Game over. Press <Space> for a new game") );
//m_gameWidget->display( i18n("Game over. Press <Space> for a new game!") ); //m_gameWidget->display( i18n("Game over. Press <Space> for a new game!") );
highscore(); highscore();
@ -461,16 +461,16 @@ void KJezzball::switchLevel()
TQString foo = TQString( TQString foo = TQString(
i18n("You have successfully cleared more than 75% of the board.\n") + i18n("You have successfully cleared more than 75% of the board.\n") +
i18n("%1 points: 15 points per remaining life\n").tqarg(m_level.lifes*15) + i18n("%1 points: 15 points per remaining life\n").arg(m_level.lifes*15) +
i18n("%1 points: Bonus\n").tqarg((m_gameWidget->percent()-75)*2*(m_game.level+5)) + i18n("%1 points: Bonus\n").arg((m_gameWidget->percent()-75)*2*(m_game.level+5)) +
i18n("%1 points: Total score for this level\n").tqarg(score) + i18n("%1 points: Total score for this level\n").arg(score) +
i18n("On to level %1. Remember you get %2 lives this time!")).tqarg(m_game.level+1).tqarg(m_game.level+2); i18n("On to level %1. Remember you get %2 lives this time!")).arg(m_game.level+1).arg(m_game.level+2);
KMessageBox::information( this,foo ); KMessageBox::information( this,foo );
// KMessageBox::information( this, i18n("You've completed level %1 with " // KMessageBox::information( this, i18n("You've completed level %1 with "
// "a score of %2.\nGet ready for the next one!").tqarg(level).tqarg(score)); // "a score of %2.\nGet ready for the next one!").arg(level).arg(score));
m_game.level++; m_game.level++;
m_levelLCD->display( m_game.level ); m_levelLCD->display( m_game.level );

@ -381,7 +381,7 @@ void AbTop::setupStatusBar()
{ {
TQString tmp; TQString tmp;
TQString t = i18n("Press %1 for a new game").tqarg( newAction->shortcut().toString()); TQString t = i18n("Press %1 for a new game").arg( newAction->shortcut().toString());
statusLabel = new TQLabel( t, statusBar(), "statusLabel" ); statusLabel = new TQLabel( t, statusBar(), "statusLabel" );
statusBar()->addWidget(statusLabel,1,false); statusBar()->addWidget(statusLabel,1,false);
@ -405,7 +405,7 @@ void AbTop::setupStatusBar()
ballLabel->setAlignment( AlignCenter ); ballLabel->setAlignment( AlignCenter );
statusBar()->addWidget(ballLabel, 0, true); statusBar()->addWidget(ballLabel, 0, true);
moveLabel = new TQLabel( i18n("Move %1").tqarg("--"), statusBar(), "moveLabel" ); moveLabel = new TQLabel( i18n("Move %1").arg("--"), statusBar(), "moveLabel" );
statusBar()->addWidget(moveLabel, 0, true); statusBar()->addWidget(moveLabel, 0, true);
#ifdef MYTRACE #ifdef MYTRACE
@ -464,11 +464,11 @@ void AbTop::updateStatus()
bool showValid = false; bool showValid = false;
if (!editMode && timerState == noGame) { if (!editMode && timerState == noGame) {
tmp = i18n("Move %1").tqarg("--"); tmp = i18n("Move %1").arg("--");
ballLabel->setPixmap(noBall); ballLabel->setPixmap(noBall);
} }
else { else {
tmp = i18n("Move %1").tqarg(moveNo/2 + 1); tmp = i18n("Move %1").arg(moveNo/2 + 1);
ballLabel->setPixmap( (board->actColor() == Board::color1) ballLabel->setPixmap( (board->actColor() == Board::color1)
? redBall : yellowBall); ? redBall : yellowBall);
} }
@ -476,15 +476,15 @@ void AbTop::updateStatus()
if (editMode) { if (editMode) {
tmp = TQString("%1: %2 %3 - %4 %5") tmp = TQString("%1: %2 %3 - %4 %5")
.tqarg( i18n("Edit") ) .arg( i18n("Edit") )
.tqarg( i18n("Red") ).tqarg(boardWidget->getColor1Count()) .arg( i18n("Red") ).arg(boardWidget->getColor1Count())
.tqarg( i18n("Yellow") ).tqarg(boardWidget->getColor2Count()); .arg( i18n("Yellow") ).arg(boardWidget->getColor2Count());
validLabel->setPixmap( (board->validState() == Board::invalid) validLabel->setPixmap( (board->validState() == Board::invalid)
? warningPix:okPix ); ? warningPix:okPix );
showValid = true; showValid = true;
} }
else if (timerState == noGame) { else if (timerState == noGame) {
tmp = i18n("Press %1 for a new game").tqarg( newAction->shortcut().toString()); tmp = i18n("Press %1 for a new game").arg( newAction->shortcut().toString());
} }
else { else {
if (timerState == gameOver) { if (timerState == gameOver) {
@ -495,9 +495,9 @@ void AbTop::updateStatus()
} }
else { else {
tmp = TQString("%1 - %2") tmp = TQString("%1 - %2")
.tqarg( (board->actColor() == Board::color1) ? .arg( (board->actColor() == Board::color1) ?
i18n("Red"):i18n("Yellow") ) i18n("Red"):i18n("Yellow") )
.tqarg( iPlayNow() ? .arg( iPlayNow() ?
i18n("I am thinking...") : i18n("It is your turn!") ); i18n("I am thinking...") : i18n("It is your turn!") );
} }
} }
@ -514,7 +514,7 @@ void AbTop::updateStatus()
validShown = showValid; validShown = showValid;
} }
statusBar()->clear(); statusBar()->clear();
statusBar()->tqrepaint(); statusBar()->repaint();
} }
void AbTop::edited(int vState) void AbTop::edited(int vState)

@ -21,14 +21,14 @@ void Ball::setSize(int x, int y)
sizeX = x; sizeX = x;
sizeY = y; sizeY = y;
tqinvalidate(); invalidate();
} }
void Ball::tqinvalidate() void Ball::invalidate()
{ {
Ball *b; Ball *b;
/* tqinvalidate all Balls... */ /* invalidate all Balls... */
for(b=first;b!=0;b=b->next) for(b=first;b!=0;b=b->next)
b->pm.resize(0,0); b->pm.resize(0,0);
} }
@ -43,7 +43,7 @@ void Ball::setLight(int x, int y, int z, const TQColor& c)
lightColor = c; lightColor = c;
tqinvalidate(); invalidate();
} }
@ -52,7 +52,7 @@ void Ball::setTexture(double c, double d)
rippleCount = c; rippleCount = c;
rippleDepth = d; rippleDepth = d;
tqinvalidate(); invalidate();
} }
@ -309,7 +309,7 @@ void BallWidget::resizeEvent(TQResizeEvent *)
realSize = (w>h) ? h:w; realSize = (w>h) ? h:w;
Ball::setSize( realSize/ballFraction, realSize/ballFraction ); Ball::setSize( realSize/ballFraction, realSize/ballFraction );
tqrepaint(); repaint();
} }
void BallWidget::paintEvent(TQPaintEvent *) void BallWidget::paintEvent(TQPaintEvent *)
@ -414,7 +414,7 @@ void BallWidget::animate()
timer->start(1000/freq,true); timer->start(1000/freq,true);
} }
// tqrepaint( false ); // repaint( false );
} }

@ -49,7 +49,7 @@ class Ball {
private: private:
void render(); void render();
static void tqinvalidate(); static void invalidate();
//static TQImage back; //static TQImage back;
static int sizeX, sizeY; static int sizeX, sizeY;

@ -345,7 +345,7 @@ void BoardWidget::draw()
if (renderMode) { if (renderMode) {
updateBalls(); updateBalls();
tqrepaint(false); repaint(false);
return; return;
} }
@ -889,7 +889,7 @@ void BoardWidget::mousePressEvent( TQMouseEvent* pEvent )
TQString tmp; TQString tmp;
actValue = - board.calcEvaluation(); actValue = - board.calcEvaluation();
tmp = i18n("Board value: %1").tqarg(actValue); tmp = i18n("Board value: %1").arg(actValue);
emit updateSpy(tmp); emit updateSpy(tmp);
} }
@ -930,7 +930,7 @@ void BoardWidget::mouseMoveEvent( TQMouseEvent* pEvent )
TQString tmp; TQString tmp;
actValue = - board.calcEvaluation(); actValue = - board.calcEvaluation();
tmp = i18n("Board value: %1").tqarg(actValue); tmp = i18n("Board value: %1").arg(actValue);
emit updateSpy(tmp); emit updateSpy(tmp);
return; return;
} }
@ -948,7 +948,7 @@ void BoardWidget::mouseMoveEvent( TQMouseEvent* pEvent )
TQString tmp; TQString tmp;
tmp.sprintf("%+d", v-actValue); tmp.sprintf("%+d", v-actValue);
TQString str = TQString("%1 : %2").tqarg(actMove.name()).tqarg(tmp); TQString str = TQString("%1 : %2").arg(actMove.name()).arg(tmp);
emit updateSpy(str); emit updateSpy(str);
showMove(actMove,3); showMove(actMove,3);
@ -961,7 +961,7 @@ void BoardWidget::mouseMoveEvent( TQMouseEvent* pEvent )
if (pos == startPos) { if (pos == startPos) {
showStart(actMove,1); showStart(actMove,1);
startShown = true; startShown = true;
tmp = i18n("Board value: %1").tqarg(actValue); tmp = i18n("Board value: %1").arg(actValue);
} }
else else
draw(); draw();

@ -96,7 +96,7 @@
<height>32767</height> <height>32767</height>
</size> </size>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignLeft</set> <set>AlignLeft</set>
</property> </property>
<property name="hAlign" stdset="0"> <property name="hAlign" stdset="0">
@ -131,7 +131,7 @@
<height>32767</height> <height>32767</height>
</size> </size>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignLeft</set> <set>AlignLeft</set>
</property> </property>
<property name="hAlign" stdset="0"> <property name="hAlign" stdset="0">
@ -166,7 +166,7 @@
<height>32767</height> <height>32767</height>
</size> </size>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignLeft</set> <set>AlignLeft</set>
</property> </property>
<property name="hAlign" stdset="0"> <property name="hAlign" stdset="0">
@ -269,7 +269,7 @@
<property name="text"> <property name="text">
<string>Push Out</string> <string>Push Out</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignTop|AlignLeft</set> <set>AlignTop|AlignLeft</set>
</property> </property>
<property name="vAlign" stdset="0"> <property name="vAlign" stdset="0">
@ -293,7 +293,7 @@
<property name="text"> <property name="text">
<string>Push</string> <string>Push</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignTop|AlignLeft</set> <set>AlignTop|AlignLeft</set>
</property> </property>
<property name="vAlign" stdset="0"> <property name="vAlign" stdset="0">
@ -366,7 +366,7 @@
<height>32767</height> <height>32767</height>
</size> </size>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignLeft</set> <set>AlignLeft</set>
</property> </property>
<property name="hAlign" stdset="0"> <property name="hAlign" stdset="0">
@ -390,7 +390,7 @@
<height>32767</height> <height>32767</height>
</size> </size>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignLeft</set> <set>AlignLeft</set>
</property> </property>
<property name="hAlign" stdset="0"> <property name="hAlign" stdset="0">
@ -480,7 +480,7 @@
<height>32767</height> <height>32767</height>
</size> </size>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignLeft</set> <set>AlignLeft</set>
</property> </property>
<property name="hAlign" stdset="0"> <property name="hAlign" stdset="0">
@ -648,7 +648,7 @@
<height>32767</height> <height>32767</height>
</size> </size>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignLeft</set> <set>AlignLeft</set>
</property> </property>
<property name="hAlign" stdset="0"> <property name="hAlign" stdset="0">
@ -694,7 +694,7 @@
<height>32767</height> <height>32767</height>
</size> </size>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignLeft</set> <set>AlignLeft</set>
</property> </property>
<property name="hAlign" stdset="0"> <property name="hAlign" stdset="0">
@ -740,7 +740,7 @@
<height>32767</height> <height>32767</height>
</size> </size>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignLeft</set> <set>AlignLeft</set>
</property> </property>
<property name="hAlign" stdset="0"> <property name="hAlign" stdset="0">
@ -810,7 +810,7 @@
<property name="text"> <property name="text">
<string>Normal</string> <string>Normal</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignTop|AlignLeft</set> <set>AlignTop|AlignLeft</set>
</property> </property>
<property name="vAlign" stdset="0"> <property name="vAlign" stdset="0">
@ -831,7 +831,7 @@
<property name="text"> <property name="text">
<string>For every move possible the given points are added to the Evaluation.</string> <string>For every move possible the given points are added to the Evaluation.</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>WordBreak|AlignTop|AlignLeft</set> <set>WordBreak|AlignTop|AlignLeft</set>
</property> </property>
<property name="vAlign" stdset="0"> <property name="vAlign" stdset="0">
@ -926,7 +926,7 @@
<height>32767</height> <height>32767</height>
</size> </size>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignLeft</set> <set>AlignLeft</set>
</property> </property>
<property name="hAlign" stdset="0"> <property name="hAlign" stdset="0">
@ -942,7 +942,7 @@
<height>32767</height> <height>32767</height>
</size> </size>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignLeft</set> <set>AlignLeft</set>
</property> </property>
<property name="hAlign" stdset="0"> <property name="hAlign" stdset="0">
@ -958,7 +958,7 @@
<height>32767</height> <height>32767</height>
</size> </size>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignLeft</set> <set>AlignLeft</set>
</property> </property>
<property name="hAlign" stdset="0"> <property name="hAlign" stdset="0">
@ -982,7 +982,7 @@
<height>32767</height> <height>32767</height>
</size> </size>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignLeft</set> <set>AlignLeft</set>
</property> </property>
<property name="hAlign" stdset="0"> <property name="hAlign" stdset="0">
@ -998,7 +998,7 @@
<height>32767</height> <height>32767</height>
</size> </size>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignLeft</set> <set>AlignLeft</set>
</property> </property>
<property name="hAlign" stdset="0"> <property name="hAlign" stdset="0">
@ -1014,7 +1014,7 @@
<height>32767</height> <height>32767</height>
</size> </size>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignLeft</set> <set>AlignLeft</set>
</property> </property>
<property name="hAlign" stdset="0"> <property name="hAlign" stdset="0">
@ -1038,7 +1038,7 @@
<height>32767</height> <height>32767</height>
</size> </size>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignLeft</set> <set>AlignLeft</set>
</property> </property>
<property name="hAlign" stdset="0"> <property name="hAlign" stdset="0">
@ -1054,7 +1054,7 @@
<height>32767</height> <height>32767</height>
</size> </size>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignLeft</set> <set>AlignLeft</set>
</property> </property>
<property name="hAlign" stdset="0"> <property name="hAlign" stdset="0">
@ -1094,7 +1094,7 @@
<height>32767</height> <height>32767</height>
</size> </size>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignLeft</set> <set>AlignLeft</set>
</property> </property>
<property name="hAlign" stdset="0"> <property name="hAlign" stdset="0">
@ -1146,7 +1146,7 @@
<property name="text"> <property name="text">
<string>For every ball, the given points are added to the evaluation depending on the balls position. The bonus for a given position is changed randomly in the +/- range.</string> <string>For every ball, the given points are added to the evaluation depending on the balls position. The bonus for a given position is changed randomly in the +/- range.</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>WordBreak|AlignTop|AlignLeft</set> <set>WordBreak|AlignTop|AlignLeft</set>
</property> </property>
<property name="vAlign" stdset="0"> <property name="vAlign" stdset="0">
@ -1233,7 +1233,7 @@
<height>32767</height> <height>32767</height>
</size> </size>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignLeft</set> <set>AlignLeft</set>
</property> </property>
<property name="hAlign" stdset="0"> <property name="hAlign" stdset="0">
@ -1249,7 +1249,7 @@
<height>32767</height> <height>32767</height>
</size> </size>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignLeft</set> <set>AlignLeft</set>
</property> </property>
<property name="hAlign" stdset="0"> <property name="hAlign" stdset="0">
@ -1265,7 +1265,7 @@
<height>32767</height> <height>32767</height>
</size> </size>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignLeft</set> <set>AlignLeft</set>
</property> </property>
<property name="hAlign" stdset="0"> <property name="hAlign" stdset="0">
@ -1281,7 +1281,7 @@
<height>32767</height> <height>32767</height>
</size> </size>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignLeft</set> <set>AlignLeft</set>
</property> </property>
<property name="hAlign" stdset="0"> <property name="hAlign" stdset="0">
@ -1341,7 +1341,7 @@
<property name="text"> <property name="text">
<string>For a number of balls In-a-Row, the given points are added to the evaluation</string> <string>For a number of balls In-a-Row, the given points are added to the evaluation</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>WordBreak|AlignTop|AlignLeft</set> <set>WordBreak|AlignTop|AlignLeft</set>
</property> </property>
<property name="vAlign" stdset="0"> <property name="vAlign" stdset="0">
@ -1428,7 +1428,7 @@
<height>32767</height> <height>32767</height>
</size> </size>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignLeft</set> <set>AlignLeft</set>
</property> </property>
<property name="hAlign" stdset="0"> <property name="hAlign" stdset="0">
@ -1452,7 +1452,7 @@
<height>32767</height> <height>32767</height>
</size> </size>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignLeft</set> <set>AlignLeft</set>
</property> </property>
<property name="hAlign" stdset="0"> <property name="hAlign" stdset="0">
@ -1468,7 +1468,7 @@
<height>32767</height> <height>32767</height>
</size> </size>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignLeft</set> <set>AlignLeft</set>
</property> </property>
<property name="hAlign" stdset="0"> <property name="hAlign" stdset="0">
@ -1500,7 +1500,7 @@
<height>32767</height> <height>32767</height>
</size> </size>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignLeft</set> <set>AlignLeft</set>
</property> </property>
<property name="hAlign" stdset="0"> <property name="hAlign" stdset="0">
@ -1524,7 +1524,7 @@
<height>32767</height> <height>32767</height>
</size> </size>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignLeft</set> <set>AlignLeft</set>
</property> </property>
<property name="hAlign" stdset="0"> <property name="hAlign" stdset="0">
@ -1560,7 +1560,7 @@
<property name="text"> <property name="text">
<string>For a difference in the number of balls, the given points are added to the evaluation. A difference of 6 only can be a lost/won game.</string> <string>For a difference in the number of balls, the given points are added to the evaluation. A difference of 6 only can be a lost/won game.</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>WordBreak|AlignTop|AlignLeft</set> <set>WordBreak|AlignTop|AlignLeft</set>
</property> </property>
<property name="vAlign" stdset="0"> <property name="vAlign" stdset="0">
@ -1642,7 +1642,7 @@
<property name="text"> <property name="text">
<string>Your evaluation scheme, defined in all other tabs of this dialog, can be stored here.</string> <string>Your evaluation scheme, defined in all other tabs of this dialog, can be stored here.</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>WordBreak|AlignTop|AlignLeft</set> <set>WordBreak|AlignTop|AlignLeft</set>
</property> </property>
<property name="vAlign" stdset="0"> <property name="vAlign" stdset="0">

@ -76,7 +76,7 @@ void EvalScheme::setDefaults()
void EvalScheme::read(KConfig *config) void EvalScheme::read(KConfig *config)
{ {
TQString confSection = TQString("%1 Evaluation Scheme").tqarg(_name); TQString confSection = TQString("%1 Evaluation Scheme").arg(_name);
config->setGroup(confSection); config->setGroup(confSection);
TQStringList list; TQStringList list;
@ -117,7 +117,7 @@ void EvalScheme::read(KConfig *config)
void EvalScheme::save(KConfig* config) void EvalScheme::save(KConfig* config)
{ {
TQString confSection = TQString("%1 Evaluation Scheme").tqarg(_name); TQString confSection = TQString("%1 Evaluation Scheme").arg(_name);
config->setGroup(confSection); config->setGroup(confSection);
TQString entry; TQString entry;
@ -128,12 +128,12 @@ void EvalScheme::save(KConfig* config)
entry.sprintf("%d", _moveValue[0]); entry.sprintf("%d", _moveValue[0]);
for(int i=1;i<Move::typeCount;i++) for(int i=1;i<Move::typeCount;i++)
entry += TQString(", %1").tqarg( _moveValue[i] ); entry += TQString(", %1").arg( _moveValue[i] );
config->writeEntry("MoveValues", entry); config->writeEntry("MoveValues", entry);
entry.sprintf("%d", _inARowValue[0]); entry.sprintf("%d", _inARowValue[0]);
for(int i=1;i<InARowCounter::inARowCount;i++) for(int i=1;i<InARowCounter::inARowCount;i++)
entry += TQString(", %1").tqarg( _inARowValue[i] ); entry += TQString(", %1").arg( _inARowValue[i] );
config->writeEntry("InARowValues", entry); config->writeEntry("InARowValues", entry);
entry.sprintf("%d,%d,%d,%d,%d", _ringValue[0], _ringValue[1], entry.sprintf("%d,%d,%d,%d,%d", _ringValue[0], _ringValue[1],
@ -217,15 +217,15 @@ TQString EvalScheme::ascii()
res.sprintf("%s=%d", _name.ascii(), _stoneValue[1]); res.sprintf("%s=%d", _name.ascii(), _stoneValue[1]);
for(i=1;i<6;i++) for(i=1;i<6;i++)
res += TQString(",%1").tqarg( _stoneValue[i] ); res += TQString(",%1").arg( _stoneValue[i] );
for(i=0;i<Move::typeCount;i++) for(i=0;i<Move::typeCount;i++)
res += TQString(",%1").tqarg( _moveValue[i] ); res += TQString(",%1").arg( _moveValue[i] );
for(i=0;i<InARowCounter::inARowCount;i++) for(i=0;i<InARowCounter::inARowCount;i++)
res += TQString(",%1").tqarg( _inARowValue[i] ); res += TQString(",%1").arg( _inARowValue[i] );
for(i=0;i<5;i++) for(i=0;i<5;i++)
res += TQString(",%1").tqarg( _ringValue[i] ); res += TQString(",%1").arg( _ringValue[i] );
for(i=0;i<5;i++) for(i=0;i<5;i++)
res += TQString(",%1").tqarg( _ringDiff[i] ); res += TQString(",%1").arg( _ringDiff[i] );
return res; return res;
} }

@ -28,7 +28,7 @@ TQColor FEPieceInfo::defaultColor(uint i) const
TQString FEPieceInfo::colorLabel(uint i) const TQString FEPieceInfo::colorLabel(uint i) const
{ {
return (i==NB_NORM_BLOCK_TYPES ? i18n("Garbage color:") return (i==NB_NORM_BLOCK_TYPES ? i18n("Garbage color:")
: i18n("Color #%1:").tqarg(i+1)); : i18n("Color #%1:").arg(i+1));
} }
void FEPieceInfo::draw(TQPixmap *pixmap, uint blockType, uint, void FEPieceInfo::draw(TQPixmap *pixmap, uint blockType, uint,

Binary file not shown.

@ -572,10 +572,10 @@ void KGoldrunner::gameFreeze (bool on_off)
{ {
if (on_off) if (on_off)
statusBar()->changeItem statusBar()->changeItem
(i18n("Press \"%1\" to RESUME").tqarg(pauseKeys), ID_MSG); (i18n("Press \"%1\" to RESUME").arg(pauseKeys), ID_MSG);
else else
statusBar()->changeItem statusBar()->changeItem
(i18n("Press \"%1\" to PAUSE").tqarg(pauseKeys), ID_MSG); (i18n("Press \"%1\" to PAUSE").arg(pauseKeys), ID_MSG);
} }
void KGoldrunner::adjustHintAction (bool hintAvailable) void KGoldrunner::adjustHintAction (bool hintAvailable)
@ -849,7 +849,7 @@ bool KGoldrunner::getDirectories()
KGrMessage::information (this, i18n("Get Folders"), KGrMessage::information (this, i18n("Get Folders"),
i18n("Cannot find documentation sub-folder 'en/%1/' " i18n("Cannot find documentation sub-folder 'en/%1/' "
"in area '%2' of the KDE folder ($TDEDIRS).") "in area '%2' of the KDE folder ($TDEDIRS).")
.tqarg(myDir).tqarg(dirs->kde_default ("html"))); .arg(myDir).arg(dirs->kde_default ("html")));
// result = FALSE; // Don't abort if the doc is missing. // result = FALSE; // Don't abort if the doc is missing.
} }
else else
@ -861,7 +861,7 @@ bool KGoldrunner::getDirectories()
KGrMessage::information (this, i18n("Get Folders"), KGrMessage::information (this, i18n("Get Folders"),
i18n("Cannot find system games sub-folder '%1/system/' " i18n("Cannot find system games sub-folder '%1/system/' "
"in area '%2' of the KDE folder ($TDEDIRS).") "in area '%2' of the KDE folder ($TDEDIRS).")
.tqarg(myDir).tqarg(dirs->kde_default ("data"))); .arg(myDir).arg(dirs->kde_default ("data")));
result = FALSE; // ABORT if the games data is missing. result = FALSE; // ABORT if the games data is missing.
} }
else else
@ -874,7 +874,7 @@ bool KGoldrunner::getDirectories()
KGrMessage::information (this, i18n("Get Folders"), KGrMessage::information (this, i18n("Get Folders"),
i18n("Cannot find or create user games sub-folder '%1/user/' " i18n("Cannot find or create user games sub-folder '%1/user/' "
"in area '%2' of the KDE user area ($TDEHOME).") "in area '%2' of the KDE user area ($TDEHOME).")
.tqarg(myDir).tqarg(dirs->kde_default ("data"))); .arg(myDir).arg(dirs->kde_default ("data")));
// result = FALSE; // Don't abort if user area is missing. // result = FALSE; // Don't abort if user area is missing.
} }
else { else {
@ -882,7 +882,7 @@ bool KGoldrunner::getDirectories()
if (! create) { if (! create) {
KGrMessage::information (this, i18n("Get Folders"), KGrMessage::information (this, i18n("Get Folders"),
i18n("Cannot find or create 'levels/' folder in " i18n("Cannot find or create 'levels/' folder in "
"sub-folder '%1/user/' in the KDE user area ($TDEHOME).").tqarg(myDir)); "sub-folder '%1/user/' in the KDE user area ($TDEHOME).").arg(myDir));
// result = FALSE; // Don't abort if user area is missing. // result = FALSE; // Don't abort if user area is missing.
} }
} }

@ -132,7 +132,7 @@ KGrSLDialog::KGrSLDialog (int action, int requestedLevel, int collnIndex,
TQPoint p = parent->mapToGlobal (TQPoint (0,0)); TQPoint p = parent->mapToGlobal (TQPoint (0,0));
// Base the tqgeometry of the dialog box on the playing area. // Base the geometry of the dialog box on the playing area.
int cell = parent->width() / (FIELDWIDTH + 4); int cell = parent->width() / (FIELDWIDTH + 4);
dad-> move (p.x()+2*cell, p.y()+2*cell); dad-> move (p.x()+2*cell, p.y()+2*cell);
dad-> setMinimumSize ((FIELDWIDTH*cell/2), (FIELDHEIGHT-1)*cell); dad-> setMinimumSize ((FIELDWIDTH*cell/2), (FIELDHEIGHT-1)*cell);
@ -357,7 +357,7 @@ void KGrSLDialog::slAboutColln ()
{ {
// User clicked the "About" button ... // User clicked the "About" button ...
int n = slCollnIndex; int n = slCollnIndex;
TQString title = i18n("About \"%1\"").tqarg(collections.at(n)->name); TQString title = i18n("About \"%1\"").arg(collections.at(n)->name);
if (collections.at(n)->about.length() > 0) { if (collections.at(n)->about.length() > 0) {
// Convert game description to ASCII and UTF-8 codes, then translate it. // Convert game description to ASCII and UTF-8 codes, then translate it.
@ -404,7 +404,7 @@ void KGrSLDialog::slPaintLevel ()
TQString filePath = game->getFilePath TQString filePath = game->getFilePath
(collections.at(n)->owner, collections.at(n), number->value()); (collections.at(n)->owner, collections.at(n), number->value());
thumbNail->setFilePath (filePath, slName); thumbNail->setFilePath (filePath, slName);
thumbNail->tqrepaint(); // Will call "drawContents (p)". thumbNail->repaint(); // Will call "drawContents (p)".
} }
void KGrSLDialog::slotHelp () void KGrSLDialog::slotHelp ()
@ -537,7 +537,7 @@ KGrNHDialog::KGrNHDialog(const TQString & levelName, const TQString & levelHint,
dad-> setCaption (i18n("Edit Name & Hint")); dad-> setCaption (i18n("Edit Name & Hint"));
#endif #endif
// Base the tqgeometry of the text box on the playing area. // Base the geometry of the text box on the playing area.
TQPoint p = parent->mapToGlobal (TQPoint (0,0)); TQPoint p = parent->mapToGlobal (TQPoint (0,0));
int c = parent->width() / (FIELDWIDTH + 4); int c = parent->width() / (FIELDWIDTH + 4);
dad-> move (p.x()+4*c, p.y()+4*c); dad-> move (p.x()+4*c, p.y()+4*c);
@ -642,7 +642,7 @@ KGrECDialog::KGrECDialog (int action, int collnIndex,
TQPoint p = parent->mapToGlobal (TQPoint (0,0)); TQPoint p = parent->mapToGlobal (TQPoint (0,0));
// Base the tqgeometry of the dialog box on the playing area. // Base the geometry of the dialog box on the playing area.
int cell = parent->width() / (FIELDWIDTH + 4); int cell = parent->width() / (FIELDWIDTH + 4);
dad-> move (p.x()+2*cell, p.y()+2*cell); dad-> move (p.x()+2*cell, p.y()+2*cell);
dad-> setMinimumSize ((FIELDWIDTH*cell/2), (FIELDHEIGHT-1)*cell); dad-> setMinimumSize ((FIELDWIDTH*cell/2), (FIELDHEIGHT-1)*cell);
@ -669,7 +669,7 @@ KGrECDialog::KGrECDialog (int action, int collnIndex,
collections.at(defaultGame)->nLevels)); collections.at(defaultGame)->nLevels));
#else #else
nLevL-> setText (i18n("%1 levels") nLevL-> setText (i18n("%1 levels")
.tqarg(collections.at(defaultGame)->nLevels)); .arg(collections.at(defaultGame)->nLevels));
#endif #endif
OKText = i18n("Save Changes"); OKText = i18n("Save Changes");
} }
@ -802,7 +802,7 @@ KGrLGDialog::KGrLGDialog (TQFile * savedGames,
dad-> setCaption (i18n("Select Saved Game")); dad-> setCaption (i18n("Select Saved Game"));
// Base the tqgeometry of the list box on the playing area. // Base the geometry of the list box on the playing area.
TQPoint p = parent->mapToGlobal (TQPoint (0,0)); TQPoint p = parent->mapToGlobal (TQPoint (0,0));
int c = parent->width() / (FIELDWIDTH + 4); int c = parent->width() / (FIELDWIDTH + 4);
dad-> move (p.x()+2*c, p.y()+2*c); dad-> move (p.x()+2*c, p.y()+2*c);
@ -942,7 +942,7 @@ void KGrMessage::wrapped (TQWidget * parent, TQString title, TQString contents)
mm-> setCaption (title); mm-> setCaption (title);
// Base the tqgeometry of the text box on the playing area. // Base the geometry of the text box on the playing area.
TQPoint p = parent->mapToGlobal (TQPoint (0,0)); TQPoint p = parent->mapToGlobal (TQPoint (0,0));
int c = parent->width() / (FIELDWIDTH + 4); int c = parent->width() / (FIELDWIDTH + 4);
mm-> move (p.x()+4*c, p.y()+4*c); mm-> move (p.x()+4*c, p.y()+4*c);

@ -190,7 +190,7 @@ void KGrGame::goUpOneLevel()
KGrMessage::information (view, collection->name, KGrMessage::information (view, collection->name,
i18n("<b>CONGRATULATIONS !!!!</b>" i18n("<b>CONGRATULATIONS !!!!</b>"
"<p>You have conquered the last level in the %1 game !!</p>") "<p>You have conquered the last level in the %1 game !!</p>")
.tqarg("<b>\"" + collection->name + "\"</b>")); .arg("<b>\"" + collection->name + "\"</b>"));
checkHighScore(); // Check if there is a high score for this game. checkHighScore(); // Check if there is a high score for this game.
unfreeze(); unfreeze();
@ -384,7 +384,7 @@ void KGrGame::startTutorial()
KGrMessage::information (view, i18n("Start Tutorial"), KGrMessage::information (view, i18n("Start Tutorial"),
i18n("Cannot find the tutorial game (file-prefix %1) in " i18n("Cannot find the tutorial game (file-prefix %1) in "
"the %2 files.") "the %2 files.")
.tqarg("'tute'").tqarg("'games.dat'")); .arg("'tute'").arg("'games.dat'"));
} }
} }
@ -514,14 +514,14 @@ bool KGrGame::openLevelFile (int levelNo, TQFile & openlevel)
KGrMessage::information (view, i18n("Load Level"), KGrMessage::information (view, i18n("Load Level"),
i18n("Cannot find file '%1'. Please make sure '%2' has been " i18n("Cannot find file '%1'. Please make sure '%2' has been "
"run in the '%3' folder.") "run in the '%3' folder.")
.tqarg(filePath).tqarg("tar xf levels.tar").tqarg(systemDataDir.myStr())); .arg(filePath).arg("tar xf levels.tar").arg(systemDataDir.myStr()));
return (FALSE); return (FALSE);
} }
// <20>ffne Level zum lesen // <20>ffne Level zum lesen
if (! openlevel.open (IO_ReadOnly)) { if (! openlevel.open (IO_ReadOnly)) {
KGrMessage::information (view, i18n("Load Level"), KGrMessage::information (view, i18n("Load Level"),
i18n("Cannot open file '%1' for read-only.").tqarg(filePath)); i18n("Cannot open file '%1' for read-only.").arg(filePath));
return (FALSE); return (FALSE);
} }
@ -769,7 +769,7 @@ void KGrGame::saveGame() // Save game ID, score and level.
{ {
if (editMode) {myMessage (view, i18n("Save Game"), if (editMode) {myMessage (view, i18n("Save Game"),
i18n("Sorry, you cannot save your game play while you are editing. " i18n("Sorry, you cannot save your game play while you are editing. "
"Please try menu item %1.").tqarg("\"" + i18n("&Save Edits...") + "\"")); "Please try menu item %1.").arg("\"" + i18n("&Save Edits...") + "\""));
return; return;
} }
if (hero->started) {myMessage (view, i18n("Save Game"), if (hero->started) {myMessage (view, i18n("Save Game"),
@ -800,7 +800,7 @@ void KGrGame::saveGame() // Save game ID, score and level.
if (! file2.open (IO_WriteOnly)) { if (! file2.open (IO_WriteOnly)) {
KGrMessage::information (view, i18n("Save Game"), KGrMessage::information (view, i18n("Save Game"),
i18n("Cannot open file '%1' for output.") i18n("Cannot open file '%1' for output.")
.tqarg(userDataDir + "savegame.tmp")); .arg(userDataDir + "savegame.tmp"));
return; return;
} }
TQTextStream text2 (&file2); TQTextStream text2 (&file2);
@ -810,7 +810,7 @@ void KGrGame::saveGame() // Save game ID, score and level.
if (! file1.open (IO_ReadOnly)) { if (! file1.open (IO_ReadOnly)) {
KGrMessage::information (view, i18n("Save Game"), KGrMessage::information (view, i18n("Save Game"),
i18n("Cannot open file '%1' for read-only.") i18n("Cannot open file '%1' for read-only.")
.tqarg(userDataDir + "savegame.dat")); .arg(userDataDir + "savegame.dat"));
return; return;
} }
@ -848,7 +848,7 @@ void KGrGame::loadGame() // Re-load game, score and level.
if (! savedGames.open (IO_ReadOnly)) { if (! savedGames.open (IO_ReadOnly)) {
KGrMessage::information (view, i18n("Load Game"), KGrMessage::information (view, i18n("Load Game"),
i18n("Cannot open file '%1' for read-only.") i18n("Cannot open file '%1' for read-only.")
.tqarg(userDataDir + "savegame.dat")); .arg(userDataDir + "savegame.dat"));
return; return;
} }
@ -899,7 +899,7 @@ void KGrGame::loadGame() // Re-load game, score and level.
} }
else { else {
KGrMessage::information (view, i18n("Load Game"), KGrMessage::information (view, i18n("Load Game"),
i18n("Cannot find the game with prefix '%1'.").tqarg(pr)); i18n("Cannot find the game with prefix '%1'.").arg(pr));
} }
} }
@ -947,7 +947,7 @@ void KGrGame::checkHighScore()
if (! high1.open (IO_ReadOnly)) { if (! high1.open (IO_ReadOnly)) {
TQString high1_name = high1.name(); TQString high1_name = high1.name();
KGrMessage::information (view, i18n("Check for High Score"), KGrMessage::information (view, i18n("Check for High Score"),
i18n("Cannot open file '%1' for read-only.").tqarg(high1_name)); i18n("Cannot open file '%1' for read-only.").arg(high1_name));
return; return;
} }
@ -987,7 +987,7 @@ void KGrGame::checkHighScore()
if (! high2.open (IO_WriteOnly)) { if (! high2.open (IO_WriteOnly)) {
KGrMessage::information (view, i18n("Check for High Score"), KGrMessage::information (view, i18n("Check for High Score"),
i18n("Cannot open file '%1' for output.") i18n("Cannot open file '%1' for output.")
.tqarg(userDataDir + "hi_" + collection->prefix + ".tmp")); .arg(userDataDir + "hi_" + collection->prefix + ".tmp"));
return; return;
} }
@ -1132,7 +1132,7 @@ void KGrGame::showHighScores()
if (! high1.exists()) { if (! high1.exists()) {
KGrMessage::information (view, i18n("Show High Scores"), KGrMessage::information (view, i18n("Show High Scores"),
i18n("Sorry, there are no high scores for the %1 game yet.") i18n("Sorry, there are no high scores for the %1 game yet.")
.tqarg("\"" + collection->name + "\"")); .arg("\"" + collection->name + "\""));
return; return;
} }
} }
@ -1140,7 +1140,7 @@ void KGrGame::showHighScores()
if (! high1.open (IO_ReadOnly)) { if (! high1.open (IO_ReadOnly)) {
TQString high1_name = high1.name(); TQString high1_name = high1.name();
KGrMessage::information (view, i18n("Show High Scores"), KGrMessage::information (view, i18n("Show High Scores"),
i18n("Cannot open file '%1' for read-only.").tqarg(high1_name)); i18n("Cannot open file '%1' for read-only.").arg(high1_name));
return; return;
} }
@ -1154,7 +1154,7 @@ void KGrGame::showHighScores()
TQLabel * hsHeader = new TQLabel (i18n ( TQLabel * hsHeader = new TQLabel (i18n (
"<center><h2>KGoldrunner Hall of Fame</h2></center><br>" "<center><h2>KGoldrunner Hall of Fame</h2></center><br>"
"<center><h3>\"%1\" Game</h3></center>") "<center><h3>\"%1\" Game</h3></center>")
.tqarg(collection->name), .arg(collection->name),
hs); hs);
TQLabel * hsColHeader = new TQLabel ( TQLabel * hsColHeader = new TQLabel (
i18n(" Name " i18n(" Name "
@ -1584,7 +1584,7 @@ bool KGrGame::saveLevelFile()
// Open the output file. // Open the output file.
if (! levelFile.open (IO_WriteOnly)) { if (! levelFile.open (IO_WriteOnly)) {
KGrMessage::information (view, i18n("Save Level"), KGrMessage::information (view, i18n("Save Level"),
i18n("Cannot open file '%1' for output.").tqarg(filePath)); i18n("Cannot open file '%1' for output.").arg(filePath));
return (FALSE); return (FALSE);
} }
@ -1642,8 +1642,8 @@ void KGrGame::moveLevelFile ()
KGrMessage::information (view, i18n("Move Level"), KGrMessage::information (view, i18n("Move Level"),
i18n("You must first load a level to be moved. Use " i18n("You must first load a level to be moved. Use "
"the %1 or %2 menu.") "the %1 or %2 menu.")
.tqarg("\"" + i18n("Game") + "\"") .arg("\"" + i18n("Game") + "\"")
.tqarg("\"" + i18n("Editor") + "\"")); .arg("\"" + i18n("Editor") + "\""));
return; return;
} }
@ -1780,7 +1780,7 @@ void KGrGame::deleteLevelFile ()
} }
else { else {
KGrMessage::information (view, i18n("Delete Level"), KGrMessage::information (view, i18n("Delete Level"),
i18n("Cannot find file '%1' to be deleted.").tqarg(filePath)); i18n("Cannot find file '%1' to be deleted.").arg(filePath));
return; return;
} }
@ -1883,7 +1883,7 @@ void KGrGame::editCollection (int action)
if (duplicatePrefix) { if (duplicatePrefix) {
KGrMessage::information (view, i18n("Save Game Info"), KGrMessage::information (view, i18n("Save Game Info"),
i18n("The filename prefix '%1' is already in use.") i18n("The filename prefix '%1' is already in use.")
.tqarg(ecPrefix)); .arg(ecPrefix));
continue; continue;
} }
} }
@ -2061,7 +2061,7 @@ bool KGrGame::reNumberLevels (int cIndex, int first, int last, int inc)
if (! dir.rename (file1, file2, TRUE)) { // Allow absolute paths. if (! dir.rename (file1, file2, TRUE)) { // Allow absolute paths.
KGrMessage::information (view, i18n("Save Level"), KGrMessage::information (view, i18n("Save Level"),
i18n("Cannot rename file '%1' to '%2'.") i18n("Cannot rename file '%1' to '%2'.")
.tqarg(file1).tqarg(file2)); .arg(file1).arg(file2));
return (FALSE); return (FALSE);
} }
i = i + step; i = i + step;
@ -2181,8 +2181,8 @@ int KGrGame::selectLevel (int action, int requestedLevel)
KGrMessage::information (view, i18n("Select Level"), KGrMessage::information (view, i18n("Select Level"),
i18n("There is no level %1 in %2, " i18n("There is no level %1 in %2, "
"so you cannot play or edit it.") "so you cannot play or edit it.")
.tqarg(selectedLevel) .arg(selectedLevel)
.tqarg("\"" + collections.at(selectedGame)->name + "\"")); .arg("\"" + collections.at(selectedGame)->name + "\""));
selectedLevel = 0; // Set an invalid selection. selectedLevel = 0; // Set an invalid selection.
continue; // Re-run the dialog box. continue; // Re-run the dialog box.
} }
@ -2372,10 +2372,10 @@ void KGrGame::mapCollections()
i18n("There is no folder '%1' to hold levels for" i18n("There is no folder '%1' to hold levels for"
" the '%2' game. Please make sure '%3' " " the '%2' game. Please make sure '%3' "
"has been run in the '%4' folder.") "has been run in the '%4' folder.")
.tqarg(d_path) .arg(d_path)
.tqarg(colln->name) .arg(colln->name)
.tqarg("tar xf levels.tar") .arg("tar xf levels.tar")
.tqarg(systemDataDir)); .arg(systemDataDir));
} }
continue; continue;
} }
@ -2388,9 +2388,9 @@ void KGrGame::mapCollections()
if ((files->count() <= 0) && (colln->nLevels > 0)) { if ((files->count() <= 0) && (colln->nLevels > 0)) {
KGrMessage::information (view, i18n("Check Games & Levels"), KGrMessage::information (view, i18n("Check Games & Levels"),
i18n("There are no files '%1/%2???.grl' for the %3 game.") i18n("There are no files '%1/%2???.grl' for the %3 game.")
.tqarg(d_path) .arg(d_path)
.tqarg(colln->prefix) .arg(colln->prefix)
.tqarg("\"" + colln->name + "\"")); .arg("\"" + colln->name + "\""));
continue; continue;
} }
@ -2413,8 +2413,8 @@ void KGrGame::mapCollections()
i18n("Check Games & Levels"), i18n("Check Games & Levels"),
i18n("File '%1' is beyond the highest level for " i18n("File '%1' is beyond the highest level for "
"the %2 game and cannot be played.") "the %2 game and cannot be played.")
.tqarg(fileName1) .arg(fileName1)
.tqarg("\"" + colln->name + "\"")); .arg("\"" + colln->name + "\""));
break; break;
} }
else if (fileName1 == fileName2) { else if (fileName1 == fileName2) {
@ -2426,16 +2426,16 @@ void KGrGame::mapCollections()
i18n("Check Games & Levels"), i18n("Check Games & Levels"),
i18n("File '%1' is before the lowest level for " i18n("File '%1' is before the lowest level for "
"the %2 game and cannot be played.") "the %2 game and cannot be played.")
.tqarg(fileName1) .arg(fileName1)
.tqarg("\"" + colln->name + "\"")); .arg("\"" + colln->name + "\""));
break; break;
} }
else { else {
KGrMessage::information (view, KGrMessage::information (view,
i18n("Check Games & Levels"), i18n("Check Games & Levels"),
i18n("Cannot find file '%1' for the %2 game.") i18n("Cannot find file '%1' for the %2 game.")
.tqarg(fileName2) .arg(fileName2)
.tqarg("\"" + colln->name + "\"")); .arg("\"" + colln->name + "\""));
lev++; lev++;
} }
} }
@ -2457,14 +2457,14 @@ bool KGrGame::loadCollections (Owner o)
if (o == SYSTEM) { if (o == SYSTEM) {
KGrMessage::information (view, i18n("Load Game Info"), KGrMessage::information (view, i18n("Load Game Info"),
i18n("Cannot find game info file '%1'.") i18n("Cannot find game info file '%1'.")
.tqarg(filePath)); .arg(filePath));
} }
return (FALSE); return (FALSE);
} }
if (! c.open (IO_ReadOnly)) { if (! c.open (IO_ReadOnly)) {
KGrMessage::information (view, i18n("Load Game Info"), KGrMessage::information (view, i18n("Load Game Info"),
i18n("Cannot open file '%1' for read-only.").tqarg(filePath)); i18n("Cannot open file '%1' for read-only.").arg(filePath));
return (FALSE); return (FALSE);
} }
@ -2513,7 +2513,7 @@ bool KGrGame::loadCollections (Owner o)
// Not EOF: it's an empty line or out-of-context "about" line. // Not EOF: it's an empty line or out-of-context "about" line.
KGrMessage::information (view, i18n("Load Game Info"), KGrMessage::information (view, i18n("Load Game Info"),
i18n("Format error in game info file '%1'.") i18n("Format error in game info file '%1'.")
.tqarg(filePath)); .arg(filePath));
c.close(); c.close();
return (FALSE); return (FALSE);
} }
@ -2542,7 +2542,7 @@ bool KGrGame::saveCollections (Owner o)
// Open the output file. // Open the output file.
if (! c.open (IO_WriteOnly)) { if (! c.open (IO_WriteOnly)) {
KGrMessage::information (view, i18n("Save Game Info"), KGrMessage::information (view, i18n("Save Game Info"),
i18n("Cannot open file '%1' for output.").tqarg(filePath)); i18n("Cannot open file '%1' for output.").arg(filePath));
return (FALSE); return (FALSE);
} }

@ -17,7 +17,7 @@
// "endData" checks for an end-of-file condition. // "endData" checks for an end-of-file condition.
// //
#define myStr latin1 #define myStr latin1
#define myChar(i) tqat((i)).latin1() #define myChar(i) at((i)).latin1()
#define endData atEnd #define endData atEnd
#include <tqobject.h> #include <tqobject.h>

@ -93,7 +93,7 @@ KCubeWidget::KCubeWidget(TQWidget* parent,const char* name
setPalette(kapp->palette()); setPalette(kapp->palette());
// show values // show values
tqrepaint(false); repaint(false);
} }
KCubeWidget::~KCubeWidget() KCubeWidget::~KCubeWidget()

@ -123,7 +123,7 @@ void KJumpingCube::saveGame(bool saveAs)
if(KIO::NetAccess::exists(url,false,this)) if(KIO::NetAccess::exists(url,false,this))
{ {
TQString mes=i18n("The file %1 exists.\n" TQString mes=i18n("The file %1 exists.\n"
"Do you want to overwrite it?").tqarg(url.url()); "Do you want to overwrite it?").arg(url.url());
result = KMessageBox::warningContinueCancel(this, mes, TQString(), i18n("Overwrite")); result = KMessageBox::warningContinueCancel(this, mes, TQString(), i18n("Overwrite"));
if(result==KMessageBox::Cancel) if(result==KMessageBox::Cancel)
return; return;
@ -147,12 +147,12 @@ void KJumpingCube::saveGame(bool saveAs)
if(KIO::NetAccess::upload( tempFile.name(),gameURL,this )) if(KIO::NetAccess::upload( tempFile.name(),gameURL,this ))
{ {
TQString s=i18n("game saved as %1"); TQString s=i18n("game saved as %1");
s=s.tqarg(gameURL.url()); s=s.arg(gameURL.url());
statusBar()->message(s,MESSAGE_TIME); statusBar()->message(s,MESSAGE_TIME);
} }
else else
{ {
KMessageBox::sorry(this,i18n("There was an error in saving file\n%1").tqarg(gameURL.url())); KMessageBox::sorry(this,i18n("There was an error in saving file\n%1").arg(gameURL.url()));
} }
} }
@ -168,7 +168,7 @@ void KJumpingCube::openGame()
return; return;
if(!KIO::NetAccess::exists(url,true,this)) if(!KIO::NetAccess::exists(url,true,this))
{ {
TQString mes=i18n("The file %1 does not exist!").tqarg(url.url()); TQString mes=i18n("The file %1 does not exist!").arg(url.url());
KMessageBox::sorry(this,mes); KMessageBox::sorry(this,mes);
fileOk=false; fileOk=false;
} }
@ -183,7 +183,7 @@ void KJumpingCube::openGame()
if(!config.hasKey("Version")) if(!config.hasKey("Version"))
{ {
TQString mes=i18n("The file %1 isn't a KJumpingCube gamefile!") TQString mes=i18n("The file %1 isn't a KJumpingCube gamefile!")
.tqarg(url.url()); .arg(url.url());
KMessageBox::sorry(this,mes); KMessageBox::sorry(this,mes);
return; return;
} }
@ -197,7 +197,7 @@ void KJumpingCube::openGame()
KIO::NetAccess::removeTempFile( tempFile ); KIO::NetAccess::removeTempFile( tempFile );
} }
else else
KMessageBox::sorry(this,i18n("There was an error loading file\n%1").tqarg( url.url() )); KMessageBox::sorry(this,i18n("There was an error loading file\n%1").arg( url.url() ));
} }
void KJumpingCube::stop() void KJumpingCube::stop()
@ -223,11 +223,11 @@ void KJumpingCube::changePlayer(int newPlayer)
{ {
undoAction->setEnabled(true); undoAction->setEnabled(true);
currentPlayer->setBackgroundColor(newPlayer == 1 ? Prefs::color1() : Prefs::color2()); currentPlayer->setBackgroundColor(newPlayer == 1 ? Prefs::color1() : Prefs::color2());
currentPlayer->tqrepaint(); currentPlayer->repaint();
} }
void KJumpingCube::showWinner(int player) { void KJumpingCube::showWinner(int player) {
TQString s=i18n("Winner is Player %1!").tqarg(player); TQString s=i18n("Winner is Player %1!").arg(player);
KMessageBox::information(this,s,i18n("Winner")); KMessageBox::information(this,s,i18n("Winner"));
view->reset(); view->reset();
} }

@ -94,7 +94,7 @@
<property name="text"> <property name="text">
<string>10x10</string> <string>10x10</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
@ -180,7 +180,7 @@
<property name="text"> <property name="text">
<string>Average</string> <string>Average</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignCenter</set> <set>AlignCenter</set>
</property> </property>
</widget> </widget>
@ -199,7 +199,7 @@
<property name="text"> <property name="text">
<string>Expert</string> <string>Expert</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>

@ -17,7 +17,7 @@ TQColor KLPieceInfo::defaultColor(uint i) const
TQString KLPieceInfo::colorLabel(uint i) const TQString KLPieceInfo::colorLabel(uint i) const
{ {
return i18n("Color #%1:").tqarg(i+1); return i18n("Color #%1:").arg(i+1);
} }
void KLPieceInfo::draw(TQPixmap *pixmap, uint blockType, uint bMode, void KLPieceInfo::draw(TQPixmap *pixmap, uint blockType, uint bMode,

@ -73,7 +73,7 @@ void Field::putBall(int x, int y, char color)
if( checkBounds(x,y) ){ if( checkBounds(x,y) ){
field[y][x].setColor(color); field[y][x].setColor(color);
erase5Balls(); erase5Balls();
tqrepaint(FALSE); repaint(FALSE);
} }
}*/ }*/
void Field::moveBall(int xa, int ya, int xb, int yb) void Field::moveBall(int xa, int ya, int xb, int yb)

@ -164,7 +164,7 @@ void KLines::startGame()
void KLines::setLevel(int level) { void KLines::setLevel(int level) {
levelStr = i18n(LEVEL[level+2]); levelStr = i18n(LEVEL[level+2]);
statusBar()->changeItem(i18n(" Level: %1").tqarg(levelStr), 0); statusBar()->changeItem(i18n(" Level: %1").arg(levelStr), 0);
} }
void KLines::startDemo() void KLines::startDemo()
@ -183,7 +183,7 @@ void KLines::startDemo()
bFirst = true; bFirst = true;
levelStr = i18n("Tutorial"); levelStr = i18n("Tutorial");
statusBar()->changeItem(i18n(" Level: %1").tqarg(levelStr), 0); statusBar()->changeItem(i18n(" Level: %1").arg(levelStr), 0);
lsb->startDemoMode(); lsb->startDemoMode();
lsb->setGameOver(false); lsb->setGameOver(false);
@ -202,7 +202,7 @@ void KLines::stopDemo()
bDemo = false; bDemo = false;
lsb->hideDemoText(); lsb->hideDemoText();
demoTimer.stop(); demoTimer.stop();
statusBar()->changeItem(i18n(" Level: %1").tqarg(i18n("Tutorial - Stopped")), 0); statusBar()->changeItem(i18n(" Level: %1").arg(i18n("Tutorial - Stopped")), 0);
act_demo->setText(i18n("Start &Tutorial")); act_demo->setText(i18n("Start &Tutorial"));
} }
@ -419,7 +419,7 @@ void KLines::focusOutEvent(TQFocusEvent *ev)
{ {
lsb->hideDemoText(); lsb->hideDemoText();
demoTimer.stop(); demoTimer.stop();
statusBar()->changeItem(i18n(" Level: %1").tqarg(i18n("Tutorial - Paused")), 0); statusBar()->changeItem(i18n(" Level: %1").arg(i18n("Tutorial - Paused")), 0);
} }
KMainWindow::focusOutEvent(ev); KMainWindow::focusOutEvent(ev);
} }
@ -428,7 +428,7 @@ void KLines::focusInEvent(TQFocusEvent *ev)
{ {
if (bDemo) if (bDemo)
{ {
statusBar()->changeItem(i18n(" Level: %1").tqarg(levelStr), 0); statusBar()->changeItem(i18n(" Level: %1").arg(levelStr), 0);
slotDemo(); slotDemo();
} }
KMainWindow::focusInEvent(ev); KMainWindow::focusInEvent(ev);
@ -528,7 +528,7 @@ void KLines::addScore(int ballsErased)
void KLines::updateStat() void KLines::updateStat()
{ {
statusBar()->changeItem(i18n(" Score: %1").tqarg(score), 1); statusBar()->changeItem(i18n(" Score: %1").arg(score), 1);
} }
void KLines::viewHighScore() void KLines::viewHighScore()
@ -540,7 +540,7 @@ void KLines::viewHighScore()
void KLines::endGame() void KLines::endGame()
{ {
lsb->setGameOver(true); lsb->setGameOver(true);
lsb->tqrepaint(false); lsb->repaint(false);
if (bDemo) if (bDemo)
return; return;

@ -163,7 +163,7 @@ void LinesBoard::placeBall( )
/*id LinesBoard::doAfterBalls() { /*id LinesBoard::doAfterBalls() {
erase5Balls(); erase5Balls();
tqrepaint(FALSE); repaint(FALSE);
} }
*/ */
/* /*
@ -306,7 +306,7 @@ void LinesBoard::moveFocus(int dx, int dy)
focusX = (focusX + dx + NUMCELLSW) % NUMCELLSW; focusX = (focusX + dx + NUMCELLSW) % NUMCELLSW;
focusY = (focusY + dy + NUMCELLSH) % NUMCELLSH; focusY = (focusY + dy + NUMCELLSH) % NUMCELLSH;
} }
tqrepaint(FALSE); repaint(FALSE);
} }
void LinesBoard::moveLeft() void LinesBoard::moveLeft()
@ -401,7 +401,7 @@ int LinesBoard::AnimEnd( )
else if ( oldanim == ANIM_BURN ) else if ( oldanim == ANIM_BURN )
{ {
emit eraseLine( deleteAnimatedBalls() ); emit eraseLine( deleteAnimatedBalls() );
tqrepaint(FALSE); repaint(FALSE);
if ( nextBallToPlace < BALLSDROP ) if ( nextBallToPlace < BALLSDROP )
{ {
placeBall(); placeBall();
@ -455,7 +455,7 @@ void LinesBoard::AnimNext() {
if ( (direction > 0 && animstep == animmax) || ( direction < 0 && animstep == 0)) if ( (direction > 0 && animstep == animmax) || ( direction < 0 && animstep == 0))
direction = -direction; direction = -direction;
animstep += direction; animstep += direction;
tqrepaint(FALSE); repaint(FALSE);
} else { } else {
if ( animstep >= animmax ) if ( animstep >= animmax )
AnimEnd(); AnimEnd();
@ -466,7 +466,7 @@ void LinesBoard::AnimNext() {
moveBall(way[animstep].x,way[animstep].y,way[animstep+1].x,way[animstep+1].y); moveBall(way[animstep].x,way[animstep].y,way[animstep+1].x,way[animstep+1].y);
animstep++; animstep++;
animdelaycount = animdelaystart; animdelaycount = animdelaystart;
tqrepaint( FALSE ); repaint( FALSE );
} }
} }
} }
@ -698,7 +698,7 @@ void LinesBoard::undo()
AnimEnd(); AnimEnd();
restoreUndo(); restoreUndo();
restoreRandomState(); restoreRandomState();
tqrepaint( FALSE ); repaint( FALSE );
} }
void LinesBoard::showDemoText(const TQString &text) void LinesBoard::showDemoText(const TQString &text)

@ -7,7 +7,7 @@ povray -w30 -h30 -V1 -P +A +KI5 +KF6 +KFF6 +SF2 +EF5 -Iball.pov +Ob$1.tga
#### burning balls balls #### burning balls balls
povray -w30 -h30 -V1 -P +A +KI0 +KF1 +KFF11 +SF1 +EF5 -Iball.pov +Oe$1.tga povray -w30 -h30 -V1 -P +A +KI0 +KF1 +KFF11 +SF1 +EF5 -Iball.pov +Oe$1.tga
montage -tqgeometry 30x30 -tile 100x1 -page 570x30 a$1??.tga b$1?.tga e$1??.tga bl_$1.tga montage -geometry 30x30 -tile 100x1 -page 570x30 a$1??.tga b$1?.tga e$1??.tga bl_$1.tga
mogrify -crop 570x30+0+0 bl_$1.tga mogrify -crop 570x30+0+0 bl_$1.tga

@ -3,7 +3,7 @@ echo "#declare BallColor = White" >clr.inc
if (povray -w30 -h30 -V1 -P +A +KI0 +KF1 +KFF11 +SF6 +EF10 -Iball.pov \ if (povray -w30 -h30 -V1 -P +A +KI0 +KF1 +KFF11 +SF6 +EF10 -Iball.pov \
+Ofire.tga) +Ofire.tga)
then # mogrify -raise 1x1 e$1??.tga then # mogrify -raise 1x1 e$1??.tga
montage -tqgeometry 30x30 -tile 100x1 -page 150x30 fire*.tga fire.tga montage -geometry 30x30 -tile 100x1 -page 150x30 fire*.tga fire.tga
mogrify -crop 150x30+0+0 fire.tga mogrify -crop 150x30+0+0 fire.tga
# animate -delay 7 $1??.tga # animate -delay 7 $1??.tga
fi fi

@ -17,7 +17,7 @@ balls.sh Brown "rgb<1/2,1/3,0>"
#### montage balls ( 20x7 cells each 30x30) #### montage balls ( 20x7 cells each 30x30)
montage -tqgeometry 570x30 -tile 1x10 bl_*.tga balls.tga montage -geometry 570x30 -tile 1x10 bl_*.tga balls.tga
mogrify -crop 570x210+0+0 balls.tga mogrify -crop 570x210+0+0 balls.tga
#### convert to jpeg #### convert to jpeg

@ -209,19 +209,19 @@ void Editor::topToolbarOption(int option) {
break; break;
case ID_TOOL_LEFT: case ID_TOOL_LEFT:
theBoard.shiftLeft(); theBoard.shiftLeft();
tqrepaint(false); repaint(false);
break; break;
case ID_TOOL_RIGHT: case ID_TOOL_RIGHT:
theBoard.shiftRight(); theBoard.shiftRight();
tqrepaint(false); repaint(false);
break; break;
case ID_TOOL_UP: case ID_TOOL_UP:
theBoard.shiftUp(); theBoard.shiftUp();
tqrepaint(false); repaint(false);
break; break;
case ID_TOOL_DOWN: case ID_TOOL_DOWN:
theBoard.shiftDown(); theBoard.shiftDown();
tqrepaint(false); repaint(false);
break; break;
case ID_TOOL_DEL: case ID_TOOL_DEL:
mode=remove; mode=remove;
@ -260,7 +260,7 @@ TQString Editor::statusText() {
if (x >=BoardLayout::width || x <0 || y >=BoardLayout::height || y <0) if (x >=BoardLayout::width || x <0 || y >=BoardLayout::height || y <0)
x = y = z = 0; x = y = z = 0;
buf = i18n("Tiles: %1 Pos: %2,%3,%4").tqarg(numTiles).tqarg(x).tqarg(y).tqarg(z); buf = i18n("Tiles: %1 Pos: %2,%3,%4").arg(numTiles).arg(x).arg(y).arg(z);
return buf; return buf;
} }
@ -283,7 +283,7 @@ void Editor::loadBoard() {
theBoard.loadBoardLayout( url.path() ); theBoard.loadBoardLayout( url.path() );
tqrepaint(false); repaint(false);
} }
@ -302,7 +302,7 @@ void Editor::newBoard() {
clean=true; clean=true;
numTiles=0; numTiles=0;
statusChanged(); statusChanged();
tqrepaint(false); repaint(false);
} }
bool Editor::saveBoard() { bool Editor::saveBoard() {
@ -386,7 +386,7 @@ void Editor::paintEvent( TQPaintEvent* ) {
drawTiles(&buff); drawTiles(&buff);
bitBlt(dest, 0,0,&buff, 0,0,buff.width(), buff.height(), CopyROP); bitBlt(dest, 0,0,&buff, 0,0,buff.width(), buff.height(), CopyROP);
drawFrame->tqrepaint(false); drawFrame->repaint(false);
} }
void Editor::drawBackground(TQPixmap *pixmap) { void Editor::drawBackground(TQPixmap *pixmap) {
@ -564,7 +564,7 @@ void Editor::drawFrameMousePressEvent( TQMouseEvent* e )
numTiles--; numTiles--;
statusChanged(); statusChanged();
drawFrameMouseMovedEvent(e); drawFrameMouseMovedEvent(e);
tqrepaint(false); repaint(false);
} }
break; break;
case insert: { case insert: {
@ -577,7 +577,7 @@ void Editor::drawFrameMousePressEvent( TQMouseEvent* e )
theBoard.insertTile(n); theBoard.insertTile(n);
numTiles++; numTiles++;
statusChanged(); statusChanged();
tqrepaint(false); repaint(false);
} }
} }
break; break;
@ -599,7 +599,7 @@ void Editor::drawCursor(POSITION &p, bool visible)
if (p.e==100 || !visible) if (p.e==100 || !visible)
x = -1; x = -1;
drawFrame->setRect(x,y,w,h, tiles.shadowSize(), mode-remove); drawFrame->setRect(x,y,w,h, tiles.shadowSize(), mode-remove);
drawFrame->tqrepaint(false); drawFrame->repaint(false);

@ -396,7 +396,7 @@ void HighScore::copyTableToScreen(const TQString &name) {
elapsedWidgets[p]->setText(buff); elapsedWidgets[p]->setText(buff);
} }
tqrepaint(false); repaint(false);
} }
int HighScore::exec(TQString &tqlayout) { int HighScore::exec(TQString &tqlayout) {

@ -52,7 +52,7 @@ void Preview::selectionChanged(int which)
{ {
m_selectedFile = m_fileList[which]; m_selectedFile = m_fileList[which];
drawPreview(); drawPreview();
m_drawFrame->tqrepaint(0,0,-1,-1,false); m_drawFrame->repaint(0,0,-1,-1,false);
markChanged(); markChanged();
} }
@ -162,7 +162,7 @@ void Preview::load() {
if ( !url.isEmpty() ) { if ( !url.isEmpty() ) {
m_selectedFile = url.path(); m_selectedFile = url.path();
drawPreview(); drawPreview();
m_drawFrame->tqrepaint(0,0,-1,-1,false); m_drawFrame->repaint(0,0,-1,-1,false);
markChanged(); markChanged();
} }
} }
@ -255,7 +255,7 @@ void Preview::drawPreview()
} }
void Preview::paintEvent( TQPaintEvent* ){ void Preview::paintEvent( TQPaintEvent* ){
m_drawFrame->tqrepaint(false); m_drawFrame->repaint(false);
} }
// the user selected ok, or apply. This method passes the changes // the user selected ok, or apply. This method passes the changes

@ -45,7 +45,7 @@ BoardWidget::BoardWidget( TQWidget* parent, const char *name )
if (!loadTileset(tFile)){ if (!loadTileset(tFile)){
KMessageBox::error(this, KMessageBox::error(this,
i18n("An error occurred when loading the tileset file %1\n" i18n("An error occurred when loading the tileset file %1\n"
"KMahjongg will now terminate.").tqarg(tFile)); "KMahjongg will now terminate.").arg(tFile));
kapp->quit(); kapp->quit();
} }
@ -55,7 +55,7 @@ BoardWidget::BoardWidget( TQWidget* parent, const char *name )
if( ! loadBackground(tFile, false ) ) if( ! loadBackground(tFile, false ) )
{ {
KMessageBox::error(this, KMessageBox::error(this,
i18n("An error occurred when loading the background image\n%1").tqarg(tFile)+ i18n("An error occurred when loading the background image\n%1").arg(tFile)+
i18n("KMahjongg will now terminate.")); i18n("KMahjongg will now terminate."));
kapp->quit(); kapp->quit();
} }
@ -65,7 +65,7 @@ BoardWidget::BoardWidget( TQWidget* parent, const char *name )
{ {
KMessageBox::error(this, KMessageBox::error(this,
i18n("An error occurred when loading the board tqlayout %1\n" i18n("An error occurred when loading the board tqlayout %1\n"
"KMahjongg will now terminate.").tqarg(tFile)); "KMahjongg will now terminate.").arg(tFile));
kapp->quit(); kapp->quit();
} }
setDisplayedWidth(); setDisplayedWidth();
@ -111,7 +111,7 @@ void BoardWidget::getFileOrDefault(TQString filename, TQString type, TQString &r
if (res.isEmpty()) { if (res.isEmpty()) {
KMessageBox::error(this, i18n("KMahjongg could not locate the file: %1\n" KMessageBox::error(this, i18n("KMahjongg could not locate the file: %1\n"
"or the default file of type: %2\n" "or the default file of type: %2\n"
"KMahjongg will now terminate").tqarg(filename).tqarg(type) ); "KMahjongg will now terminate").arg(filename).arg(type) );
kapp->quit(); kapp->quit();
} }
} }
@ -264,7 +264,7 @@ void BoardWidget::paintEvent( TQPaintEvent* pa )
return; return;
} }
// if the tqrepaint is because of a window redraw after a move // if the repaint is because of a window redraw after a move
// or a menu roll up, then just blit in the last rendered image // or a menu roll up, then just blit in the last rendered image
if (!updateBackBuffer) { if (!updateBackBuffer) {
bitBlt(this, xx,pa->rect().top(), bitBlt(this, xx,pa->rect().top(),
@ -1804,7 +1804,7 @@ bool BoardWidget::loadBackground(
if( ! theBackground.load( pszFileName, requiredWidth(), requiredHeight()) ) if( ! theBackground.load( pszFileName, requiredWidth(), requiredHeight()) )
{ {
if( bShowError ) if( bShowError )
KMessageBox::sorry(this, i18n("Failed to load image:\n%1").tqarg(pszFileName) ); KMessageBox::sorry(this, i18n("Failed to load image:\n%1").arg(pszFileName) );
return( false ); return( false );
} }
Prefs::setBackground(pszFileName); Prefs::setBackground(pszFileName);
@ -2010,7 +2010,7 @@ void BoardWidget::shuffle() {
// force a redraw // force a redraw
updateBackBuffer=true; updateBackBuffer=true;
tqrepaint(false); repaint(false);
// I consider this s very bad cheat so, I punish the user // I consider this s very bad cheat so, I punish the user

@ -205,7 +205,7 @@ class BoardWidget : public TQWidget
bool updateBackBuffer; // does board need redrawing. Not if it is just a tqrepaint bool updateBackBuffer; // does board need redrawing. Not if it is just a repaint
bool gamePaused; bool gamePaused;

@ -397,7 +397,7 @@ void KMahjongg::gameOver(
void KMahjongg::showStatusText( const TQString &msg, long board ) void KMahjongg::showStatusText( const TQString &msg, long board )
{ {
statusLabel->setText(msg); statusLabel->setText(msg);
TQString str = i18n("Game number: %1").tqarg(board); TQString str = i18n("Game number: %1").arg(board);
gameNumLabel->setText(str); gameNumLabel->setText(str);
} }
@ -406,8 +406,8 @@ void KMahjongg::showStatusText( const TQString &msg, long board )
void KMahjongg::showTileNumber( int iMaximum, int iCurrent, int iLeft ) void KMahjongg::showTileNumber( int iMaximum, int iCurrent, int iLeft )
{ {
// Hmm... seems iCurrent is the number of remaining tiles, not removed ... // Hmm... seems iCurrent is the number of remaining tiles, not removed ...
//TQString szBuffer = i18n("Removed: %1/%2").tqarg(iCurrent).tqarg(iMaximum); //TQString szBuffer = i18n("Removed: %1/%2").arg(iCurrent).arg(iMaximum);
TQString szBuffer = i18n("Removed: %1/%2 Combinations left: %3").tqarg(iMaximum-iCurrent).tqarg(iMaximum).tqarg(iLeft); TQString szBuffer = i18n("Removed: %1/%2 Combinations left: %3").arg(iMaximum-iCurrent).arg(iMaximum).arg(iLeft);
tilesLeftLabel->setText(szBuffer); tilesLeftLabel->setText(szBuffer);
// Update here since undo allow is effected by demo mode // Update here since undo allow is effected by demo mode

@ -165,7 +165,7 @@ void CustomConfig::updateNbMines()
Level l(_width->value(), _height->value(), _mines->value()); Level l(_width->value(), _height->value(), _mines->value());
_mines->setRange(1, Level::maxNbMines(l.width(), l.height())); _mines->setRange(1, Level::maxNbMines(l.width(), l.height()));
_mines->setLabel(i18n("Mines (%1%):") _mines->setLabel(i18n("Mines (%1%):")
.tqarg( (100*l.nbMines()) / (l.width() * l.height()) )); .arg( (100*l.nbMines()) / (l.width() * l.height()) ));
_gameType->setCurrentItem(l.type()); _gameType->setCurrentItem(l.type());
_block = false; _block = false;
} }

@ -198,13 +198,13 @@ SolvingRateDialog::SolvingRateDialog(const BaseField &field, TQWidget *parent)
setButtonOK(item); setButtonOK(item);
TQVBoxLayout *top = new TQVBoxLayout(plainPage(), 0, spacingHint()); TQVBoxLayout *top = new TQVBoxLayout(plainPage(), 0, spacingHint());
TQLabel *label = new TQLabel(i18n("Width: %1").tqarg(field.width()), TQLabel *label = new TQLabel(i18n("Width: %1").arg(field.width()),
plainPage()); plainPage());
top->addWidget(label); top->addWidget(label);
label = new TQLabel(i18n("Height: %1").tqarg(field.height()), plainPage()); label = new TQLabel(i18n("Height: %1").arg(field.height()), plainPage());
top->addWidget(label); top->addWidget(label);
label = new TQLabel(i18n("Mines: %1 (%2%)").tqarg(field.nbMines()) label = new TQLabel(i18n("Mines: %1 (%2%)").arg(field.nbMines())
.tqarg( field.nbMines() * 100.0 / field.size()), .arg( field.nbMines() * 100.0 / field.size()),
plainPage()); plainPage());
top->addWidget(label); top->addWidget(label);
@ -243,7 +243,7 @@ void SolvingRateDialog::solvingDone(bool success)
{ {
if (success) _success++; if (success) _success++;
_label->setText(i18n("Success rate: %1%") _label->setText(i18n("Success rate: %1%")
.tqarg(_success * 100.0 / _i, 0, 'f', 3)); .arg(_success * 100.0 / _i, 0, 'f', 3));
_progress->advance(1); _progress->advance(1);
TQTimer::singleShot(0, this, TQT_SLOT(step())); TQTimer::singleShot(0, this, TQT_SLOT(step()));
} }

@ -368,7 +368,7 @@ void Status::loadLog()
bool ok = doc.setContent(&file, 0, &errorLine); bool ok = doc.setContent(&file, 0, &errorLine);
if ( !ok ) { if ( !ok ) {
KMessageBox::sorry(this, i18n("Cannot read XML file on line %1") KMessageBox::sorry(this, i18n("Cannot read XML file on line %1")
.tqarg(errorLine)); .arg(errorLine));
return; return;
} }
success = true; success = true;

@ -149,7 +149,7 @@ void MainWindow::newGame(int sk)
m_clickcount = 0; m_clickcount = 0;
TQString clicks = i18n("Click: %1"); TQString clicks = i18n("Click: %1");
statusBar()->changeItem(clicks.tqarg(TQString::number(m_clickcount)),1); statusBar()->changeItem(clicks.arg(TQString::number(m_clickcount)),1);
KNotifyClient::event(winId(), "startsound", i18n("New Game")); KNotifyClient::event(winId(), "startsound", i18n("New Game"));
for(int i = 0; i < MasterBoardSize * MasterBoardSize; i++) for(int i = 0; i < MasterBoardSize * MasterBoardSize; i++)
@ -370,7 +370,7 @@ void MainWindow::rotate(int index, bool toleft)
m_clickcount++; m_clickcount++;
TQString clicks = i18n("Click: %1"); TQString clicks = i18n("Click: %1");
statusBar()->changeItem(clicks.tqarg(TQString::number(m_clickcount)),1); statusBar()->changeItem(clicks.arg(TQString::number(m_clickcount)),1);
if (isGameOver()) if (isGameOver())
{ {

@ -58,12 +58,12 @@
inline TQString makeGroup(int id, int hole, TQString name, int x, int y) inline TQString makeGroup(int id, int hole, TQString name, int x, int y)
{ {
return TQString("%1-%2@%3,%4|%5").tqarg(hole).tqarg(name).tqarg(x).tqarg(y).tqarg(id); return TQString("%1-%2@%3,%4|%5").arg(hole).arg(name).arg(x).arg(y).arg(id);
} }
inline TQString makeStateGroup(int id, const TQString &name) inline TQString makeStateGroup(int id, const TQString &name)
{ {
return TQString("%1|%2").tqarg(name).tqarg(id); return TQString("%1|%2").arg(name).arg(id);
} }
///////////////////////// /////////////////////////
@ -2311,7 +2311,7 @@ void KolfGame::startFirstHole(int hole)
{ {
for (; scoreboardHoles < curHole; ++scoreboardHoles) for (; scoreboardHoles < curHole; ++scoreboardHoles)
{ {
cfg->setGroup(TQString("%1-hole@-50,-50|0").tqarg(scoreboardHoles + 1)); cfg->setGroup(TQString("%1-hole@-50,-50|0").arg(scoreboardHoles + 1));
emit newHole(cfg->readNumEntry("par", 3)); emit newHole(cfg->readNumEntry("par", 3));
} }
@ -2553,7 +2553,7 @@ void KolfGame::handleMouseMoveEvent(TQMouseEvent *e)
highlighter->moveBy(-(double)moveX, -(double)moveY); highlighter->moveBy(-(double)moveX, -(double)moveY);
movingItem->moveBy(-(double)moveX, -(double)moveY); movingItem->moveBy(-(double)moveX, -(double)moveY);
TQRect brect = movingItem->boundingRect(); TQRect brect = movingItem->boundingRect();
emit newStatusText(TQString("%1x%2").tqarg(brect.x()).tqarg(brect.y())); emit newStatusText(TQString("%1x%2").arg(brect.x()).arg(brect.y()));
storedMousePos = mouse; storedMousePos = mouse;
} }
@ -3136,7 +3136,7 @@ void KolfGame::shotDone()
const TQString placeOutside = i18n("Drop Outside of Hazard"); const TQString placeOutside = i18n("Drop Outside of Hazard");
const TQString rehit = i18n("Rehit From Last Location"); const TQString rehit = i18n("Rehit From Last Location");
options << placeOutside << rehit; options << placeOutside << rehit;
const TQString choice = KComboBoxDialog::getItem(i18n("What would you like to do for your next shot?"), i18n("%1 is in a Hazard").tqarg((*it).name()), options, placeOutside, "hazardOptions"); const TQString choice = KComboBoxDialog::getItem(i18n("What would you like to do for your next shot?"), i18n("%1 is in a Hazard").arg((*it).name()), options, placeOutside, "hazardOptions");
if (choice == placeOutside) if (choice == placeOutside)
{ {
@ -3303,7 +3303,7 @@ void KolfGame::sayWhosGoing()
{ {
if (players->count() >= 2) if (players->count() >= 2)
{ {
KMessageBox::information(this, i18n("%1 will start off.").tqarg((*curPlayer).name()), i18n("New Hole"), "newHole"); KMessageBox::information(this, i18n("%1 will start off.").arg((*curPlayer).name()), i18n("New Hole"), "newHole");
} }
} }
@ -3429,7 +3429,7 @@ void KolfGame::startNextHole()
for (; scoreboardHoles < curHole; ++scoreboardHoles) for (; scoreboardHoles < curHole; ++scoreboardHoles)
{ {
cfg->setGroup(TQString("%1-hole@-50,-50|0").tqarg(scoreboardHoles + 1)); cfg->setGroup(TQString("%1-hole@-50,-50|0").arg(scoreboardHoles + 1));
emit newHole(cfg->readNumEntry("par", 3)); emit newHole(cfg->readNumEntry("par", 3));
} }
@ -3451,7 +3451,7 @@ void KolfGame::startNextHole()
void KolfGame::showInfo() void KolfGame::showInfo()
{ {
TQString text = i18n("Hole %1: par %2, maximum %3 strokes").tqarg(curHole).tqarg(holeInfo.par()).tqarg(holeInfo.maxStrokes()); TQString text = i18n("Hole %1: par %2, maximum %3 strokes").arg(curHole).arg(holeInfo.par()).arg(holeInfo.maxStrokes());
infoText->move((width - TQFontMetrics(infoText->font()).width(text)) / 2, infoText->y()); infoText->move((width - TQFontMetrics(infoText->font()).width(text)) / 2, infoText->y());
infoText->setText(text); infoText->setText(text);
// I hate this text! Let's not show it // I hate this text! Let's not show it
@ -3463,9 +3463,9 @@ void KolfGame::showInfo()
void KolfGame::showInfoDlg(bool addDontShowAgain) void KolfGame::showInfoDlg(bool addDontShowAgain)
{ {
KMessageBox::information(parentWidget(), KMessageBox::information(parentWidget(),
i18n("Course name: %1").tqarg(holeInfo.name()) + TQString("\n") i18n("Course name: %1").arg(holeInfo.name()) + TQString("\n")
+ i18n("Created by %1").tqarg(holeInfo.author()) + TQString("\n") + i18n("Created by %1").arg(holeInfo.author()) + TQString("\n")
+ i18n("%1 holes").tqarg(highestHole), + i18n("%1 holes").arg(highestHole),
i18n("Course Information"), i18n("Course Information"),
addDontShowAgain? holeInfo.name() + TQString(" ") + holeInfo.author() : TQString()); addDontShowAgain? holeInfo.name() + TQString(" ") + holeInfo.author() : TQString());
} }
@ -3514,7 +3514,7 @@ void KolfGame::openFile()
holeInfo.setUntranslatedName(cfg->readEntryUntranslated("Name", holeInfo.untranslatedName())); holeInfo.setUntranslatedName(cfg->readEntryUntranslated("Name", holeInfo.untranslatedName()));
emit titleChanged(holeInfo.name()); emit titleChanged(holeInfo.name());
cfg->setGroup(TQString("%1-hole@-50,-50|0").tqarg(curHole)); cfg->setGroup(TQString("%1-hole@-50,-50|0").arg(curHole));
curPar = cfg->readNumEntry("par", 3); curPar = cfg->readNumEntry("par", 3);
holeInfo.setPar(curPar); holeInfo.setPar(curPar);
holeInfo.borderWallsChanged(cfg->readBoolEntry("borderWalls", holeInfo.borderWalls())); holeInfo.borderWallsChanged(cfg->readBoolEntry("borderWalls", holeInfo.borderWalls()));
@ -3616,7 +3616,7 @@ void KolfGame::openFile()
if (!missingPlugins.empty()) if (!missingPlugins.empty())
{ {
KMessageBox::informationList(this, TQString("<p>&lt;http://katzbrown.com/kolf/Plugins/&gt;</p><p>") + i18n("This hole uses the following plugins, which you do not have installed:") + TQString("</p>"), missingPlugins, TQString(), TQString("%1 warning").tqarg(holeInfo.untranslatedName() + TQString::number(curHole))); KMessageBox::informationList(this, TQString("<p>&lt;http://katzbrown.com/kolf/Plugins/&gt;</p><p>") + i18n("This hole uses the following plugins, which you do not have installed:") + TQString("</p>"), missingPlugins, TQString(), TQString("%1 warning").arg(holeInfo.untranslatedName() + TQString::number(curHole)));
} }
lastDelId = -1; lastDelId = -1;
@ -3995,7 +3995,7 @@ void KolfGame::save()
} }
// save where ball starts (whiteBall tells all) // save where ball starts (whiteBall tells all)
cfg->setGroup(TQString("%1-ball@%2,%3").tqarg(curHole).tqarg((int)whiteBall->x()).tqarg((int)whiteBall->y())); cfg->setGroup(TQString("%1-ball@%2,%3").arg(curHole).arg((int)whiteBall->x()).arg((int)whiteBall->y()));
cfg->writeEntry("dummykey", true); cfg->writeEntry("dummykey", true);
cfg->setGroup("0-course@-50,-50"); cfg->setGroup("0-course@-50,-50");
@ -4003,7 +4003,7 @@ void KolfGame::save()
cfg->writeEntry("Name", holeInfo.untranslatedName()); cfg->writeEntry("Name", holeInfo.untranslatedName());
// save hole info // save hole info
cfg->setGroup(TQString("%1-hole@-50,-50|0").tqarg(curHole)); cfg->setGroup(TQString("%1-hole@-50,-50|0").arg(curHole));
cfg->writeEntry("par", holeInfo.par()); cfg->writeEntry("par", holeInfo.par());
cfg->writeEntry("maxstrokes", holeInfo.maxStrokes()); cfg->writeEntry("maxstrokes", holeInfo.maxStrokes());
cfg->writeEntry("borderWalls", holeInfo.borderWalls()); cfg->writeEntry("borderWalls", holeInfo.borderWalls());
@ -4160,7 +4160,7 @@ void KolfGame::print(KPrinter &pr)
if (pr.option("kde-kolf-title") == "true") if (pr.option("kde-kolf-title") == "true")
{ {
TQString text = i18n("%1 - Hole %2; by %3").tqarg(holeInfo.name()).tqarg(curHole).tqarg(holeInfo.author()); TQString text = i18n("%1 - Hole %2; by %3").arg(holeInfo.name()).arg(curHole).arg(holeInfo.author());
TQFont font(kapp->font()); TQFont font(kapp->font());
font.setPointSize(18); font.setPointSize(18);
TQRect rect = TQFontMetrics(font).boundingRect(text); TQRect rect = TQFontMetrics(font).boundingRect(text);
@ -4219,7 +4219,7 @@ void KolfGame::courseInfo(CourseInfo &info, const TQString& filename)
unsigned int par= 0; unsigned int par= 0;
while (1) while (1)
{ {
TQString group = TQString("%1-hole@-50,-50|0").tqarg(hole); TQString group = TQString("%1-hole@-50,-50|0").arg(hole);
if (!cfg.hasGroup(group)) if (!cfg.hasGroup(group))
{ {
hole--; hole--;

@ -124,8 +124,8 @@ TQString KComboBoxDialog::getText(const TQString &_caption, const TQString &_tex
KHistoryCombo * const box = dlg.comboBox(); KHistoryCombo * const box = dlg.comboBox();
box->setEditable(true); box->setEditable(true);
const TQString historyItem = TQString("%1History").tqarg(configName); const TQString historyItem = TQString("%1History").arg(configName);
const TQString completionItem = TQString("%1Completion").tqarg(configName); const TQString completionItem = TQString("%1Completion").arg(configName);
if(!configName.isNull()) if(!configName.isNull())
{ {

@ -431,10 +431,10 @@ void Kolf::gameOver()
if (names.count() > 1) if (names.count() > 1)
{ {
TQString winners = names.join(i18n(" and ")); TQString winners = names.join(i18n(" and "));
KMessageBox::information(this, i18n("%1 tied").tqarg(winners)); KMessageBox::information(this, i18n("%1 tied").arg(winners));
} }
else else
KMessageBox::information(this, i18n("%1 won!").tqarg(names.first())); KMessageBox::information(this, i18n("%1 won!").arg(names.first()));
} }
if (competition) if (competition)
@ -459,7 +459,7 @@ void Kolf::gameOver()
scoreDialog->addScore((*it).score, info, false, true); scoreDialog->addScore((*it).score, info, false, true);
} }
scoreDialog->setComment(i18n("High Scores for %1").tqarg(courseInfo.name)); scoreDialog->setComment(i18n("High Scores for %1").arg(courseInfo.name));
scoreDialog->show(); scoreDialog->show();
} }
@ -475,7 +475,7 @@ void Kolf::showHighScores()
game->courseInfo(courseInfo, game->curFilename()); game->courseInfo(courseInfo, game->curFilename());
scoreDialog->setConfigGroup(courseInfo.untranslatedName + TQString(" Highscores")); scoreDialog->setConfigGroup(courseInfo.untranslatedName + TQString(" Highscores"));
scoreDialog->setComment(i18n("High Scores for %1").tqarg(courseInfo.name)); scoreDialog->setComment(i18n("High Scores for %1").arg(courseInfo.name));
scoreDialog->show(); scoreDialog->show();
} }
@ -572,7 +572,7 @@ void Kolf::openURL(KURL url)
void Kolf::newPlayersTurn(Player *player) void Kolf::newPlayersTurn(Player *player)
{ {
tempStatusBarText = i18n("%1's turn").tqarg(player->name()); tempStatusBarText = i18n("%1's turn").arg(player->name());
if (showInfoAction->isChecked()) if (showInfoAction->isChecked())
statusBar()->message(tempStatusBarText, 5 * 1000); statusBar()->message(tempStatusBarText, 5 * 1000);
@ -643,7 +643,7 @@ void Kolf::inPlayEnd()
void Kolf::maxStrokesReached(const TQString &name) void Kolf::maxStrokesReached(const TQString &name)
{ {
KMessageBox::sorry(this, i18n("%1's score has reached the maximum for this hole.").tqarg(name)); KMessageBox::sorry(this, i18n("%1's score has reached the maximum for this hole.").arg(name));
} }
void Kolf::updateHoleMenu(int largest) void Kolf::updateHoleMenu(int largest)
@ -697,7 +697,7 @@ void Kolf::print()
KPrinter pr; KPrinter pr;
pr.addDialogPage(new PrintDialogPage()); pr.addDialogPage(new PrintDialogPage());
if (pr.setup(this, i18n("Print %1 - Hole %2").tqarg(game->courseName()).tqarg(game->currentHole()))) if (pr.setup(this, i18n("Print %1 - Hole %2").arg(game->courseName()).arg(game->currentHole())))
{ {
pr.newPage(); pr.newPage();
if (game) if (game)
@ -785,14 +785,14 @@ void Kolf::initPlugins()
void Kolf::showPlugins() void Kolf::showPlugins()
{ {
TQString text = TQString("<h2>%1</h2><ol>").tqarg(i18n("Currently Loaded Plugins")); TQString text = TQString("<h2>%1</h2><ol>").arg(i18n("Currently Loaded Plugins"));
Object *object = 0; Object *object = 0;
for (object = plugins.first(); object; object = plugins.next()) for (object = plugins.first(); object; object = plugins.next())
{ {
text.append("<li>"); text.append("<li>");
text.append(object->name()); text.append(object->name());
text.append(" - "); text.append(" - ");
text.append(i18n("by %1").tqarg(object->author())); text.append(i18n("by %1").arg(object->author()));
text.append("</li>"); text.append("</li>");
} }
text.append("</ol>"); text.append("</ol>");

@ -57,16 +57,16 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
KolfGame::courseInfo(info, filename); KolfGame::courseInfo(info, filename);
cout << info.name.latin1() cout << info.name.latin1()
<< " - " << i18n("By %1").tqarg(info.author).latin1() << " - " << i18n("By %1").arg(info.author).latin1()
<< " - " << i18n("%1 holes").tqarg(info.holes).latin1() << " - " << i18n("%1 holes").arg(info.holes).latin1()
<< " - " << i18n("par %1").tqarg(info.par).latin1() << " - " << i18n("par %1").arg(info.par).latin1()
<< endl; << endl;
return 0; return 0;
} }
else else
{ {
KCmdLineArgs::usage(i18n("Course %1 does not exist.").tqarg(filename.latin1())); KCmdLineArgs::usage(i18n("Course %1 does not exist.").arg(filename.latin1()));
} }
} }

@ -212,11 +212,11 @@ void NewGameDialog::courseSelected(int index)
CourseInfo &curinfo = info[currentCourse]; CourseInfo &curinfo = info[currentCourse];
name->setText(TQString("<strong>%1</strong>").tqarg(curinfo.name)); name->setText(TQString("<strong>%1</strong>").arg(curinfo.name));
author->setText(i18n("By %1").tqarg(curinfo.author)); author->setText(i18n("By %1").arg(curinfo.author));
par->setText(i18n("Par %1").tqarg(curinfo.par)); par->setText(i18n("Par %1").arg(curinfo.par));
holes->setText(i18n("%1 Holes").tqarg(curinfo.holes)); holes->setText(i18n("%1 Holes").arg(curinfo.holes));
} }
void NewGameDialog::showHighscores() void NewGameDialog::showHighscores()
@ -224,7 +224,7 @@ void NewGameDialog::showHighscores()
KScoreDialog *scoreDialog = new KScoreDialog(KScoreDialog::Name | KScoreDialog::Custom1 | KScoreDialog::Score, this); KScoreDialog *scoreDialog = new KScoreDialog(KScoreDialog::Name | KScoreDialog::Custom1 | KScoreDialog::Score, this);
scoreDialog->addField(KScoreDialog::Custom1, i18n("Par"), "Par"); scoreDialog->addField(KScoreDialog::Custom1, i18n("Par"), "Par");
scoreDialog->setConfigGroup(info[currentCourse].untranslatedName + TQString(" Highscores")); scoreDialog->setConfigGroup(info[currentCourse].untranslatedName + TQString(" Highscores"));
scoreDialog->setComment(i18n("High Scores for %1").tqarg(info[currentCourse].name)); scoreDialog->setComment(i18n("High Scores for %1").arg(info[currentCourse].name));
scoreDialog->show(); scoreDialog->show();
} }
@ -287,7 +287,7 @@ void NewGameDialog::addPlayer()
if (editors.count() >= startColors.count()) if (editors.count() >= startColors.count())
return; return;
editors.append(new PlayerEditor(i18n("Player %1").tqarg(editors.count() + 1), *startColors.at(editors.count()), tqlayout)); editors.append(new PlayerEditor(i18n("Player %1").arg(editors.count() + 1), *startColors.at(editors.count()), tqlayout));
editors.last()->show(); editors.last()->show();
connect(editors.last(), TQT_SIGNAL(deleteEditor(PlayerEditor *)), this, TQT_SLOT(deleteEditor(PlayerEditor *))); connect(editors.last(), TQT_SIGNAL(deleteEditor(PlayerEditor *)), this, TQT_SLOT(deleteEditor(PlayerEditor *)));

@ -41,7 +41,7 @@ void Test::advance(int phase)
// random color // random color
const TQColor myColor((TQRgb)(kapp->random() % 0x01000000)); const TQColor myColor((TQRgb)(kapp->random() % 0x01000000));
// set the brush, so our tqshape is drawn // set the brush, so our shape is drawn
// with the random color // with the random color
setBrush(TQBrush(myColor)); setBrush(TQBrush(myColor));

@ -79,10 +79,10 @@ FleetDlg::init()
while( (curFleet = nextFleet())) { while( (curFleet = nextFleet())) {
fleetNumber++; fleetNumber++;
new FleetDlgListViewItem(fleetTable, new FleetDlgListViewItem(fleetTable,
TQString("%1").tqarg(fleetNumber), TQString("%1").arg(fleetNumber),
curFleet->destination->getName(), curFleet->destination->getName(),
TQString("%1").tqarg(curFleet->getShipCount()), TQString("%1").arg(curFleet->getShipCount()),
TQString("%1").tqarg(KGlobal::locale()->formatNumber(curFleet->killPercentage, 3)), TQString("%1").arg(KGlobal::locale()->formatNumber(curFleet->killPercentage, 3)),
TQString("%1").tqarg((int)ceil(curFleet->arrivalTurn))); TQString("%1").arg((int)ceil(curFleet->arrivalTurn)));
} }
} }

@ -315,10 +315,10 @@ GameBoard::turn()
TQString msg; TQString msg;
msg = i18n("The distance from Planet %1 to Planet %2 is %3 light years.\n" 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") "A ship leaving this turn will arrive on turn %4")
.tqarg(sourcePlanet->getName()) .arg(sourcePlanet->getName())
.tqarg(destPlanet->getName()) .arg(destPlanet->getName())
.tqarg(KGlobal::locale()->formatNumber( dist, 2 )) .arg(KGlobal::locale()->formatNumber( dist, 2 ))
.tqarg(KGlobal::locale()->formatNumber( turnNumber + (int)dist, 0 )); .arg(KGlobal::locale()->formatNumber( turnNumber + (int)dist, 0 ));
KMessageBox::information( this, msg, i18n("Distance")); KMessageBox::information( this, msg, i18n("Distance"));
gameState = NONE; gameState = NONE;
@ -431,7 +431,7 @@ GameBoard::turn()
} }
TQString turnStr; TQString turnStr;
turnStr = i18n("Turn #: %1 of %2").tqarg(turnNumber).tqarg(lastTurn); turnStr = i18n("Turn #: %1 of %2").arg(turnNumber).arg(lastTurn);
turnCounter->setText( turnStr ); turnCounter->setText( turnStr );
@ -470,15 +470,15 @@ GameBoard::nextTurn()
Player *winner = findWinner(); Player *winner = findWinner();
if (winner) if (winner)
{ {
mapWidget->tqrepaint(true); mapWidget->repaint(true);
KMessageBox::information(this, KMessageBox::information(this,
i18n("The mighty %1 has conquered the galaxy!").tqarg(winner->getName()), i18n("The mighty %1 has conquered the galaxy!").arg(winner->getName()),
i18n("Game Over")); i18n("Game Over"));
} }
if( (turnNumber == lastTurn) && !winner ) if( (turnNumber == lastTurn) && !winner )
{ {
mapWidget->tqrepaint(true); mapWidget->repaint(true);
GameEndDlg *dlg = new GameEndDlg( this ); GameEndDlg *dlg = new GameEndDlg( this );
if( dlg->exec() == KDialogBase::Yes ) { if( dlg->exec() == KDialogBase::Yes ) {
@ -492,7 +492,7 @@ GameBoard::nextTurn()
{ {
// Game over, man! Game over. // Game over, man! Game over.
mapWidget->tqrepaint(true); mapWidget->repaint(true);
gameOver(); gameOver();
}; };
@ -565,8 +565,8 @@ GameBoard::gameMsg(const TQString &msg, Player *player, Planet *planet, Player *
{ {
if (!player->isAiPlayer()) if (!player->isAiPlayer())
isHumanInvolved = true; isHumanInvolved = true;
colorMsg = colorMsg.tqarg(playerString(player)); colorMsg = colorMsg.arg(playerString(player));
plainMsg = plainMsg.tqarg(player->getName()); plainMsg = plainMsg.arg(player->getName());
} }
if (planet) if (planet)
@ -577,15 +577,15 @@ GameBoard::gameMsg(const TQString &msg, Player *player, Planet *planet, Player *
isHumanInvolved = true; isHumanInvolved = true;
TQString color = planetPlayer->getColor().name(); TQString color = planetPlayer->getColor().name();
colorMsg = colorMsg.tqarg(TQString("<font color=\"%1\">%2</font>").tqarg(color, planet->getName())); colorMsg = colorMsg.arg(TQString("<font color=\"%1\">%2</font>").arg(color, planet->getName()));
plainMsg = plainMsg.tqarg(planet->getName()); plainMsg = plainMsg.arg(planet->getName());
} }
msgWidget->append(("<qt><font color=\"white\">Turn %1:</font> <font color=\""+color+"\">").tqarg(turnNumber)+colorMsg+"</font></qt>"); msgWidget->append(("<qt><font color=\"white\">Turn %1:</font> <font color=\""+color+"\">").arg(turnNumber)+colorMsg+"</font></qt>");
msgWidget->scrollToBottom(); msgWidget->scrollToBottom();
if (isHumanInvolved) if (isHumanInvolved)
{ {
mapWidget->tqrepaint(true); mapWidget->repaint(true);
KMessageBox::information(this, plainMsg); KMessageBox::information(this, plainMsg);
} }
} }
@ -660,7 +660,7 @@ GameBoard::doFleetArrival( AttackFleet *arrivingFleet )
TQString msg; TQString msg;
msg = i18n("Reinforcements (%1 ships) have arrived for planet %2.") msg = i18n("Reinforcements (%1 ships) have arrived for planet %2.")
.tqarg(arrivingFleet->getShipCount()); .arg(arrivingFleet->getShipCount());
gameMsg(msg, 0, arrivingFleet->destination); gameMsg(msg, 0, arrivingFleet->destination);
} }
} else { } else {
@ -717,7 +717,7 @@ GameBoard::doFleetArrival( AttackFleet *arrivingFleet )
} }
} }
mapWidget->tqrepaint(true); mapWidget->repaint(true);
} }
//************************************************************************ //************************************************************************

@ -482,7 +482,7 @@ Player::getName()
TQString TQString
Player::getColoredName() Player::getColoredName()
{ {
return TQString("<font color=\"%1\">%2</font>").tqarg(color.name(), name); return TQString("<font color=\"%1\">%2</font>").arg(color.name(), name);
} }
Player *Player::createPlayer( TQString newName, TQColor color, int playerNum, bool isAi ) Player *Player::createPlayer( TQString newName, TQColor color, int playerNum, bool isAi )

@ -71,6 +71,6 @@ GameEndDlg::extraTurns()
void void
GameEndDlg::turnCountChange( int newTurnCount ) GameEndDlg::turnCountChange( int newTurnCount )
{ {
TQString newLbl = i18n("Extra turns: %1").tqarg( newTurnCount ); TQString newLbl = i18n("Extra turns: %1").arg( newTurnCount );
turnCountLbl->setText( newLbl); turnCountLbl->setText( newLbl);
} }

@ -149,7 +149,7 @@ ConquestMap::squareBlink()
void void
ConquestMap::mapUpdate() ConquestMap::mapUpdate()
{ {
viewport()->tqrepaint(false); viewport()->repaint(false);
} }

@ -96,7 +96,7 @@ NewGameDlg::init()
for( TQListViewItem *item = w->listPlayers->firstChild(); for( TQListViewItem *item = w->listPlayers->firstChild();
item; item = item->nextSibling(), plrNum++ ) item; item = item->nextSibling(), plrNum++ )
{ {
TQString key = TQString("Player_%1").tqarg(plrNum); TQString key = TQString("Player_%1").arg(plrNum);
TQString playerName = config->readEntry(key); TQString playerName = config->readEntry(key);
if (playerName.isEmpty()) if (playerName.isEmpty())
@ -184,7 +184,7 @@ NewGameDlg::setPlayerCount(int playerCount)
while(w->listPlayers->childCount() < playerCount) while(w->listPlayers->childCount() < playerCount)
{ {
TQString playerName = i18n("Generated AI player name", "Comp%1").tqarg(i+1); TQString playerName = i18n("Generated AI player name", "Comp%1").arg(i+1);
TQPixmap pm(16,16); TQPixmap pm(16,16);
TQColor color(PlayerColors[i]); TQColor color(PlayerColors[i]);
pm.fill(color); pm.fill(color);
@ -229,9 +229,9 @@ NewGameDlg::turns()
void void
NewGameDlg::updateLabels() NewGameDlg::updateLabels()
{ {
w->labelPlayers->setText(i18n("Number of &players: %1").tqarg(w->sliderPlayers->value())); w->labelPlayers->setText(i18n("Number of &players: %1").arg(w->sliderPlayers->value()));
w->labelPlanets->setText(i18n("Number of neutral p&lanets: %1").tqarg(w->sliderPlanets->value())); w->labelPlanets->setText(i18n("Number of neutral p&lanets: %1").arg(w->sliderPlanets->value()));
w->labelTurns->setText(i18n("Number of &turns: %1").tqarg(w->sliderTurns->value())); w->labelTurns->setText(i18n("Number of &turns: %1").arg(w->sliderTurns->value()));
} }
void void
@ -269,7 +269,7 @@ NewGameDlg::save()
for( TQListViewItem *item = w->listPlayers->firstChild(); for( TQListViewItem *item = w->listPlayers->firstChild();
item; item = item->nextSibling() ) item; item = item->nextSibling() )
{ {
TQString key = TQString("Player_%1").tqarg(plrNum); TQString key = TQString("Player_%1").arg(plrNum);
TQString playerName = item->text(0); TQString playerName = item->text(0);
bool ai = (item->text(2) == "A"); bool ai = (item->text(2) == "A");
if (ai) if (ai)

@ -126,7 +126,7 @@ void PlanetInfo::showPlanet( Planet *planet )
TQString temp; TQString temp;
temp = "<qt>" + i18n("Planet name: %1").tqarg(planet->getName()); temp = "<qt>" + i18n("Planet name: %1").arg(planet->getName());
name->setText( temp ); name->setText( temp );
return; return;
} }
@ -141,19 +141,19 @@ void PlanetInfo::showPlanet( Planet *planet )
TQString temp; TQString temp;
temp = "<qt>" + i18n("Planet name: %1").tqarg(p->planet->getName()); temp = "<qt>" + i18n("Planet name: %1").arg(p->planet->getName());
name->setText( temp ); name->setText( temp );
temp = "<qt>" + i18n("Owner: %1").tqarg(p->planet->getPlayer()->getColoredName()); temp = "<qt>" + i18n("Owner: %1").arg(p->planet->getPlayer()->getColoredName());
owner->setText( temp ); owner->setText( temp );
temp = "<qt>" + i18n("Ships: %1").tqarg( KGlobal::locale()->formatNumber(p->ships, 0) ); temp = "<qt>" + i18n("Ships: %1").arg( KGlobal::locale()->formatNumber(p->ships, 0) );
ships->setText( temp ); ships->setText( temp );
temp = "<qt>" + i18n("Production: %1").tqarg( KGlobal::locale()->formatNumber(p->production, 0) ); temp = "<qt>" + i18n("Production: %1").arg( KGlobal::locale()->formatNumber(p->production, 0) );
production->setText( temp ); production->setText( temp );
temp = "<qt>" + i18n("Kill percent: %1").tqarg( KGlobal::locale()->formatNumber(p->killRate, 3) ); temp = "<qt>" + i18n("Kill percent: %1").arg( KGlobal::locale()->formatNumber(p->killRate, 3) );
kill_percent->setText( temp ); kill_percent->setText( temp );
} }
} }

@ -71,10 +71,10 @@ ScoreDlg::init()
for( ;(curPlayer = itr()); ) for( ;(curPlayer = itr()); )
new ScoreDlgListViewItem(scoreTable, new ScoreDlgListViewItem(scoreTable,
curPlayer->getName(), curPlayer->getName(),
TQString("%1").tqarg(curPlayer->getShipsBuilt()), TQString("%1").arg(curPlayer->getShipsBuilt()),
TQString("%1").tqarg(curPlayer->getPlanetsConquered()), TQString("%1").arg(curPlayer->getPlanetsConquered()),
TQString("%1").tqarg(curPlayer->getFleetsLaunched()), TQString("%1").arg(curPlayer->getFleetsLaunched()),
TQString("%1").tqarg(curPlayer->getEnemyFleetsDestroyed()), TQString("%1").arg(curPlayer->getEnemyFleetsDestroyed()),
TQString("%1").tqarg(curPlayer->getEnemyShipsDestroyed())); TQString("%1").arg(curPlayer->getEnemyShipsDestroyed()));
} }

@ -45,7 +45,7 @@ Card::Card( Rank r, Suit s, TQCanvas* _parent )
{ {
// Set the name of the card // Set the name of the card
// FIXME: i18n() // FIXME: i18n()
m_name = TQString("%1 %2").tqarg(suit_names[s-1]).tqarg(rank_names[r-1]).utf8(); m_name = TQString("%1 %2").arg(suit_names[s-1]).arg(rank_names[r-1]).utf8();
// Default for the card is face up, standard size. // Default for the card is face up, standard size.
m_faceup = true; m_faceup = true;

@ -1160,14 +1160,14 @@ void Dealer::won()
{ // wrap in own scope to make KConfigGroupSave work { // wrap in own scope to make KConfigGroupSave work
KConfig *config = kapp->config(); KConfig *config = kapp->config();
KConfigGroupSaver kcs(config, scores_group); KConfigGroupSaver kcs(config, scores_group);
unsigned int n = config->readUnsignedNumEntry(TQString("won%1").tqarg(_id),0) + 1; unsigned int n = config->readUnsignedNumEntry(TQString("won%1").arg(_id),0) + 1;
config->writeEntry(TQString("won%1").tqarg(_id),n); config->writeEntry(TQString("won%1").arg(_id),n);
n = config->readUnsignedNumEntry(TQString("winstreak%1").tqarg(_id),0) + 1; n = config->readUnsignedNumEntry(TQString("winstreak%1").arg(_id),0) + 1;
config->writeEntry(TQString("winstreak%1").tqarg(_id),n); config->writeEntry(TQString("winstreak%1").arg(_id),n);
unsigned int m = config->readUnsignedNumEntry(TQString("maxwinstreak%1").tqarg(_id),0); unsigned int m = config->readUnsignedNumEntry(TQString("maxwinstreak%1").arg(_id),0);
if (n>m) if (n>m)
config->writeEntry(TQString("maxwinstreak%1").tqarg(_id),n); config->writeEntry(TQString("maxwinstreak%1").arg(_id),n);
config->writeEntry(TQString("loosestreak%1").tqarg(_id),0); config->writeEntry(TQString("loosestreak%1").arg(_id),0);
} }
// sort cards by increasing z // sort cards by increasing z
@ -1430,9 +1430,9 @@ void Dealer::countGame()
kdDebug(11111) << "counting game as played." << endl; kdDebug(11111) << "counting game as played." << endl;
KConfig *config = kapp->config(); KConfig *config = kapp->config();
KConfigGroupSaver kcs(config, scores_group); KConfigGroupSaver kcs(config, scores_group);
unsigned int Total = config->readUnsignedNumEntry(TQString("total%1").tqarg(_id),0); unsigned int Total = config->readUnsignedNumEntry(TQString("total%1").arg(_id),0);
++Total; ++Total;
config->writeEntry(TQString("total%1").tqarg(_id),Total); config->writeEntry(TQString("total%1").arg(_id),Total);
_gameRecorded = true; _gameRecorded = true;
} }
} }
@ -1443,12 +1443,12 @@ void Dealer::countLoss()
// update score // update score
KConfig *config = kapp->config(); KConfig *config = kapp->config();
KConfigGroupSaver kcs(config, scores_group); KConfigGroupSaver kcs(config, scores_group);
unsigned int n = config->readUnsignedNumEntry(TQString("loosestreak%1").tqarg(_id),0) + 1; unsigned int n = config->readUnsignedNumEntry(TQString("loosestreak%1").arg(_id),0) + 1;
config->writeEntry(TQString("loosestreak%1").tqarg(_id),n); config->writeEntry(TQString("loosestreak%1").arg(_id),n);
unsigned int m = config->readUnsignedNumEntry(TQString("maxloosestreak%1").tqarg(_id),0); unsigned int m = config->readUnsignedNumEntry(TQString("maxloosestreak%1").arg(_id),0);
if (n>m) if (n>m)
config->writeEntry(TQString("maxloosestreak%1").tqarg(_id),n); config->writeEntry(TQString("maxloosestreak%1").arg(_id),n);
config->writeEntry(TQString("winstreak%1").tqarg(_id),0); config->writeEntry(TQString("winstreak%1").arg(_id),0);
} }
} }

@ -531,7 +531,7 @@ GCC_INLINE int freecell_solver_check_and_add_state(
/* The new state was not found in the cache, and it was already inserted */ /* The new state was not found in the cache, and it was already inserted */
if (new_state->parent) if (new_state->parent)
{ {
new_state->parent->num_active_tqchildren++; new_state->parent->num_active_children++;
} }
instance->num_states_in_collection++; instance->num_states_in_collection++;

@ -145,7 +145,7 @@ void *freecell_solver_PQueuePop( PTQUEUE *pq)
for( i=PTQ_FIRST_ENTRY; (child = PTQ_LEFT_CHILD_INDEX(i)) <= CurrentSize; i=child ) for( i=PTQ_FIRST_ENTRY; (child = PTQ_LEFT_CHILD_INDEX(i)) <= CurrentSize; i=child )
{ {
/* set child to the smaller of the two tqchildren... */ /* set child to the smaller of the two children... */
if( (child != CurrentSize) && if( (child != CurrentSize) &&
(PGetRating(Elements[child + 1]) > PGetRating(Elements[child])) ) (PGetRating(Elements[child + 1]) > PGetRating(Elements[child])) )

@ -47,7 +47,7 @@ typedef struct _PTQUEUE
#define PTQ_PARENT_INDEX(i) ((i)>>1) #define PTQ_PARENT_INDEX(i) ((i)>>1)
#define PTQ_FIRST_ENTRY (1) #define PTQ_FIRST_ENTRY (1)
/* left and right tqchildren are index * 2 and (index * 2) +1 respectively */ /* left and right children are index * 2 and (index * 2) +1 respectively */
#define PTQ_LEFT_CHILD_INDEX(i) ((i)<<1) #define PTQ_LEFT_CHILD_INDEX(i) ((i)<<1)
#define PTQ_RIGHT_CHILD_INDEX(i) (((i)<<1)+1) #define PTQ_RIGHT_CHILD_INDEX(i) (((i)<<1)+1)

@ -77,7 +77,7 @@ struct fcs_struct_state_with_locations_t
int depth; int depth;
int visited; int visited;
int visited_iter; int visited_iter;
int num_active_tqchildren; int num_active_children;
int scan_visited[MAX_NUM_SCANS_BUCKETS]; int scan_visited[MAX_NUM_SCANS_BUCKETS];
}; };
@ -237,7 +237,7 @@ struct fcs_struct_state_with_locations_t
int depth; int depth;
int visited; int visited;
int visited_iter; int visited_iter;
int num_active_tqchildren; int num_active_children;
int scan_visited[MAX_NUM_SCANS_BUCKETS]; int scan_visited[MAX_NUM_SCANS_BUCKETS];
}; };
@ -508,11 +508,11 @@ struct fcs_struct_state_with_locations_t
* */ * */
int visited_iter; int visited_iter;
/* /*
* This is the number of direct tqchildren of this state which were not * This is the number of direct children of this state which were not
* yet declared as dead ends. Once this counter reaches zero, this * yet declared as dead ends. Once this counter reaches zero, this
* state too is declared as a dead end. * state too is declared as a dead end.
* */ * */
int num_active_tqchildren; int num_active_children;
/* /*
* This is a vector of flags - one for each scan. Each indicates whether * This is a vector of flags - one for each scan. Each indicates whether
* its scan has already visited this state * its scan has already visited this state

@ -88,8 +88,8 @@ extern freecell_solver_solve_for_state_test_t freecell_solver_sfs_tests[FCS_TEST
if (ptr_state != NULL) \ if (ptr_state != NULL) \
{ \ { \
/* Decrease the refcount of the state */ \ /* Decrease the refcount of the state */ \
ptr_state->num_active_tqchildren--; \ ptr_state->num_active_children--; \
while((ptr_state->num_active_tqchildren == 0) && (ptr_state->visited & FCS_VISITED_ALL_TESTS_DONE)) \ while((ptr_state->num_active_children == 0) && (ptr_state->visited & FCS_VISITED_ALL_TESTS_DONE)) \
{ \ { \
/* Mark as dead end */ \ /* Mark as dead end */ \
ptr_state->visited |= FCS_VISITED_DEAD_END; \ ptr_state->visited |= FCS_VISITED_DEAD_END; \
@ -100,7 +100,7 @@ extern freecell_solver_solve_for_state_test_t freecell_solver_sfs_tests[FCS_TEST
break; \ break; \
} \ } \
/* Decrease the refcount */ \ /* Decrease the refcount */ \
ptr_state->num_active_tqchildren--; \ ptr_state->num_active_children--; \
} \ } \
} \ } \
} \ } \

@ -66,8 +66,8 @@ extern "C" {
ptr_new_state_with_locations->depth = ptr_state_with_locations->depth + 1; \ ptr_new_state_with_locations->depth = ptr_state_with_locations->depth + 1; \
/* Mark this state as a state that was not yet visited */ \ /* Mark this state as a state that was not yet visited */ \
ptr_new_state_with_locations->visited = 0; \ ptr_new_state_with_locations->visited = 0; \
/* It's a newly created state which does not have tqchildren yet. */ \ /* It's a newly created state which does not have children yet. */ \
ptr_new_state_with_locations->num_active_tqchildren = 0; \ ptr_new_state_with_locations->num_active_children = 0; \
memset(ptr_new_state_with_locations->scan_visited, '\0', \ memset(ptr_new_state_with_locations->scan_visited, '\0', \
sizeof(ptr_new_state_with_locations->scan_visited) \ sizeof(ptr_new_state_with_locations->scan_visited) \
); \ ); \
@ -119,13 +119,13 @@ fcs_move_stack_push(moves, temp_move); \
); \ ); \
if (!(existing_state->visited & FCS_VISITED_DEAD_END)) \ if (!(existing_state->visited & FCS_VISITED_DEAD_END)) \
{ \ { \
if ((--existing_state->parent->num_active_tqchildren) == 0) \ if ((--existing_state->parent->num_active_children) == 0) \
{ \ { \
mark_as_dead_end( \ mark_as_dead_end( \
existing_state->parent \ existing_state->parent \
); \ ); \
} \ } \
ptr_state_with_locations->num_active_tqchildren++; \ ptr_state_with_locations->num_active_children++; \
} \ } \
existing_state->parent = ptr_state_with_locations; \ existing_state->parent = ptr_state_with_locations; \
existing_state->depth = ptr_state_with_locations->depth + 1; \ existing_state->depth = ptr_state_with_locations->depth + 1; \

@ -280,8 +280,8 @@ void FreecellBase::resumeSolution()
return; return;
emit gameInfo(i18n("%1 tries - depth %2") emit gameInfo(i18n("%1 tries - depth %2")
.tqarg(freecell_solver_user_get_num_times(solver_instance)) .arg(freecell_solver_user_get_num_times(solver_instance))
.tqarg(freecell_solver_user_get_current_depth(solver_instance))); .arg(freecell_solver_user_get_current_depth(solver_instance)));
if (solver_ret == FCS_STATE_WAS_SOLVED) if (solver_ret == FCS_STATE_WAS_SOLVED)
{ {
@ -296,7 +296,7 @@ void FreecellBase::resumeSolution()
int moves = freecell_solver_user_get_num_times(solver_instance); int moves = freecell_solver_user_get_num_times(solver_instance);
freeSolution(); freeSolution();
emit gameInfo(i18n("unsolved after %1 moves") emit gameInfo(i18n("unsolved after %1 moves")
.tqarg(moves)); .arg(moves));
stopDemo(); stopDemo();
return; return;
} }
@ -379,7 +379,7 @@ TQString FreecellBase::solverFormat() const
tmp += suitToString(target[i]->top()->suit()) + "-" + rankToString(target[i]->top()->rank()) + " "; tmp += suitToString(target[i]->top()->suit()) + "-" + rankToString(target[i]->top()->rank()) + " ";
} }
if (!tmp.isEmpty()) if (!tmp.isEmpty())
output += TQString::fromLatin1("Foundations: %1\n").tqarg(tmp); output += TQString::fromLatin1("Foundations: %1\n").arg(tmp);
tmp.truncate(0); tmp.truncate(0);
for (uint i = 0; i < freecell.count(); i++) { for (uint i = 0; i < freecell.count(); i++) {
@ -389,7 +389,7 @@ TQString FreecellBase::solverFormat() const
tmp += rankToString(freecell[i]->top()->rank()) + suitToString(freecell[i]->top()->suit()) + " "; tmp += rankToString(freecell[i]->top()->rank()) + suitToString(freecell[i]->top()->suit()) + " ";
} }
if (!tmp.isEmpty()) if (!tmp.isEmpty())
output += TQString::fromLatin1("Freecells: %1\n").tqarg(tmp); output += TQString::fromLatin1("Freecells: %1\n").arg(tmp);
for (uint i = 0; i < store.count(); i++) for (uint i = 0; i < store.count(); i++)
{ {
@ -544,7 +544,7 @@ MoveHint *FreecellBase::chooseHint()
{ {
if (solver_instance && freecell_solver_user_get_moves_left(solver_instance)) { if (solver_instance && freecell_solver_user_get_moves_left(solver_instance)) {
emit gameInfo(i18n("%1 moves before finish").tqarg(freecell_solver_user_get_moves_left(solver_instance))); emit gameInfo(i18n("%1 moves before finish").arg(freecell_solver_user_get_moves_left(solver_instance)));
fcs_move_t move; fcs_move_t move;
if (!freecell_solver_user_get_next_move(solver_instance, &move)) { if (!freecell_solver_user_get_next_move(solver_instance, &move)) {

@ -84,7 +84,7 @@
<property name="text"> <property name="text">
<string>%1</string> <string>%1</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
@ -119,7 +119,7 @@
<property name="text"> <property name="text">
<string>%1</string> <string>%1</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
@ -138,7 +138,7 @@
<property name="text"> <property name="text">
<string>%1</string> <string>%1</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
@ -157,7 +157,7 @@
<property name="text"> <property name="text">
<string>%1</string> <string>%1</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>

@ -42,16 +42,16 @@ void GameStatsImpl::setGameType(int id)
languageChange(); languageChange();
KConfig *config = kapp->config(); KConfig *config = kapp->config();
KConfigGroupSaver kcs(config, scores_group); KConfigGroupSaver kcs(config, scores_group);
unsigned int t = config->readUnsignedNumEntry(TQString("total%1").tqarg(id),0); unsigned int t = config->readUnsignedNumEntry(TQString("total%1").arg(id),0);
Played->setText(Played->text().tqarg(t)); Played->setText(Played->text().arg(t));
unsigned int w = config->readUnsignedNumEntry(TQString("won%1").tqarg(id),0); unsigned int w = config->readUnsignedNumEntry(TQString("won%1").arg(id),0);
Won->setText(Won->text().tqarg(w)); Won->setText(Won->text().arg(w));
if (t) if (t)
WonPerc->setText(WonPerc->text().tqarg(w*100/t)); WonPerc->setText(WonPerc->text().arg(w*100/t));
else else
WonPerc->setText(WonPerc->text().tqarg(0)); WonPerc->setText(WonPerc->text().arg(0));
WinStreak->setText( WinStreak->setText(
WinStreak->text().tqarg(config->readUnsignedNumEntry(TQString("maxwinstreak%1").tqarg(id),0))); WinStreak->text().arg(config->readUnsignedNumEntry(TQString("maxwinstreak%1").arg(id),0)));
LooseStreak->setText( LooseStreak->setText(
LooseStreak->text().tqarg(config->readUnsignedNumEntry(TQString("maxloosestreak%1").tqarg(id),0))); LooseStreak->text().arg(config->readUnsignedNumEntry(TQString("maxloosestreak%1").arg(id),0)));
} }

@ -239,7 +239,7 @@ void pWidget::changeWallpaper()
return; return;
background = TQPixmap(bgpath); background = TQPixmap(bgpath);
if (background.isNull()) { if (background.isNull()) {
KMessageBox::sorry(this, i18n("<qt>Couldn't load wallpaper<br/>%1</qt>").tqarg(bgpath)); KMessageBox::sorry(this, i18n("<qt>Couldn't load wallpaper<br/>%1</qt>").arg(bgpath));
return; return;
} }

@ -46,10 +46,10 @@ BetBox::BetBox(TQWidget* parent, const char* name)
foldButton = new TQPushButton(this); foldButton = new TQPushButton(this);
l->addWidget(foldButton, 0); l->addWidget(foldButton, 0);
bet5Up->setText(TQString("+%1").tqarg(KGlobal::locale()->formatMoney(5))); bet5Up->setText(TQString("+%1").arg(KGlobal::locale()->formatMoney(5)));
bet10Up->setText(TQString("+%1").tqarg(KGlobal::locale()->formatMoney(10))); bet10Up->setText(TQString("+%1").arg(KGlobal::locale()->formatMoney(10)));
bet5Down->setText(TQString("-%1").tqarg(KGlobal::locale()->formatMoney(5))); bet5Down->setText(TQString("-%1").arg(KGlobal::locale()->formatMoney(5)));
bet10Down->setText(TQString("-%1").tqarg(KGlobal::locale()->formatMoney(10))); bet10Down->setText(TQString("-%1").arg(KGlobal::locale()->formatMoney(10)));
adjustBet->setText(i18n("Adjust Bet")); adjustBet->setText(i18n("Adjust Bet"));
foldButton->setText(i18n("Fold")); foldButton->setText(i18n("Fold"));

@ -173,7 +173,7 @@ void CardWidget::repaintDeck()
setPixmap(*m_pm); setPixmap(*m_pm);
setFixedSize(cardImages->getWidth(), cardImages->getHeight()); setFixedSize(cardImages->getWidth(), cardImages->getHeight());
((TQWidget*) parent())->tqlayout()->tqinvalidate(); ((TQWidget*) parent())->tqlayout()->invalidate();
((TQWidget*) parent())->setFixedSize( ((TQWidget*) parent())->sizeHint()); ((TQWidget*) parent())->setFixedSize( ((TQWidget*) parent())->sizeHint());
} }

@ -178,7 +178,7 @@ kpok::kpok(TQWidget *parent, const char *name)
// ...and the rest to computer players. // ...and the rest to computer players.
for (int unsigned i = 1; i < m_numPlayers; i++) for (int unsigned i = 1; i < m_numPlayers; i++)
m_players[i].setName(TQString("Computer %1").tqarg(i-1)); m_players[i].setName(TQString("Computer %1").arg(i-1));
lastHandText = ""; lastHandText = "";
@ -269,7 +269,7 @@ void kpok::initWindow()
mWonWidget = new TQWidget(this); mWonWidget = new TQWidget(this);
inputLayout->addWidget(mWonWidget, 2); inputLayout->addWidget(mWonWidget, 2);
mWonWidget->setMinimumHeight(50); //FIXME hardcoded value for the wave mWonWidget->setMinimumHeight(50); //FIXME hardcoded value for the wave
mWonWidget->setMinimumWidth(tmp.width(i18n("You won %1").tqarg(KGlobal::locale()->formatMoney(100))) + 20); // workaround for width problem in wave mWonWidget->setMinimumWidth(tmp.width(i18n("You won %1").arg(KGlobal::locale()->formatMoney(100))) + 20); // workaround for width problem in wave
TQHBoxLayout* wonLayout = new TQHBoxLayout(mWonWidget); TQHBoxLayout* wonLayout = new TQHBoxLayout(mWonWidget);
wonLayout->setAutoAdd(true); wonLayout->setAutoAdd(true);
@ -686,7 +686,7 @@ void kpok::paintCash()
for (unsigned int i = 0; i < m_numPlayers; i++) { for (unsigned int i = 0; i < m_numPlayers; i++) {
playerBox[i]->showCash(); playerBox[i]->showCash();
} }
potLabel->setText(i18n("Pot: %1").tqarg(KGlobal::locale()->formatMoney(m_game.getPot()))); potLabel->setText(i18n("Pot: %1").arg(KGlobal::locale()->formatMoney(m_game.getPot())));
} }
@ -805,9 +805,9 @@ void kpok::displayWinner_Computer(PokerPlayer* winner, bool othersPassed)
// Generate a string with winner info and show it. // Generate a string with winner info and show it.
TQString label; TQString label;
if (winner->getHuman()) if (winner->getHuman())
label = i18n("You won %1").tqarg(KGlobal::locale()->formatMoney(m_game.getPot())); label = i18n("You won %1").arg(KGlobal::locale()->formatMoney(m_game.getPot()));
else else
label = i18n("%1 won %2").tqarg(winner->getName()).tqarg(KGlobal::locale()->formatMoney(m_game.getPot())); label = i18n("%1 won %2").arg(winner->getName()).arg(KGlobal::locale()->formatMoney(m_game.getPot()));
wonLabel->setText(label); wonLabel->setText(label);
// Start the waving motion of the text. // Start the waving motion of the text.
@ -1028,7 +1028,7 @@ void kpok::stopWave()
{ {
waveTimer->stop(); waveTimer->stop();
fCount = -1; /* clear image */ fCount = -1; /* clear image */
tqrepaint ( FALSE ); repaint ( FALSE );
waveActive = false; waveActive = false;
} }
@ -1042,7 +1042,7 @@ void kpok::stopDrawing()
void kpok::waveTimerEvent() void kpok::waveTimerEvent()
{ {
fCount = (fCount + 1) & 15; fCount = (fCount + 1) & 15;
tqrepaint( FALSE ); repaint( FALSE );
} }
@ -1072,7 +1072,7 @@ void kpok::displayWin(const TQString& hand, int cashWon)
if (cashWon) { if (cashWon) {
playSound("win.wav"); playSound("win.wav");
buf = i18n("You won %1!").tqarg(KGlobal::locale()->formatMoney(cashWon)); buf = i18n("You won %1!").arg(KGlobal::locale()->formatMoney(cashWon));
} else { } else {
playSound("lose.wav"); playSound("lose.wav");
buf = i18n("Game Over"); // locale buf = i18n("Game Over"); // locale
@ -1307,9 +1307,9 @@ void kpok::saveGame(KConfig* conf)
conf->writeEntry("lastHandText", lastHandText); conf->writeEntry("lastHandText", lastHandText);
for (int i = 0; i < players; i++) { for (int i = 0; i < players; i++) {
conf->writeEntry(TQString("Name_%1").tqarg(i), m_players[i].getName()); conf->writeEntry(TQString("Name_%1").arg(i), m_players[i].getName());
conf->writeEntry(TQString("Human_%1").tqarg(i), m_players[i].getHuman()); conf->writeEntry(TQString("Human_%1").arg(i), m_players[i].getHuman());
conf->writeEntry(TQString("Cash_%1").tqarg(i), m_players[i].getCash()); conf->writeEntry(TQString("Cash_%1").arg(i), m_players[i].getCash());
} }
m_game.clearDirty(); m_game.clearDirty();
@ -1407,14 +1407,14 @@ bool kpok::loadGame(KConfig* conf)
if (numPlayers > 0) { if (numPlayers > 0) {
for (int i = 0; i < numPlayers; i++) { for (int i = 0; i < numPlayers; i++) {
TQString buf = conf->readEntry(TQString("Name_%1").tqarg(i), TQString buf = conf->readEntry(TQString("Name_%1").arg(i),
"Player"); "Player");
m_players[i].setName(buf); m_players[i].setName(buf);
bool human = conf->readBoolEntry(TQString("Human_%1").tqarg(i), bool human = conf->readBoolEntry(TQString("Human_%1").arg(i),
false); false);
if (human) if (human)
m_players[i].setHuman(); // i == 0 m_players[i].setHuman(); // i == 0
int cash = conf->readNumEntry(TQString("Cash_%1").tqarg(i), int cash = conf->readNumEntry(TQString("Cash_%1").arg(i),
START_MONEY); START_MONEY);
m_players[i].setCash(cash); m_players[i].setCash(cash);
m_game.setDirty(); m_game.setDirty();

@ -75,7 +75,7 @@ NewGameDlg::NewGameDlg(TQWidget* parent)
l = new TQHBoxLayout(topLayout); l = new TQHBoxLayout(topLayout);
l->addWidget(new TQLabel(i18n("Players' starting money:"), plainPage())); l->addWidget(new TQLabel(i18n("Players' starting money:"), plainPage()));
moneyOfPlayers = new TQLineEdit(TQString("%1").tqarg(money), plainPage()); moneyOfPlayers = new TQLineEdit(TQString("%1").arg(money), plainPage());
moneyOfPlayers->setValidator( new KIntValidator( 0,999999,moneyOfPlayers ) ); moneyOfPlayers->setValidator( new KIntValidator( 0,999999,moneyOfPlayers ) );
l->addWidget(moneyOfPlayers); l->addWidget(moneyOfPlayers);
@ -127,7 +127,7 @@ void NewGameDlg::setPlayerNames(int no, TQString playerName)
player1Name->setText(kapp->config()->readEntry("Name_0", i18n("You"))); player1Name->setText(kapp->config()->readEntry("Name_0", i18n("You")));
computerNames->clear(); computerNames->clear();
for (int i = 1; i < MAX_PLAYERS; i++) { for (int i = 1; i < MAX_PLAYERS; i++) {
computerNames->insertItem(kapp->config()->readEntry(TQString("Name_%1").tqarg(i), i18n("Computer %1").tqarg(i))); computerNames->insertItem(kapp->config()->readEntry(TQString("Name_%1").arg(i), i18n("Computer %1").arg(i)));
} }
} else if (no == 0) { } else if (no == 0) {
player1Name->setText(playerName); player1Name->setText(playerName);

@ -91,7 +91,7 @@ PlayerBox::PlayerBox(bool playerOne, TQWidget* parent, const char* name)
} }
TQToolTip::add(m_cashLabel, TQToolTip::add(m_cashLabel,
i18n("Money of %1").tqarg("Player"));//change via showName() i18n("Money of %1").arg("Player"));//change via showName()
// Assume that we have a multiplayer game. // Assume that we have a multiplayer game.
m_singlePlayer = false; m_singlePlayer = false;
@ -122,7 +122,7 @@ void PlayerBox::showCash()
{ {
// Show the amount of cash the player has. // Show the amount of cash the player has.
m_cashLabel->setText(i18n("Cash: %1") m_cashLabel->setText(i18n("Cash: %1")
.tqarg(KGlobal::locale()->formatMoney(m_player->getCash()))); .arg(KGlobal::locale()->formatMoney(m_player->getCash())));
// Show how much we have bet during this round. // Show how much we have bet during this round.
if (m_player->out()) if (m_player->out())
@ -130,10 +130,10 @@ void PlayerBox::showCash()
else { else {
if (m_singlePlayer) if (m_singlePlayer)
m_betLabel->setText(i18n("Cash per round: %1") m_betLabel->setText(i18n("Cash per round: %1")
.tqarg(KGlobal::locale()->formatMoney(m_cashPerRound))); .arg(KGlobal::locale()->formatMoney(m_cashPerRound)));
else else
m_betLabel->setText(i18n("Bet: %1") m_betLabel->setText(i18n("Bet: %1")
.tqarg(KGlobal::locale()-> formatMoney(m_player->getCurrentBet()))); .arg(KGlobal::locale()-> formatMoney(m_player->getCurrentBet())));
} }
} }
@ -145,7 +145,7 @@ void PlayerBox::showName()
{ {
setTitle(m_player->getName()); setTitle(m_player->getName());
TQToolTip::remove(m_cashLabel); TQToolTip::remove(m_cashLabel);
TQToolTip::add(m_cashLabel, i18n("Money of %1").tqarg(m_player->getName())); TQToolTip::add(m_cashLabel, i18n("Money of %1").arg(m_player->getName()));
} }

@ -66,7 +66,7 @@ TQString SimpleMove::asString() const
if (m_x == -1) if (m_x == -1)
return TQString("pass"); return TQString("pass");
else else
return TQString("%1%2").tqarg(" ABCDEFGH"[m_x]).tqarg(" 12345678"[m_y]); return TQString("%1%2").arg(" ABCDEFGH"[m_x]).arg(" 12345678"[m_y]);
} }

@ -308,7 +308,7 @@ void QReversiBoardView::updateBoard (bool force)
// If we are showing legal moves, we have to erase the old ones // If we are showing legal moves, we have to erase the old ones
// before we can show the new ones. The easiest way to do that is // before we can show the new ones. The easiest way to do that is
// to tqrepaint everything. // to repaint everything.
// //
// FIXME: A better way, perhaps, is to do the repainting in // FIXME: A better way, perhaps, is to do the repainting in
// drawPiece (which should be renamed drawSquare). // drawPiece (which should be renamed drawSquare).
@ -498,7 +498,7 @@ void QReversiBoardView::drawOnePiece(uint row, uint col, int i)
} }
// We got a tqrepaint event. We make it easy for us and redraw the // We got a repaint event. We make it easy for us and redraw the
// entire board. // entire board.
// //

@ -329,9 +329,9 @@ void KReversi::slotUndo()
} }
if (m_game->toMove() == computerColor()) { if (m_game->toMove() == computerColor()) {
// Must tqrepaint so that the new move is not shown before the old // Must repaint so that the new move is not shown before the old
// one is removed on the screen. // one is removed on the screen.
m_gameView->tqrepaint(); m_gameView->repaint();
computerMakeMove(); computerMakeMove();
} }
else else
@ -609,21 +609,21 @@ void KReversi::showGameOver(Color color)
if ( color == Nobody ) { if ( color == Nobody ) {
KNotifyClient::event(winId(), "draw", i18n("Draw!")); KNotifyClient::event(winId(), "draw", i18n("Draw!"));
TQString s = i18n("Game is drawn!\n\nYou : %1\nComputer: %2") TQString s = i18n("Game is drawn!\n\nYou : %1\nComputer: %2")
.tqarg(human).tqarg(computer); .arg(human).arg(computer);
KMessageBox::information(this, s, i18n("Game Ended")); KMessageBox::information(this, s, i18n("Game Ended"));
score.setType(KExtHighscore::Draw); score.setType(KExtHighscore::Draw);
} }
else if ( humanColor() == color ) { else if ( humanColor() == color ) {
KNotifyClient::event(winId(), "won", i18n("Game won!")); KNotifyClient::event(winId(), "won", i18n("Game won!"));
TQString s = i18n("Congratulations, you have won!\n\nYou : %1\nComputer: %2") TQString s = i18n("Congratulations, you have won!\n\nYou : %1\nComputer: %2")
.tqarg(human).tqarg(computer); .arg(human).arg(computer);
KMessageBox::information(this, s, i18n("Game Ended")); KMessageBox::information(this, s, i18n("Game Ended"));
score.setType(KExtHighscore::Won); score.setType(KExtHighscore::Won);
} }
else { else {
KNotifyClient::event(winId(), "lost", i18n("Game lost!")); KNotifyClient::event(winId(), "lost", i18n("Game lost!"));
TQString s = i18n("You have lost the game!\n\nYou : %1\nComputer: %2") TQString s = i18n("You have lost the game!\n\nYou : %1\nComputer: %2")
.tqarg(human).tqarg(computer); .arg(human).arg(computer);
KMessageBox::information(this, s, i18n("Game Ended")); KMessageBox::information(this, s, i18n("Game Ended"));
score.setType(KExtHighscore::Lost); score.setType(KExtHighscore::Lost);
} }

@ -213,10 +213,10 @@ void QReversiGameView::moveMade(uint moveNum, Move &move)
// Insert the new move in the listbox and mark it as the current one. // Insert the new move in the listbox and mark it as the current one.
m_movesView->insertItem(TQString("%1. %2 %3") m_movesView->insertItem(TQString("%1. %2 %3")
.tqarg(moveNum) .arg(moveNum)
.tqarg(Prefs::grayscale() ? colorsWB[move.color()] .arg(Prefs::grayscale() ? colorsWB[move.color()]
: colorsRB[move.color()]) : colorsRB[move.color()])
.tqarg(move.asString())); .arg(move.asString()));
m_movesView->setCurrentItem(moveNum - 1); m_movesView->setCurrentItem(moveNum - 1);
m_movesView->ensureCurrentVisible(); m_movesView->ensureCurrentVisible();

@ -143,7 +143,7 @@
<property name="text"> <property name="text">
<string>Beginner</string> <string>Beginner</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignLeft</set> <set>AlignVCenter|AlignLeft</set>
</property> </property>
</widget> </widget>
@ -154,7 +154,7 @@
<property name="text"> <property name="text">
<string>Expert</string> <string>Expert</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
@ -165,7 +165,7 @@
<property name="text"> <property name="text">
<string>Average</string> <string>Average</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignCenter</set> <set>AlignCenter</set>
</property> </property>
</widget> </widget>
@ -189,7 +189,7 @@
<property name="text"> <property name="text">
<string>Slow</string> <string>Slow</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignLeft</set> <set>AlignVCenter|AlignLeft</set>
</property> </property>
</widget> </widget>
@ -200,7 +200,7 @@
<property name="text"> <property name="text">
<string>Fast</string> <string>Fast</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>

@ -121,11 +121,11 @@ void KSameWidget::showNumberRemainingToggled()
if(showNumberRemaining->isChecked()){ if(showNumberRemaining->isChecked()){
TQStringList list; TQStringList list;
for(int i=1;i<=stone->colors();i++) for(int i=1;i<=stone->colors();i++)
list.append(TQString("%1").tqarg(stone->count(i))); list.append(TQString("%1").arg(stone->count(i)));
TQString count = TQString(" (%1)").tqarg(list.join(",")); TQString count = TQString(" (%1)").arg(list.join(","));
status->changeItem(i18n("%1 Colors%2").tqarg(stone->colors()).tqarg(count),1); status->changeItem(i18n("%1 Colors%2").arg(stone->colors()).arg(count),1);
} }
else status->changeItem(i18n("%1 Colors").tqarg(stone->colors()),1); else status->changeItem(i18n("%1 Colors").arg(stone->colors()),1);
KConfig *cfg = kapp->config(); KConfig *cfg = kapp->config();
cfg->writeEntry("showRemaining", showNumberRemaining->isChecked()); cfg->writeEntry("showRemaining", showNumberRemaining->isChecked());
@ -188,15 +188,15 @@ void KSameWidget::m_showhs() {
} }
void KSameWidget::setColors(int colors) { void KSameWidget::setColors(int colors) {
status->changeItem(i18n("%1 Colors").tqarg(colors),1); status->changeItem(i18n("%1 Colors").arg(colors),1);
} }
void KSameWidget::setBoard(int board) { void KSameWidget::setBoard(int board) {
status->changeItem(i18n("Board: %1").tqarg(board, 6), 2); status->changeItem(i18n("Board: %1").arg(board, 6), 2);
} }
void KSameWidget::setMarked(int m) { void KSameWidget::setMarked(int m) {
status->changeItem(i18n("Marked: %1").tqarg(m, 6),3); status->changeItem(i18n("Marked: %1").arg(m, 6),3);
m_markedStones=m; m_markedStones=m;
} }
@ -209,11 +209,11 @@ void KSameWidget::setScore(int score) {
if(showNumberRemaining->isChecked()){ if(showNumberRemaining->isChecked()){
TQStringList list; TQStringList list;
for(int i=1;i<=stone->colors();i++) for(int i=1;i<=stone->colors();i++)
list.append(TQString("%1").tqarg(stone->count(i))); list.append(TQString("%1").arg(stone->count(i)));
TQString count = TQString(" (%1)").tqarg(list.join(",")); TQString count = TQString(" (%1)").arg(list.join(","));
status->changeItem(i18n("%1 Colors%2").tqarg(stone->colors()).tqarg(count),1); status->changeItem(i18n("%1 Colors%2").arg(stone->colors()).arg(count),1);
} }
status->changeItem(i18n("Score: %1").tqarg(score, 6),4); status->changeItem(i18n("Score: %1").arg(score, 6),4);
undo->setEnabled(stone->undoPossible()); undo->setEnabled(stone->undoPossible());
restart->setEnabled(!stone->isOriginalBoard()); restart->setEnabled(!stone->isOriginalBoard());
} }
@ -222,11 +222,11 @@ void KSameWidget::gameover() {
if (stone->hasBonus()) { if (stone->hasBonus()) {
KNotifyClient::event(winId(), "game won", KNotifyClient::event(winId(), "game won",
i18n("You even removed the last stone, great job! " i18n("You even removed the last stone, great job! "
"This gave you a score of %1 in total.").tqarg(stone->score())); "This gave you a score of %1 in total.").arg(stone->score()));
} else { } else {
KNotifyClient::event(winId(), "game over", KNotifyClient::event(winId(), "game over",
i18n("There are no more removeable stones. " i18n("There are no more removeable stones. "
"You got a score of %1 in total.").tqarg(stone->score())); "You got a score of %1 in total.").arg(stone->score()));
} }
stone->unmark(); stone->unmark();
KScoreDialog d(KScoreDialog::Name | KScoreDialog::Score, this); KScoreDialog d(KScoreDialog::Name | KScoreDialog::Score, this);

@ -299,9 +299,9 @@ void App::slotEndOfGame()
else else
{ {
TQString s = i18n("Congratulations! You made it in %1:%2:%3") TQString s = i18n("Congratulations! You made it in %1:%2:%3")
.tqarg(TQString().sprintf("%02d", board->getTimeForGame()/3600)) .arg(TQString().sprintf("%02d", board->getTimeForGame()/3600))
.tqarg(TQString().sprintf("%02d", (board->getTimeForGame() / 60) % 60)) .arg(TQString().sprintf("%02d", (board->getTimeForGame() / 60) % 60))
.tqarg(TQString().sprintf("%02d", board->getTimeForGame() % 60)); .arg(TQString().sprintf("%02d", board->getTimeForGame() % 60));
KMessageBox::information(this, s, i18n("End of Game")); KMessageBox::information(this, s, i18n("End of Game"));
} }
@ -315,18 +315,18 @@ void App::updateScore()
{ {
int t = board->getTimeForGame(); int t = board->getTimeForGame();
TQString s = i18n(" Your time: %1:%2:%3 %4") TQString s = i18n(" Your time: %1:%2:%3 %4")
.tqarg(TQString().sprintf("%02d", t / 3600 )) .arg(TQString().sprintf("%02d", t / 3600 ))
.tqarg(TQString().sprintf("%02d", (t / 60) % 60 )) .arg(TQString().sprintf("%02d", (t / 60) % 60 ))
.tqarg(TQString().sprintf("%02d", t % 60 )) .arg(TQString().sprintf("%02d", t % 60 ))
.tqarg(board->isPaused()?i18n("(Paused) "):TQString()); .arg(board->isPaused()?i18n("(Paused) "):TQString());
statusBar()->changeItem(s, SBI_TIME); statusBar()->changeItem(s, SBI_TIME);
// Number of tiles // Number of tiles
int tl = (board->x_tiles() * board->y_tiles()); int tl = (board->x_tiles() * board->y_tiles());
s = i18n(" Removed: %1/%2 ") s = i18n(" Removed: %1/%2 ")
.tqarg(TQString().sprintf("%d", tl - board->tilesLeft())) .arg(TQString().sprintf("%d", tl - board->tilesLeft()))
.tqarg(TQString().sprintf("%d", tl )); .arg(TQString().sprintf("%d", tl ));
statusBar()->changeItem(s, SBI_TILES); statusBar()->changeItem(s, SBI_TILES);
} }
@ -685,8 +685,8 @@ void App::showHighscore(int focusitem)
if(i < highscore.size()) if(i < highscore.size())
{ {
s = TQString("%1 %2") s = TQString("%1 %2")
.tqarg(getScore(hs)) .arg(getScore(hs))
.tqarg(hs.gravity ? i18n("(gravity)") : TQString("")); .arg(hs.gravity ? i18n("(gravity)") : TQString(""));
} }
else else
{ {

@ -444,7 +444,7 @@ void Board::updateField(int x, int y, bool erase)
tiles.tileWidth(), tiles.tileWidth(),
tiles.tileHeight()); tiles.tileHeight());
tqrepaint(r, erase); repaint(r, erase);
} }
void Board::paintEvent(TQPaintEvent *e) void Board::paintEvent(TQPaintEvent *e)
@ -900,7 +900,7 @@ void Board::dumpBoard() const
if(tile == EMPTY) if(tile == EMPTY)
row += " --"; row += " --";
else else
row += TQString("%1").tqarg(getField(x, y), 3); row += TQString("%1").arg(getField(x, y), 3);
} }
kdDebug() << row << endl; kdDebug() << row << endl;
} }

@ -78,7 +78,7 @@
<property name="text"> <property name="text">
<string>Hard</string> <string>Hard</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
@ -130,7 +130,7 @@
<property name="text"> <property name="text">
<string>Fast</string> <string>Fast</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
@ -170,7 +170,7 @@
<property name="text"> <property name="text">
<string>18x8</string> <string>18x8</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignCenter</set> <set>AlignCenter</set>
</property> </property>
</widget> </widget>
@ -181,7 +181,7 @@
<property name="text"> <property name="text">
<string>26x14</string> <string>26x14</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignCenter</set> <set>AlignCenter</set>
</property> </property>
</widget> </widget>
@ -192,7 +192,7 @@
<property name="text"> <property name="text">
<string>30x16</string> <string>30x16</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
@ -226,7 +226,7 @@
<property name="text"> <property name="text">
<string>24x12</string> <string>24x12</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignCenter</set> <set>AlignCenter</set>
</property> </property>
</widget> </widget>

@ -206,9 +206,9 @@ void GameWidget::newGame()
void GameWidget::repaintChilds() void GameWidget::repaintChilds()
{ {
screen->tqrepaint(false); screen->repaint(false);
mirror->tqrepaint(false); mirror->repaint(false);
next->tqrepaint(false); next->repaint(false);
} }
void GameWidget::putPiece() void GameWidget::putPiece()
@ -218,7 +218,7 @@ void GameWidget::putPiece()
if (piece[2] != bg_sprite) ref(xpos + 0, ypos + 1) = piece[2]; if (piece[2] != bg_sprite) ref(xpos + 0, ypos + 1) = piece[2];
if (piece[3] != bg_sprite) ref(xpos + 1, ypos + 1) = piece[3]; if (piece[3] != bg_sprite) ref(xpos + 1, ypos + 1) = piece[3];
updateMirror(); updateMirror();
screen->tqrepaint(false); screen->repaint(false);
} }
void GameWidget::getPiece() void GameWidget::getPiece()
@ -241,7 +241,7 @@ void GameWidget::newPiece()
next_piece[i] = (Sprite)(Sprite_Block1 + random.getLong(num_pieces_level)); next_piece[i] = (Sprite)(Sprite_Block1 + random.getLong(num_pieces_level));
else else
next_piece[i] = bg_sprite; next_piece[i] = bg_sprite;
next->tqrepaint(false); next->repaint(false);
} }
void GameWidget::nextPiece() void GameWidget::nextPiece()
@ -272,7 +272,7 @@ void GameWidget::updateMirror()
mirror_sprites[x] = bg_sprite; mirror_sprites[x] = bg_sprite;
mirror_sprites[xpos] = piece[2] == bg_sprite ? piece[0] : piece[2]; mirror_sprites[xpos] = piece[2] == bg_sprite ? piece[0] : piece[2];
mirror_sprites[xpos+1] = piece[3] == bg_sprite ? piece[1] : piece[3]; mirror_sprites[xpos+1] = piece[3] == bg_sprite ? piece[1] : piece[3];
mirror->tqrepaint(false); mirror->repaint(false);
} }
void GameWidget::keyUp() void GameWidget::keyUp()
@ -390,7 +390,7 @@ void GameWidget::broke(int x, int y, bool *xmap)
emit changedStats(num_level, num_points); emit changedStats(num_level, num_points);
#ifdef HAVE_USLEEP #ifdef HAVE_USLEEP
screen->tqrepaint(false); screen->repaint(false);
usleep(75 * 1000); usleep(75 * 1000);
#endif #endif
} }

@ -182,8 +182,8 @@ void GameWindow::updateStats(int level, int points)
TQString l, p; TQString l, p;
l.setNum(level); l.setNum(level);
p.setNum(points); p.setNum(points);
status->changeItem(i18n("Level: %1").tqarg(l), 1); status->changeItem(i18n("Level: %1").arg(l), 1);
status->changeItem(i18n("Score: %1").tqarg(p), 2); status->changeItem(i18n("Score: %1").arg(p), 2);
} }
void GameWindow::gameOver() void GameWindow::gameOver()

@ -73,7 +73,7 @@ void Ball::nextMove()
} }
} }
void Ball::tqrepaint() void Ball::repaint()
{ {
static int i = 0; static int i = 0;
static bool rotate = true; static bool rotate = true;

@ -33,7 +33,7 @@ public:
Ball(Board *b, PixServer *p); Ball(Board *b, PixServer *p);
virtual ~Ball(){} virtual ~Ball(){}
virtual void nextMove(); virtual void nextMove();
void tqrepaint(); void repaint();
void zero(); void zero();
protected: protected:
Board *board; Board *board;

@ -81,7 +81,7 @@ void Basket::newApples()
} }
} }
void Basket::tqrepaint(bool dirty ) void Basket::repaint(bool dirty )
{ {
Kaffee *g; Kaffee *g;
for ( g = list->first(); g != 0; g = list->next()) { for ( g = list->first(); g != 0; g = list->next()) {

@ -56,7 +56,7 @@ class Basket : public TQObject
public: public:
Basket(Board *b, PixServer *p); Basket(Board *b, PixServer *p);
~Basket(); ~Basket();
void tqrepaint(bool); void repaint(bool);
void newApples(); void newApples();
void clear(); void clear();
Fruits eaten( int i); Fruits eaten( int i);

@ -88,11 +88,11 @@ Game::~Game()
} }
void Game::scoreChanged(int score){ void Game::scoreChanged(int score){
statusBar()->changeItem(i18n("Score: %1").tqarg(score), SCORE); statusBar()->changeItem(i18n("Score: %1").arg(score), SCORE);
} }
void Game::setTrys(int tries){ void Game::setTrys(int tries){
statusBar()->changeItem(i18n("Lives: %1").tqarg(tries), LIVES); statusBar()->changeItem(i18n("Lives: %1").arg(tries), LIVES);
} }
void Game::gameEnd(int score){ void Game::gameEnd(int score){

@ -59,7 +59,7 @@
<property name="text"> <property name="text">
<string>Fast</string> <string>Fast</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>

@ -181,7 +181,7 @@ void PixServer::initBrickPixmap()
{ {
TQPixmap pm = TQPixmap(locate("appdata", "pics/brick.png")); TQPixmap pm = TQPixmap(locate("appdata", "pics/brick.png"));
if (pm.isNull()) { if (pm.isNull()) {
kdFatal() << i18n("error loading %1, aborting\n").tqarg("brick.png"); kdFatal() << i18n("error loading %1, aborting\n").arg("brick.png");
} }
int pw = pm.width(); int pw = pm.width();
int ph = pm.height(); int ph = pm.height();

@ -114,7 +114,7 @@ void Rattler::paintEvent( TQPaintEvent *e)
return; return;
TQPixmap levelPix = pix->levelPix(); TQPixmap levelPix = pix->levelPix();
basket->tqrepaint(true); basket->repaint(true);
bitBlt(this, rect.x(), rect.y(), bitBlt(this, rect.x(), rect.y(),
&levelPix, rect.x(), rect.y(), rect.width(), rect.height()); &levelPix, rect.x(), rect.y(), rect.width(), rect.height());
@ -130,14 +130,14 @@ void Rattler::timerEvent( TQTimerEvent * )
for (CompuSnake *c = computerSnakes->first(); c != 0; c = computerSnakes->next()){ for (CompuSnake *c = computerSnakes->first(); c != 0; c = computerSnakes->next()){
if(c) { if(c) {
c->nextMove(); c->nextMove();
c->tqrepaint(false); c->repaint(false);
} }
} }
for (Ball *b = balls->first(); b != 0; b = balls->next()){ for (Ball *b = balls->first(); b != 0; b = balls->next()){
if (b) { if (b) {
b->nextMove(); b->nextMove();
b->tqrepaint(); b->repaint();
} }
} }
@ -147,10 +147,10 @@ void Rattler::timerEvent( TQTimerEvent * )
if(!gameState.testBit(Demo)) if(!gameState.testBit(Demo))
{ {
state = samy->nextMove(direction); state = samy->nextMove(direction);
samy->tqrepaint( false ); samy->repaint( false );
} }
basket->tqrepaint( false); basket->repaint( false);
if (state == ko) if (state == ko)
newTry(); newTry();
@ -313,7 +313,7 @@ void Rattler::pause()
label = new TQLabel(this); label = new TQLabel(this);
label->setFont( TQFont( "Times", 14, TQFont::Bold ) ); label->setFont( TQFont( "Times", 14, TQFont::Bold ) );
label->setText(i18n("Game Paused\n Press %1 to resume\n") label->setText(i18n("Game Paused\n Press %1 to resume\n")
.tqarg(tempPauseAction->shortcutText())); .arg(tempPauseAction->shortcutText()));
label->setAlignment( AlignCenter ); label->setAlignment( AlignCenter );
label->setFrameStyle( TQFrame::Panel | TQFrame::Raised ); label->setFrameStyle( TQFrame::Panel | TQFrame::Raised );
label->setGeometry(182, 206, 198, 80); label->setGeometry(182, 206, 198, 80);
@ -351,7 +351,7 @@ void Rattler::restartDemo()
level->create(Intro); level->create(Intro);
pix->initRoomPixmap(); pix->initRoomPixmap();
init(false); init(false);
tqrepaint(); repaint();
start(); start();
} }
@ -374,7 +374,7 @@ void Rattler::demo()
level->create(Intro); level->create(Intro);
pix->initRoomPixmap(); pix->initRoomPixmap();
} }
tqrepaint(rect(), false); repaint(rect(), false);
init(false); init(false);
run(); run();
first_time = false; first_time = false;
@ -413,7 +413,7 @@ void Rattler::restart()
cleanLabel(); cleanLabel();
tqrepaint(); repaint();
TQTimer::singleShot( 2000, this, TQT_SLOT(showRoom()) ); TQTimer::singleShot( 2000, this, TQT_SLOT(showRoom()) );
} }
@ -426,7 +426,7 @@ void Rattler::newTry()
gameState.setBit(Over); gameState.setBit(Over);
level->create(GameOver); level->create(GameOver);
pix->initRoomPixmap(); pix->initRoomPixmap();
tqrepaint(); repaint();
TQTimer::singleShot( 5000, this, TQT_SLOT(demo()) ); TQTimer::singleShot( 5000, this, TQT_SLOT(demo()) );
emit setScore(points); emit setScore(points);
return; return;
@ -439,7 +439,7 @@ void Rattler::newTry()
level->create(Room); level->create(Room);
pix->initRoomPixmap(); pix->initRoomPixmap();
init(true); init(true);
tqrepaint(); repaint();
TQTimer::singleShot( 1000, this, TQT_SLOT(run()) ); TQTimer::singleShot( 1000, this, TQT_SLOT(run()) );
} }
@ -456,7 +456,7 @@ void Rattler::levelUp()
level->nextLevel(); level->nextLevel();
level->create(Banner); level->create(Banner);
pix->initRoomPixmap(); pix->initRoomPixmap();
tqrepaint(); repaint();
TQTimer::singleShot( 2000, this, TQT_SLOT(showRoom()) ); TQTimer::singleShot( 2000, this, TQT_SLOT(showRoom()) );
} }
@ -493,7 +493,7 @@ void Rattler::showRoom()
level->create(Room); level->create(Room);
pix->initRoomPixmap(); pix->initRoomPixmap();
init(true); init(true);
tqrepaint(); repaint();
TQTimer::singleShot( 1000, this, TQT_SLOT(run()) ); TQTimer::singleShot( 1000, this, TQT_SLOT(run()) );
} }

@ -143,7 +143,7 @@ void Snake::reset(int index, int border)
} }
} }
void Snake::tqrepaint( bool dirty) void Snake::repaint( bool dirty)
{ {
int x = 0; int x = 0;
for ( Samy *sam = list.first(); sam != 0; sam = list.next(), x++) { for ( Samy *sam = list.first(); sam != 0; sam = list.next(), x++) {

@ -46,7 +46,7 @@ signals:
public: public:
Snake(Board *b, PixServer *p, Gate g, PixMap x); Snake(Board *b, PixServer *p, Gate g, PixMap x);
~Snake() {} ~Snake() {}
void tqrepaint( bool ); void repaint( bool );
void zero(); void zero();
protected: protected:

@ -599,7 +599,7 @@ PlayField::keyPressEvent(TQKeyEvent * e) {
case Key_X: case Key_X:
levelMap_->random(); levelMap_->random();
levelChange(); levelChange();
tqrepaint(false); repaint(false);
break; break;
case Key_R: case Key_R:
@ -620,7 +620,7 @@ PlayField::keyPressEvent(TQKeyEvent * e) {
break; break;
case Key_I: case Key_I:
history_->redo(levelMap_); history_->redo(levelMap_);
tqrepaint(false); repaint(false);
return; return;
break; break;
@ -644,7 +644,7 @@ PlayField::keyPressEvent(TQKeyEvent * e) {
} }
updateStepsXpm(); updateStepsXpm();
updatePushesXpm(); updatePushesXpm();
tqrepaint(false); repaint(false);
return; return;
break; break;
#endif #endif
@ -855,7 +855,7 @@ this level yet."), this);
level(levelMap_->level()+1); level(levelMap_->level()+1);
levelChange(); levelChange();
tqrepaint(false); repaint(false);
} }
void void
@ -868,7 +868,7 @@ the current collection."), this);
} }
level(levelMap_->level()-1); level(levelMap_->level()-1);
levelChange(); levelChange();
tqrepaint(false); repaint(false);
} }
void void
@ -892,7 +892,7 @@ PlayField::restartLevel() {
level(levelMap_->level()); level(levelMap_->level());
updateStepsXpm(); updateStepsXpm();
updatePushesXpm(); updatePushesXpm();
tqrepaint(false); repaint(false);
} }
void void
@ -901,7 +901,7 @@ PlayField::changeCollection(LevelCollection *collection) {
levelMap_->changeCollection(collection); levelMap_->changeCollection(collection);
levelChange(); levelChange();
//erase(collRect_); //erase(collRect_);
tqrepaint(false); repaint(false);
} }
void void
@ -1030,7 +1030,7 @@ PlayField::goToBookmark(Bookmark *bm) {
//updateLevelXpm(); //updateLevelXpm();
updateStepsXpm(); updateStepsXpm();
updatePushesXpm(); updatePushesXpm();
tqrepaint(false); repaint(false);
} }
bool bool

@ -492,7 +492,7 @@ void MyMainView::newRound()
field.update(); field.update();
TQString str = i18n("Press %1 to start") TQString str = i18n("Press %1 to start")
.tqarg(KShortcut(GAME_START_SHORTCUT).toString()); .arg(KShortcut(GAME_START_SHORTCUT).toString());
emit(setStatusText(str,IDS_MAIN)); emit(setStatusText(str,IDS_MAIN));
emit( setStatusText( "", IDS_PAUSE ) ); emit( setStatusText( "", IDS_PAUSE ) );
stop( ); stop( );
@ -557,7 +557,7 @@ void MyMainView::timerEvent(TQTimerEvent *event)
emit(wins(0,w)); emit(wins(0,w));
} }
TQString str = i18n("Press %1 for new round") TQString str = i18n("Press %1 for new round")
.tqarg(KShortcut(GAME_START_SHORTCUT).toString()); .arg(KShortcut(GAME_START_SHORTCUT).toString());
emit(setStatusText(str,IDS_MAIN)); emit(setStatusText(str,IDS_MAIN));
stop( ); stop( );
} }

@ -35,8 +35,8 @@ PlayerInfo::PlayerInfo(int pnr,TQWidget *parent,const char *name)
for(i=0;i<4;i++) for(i=0;i<4;i++)
{ {
str = TQString::fromLatin1("sprites/playerinfo/ship%1%2.pnm") str = TQString::fromLatin1("sprites/playerinfo/ship%1%2.pnm")
.tqarg(pnr+1) .arg(pnr+1)
.tqarg(i); .arg(i);
pix[i]=new TQPixmap(locate("appdata", str)); pix[i]=new TQPixmap(locate("appdata", str));
} }

@ -90,7 +90,7 @@
<property name="text"> <property name="text">
<string>Large</string> <string>Large</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>
@ -101,7 +101,7 @@
<property name="text"> <property name="text">
<string>Small</string> <string>Small</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignLeft</set> <set>AlignVCenter|AlignLeft</set>
</property> </property>
</widget> </widget>
@ -112,7 +112,7 @@
<property name="text"> <property name="text">
<string>Medium</string> <string>Medium</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignCenter</set> <set>AlignCenter</set>
</property> </property>
</widget> </widget>

@ -175,7 +175,7 @@
<property name="text"> <property name="text">
<string>Default</string> <string>Default</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignCenter</set> <set>AlignCenter</set>
</property> </property>
</widget> </widget>
@ -186,7 +186,7 @@
<property name="text"> <property name="text">
<string>Fast</string> <string>Fast</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>

@ -108,12 +108,12 @@ void KTron::updateStatusbar(){
TQString name; TQString name;
if(tron->isComputer(Both)) if(tron->isComputer(Both))
name=i18n("Computer(%1)").tqarg(i+1); name=i18n("Computer(%1)").arg(i+1);
else if(tron->isComputer(player)) else if(tron->isComputer(player))
name=i18n("Computer"); name=i18n("Computer");
else else
name=playerName[i]; name=playerName[i];
TQString string = TQString("%1: %2").tqarg(name).tqarg(playerPoints[i]); TQString string = TQString("%1: %2").arg(name).arg(playerPoints[i]);
statusBar()->changeItem(string,ID_STATUS_BASE+i+1); statusBar()->changeItem(string,ID_STATUS_BASE+i+1);
} }
} }
@ -158,12 +158,12 @@ void KTron::showWinner(Player winner){
if(!tron->isComputer(winner)) if(!tron->isComputer(winner))
winnerName = playerName[winner]; winnerName = playerName[winner];
TQString message=i18n("%1 has won!").tqarg(winnerName); TQString message=i18n("%1 has won!").arg(winnerName);
statusBar()->message(message,MESSAGE_TIME); statusBar()->message(message,MESSAGE_TIME);
message = i18n("%1 has won versus %2 with %3 : %4 points!"); message = i18n("%1 has won versus %2 with %3 : %4 points!");
message=message.tqarg(winnerName).tqarg(loserName); message=message.arg(winnerName).arg(loserName);
message=message.tqarg(playerPoints[winner]).tqarg(playerPoints[loser]); message=message.arg(playerPoints[winner]).arg(playerPoints[loser]);
KMessageBox::information(this, message, i18n("Winner")); KMessageBox::information(this, message, i18n("Winner"));
tron->newGame(); tron->newGame();

@ -81,7 +81,7 @@ void Tron::loadSettings(){
// Style // Style
if(pixmap){ if(pixmap){
updatePixmap(); updatePixmap();
tqrepaint(); repaint();
} }
// Backgroundimage // Backgroundimage
@ -96,7 +96,7 @@ void Tron::loadSettings(){
setBackgroundPix(pix); setBackgroundPix(pix);
} else { } else {
TQString msg=i18n("Wasn't able to load wallpaper\n%1"); TQString msg=i18n("Wasn't able to load wallpaper\n%1");
msg=msg.tqarg(tmpFile); msg=msg.arg(tmpFile);
KMessageBox::sorry(this, msg); KMessageBox::sorry(this, msg);
} }
KIO::NetAccess::removeTempFile(tmpFile); KIO::NetAccess::removeTempFile(tmpFile);
@ -268,7 +268,7 @@ void Tron::showWinner(Player player)
updatePixmap(); updatePixmap();
} }
tqrepaint(); repaint();
emit gameEnds(player); emit gameEnds(player);
@ -810,7 +810,7 @@ void Tron::showBeginHint()
if(players[0].score==0 && players[1].score==0) if(players[0].score==0 && players[1].score==0)
{ {
beginHint=true; beginHint=true;
tqrepaint(); repaint();
} }
} }
} }

@ -94,7 +94,7 @@ void PlayGround::repaintAll()
editableArea.width() + 20, editableArea.width() + 20,
editableArea.height() + 20); editableArea.height() + 20);
tqrepaint(dirtyArea, false); repaint(dirtyArea, false);
} }
// Undo last action // Undo last action
@ -255,10 +255,10 @@ void PlayGround::mousePressEvent( TQMouseEvent *event )
int draggedNumber = draggedObject.getNumber(); int draggedNumber = draggedObject.getNumber();
TQPixmap object(objectsLayout[draggedNumber].size()); TQPixmap object(objectsLayout[draggedNumber].size());
TQBitmap tqshape(objectsLayout[draggedNumber].size()); TQBitmap shape(objectsLayout[draggedNumber].size());
bitBlt(&object, TQPoint(0, 0), &gameboard, objectsLayout[draggedNumber], TQt::CopyROP); bitBlt(&object, TQPoint(0, 0), &gameboard, objectsLayout[draggedNumber], TQt::CopyROP);
bitBlt(&tqshape, TQPoint(0, 0), &masks, objectsLayout[draggedNumber], TQt::CopyROP); bitBlt(&shape, TQPoint(0, 0), &masks, objectsLayout[draggedNumber], TQt::CopyROP);
object.setMask(tqshape); object.setMask(shape);
draggedCursor = new TQCursor(object, position.x(), position.y()); draggedCursor = new TQCursor(object, position.x(), position.y());
setCursor(*draggedCursor); setCursor(*draggedCursor);
@ -320,7 +320,7 @@ void PlayGround::mouseReleaseEvent( TQMouseEvent *event )
// Repaint the editable area // Repaint the editable area
position.moveBy(XMARGIN, YMARGIN); position.moveBy(XMARGIN, YMARGIN);
tqrepaint(position, false); repaint(position, false);
} }
@ -506,7 +506,7 @@ void PlayGround::loadFailure()
exit(-1); exit(-1);
} }
// Set up play ground's tqgeometry // Set up play ground's geometry
void PlayGround::setupGeometry() void PlayGround::setupGeometry()
{ {
int width = gameboard.width() + 2 * XMARGIN, int width = gameboard.width() + 2 * XMARGIN,
@ -547,15 +547,15 @@ bool PlayGround::zone(TQPoint &position)
draggedObject = *currentObject; draggedObject = *currentObject;
draggedNumber = draggedObject.getNumber(); draggedNumber = draggedObject.getNumber();
TQBitmap tqshape(objectsLayout[draggedNumber].size()); TQBitmap shape(objectsLayout[draggedNumber].size());
TQPoint relative(position.x() - toUpdate.x(), TQPoint relative(position.x() - toUpdate.x(),
position.y() - toUpdate.y()); position.y() - toUpdate.y());
bitBlt(&tqshape, TQPoint(0, 0), &masks, objectsLayout[draggedNumber], TQt::CopyROP); bitBlt(&shape, TQPoint(0, 0), &masks, objectsLayout[draggedNumber], TQt::CopyROP);
if (!tqshape.convertToImage().pixelIndex(relative.x(), relative.y())) continue; if (!shape.convertToImage().pixelIndex(relative.x(), relative.y())) continue;
toDraw.remove(draggedZOrder); toDraw.remove(draggedZOrder);
toUpdate.moveBy(XMARGIN, YMARGIN); toUpdate.moveBy(XMARGIN, YMARGIN);
tqrepaint(toUpdate, false); repaint(toUpdate, false);
position = relative; position = relative;

@ -62,7 +62,7 @@ private:
private: private:
TQPixmap gameboard; // Picture of the game board TQPixmap gameboard; // Picture of the game board
TQBitmap masks; // Pictures of the objects' tqshapes TQBitmap masks; // Pictures of the objects' shapes
TQRect editableArea; // Part of the gameboard where the player can lay down objects TQRect editableArea; // Part of the gameboard where the player can lay down objects
TQString menuItem, // Menu item describing describing this gameboard TQString menuItem, // Menu item describing describing this gameboard
editableSound; // Sound associated with this area editableSound; // Sound associated with this area
@ -73,7 +73,7 @@ private:
TQString *textsList, // List of the message numbers associated with categories TQString *textsList, // List of the message numbers associated with categories
*soundsList; // List of sounds associated with each object *soundsList; // List of sounds associated with each object
TQCursor *draggedCursor; // Cursor's tqshape for currently dragged object TQCursor *draggedCursor; // Cursor's shape for currently dragged object
ToDraw draggedObject; // Object currently dragged ToDraw draggedObject; // Object currently dragged
int draggedZOrder; // Z-order (in to-draw buffer) of this object int draggedZOrder; // Z-order (in to-draw buffer) of this object

@ -49,11 +49,11 @@ void ToDraw::draw(TQPainter &artist, const TQRect &area,
if (!position.intersects(area)) return; if (!position.intersects(area)) return;
TQPixmap objectPixmap(objectsLayout[number].size()); TQPixmap objectPixmap(objectsLayout[number].size());
TQBitmap tqshapeBitmap(objectsLayout[number].size()); TQBitmap shapeBitmap(objectsLayout[number].size());
bitBlt(&objectPixmap, TQPoint(0, 0), gameboard, objectsLayout[number], TQt::CopyROP); bitBlt(&objectPixmap, TQPoint(0, 0), gameboard, objectsLayout[number], TQt::CopyROP);
bitBlt(&tqshapeBitmap, TQPoint(0, 0), masks, objectsLayout[number], TQt::CopyROP); bitBlt(&shapeBitmap, TQPoint(0, 0), masks, objectsLayout[number], TQt::CopyROP);
objectPixmap.setMask(tqshapeBitmap); objectPixmap.setMask(shapeBitmap);
artist.drawPixmap(position.topLeft(), objectPixmap); artist.drawPixmap(position.topLeft(), objectPixmap);
} }

@ -408,9 +408,9 @@ void TopLevel::filePrint()
KPrinter printer; KPrinter printer;
bool ok; bool ok;
ok = printer.setup(this, i18n("Print %1").tqarg(actionCollection()->action(gameboardActions[selectedGameboard].latin1())->plainText())); ok = printer.setup(this, i18n("Print %1").arg(actionCollection()->action(gameboardActions[selectedGameboard].latin1())->plainText()));
if (!ok) return; if (!ok) return;
playGround->tqrepaint(true); playGround->repaint(true);
if (!playGround->printPicture(printer)) if (!playGround->printPicture(printer))
KMessageBox::error(this, KMessageBox::error(this,
i18n("Could not print picture.")); i18n("Could not print picture."));

@ -41,8 +41,8 @@ void BaseField::init(bool AI, bool multiplayer, bool server, bool first,
_flags.multiplayer = multiplayer; _flags.multiplayer = multiplayer;
_flags.server = server; _flags.server = server;
_flags.first = first; _flags.first = first;
TQString text = (AI ? i18n("%1\n(AI player)").tqarg(name) TQString text = (AI ? i18n("%1\n(AI player)").arg(name)
: (multiplayer ? i18n("%1\n(Human player)").tqarg(name) : (multiplayer ? i18n("%1\n(Human player)").arg(name)
: TQString())); : TQString()));
if ( first && !server ) text += i18n("\nWaiting for server"); if ( first && !server ) text += i18n("\nWaiting for server");
setMessage(text, (first && server ? StartButton : NoButton)); setMessage(text, (first && server ? StartButton : NoButton));
@ -128,7 +128,7 @@ void BaseField::stop(bool gameover)
if ( board->arcadeStage()==bfactory->bbi.nbArcadeStages ) if ( board->arcadeStage()==bfactory->bbi.nbArcadeStages )
msg = i18n("The End"); msg = i18n("The End");
else { else {
msg = i18n("Stage #%1 done").tqarg(board->arcadeStage()); msg = i18n("Stage #%1 done").arg(board->arcadeStage());
button = ProceedButton; button = ProceedButton;
} }
} }

@ -343,14 +343,14 @@ TQCString AIConfig::coefficientKey(const char *name)
double AIConfig::coefficient(const AI::Data &data) double AIConfig::coefficient(const AI::Data &data)
{ {
KConfigSkeletonItem *item = CommonPrefs::self()->findItem( TQString("Coefficient_%1").tqarg(data.name) ); KConfigSkeletonItem *item = CommonPrefs::self()->findItem( TQString("Coefficient_%1").arg(data.name) );
assert(item); assert(item);
return item->property().toDouble(); return item->property().toDouble();
} }
int AIConfig::trigger(const AI::Data &data) int AIConfig::trigger(const AI::Data &data)
{ {
KConfigSkeletonItem *item = CommonPrefs::self()->findItem( TQString("Trigger_%1").tqarg(data.name) ); KConfigSkeletonItem *item = CommonPrefs::self()->findItem( TQString("Trigger_%1").arg(data.name) );
assert(item); assert(item);
return item->property().toInt(); return item->property().toInt();
} }

@ -23,13 +23,13 @@ void CommonHighscores::convertLegacy(uint)
KConfigGroupSaver cg(kapp->config(), "High Scores"); KConfigGroupSaver cg(kapp->config(), "High Scores");
for (uint i=0; i<10; i++) { for (uint i=0; i<10; i++) {
TQString name TQString name
= cg.config()->readEntry(TQString("name%1").tqarg(i), TQString()); = cg.config()->readEntry(TQString("name%1").arg(i), TQString());
if ( name.isNull() ) break; if ( name.isNull() ) break;
if ( name.isEmpty() ) name = i18n("anonymous"); if ( name.isEmpty() ) name = i18n("anonymous");
uint score uint score
= cg.config()->readUnsignedNumEntry(TQString("score%1").tqarg(i), 0); = cg.config()->readUnsignedNumEntry(TQString("score%1").arg(i), 0);
uint level uint level
= cg.config()->readUnsignedNumEntry(TQString("level%1").tqarg(i), 1); = cg.config()->readUnsignedNumEntry(TQString("level%1").arg(i), 1);
Score s(Won); Score s(Won);
s.setScore(score); s.setScore(score);
s.setData("name", name); s.setData("name", name);

@ -88,9 +88,9 @@ class Led : public TQWidget
{ return TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); } { return TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); }
TQSize sizeHint() const { return TQSize(LED_WIDTH, LED_HEIGHT); } TQSize sizeHint() const { return TQSize(LED_WIDTH, LED_HEIGHT); }
void on() { if (!_on) { _on = TRUE; tqrepaint(); } } void on() { if (!_on) { _on = TRUE; repaint(); } }
void off() { if (_on) {_on = FALSE; tqrepaint(); } } void off() { if (_on) {_on = FALSE; repaint(); } }
void setColor(const TQColor &c) { if (c!=col) { col = c; tqrepaint(); } } void setColor(const TQColor &c) { if (c!=col) { col = c; repaint(); } }
protected: protected:
void paintEvent(TQPaintEvent *) { void paintEvent(TQPaintEvent *) {

@ -6,7 +6,7 @@ void errorBox(const TQString &msg1, const TQString &msg2, TQWidget *parent)
{ {
TQString str; TQString str;
if ( msg2.isNull() ) str = msg1; if ( msg2.isNull() ) str = msg1;
else str = i18n("%1:\n%2").tqarg(msg1).tqarg(msg2); else str = i18n("%1:\n%2").arg(msg1).arg(msg2);
KMessageBox::error(parent, str); KMessageBox::error(parent, str);
} }

@ -46,7 +46,7 @@ void KeyData::createActionCollection(uint index, TQWidget *receiver)
_cols[index] = new KActionCollection(receiver, this); _cols[index] = new KActionCollection(receiver, this);
for (uint k=0; k<_data.size(); k++) { for (uint k=0; k<_data.size(); k++) {
TQString label = i18n(_data[k].label); TQString label = i18n(_data[k].label);
TQString name = TQString("%2 %3").tqarg(index+1).tqarg(_data[k].name); TQString name = TQString("%2 %3").arg(index+1).arg(_data[k].name);
const char *slot = (_data[k].slotRelease ? 0 : _data[k].slot); const char *slot = (_data[k].slotRelease ? 0 : _data[k].slot);
KAction *a = new KAction(label, _keycodes[_cols.size()-1][index][k], KAction *a = new KAction(label, _keycodes[_cols.size()-1][index][k],
TQT_TQOBJECT(receiver), slot, _cols[index], name.utf8()); TQT_TQOBJECT(receiver), slot, _cols[index], name.utf8());
@ -78,8 +78,8 @@ void KeyData::setEnabled(uint index, bool enabled)
void KeyData::addKeys(KKeyDialog &d) void KeyData::addKeys(KKeyDialog &d)
{ {
for (uint i=0; i<_cols.size(); i++) for (uint i=0; i<_cols.size(); i++)
d.insert(_cols[i], i18n("Shortcuts for player #%1/%2").tqarg(i+1) d.insert(_cols[i], i18n("Shortcuts for player #%1/%2").arg(i+1)
.tqarg(_cols.size())); .arg(_cols.size()));
} }
void KeyData::save() void KeyData::save()

@ -37,7 +37,7 @@ class KeyData : public TQObject
TQMap<KAction *, SpecialData> _specActions; TQMap<KAction *, SpecialData> _specActions;
TQString group() const TQString group() const
{ return TQString("Keys (%1 humans)").tqarg(_cols.size()); } { return TQString("Keys (%1 humans)").arg(_cols.size()); }
}; };
#endif // KEYS_H #endif // KEYS_H

@ -68,7 +68,7 @@ void NetMeeting::appendLine(const MeetingLineData &pld, bool server)
if (pld.own) connect(pl, TQT_SIGNAL(textChanged(const TQString &)), if (pld.own) connect(pl, TQT_SIGNAL(textChanged(const TQString &)),
TQT_SLOT(textChanged(const TQString &))); TQT_SLOT(textChanged(const TQString &)));
else message(i18n("A new client has just arrived (#%1)") else message(i18n("A new client has just arrived (#%1)")
.tqarg(wl->size()+1)); .arg(wl->size()+1));
pl->setData(pld.ed); pl->setData(pld.ed);
connect(pl, TQT_SIGNAL(typeChanged(MeetingCheckBox::Type)), connect(pl, TQT_SIGNAL(typeChanged(MeetingCheckBox::Type)),
TQT_SLOT(typeChanged(MeetingCheckBox::Type))); TQT_SLOT(typeChanged(MeetingCheckBox::Type)));
@ -241,7 +241,7 @@ void ServerNetMeeting::writeToAll(uint i)
void ServerNetMeeting::netError(uint i, const TQString &type) void ServerNetMeeting::netError(uint i, const TQString &type)
{ {
Q_ASSERT( i!=0 ); Q_ASSERT( i!=0 );
disconnectHost(i, i18n("%1 client #%2: disconnect it").tqarg(type).tqarg(i)); disconnectHost(i, i18n("%1 client #%2: disconnect it").arg(type).arg(i));
} }
void ServerNetMeeting::disconnectHost(uint i, const TQString &str) void ServerNetMeeting::disconnectHost(uint i, const TQString &str)
@ -265,7 +265,7 @@ void ServerNetMeeting::newHost(int)
int res = sm[0]->accept(s); int res = sm[0]->accept(s);
if ( res!=0 ) { if ( res!=0 ) {
message(i18n("Failed to accept incoming client:\n%1") message(i18n("Failed to accept incoming client:\n%1")
.tqarg(socketError(s))); .arg(socketError(s)));
return; return;
} }
players.append(NewPlayer); players.append(NewPlayer);
@ -301,7 +301,7 @@ void ServerNetMeeting::idFlag(uint i)
void ServerNetMeeting::endFlag(uint i) void ServerNetMeeting::endFlag(uint i)
{ {
disconnectHost(i, i18n("Client #%1 has left").tqarg(i)); disconnectHost(i, i18n("Client #%1 has left").arg(i));
} }
void ServerNetMeeting::newFlag(uint i) void ServerNetMeeting::newFlag(uint i)
@ -462,7 +462,7 @@ ClientNetMeeting::ClientNetMeeting(const cId &id,
void ClientNetMeeting::netError(uint, const TQString &str) void ClientNetMeeting::netError(uint, const TQString &str)
{ {
cleanReject(i18n("%1 server: aborting connection.").tqarg(str)); cleanReject(i18n("%1 server: aborting connection.").arg(str));
} }
void ClientNetMeeting::writeToAll(uint) void ClientNetMeeting::writeToAll(uint)
@ -529,7 +529,7 @@ void ClientNetMeeting::delFlag(uint)
sm[0]->readingStream() >> k; sm[0]->readingStream() >> k;
CHECK_READ(0); CHECK_READ(0);
removeLine(k-1); removeLine(k-1);
message(i18n("Client %1 has left").tqarg(k)); message(i18n("Client %1 has left").arg(k));
} }
void ClientNetMeeting::textChanged(const TQString &text) void ClientNetMeeting::textChanged(const TQString &text)

@ -100,14 +100,14 @@ void MPInterface::specialLocalGame(uint nbHumans, uint nbAIs)
bd.type = (i<nbHumans ? PlayerComboBox::Human : PlayerComboBox::AI); bd.type = (i<nbHumans ? PlayerComboBox::Human : PlayerComboBox::AI);
bd.name = TQString(); bd.name = TQString();
t = (PlayerComboBox::Type) t = (PlayerComboBox::Type)
cg.config()->readNumEntry(TQString(MP_PLAYER_TYPE).tqarg(i), cg.config()->readNumEntry(TQString(MP_PLAYER_TYPE).arg(i),
PlayerComboBox::None); PlayerComboBox::None);
if ( bd.type==t ) if ( bd.type==t )
bd.name = cg.config()->readEntry(TQString(MP_PLAYER_NAME).tqarg(i), bd.name = cg.config()->readEntry(TQString(MP_PLAYER_NAME).arg(i),
TQString()); TQString());
if ( bd.name.isNull() ) if ( bd.name.isNull() )
bd.name = (i<nbHumans ? i18n("Human %1").tqarg(i+1) bd.name = (i<nbHumans ? i18n("Human %1").arg(i+1)
: i18n("AI %1").tqarg(i-nbHumans+1)); : i18n("AI %1").arg(i-nbHumans+1));
cd.rhd.bds += bd; cd.rhd.bds += bd;
} }
cd.server = TRUE; cd.server = TRUE;

@ -66,8 +66,8 @@ void MeetingLine::setData(const ExtData &ed)
if ( bds[i].type==PlayerComboBox::Human ) nbh++; if ( bds[i].type==PlayerComboBox::Human ) nbh++;
else if ( bds[i].type==PlayerComboBox::AI ) nba++; else if ( bds[i].type==PlayerComboBox::AI ) nba++;
} }
labH->setText(i18n("Hu=%1").tqarg(nbh)); labH->setText(i18n("Hu=%1").arg(nbh));
labAI->setText(i18n("AI=%1").tqarg(nba)); labAI->setText(i18n("AI=%1").arg(nba));
lname->setText(bds[0].name); lname->setText(bds[0].name);
setType(ed.type); setType(ed.type);
setText(ed.text); setText(ed.text);

@ -23,13 +23,13 @@ TQString cId::errorMessage(const cId &id) const
case Accepted: return TQString(); case Accepted: return TQString();
case LibIdClash: case LibIdClash:
return i18n("The MultiPlayer library of the server is incompatible") return i18n("The MultiPlayer library of the server is incompatible")
+ str.tqarg(libId).tqarg(id.libId); + str.arg(libId).arg(id.libId);
case GameNameClash: case GameNameClash:
return i18n("Trying to connect a server for another game type") return i18n("Trying to connect a server for another game type")
+ str.tqarg(gameName).tqarg(id.gameName); + str.arg(gameName).arg(id.gameName);
case GameIdClash: case GameIdClash:
return i18n("The server game version is incompatible") return i18n("The server game version is incompatible")
+ str.tqarg(gameId).tqarg(id.gameId); + str.arg(gameId).arg(id.gameId);
} }
Q_ASSERT(0); Q_ASSERT(0);
return TQString(); return TQString();

@ -94,10 +94,10 @@ void MPWizard::setupLocalPage(const MPGameInfo &gi)
Q_ASSERT( gi.maxNbLocalPlayers>0 ); Q_ASSERT( gi.maxNbLocalPlayers>0 );
for (uint i=0; i<gi.maxNbLocalPlayers; i++) { for (uint i=0; i<gi.maxNbLocalPlayers; i++) {
type = (PlayerComboBox::Type) type = (PlayerComboBox::Type)
cg.config()->readNumEntry(TQString(MP_PLAYER_TYPE).tqarg(i), cg.config()->readNumEntry(TQString(MP_PLAYER_TYPE).arg(i),
(i==0 ? PlayerComboBox::Human : PlayerComboBox::None)); (i==0 ? PlayerComboBox::Human : PlayerComboBox::None));
n = cg.config()->readEntry(TQString(MP_PLAYER_NAME).tqarg(i), n = cg.config()->readEntry(TQString(MP_PLAYER_NAME).arg(i),
i18n("Player #%1").tqarg(i)); i18n("Player #%1").arg(i));
pl = new PlayerLine(type, n, gi.humanSettingSlot, gi.AISettingSlot, pl = new PlayerLine(type, n, gi.humanSettingSlot, gi.AISettingSlot,
i!=0, gi.AIAllowed, wl); i!=0, gi.AIAllowed, wl);
@ -122,7 +122,7 @@ void MPWizard::setupLocalPage(const MPGameInfo &gi)
TQString MPWizard::name(uint i) const TQString MPWizard::name(uint i) const
{ {
TQString s = wl->widget(i)->name(); TQString s = wl->widget(i)->name();
if ( s.length()==0 ) s = i18n("Player #%1").tqarg(i); if ( s.length()==0 ) s = i18n("Player #%1").arg(i);
return s; return s;
} }
@ -177,7 +177,7 @@ void MPWizard::accept()
// do lookup // do lookup
int res = socket->lookup(); int res = socket->lookup();
if ( checkSocket(res, socket, i18n("Error looking up for \"%1\"") if ( checkSocket(res, socket, i18n("Error looking up for \"%1\"")
.tqarg(host), this) ) { .arg(host), this) ) {
delete socket; delete socket;
return; return;
} }
@ -206,9 +206,9 @@ void MPWizard::accept()
cg.config()->writeEntry(MP_GAMETYPE, (int)type); cg.config()->writeEntry(MP_GAMETYPE, (int)type);
for (uint i=0; i<wl->size(); i++) { for (uint i=0; i<wl->size(); i++) {
cg.config()->writeEntry(TQString(MP_PLAYER_TYPE).tqarg(i), cg.config()->writeEntry(TQString(MP_PLAYER_TYPE).arg(i),
(int)wl->widget(i)->type()); (int)wl->widget(i)->type());
cg.config()->writeEntry(TQString(MP_PLAYER_NAME).tqarg(i), name(i)); cg.config()->writeEntry(TQString(MP_PLAYER_NAME).arg(i), name(i));
} }
KWizard::accept(); KWizard::accept();

@ -2,68 +2,68 @@
cd $1 cd $1
convert -format png -tqgeometry "72x96" 01c.gif 1.png convert -format png -geometry "72x96" 01c.gif 1.png
convert -format png -tqgeometry "72x96" 01s.gif 2.png convert -format png -geometry "72x96" 01s.gif 2.png
convert -format png -tqgeometry "72x96" 01h.gif 3.png convert -format png -geometry "72x96" 01h.gif 3.png
convert -format png -tqgeometry "72x96" 01d.gif 4.png convert -format png -geometry "72x96" 01d.gif 4.png
convert -format png -tqgeometry "72x96" 13c.gif 5.png convert -format png -geometry "72x96" 13c.gif 5.png
convert -format png -tqgeometry "72x96" 13s.gif 6.png convert -format png -geometry "72x96" 13s.gif 6.png
convert -format png -tqgeometry "72x96" 13h.gif 7.png convert -format png -geometry "72x96" 13h.gif 7.png
convert -format png -tqgeometry "72x96" 13d.gif 8.png convert -format png -geometry "72x96" 13d.gif 8.png
convert -format png -tqgeometry "72x96" 12c.gif 9.png convert -format png -geometry "72x96" 12c.gif 9.png
convert -format png -tqgeometry "72x96" 12s.gif 10.png convert -format png -geometry "72x96" 12s.gif 10.png
convert -format png -tqgeometry "72x96" 12h.gif 11.png convert -format png -geometry "72x96" 12h.gif 11.png
convert -format png -tqgeometry "72x96" 12d.gif 12.png convert -format png -geometry "72x96" 12d.gif 12.png
convert -format png -tqgeometry "72x96" 11c.gif 13.png convert -format png -geometry "72x96" 11c.gif 13.png
convert -format png -tqgeometry "72x96" 11s.gif 14.png convert -format png -geometry "72x96" 11s.gif 14.png
convert -format png -tqgeometry "72x96" 11h.gif 15.png convert -format png -geometry "72x96" 11h.gif 15.png
convert -format png -tqgeometry "72x96" 11d.gif 16.png convert -format png -geometry "72x96" 11d.gif 16.png
convert -format png -tqgeometry "72x96" 10c.gif 17.png convert -format png -geometry "72x96" 10c.gif 17.png
convert -format png -tqgeometry "72x96" 10s.gif 18.png convert -format png -geometry "72x96" 10s.gif 18.png
convert -format png -tqgeometry "72x96" 10h.gif 19.png convert -format png -geometry "72x96" 10h.gif 19.png
convert -format png -tqgeometry "72x96" 10d.gif 20.png convert -format png -geometry "72x96" 10d.gif 20.png
convert -format png -tqgeometry "72x96" 09c.gif 21.png convert -format png -geometry "72x96" 09c.gif 21.png
convert -format png -tqgeometry "72x96" 09s.gif 22.png convert -format png -geometry "72x96" 09s.gif 22.png
convert -format png -tqgeometry "72x96" 09h.gif 23.png convert -format png -geometry "72x96" 09h.gif 23.png
convert -format png -tqgeometry "72x96" 09d.gif 24.png convert -format png -geometry "72x96" 09d.gif 24.png
convert -format png -tqgeometry "72x96" 08c.gif 25.png convert -format png -geometry "72x96" 08c.gif 25.png
convert -format png -tqgeometry "72x96" 08s.gif 26.png convert -format png -geometry "72x96" 08s.gif 26.png
convert -format png -tqgeometry "72x96" 08h.gif 27.png convert -format png -geometry "72x96" 08h.gif 27.png
convert -format png -tqgeometry "72x96" 08d.gif 28.png convert -format png -geometry "72x96" 08d.gif 28.png
convert -format png -tqgeometry "72x96" 07c.gif 29.png convert -format png -geometry "72x96" 07c.gif 29.png
convert -format png -tqgeometry "72x96" 07s.gif 30.png convert -format png -geometry "72x96" 07s.gif 30.png
convert -format png -tqgeometry "72x96" 07h.gif 31.png convert -format png -geometry "72x96" 07h.gif 31.png
convert -format png -tqgeometry "72x96" 07d.gif 32.png convert -format png -geometry "72x96" 07d.gif 32.png
convert -format png -tqgeometry "72x96" 06c.gif 33.png convert -format png -geometry "72x96" 06c.gif 33.png
convert -format png -tqgeometry "72x96" 06s.gif 34.png convert -format png -geometry "72x96" 06s.gif 34.png
convert -format png -tqgeometry "72x96" 06h.gif 35.png convert -format png -geometry "72x96" 06h.gif 35.png
convert -format png -tqgeometry "72x96" 06d.gif 36.png convert -format png -geometry "72x96" 06d.gif 36.png
convert -format png -tqgeometry "72x96" 05c.gif 37.png convert -format png -geometry "72x96" 05c.gif 37.png
convert -format png -tqgeometry "72x96" 05s.gif 38.png convert -format png -geometry "72x96" 05s.gif 38.png
convert -format png -tqgeometry "72x96" 05h.gif 39.png convert -format png -geometry "72x96" 05h.gif 39.png
convert -format png -tqgeometry "72x96" 05d.gif 40.png convert -format png -geometry "72x96" 05d.gif 40.png
convert -format png -tqgeometry "72x96" 04c.gif 41.png convert -format png -geometry "72x96" 04c.gif 41.png
convert -format png -tqgeometry "72x96" 04s.gif 42.png convert -format png -geometry "72x96" 04s.gif 42.png
convert -format png -tqgeometry "72x96" 04h.gif 43.png convert -format png -geometry "72x96" 04h.gif 43.png
convert -format png -tqgeometry "72x96" 04d.gif 44.png convert -format png -geometry "72x96" 04d.gif 44.png
convert -format png -tqgeometry "72x96" 03c.gif 45.png convert -format png -geometry "72x96" 03c.gif 45.png
convert -format png -tqgeometry "72x96" 03s.gif 46.png convert -format png -geometry "72x96" 03s.gif 46.png
convert -format png -tqgeometry "72x96" 03h.gif 47.png convert -format png -geometry "72x96" 03h.gif 47.png
convert -format png -tqgeometry "72x96" 03d.gif 48.png convert -format png -geometry "72x96" 03d.gif 48.png
convert -format png -tqgeometry "72x96" 02c.gif 49.png convert -format png -geometry "72x96" 02c.gif 49.png
convert -format png -tqgeometry "72x96" 02s.gif 50.png convert -format png -geometry "72x96" 02s.gif 50.png
convert -format png -tqgeometry "72x96" 02h.gif 51.png convert -format png -geometry "72x96" 02h.gif 51.png
convert -format png -tqgeometry "72x96" 02d.gif 52.png convert -format png -geometry "72x96" 02d.gif 52.png

@ -92,7 +92,7 @@ void ScoresList::addLineItem(const ItemArray &items,
if (line) line->setText(k, itemText(container, index)); if (line) line->setText(k, itemText(container, index));
else { else {
addColumn( container.item()->label() ); addColumn( container.item()->label() );
setColumnAlignment(k, container.item()->tqalignment()); setColumnAlignment(k, container.item()->alignment());
} }
k++; k++;
} }
@ -289,7 +289,7 @@ void LastMultipleScoresList::addLineItem(const ItemArray &si,
if (line) line->setText(i, itemText(*container, index)); if (line) line->setText(i, itemText(*container, index));
else { else {
addColumn( container->item()->label() ); addColumn( container->item()->label() );
setColumnAlignment(i, container->item()->tqalignment()); setColumnAlignment(i, container->item()->alignment());
} }
} }
} }
@ -333,7 +333,7 @@ void TotalMultipleScoresList::addLineItem(const ItemArray &si,
TQString label = TQString label =
(i==2 ? i18n("Won Games") : container->item()->label()); (i==2 ? i18n("Won Games") : container->item()->label());
addColumn(label); addColumn(label);
setColumnAlignment(i, container->item()->tqalignment()); setColumnAlignment(i, container->item()->alignment());
} }
} }
} }

@ -314,7 +314,7 @@ PlayerInfos::PlayerInfos()
#ifdef HIGHSCORE_DIRECTORY #ifdef HIGHSCORE_DIRECTORY
if (_oldLocalPlayer) { // player already exists in local config file if (_oldLocalPlayer) { // player already exists in local config file
// copy player data // copy player data
TQString prefix = TQString("%1_").tqarg(_oldLocalId+1); TQString prefix = TQString("%1_").arg(_oldLocalId+1);
TQMap<TQString, TQString> entries = TQMap<TQString, TQString> entries =
cg.config()->entryMap("KHighscore_players"); cg.config()->entryMap("KHighscore_players");
TQMap<TQString, TQString>::const_iterator it; TQMap<TQString, TQString>::const_iterator it;
@ -378,8 +378,8 @@ TQString PlayerInfos::histoName(uint i) const
const TQMemArray<uint> &sh = _histogram; const TQMemArray<uint> &sh = _histogram;
Q_ASSERT( i<sh.size() || (_bound || i==sh.size()) ); Q_ASSERT( i<sh.size() || (_bound || i==sh.size()) );
if ( i==sh.size() ) if ( i==sh.size() )
return TQString("nb scores greater than %1").tqarg(sh[sh.size()-1]); return TQString("nb scores greater than %1").arg(sh[sh.size()-1]);
return TQString("nb scores less than %1").tqarg(sh[i]); return TQString("nb scores less than %1").arg(sh[i]);
} }
uint PlayerInfos::histoSize() const uint PlayerInfos::histoSize() const
@ -497,10 +497,10 @@ void PlayerInfos::removeKey()
TQString sk; TQString sk;
do { do {
i++; i++;
sk = str.tqarg(HS_KEY).tqarg(i); sk = str.arg(HS_KEY).arg(i);
} while ( !cg.config()->readEntry(sk, TQString()).isEmpty() ); } while ( !cg.config()->readEntry(sk, TQString()).isEmpty() );
cg.config()->writeEntry(sk, key()); cg.config()->writeEntry(sk, key());
cg.config()->writeEntry(str.tqarg(HS_REGISTERED_NAME).tqarg(i), cg.config()->writeEntry(str.arg(HS_REGISTERED_NAME).arg(i),
registeredName()); registeredName());
// clear current key/nickname // clear current key/nickname
@ -609,7 +609,7 @@ bool ManagerPrivate::doQuery(const KURL &url, TQWidget *parent,
TQString tmpFile; TQString tmpFile;
if ( !KIO::NetAccess::download(url, tmpFile, parent) ) { if ( !KIO::NetAccess::download(url, tmpFile, parent) ) {
TQString details = i18n("Server URL: %1").tqarg(url.host()); TQString details = i18n("Server URL: %1").arg(url.host());
KMessageBox::detailedSorry(parent, i18n(UNABLE_TO_CONTACT), details); KMessageBox::detailedSorry(parent, i18n(UNABLE_TO_CONTACT), details);
return false; return false;
} }
@ -647,7 +647,7 @@ bool ManagerPrivate::doQuery(const KURL &url, TQWidget *parent,
} }
} }
TQString msg = i18n("Invalid answer from world-wide highscores server."); TQString msg = i18n("Invalid answer from world-wide highscores server.");
TQString details = i18n("Raw message: %1").tqarg(content); TQString details = i18n("Raw message: %1").arg(content);
KMessageBox::detailedSorry(parent, msg, details); KMessageBox::detailedSorry(parent, msg, details);
return false; return false;
} }
@ -660,7 +660,7 @@ bool ManagerPrivate::getFromQuery(const TQDomNamedNodeMap &map,
if ( attr.isNull() ) { if ( attr.isNull() ) {
KMessageBox::sorry(parent, KMessageBox::sorry(parent,
i18n("Invalid answer from world-wide " i18n("Invalid answer from world-wide "
"highscores server (missing item: %1).").tqarg(name)); "highscores server (missing item: %1).").arg(name));
return false; return false;
} }
value = attr.value(); value = attr.value();

@ -33,8 +33,8 @@ namespace KExtHighscore
{ {
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
Item::Item(const TQVariant &def, const TQString &label, int tqalignment) Item::Item(const TQVariant &def, const TQString &label, int alignment)
: _default(def), _label(label), _tqalignment(tqalignment), : _default(def), _label(label), _alignment(alignment),
_format(NoFormat), _special(NoSpecial) _format(NoFormat), _special(NoSpecial)
{} {}
@ -287,7 +287,7 @@ void MultiplayerScores::show(TQWidget *parent)
vbox = new TQVBox(dialog.plainPage()); vbox = new TQVBox(dialog.plainPage());
hbox->addWidget(vbox); hbox->addWidget(vbox);
(void)new TQLabel(i18n("Scores for the last %1 games:") (void)new TQLabel(i18n("Scores for the last %1 games:")
.tqarg(_nbGames[0]), vbox); .arg(_nbGames[0]), vbox);
(void)new TotalMultipleScoresList(ordered, vbox); (void)new TotalMultipleScoresList(ordered, vbox);
} }

@ -79,10 +79,10 @@ class KDE_EXPORT Item
* Be sure to cast the value to the required type (for e.g. with uint). * Be sure to cast the value to the required type (for e.g. with uint).
* @param label the label corresponding to the item. If empty, the item * @param label the label corresponding to the item. If empty, the item
* is not shown. * is not shown.
* @param tqalignment the tqalignment of the item. * @param alignment the alignment of the item.
*/ */
Item(const TQVariant &def = TQVariant::Invalid, Item(const TQVariant &def = TQVariant::Invalid,
const TQString &label = TQString(), int tqalignment = TQt::AlignRight); const TQString &label = TQString(), int alignment = TQt::AlignRight);
virtual ~Item(); virtual ~Item();
@ -114,9 +114,9 @@ class KDE_EXPORT Item
TQString label() const { return _label; } TQString label() const { return _label; }
/** /**
* @return the tqalignment. * @return the alignment.
*/ */
int tqalignment() const { return _tqalignment; } int alignment() const { return _alignment; }
/** /**
* Set default value. * Set default value.
@ -149,7 +149,7 @@ class KDE_EXPORT Item
private: private:
TQVariant _default; TQVariant _default;
TQString _label; TQString _label;
int _tqalignment; int _alignment;
Format _format; Format _format;
Special _special; Special _special;

@ -97,7 +97,7 @@ void AdditionalTab::allSelected()
TQString AdditionalTab::percent(uint n, uint total, bool withBraces) TQString AdditionalTab::percent(uint n, uint total, bool withBraces)
{ {
if ( n==0 || total==0 ) return TQString(); if ( n==0 || total==0 ) return TQString();
TQString s = TQString("%1%").tqarg(100.0 * n / total, 0, 'f', 1); TQString s = TQString("%1%").arg(100.0 * n / total, 0, 'f', 1);
return (withBraces ? TQString("(") + s + ")" : s); return (withBraces ? TQString("(") + s + ")" : s);
} }

@ -96,7 +96,7 @@ void KHighscore::init(const char *appname)
{ {
#ifdef HIGHSCORE_DIRECTORY #ifdef HIGHSCORE_DIRECTORY
const TQString filename = TQString::fromLocal8Bit("%1/%2.scores") const TQString filename = TQString::fromLocal8Bit("%1/%2.scores")
.tqarg(HIGHSCORE_DIRECTORY).tqarg(appname); .arg(HIGHSCORE_DIRECTORY).arg(appname);
int fd = open(filename.local8Bit(), O_RDWR); int fd = open(filename.local8Bit(), O_RDWR);
if ( fd<0 ) kdFatal(11002) << "cannot open global highscore file \"" if ( fd<0 ) kdFatal(11002) << "cannot open global highscore file \""
<< filename << "\"" << endl; << filename << "\"" << endl;
@ -169,7 +169,7 @@ void KHighscore::writeEntry(int entry, const TQString& key, const TQVariant& val
{ {
Q_ASSERT( isLocked() ); Q_ASSERT( isLocked() );
KConfigGroupSaver cg(config(), group()); KConfigGroupSaver cg(config(), group());
TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(key); TQString confKey = TQString("%1_%2").arg(entry).arg(key);
cg.config()->writeEntry(confKey, value); cg.config()->writeEntry(confKey, value);
} }
@ -177,7 +177,7 @@ void KHighscore::writeEntry(int entry, const TQString& key, int value)
{ {
Q_ASSERT( isLocked() ); Q_ASSERT( isLocked() );
KConfigGroupSaver cg(config(), group()); KConfigGroupSaver cg(config(), group());
TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(key); TQString confKey = TQString("%1_%2").arg(entry).arg(key);
cg.config()->writeEntry(confKey, value); cg.config()->writeEntry(confKey, value);
} }
@ -185,35 +185,35 @@ void KHighscore::writeEntry(int entry, const TQString& key, const TQString &valu
{ {
Q_ASSERT (isLocked() ); Q_ASSERT (isLocked() );
KConfigGroupSaver cg(config(), group()); KConfigGroupSaver cg(config(), group());
TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(key); TQString confKey = TQString("%1_%2").arg(entry).arg(key);
cg.config()->writeEntry(confKey, value); cg.config()->writeEntry(confKey, value);
} }
TQVariant KHighscore::readPropertyEntry(int entry, const TQString& key, const TQVariant& pDefault) const TQVariant KHighscore::readPropertyEntry(int entry, const TQString& key, const TQVariant& pDefault) const
{ {
KConfigGroupSaver cg(config(), group()); KConfigGroupSaver cg(config(), group());
TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(key); TQString confKey = TQString("%1_%2").arg(entry).arg(key);
return cg.config()->readPropertyEntry(confKey, pDefault); return cg.config()->readPropertyEntry(confKey, pDefault);
} }
TQString KHighscore::readEntry(int entry, const TQString& key, const TQString& pDefault) const TQString KHighscore::readEntry(int entry, const TQString& key, const TQString& pDefault) const
{ {
KConfigGroupSaver cg(config(), group()); KConfigGroupSaver cg(config(), group());
TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(key); TQString confKey = TQString("%1_%2").arg(entry).arg(key);
return cg.config()->readEntry(confKey, pDefault); return cg.config()->readEntry(confKey, pDefault);
} }
int KHighscore::readNumEntry(int entry, const TQString& key, int pDefault) const int KHighscore::readNumEntry(int entry, const TQString& key, int pDefault) const
{ {
KConfigGroupSaver cg(config(), group()); KConfigGroupSaver cg(config(), group());
TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(key); TQString confKey = TQString("%1_%2").arg(entry).arg(key);
return cg.config()->readNumEntry(confKey, pDefault); return cg.config()->readNumEntry(confKey, pDefault);
} }
bool KHighscore::hasEntry(int entry, const TQString& key) const bool KHighscore::hasEntry(int entry, const TQString& key) const
{ {
KConfigGroupSaver cg(config(), group()); KConfigGroupSaver cg(config(), group());
TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(key); TQString confKey = TQString("%1_%2").arg(entry).arg(key);
return cg.config()->hasKey(confKey); return cg.config()->hasKey(confKey);
} }
@ -248,7 +248,7 @@ TQString KHighscore::group() const
if ( highscoreGroup().isNull() ) if ( highscoreGroup().isNull() )
return (d->global ? TQString() : GROUP); return (d->global ? TQString() : GROUP);
return (d->global ? highscoreGroup() return (d->global ? highscoreGroup()
: TQString("%1_%2").tqarg(GROUP).tqarg(highscoreGroup())); : TQString("%1_%2").arg(GROUP).arg(highscoreGroup()));
} }
bool KHighscore::hasTable() const bool KHighscore::hasTable() const

@ -67,7 +67,7 @@ class KHighscorePrivate;
* single player, so the "best times" of a player. To write highscores for a * single player, so the "best times" of a player. To write highscores for a
* specific player in a specific level you will have to use a more complex way: * specific player in a specific level you will have to use a more complex way:
* \code * \code
* TQString group = TQString("%1_%2").tqarg(player).tqarg(level); * TQString group = TQString("%1_%2").arg(player).arg(level);
* table->setGroup(group); * table->setGroup(group);
* writeHighscore(table, player, level); * writeHighscore(table, player, level);
* \endcode * \endcode

@ -164,7 +164,7 @@ void KScoreDialog::setupDialog()
for (int i = 1; i <= 10; ++i) { for (int i = 1; i <= 10; ++i) {
TQLabel *label; TQLabel *label;
num.setNum(i); num.setNum(i);
label = new TQLabel(i18n("#%1").tqarg(num), d->page); label = new TQLabel(i18n("#%1").arg(num), d->page);
d->labels.insert((i-1)*d->nrCols + 0, label); d->labels.insert((i-1)*d->nrCols + 0, label);
d->tqlayout->addWidget(label, i+4, 0); d->tqlayout->addWidget(label, i+4, 0);
if (d->fields & Name) if (d->fields & Name)

@ -73,14 +73,14 @@ void KChatBaseText::init()
void KChatBaseText::setName(const TQString& n) void KChatBaseText::setName(const TQString& n)
{ {
// d->mName = n; // d->mName = n;
d->mName = TQString("%1: ").tqarg(n); d->mName = TQString("%1: ").arg(n);
setText(TQString("%1: %2").tqarg(name()).tqarg(message())); // esp. for sorting setText(TQString("%1: %2").arg(name()).arg(message())); // esp. for sorting
} }
void KChatBaseText::setMessage(const TQString& m) void KChatBaseText::setMessage(const TQString& m)
{ {
d->mMessage = m; d->mMessage = m;
setText(TQString("%1: %2").tqarg(name()).tqarg(message())); // esp. for sorting setText(TQString("%1: %2").arg(name()).arg(message())); // esp. for sorting
} }
const TQString& KChatBaseText::name() const const TQString& KChatBaseText::name() const
@ -368,7 +368,7 @@ TQListBoxItem* KChatBase::layoutMessage(const TQString& fromName, const TQString
//TODO KChatBasePixmap? Should change the font here! //TODO KChatBasePixmap? Should change the font here!
message = (TQListBoxItem*)new TQListBoxPixmap(pix, i18n("%1 %2").tqarg(fromName).tqarg(text.mid(3))); message = (TQListBoxItem*)new TQListBoxPixmap(pix, i18n("%1 %2").arg(fromName).arg(text.mid(3)));
} else { } else {
// the text is not edited in any way. just return an item // the text is not edited in any way. just return an item
KChatBaseText* m = new KChatBaseText(fromName, text); KChatBaseText* m = new KChatBaseText(fromName, text);
@ -384,7 +384,7 @@ TQListBoxItem* KChatBase::layoutSystemMessage(const TQString& fromName, const TQ
//TODO: KChatBaseConfigure? - e.g. color //TODO: KChatBaseConfigure? - e.g. color
// no need to check for /me etc. // no need to check for /me etc.
KChatBaseText* m = new KChatBaseText(i18n("--- %1").tqarg(fromName), text); KChatBaseText* m = new KChatBaseText(i18n("--- %1").arg(fromName), text);
m->setNameFont(&d->mSystemNameFont); m->setNameFont(&d->mSystemNameFont);
m->setMessageFont(&d->mSystemMessageFont); m->setMessageFont(&d->mSystemMessageFont);
return (TQListBoxItem*)m; return (TQListBoxItem*)m;
@ -406,7 +406,7 @@ void KChatBase::slotReturnPressed(const TQString& text)
TQString KChatBase::comboBoxItem(const TQString& name) const TQString KChatBase::comboBoxItem(const TQString& name) const
{ // TODO: such a function for "send to all" and "send to my group" { // TODO: such a function for "send to all" and "send to my group"
return i18n("Send to %1").tqarg(name); return i18n("Send to %1").arg(name);
} }
void KChatBase::slotClear() void KChatBase::slotClear()

@ -471,7 +471,7 @@ protected:
/** /**
* Replace to customise the combo box. * Replace to customise the combo box.
* *
* Default: i18n("Send to %1).tqarg(name) * Default: i18n("Send to %1).arg(name)
* @param name The name of the player * @param name The name of the player
* @return The string as it will be shown in the combo box * @return The string as it will be shown in the combo box
**/ **/

@ -743,7 +743,7 @@ void KGameDialogConnectionConfig::slotKickPlayerOut(TQListBoxItem* item)
return; return;
} }
if (KMessageBox::questionYesNo(this, i18n("Do you want to ban player \"%1\" from the game?").tqarg( if (KMessageBox::questionYesNo(this, i18n("Do you want to ban player \"%1\" from the game?").arg(
p->name()), TQString(), i18n("Ban Player"), i18n("Do Not Ban")) == KMessageBox::Yes) { p->name()), TQString(), i18n("Ban Player"), i18n("Do Not Ban")) == KMessageBox::Yes) {
kdDebug(11001) << "will remove player " << p << endl; kdDebug(11001) << "will remove player " << p << endl;
game()->removePlayer(p); game()->removePlayer(p);

@ -86,7 +86,7 @@ void KGameErrorDialog::slotClientConnectionLost(TQ_UINT32 /*id*/,bool)
//TODO: add IP/port of the client //TODO: add IP/port of the client
TQString message; TQString message;
// if (c) { // if (c) {
// message = i18n("Connection to client has been lost!\nID: %1\nIP: %2").tqarg(c->id()).tqarg(c->IP()); // message = i18n("Connection to client has been lost!\nID: %1\nIP: %2").arg(c->id()).arg(c->IP());
// } else { // } else {
// message = i18n("Connection to client has been lost!"); // message = i18n("Connection to client has been lost!");
// } // }
@ -96,7 +96,7 @@ void KGameErrorDialog::slotClientConnectionLost(TQ_UINT32 /*id*/,bool)
void KGameErrorDialog::slotError(int errorNo, TQString text) void KGameErrorDialog::slotError(int errorNo, TQString text)
{ {
TQString message = i18n("Received a network error!\nError number: %1\nError message: %2").tqarg(errorNo).tqarg(text); TQString message = i18n("Received a network error!\nError number: %1\nError message: %2").arg(errorNo).arg(text);
error(message, (TQWidget*)parent()); error(message, (TQWidget*)parent());
} }
@ -106,7 +106,7 @@ void KGameErrorDialog::connectionError(TQString s)
if (s.isNull()) { if (s.isNull()) {
message = i18n("No connection could be created."); message = i18n("No connection could be created.");
} else { } else {
message = i18n("No connection could be created.\nThe error message was:\n%1").tqarg(s); message = i18n("No connection could be created.\nThe error message was:\n%1").arg(s);
} }
error(message, (TQWidget*)parent()); error(message, (TQWidget*)parent());
} }

@ -433,7 +433,7 @@ public:
* @param msg the message which will be send. See messages.txt for contents * @param msg the message which will be send. See messages.txt for contents
* @param msgid an id for this message * @param msgid an id for this message
* @param sender the id of the sender * @param sender the id of the sender
* @param group the group of the tqreceivers * @param group the group of the receivers
* @return true if worked * @return true if worked
*/ */
bool sendGroupMessage(const TQByteArray& msg, int msgid, TQ_UINT32 sender, const TQString& group); bool sendGroupMessage(const TQByteArray& msg, int msgid, TQ_UINT32 sender, const TQString& group);

@ -92,7 +92,7 @@ void KGameChat::addMessage(int fromId, const TQString& text)
{ {
if (!d->mGame) { if (!d->mGame) {
kdWarning(11001) << "no KGame object has been set" << endl; kdWarning(11001) << "no KGame object has been set" << endl;
addMessage(i18n("Player %1").tqarg(fromId), text); addMessage(i18n("Player %1").arg(fromId), text);
} else { } else {
KPlayer* p = d->mGame->findPlayer(fromId); KPlayer* p = d->mGame->findPlayer(fromId);
if (p) { if (p) {
@ -165,7 +165,7 @@ bool KGameChat::isToPlayerMessage(int id) const
return d->mSendId2PlayerId.contains(id); } return d->mSendId2PlayerId.contains(id); }
TQString KGameChat::sendToPlayerEntry(const TQString& name) const TQString KGameChat::sendToPlayerEntry(const TQString& name) const
{ return i18n("Send to %1").tqarg(name); } { return i18n("Send to %1").arg(name); }
int KGameChat::playerId(int id) const int KGameChat::playerId(int id) const
{ {
@ -211,7 +211,7 @@ void KGameChat::setFromPlayer(KPlayer* p)
removeSendingEntry(d->mToMyGroup); removeSendingEntry(d->mToMyGroup);
} }
d->mToMyGroup = nextId(); d->mToMyGroup = nextId();
addSendingEntry(i18n("Send to My Group (\"%1\")").tqarg(p->group()), d->mToMyGroup); addSendingEntry(i18n("Send to My Group (\"%1\")").arg(p->group()), d->mToMyGroup);
} }
d->mFromPlayer = p; d->mFromPlayer = p;
kdDebug(11001) << k_funcinfo << " player=" << p << endl; kdDebug(11001) << k_funcinfo << " player=" << p << endl;

@ -60,7 +60,7 @@ TQString KGameError::errorText(int errorCode, TQDataStream& s)
TQ_INT32 cookie2; TQ_INT32 cookie2;
s >> cookie1; s >> cookie1;
s >> cookie2; s >> cookie2;
text = i18n("Cookie mismatch!\nExpected Cookie: %1\nReceived Cookie: %2").tqarg(cookie1).tqarg(cookie2); text = i18n("Cookie mismatch!\nExpected Cookie: %1\nReceived Cookie: %2").arg(cookie1).arg(cookie2);
break; break;
} }
case Version: case Version:
@ -69,11 +69,11 @@ TQString KGameError::errorText(int errorCode, TQDataStream& s)
TQ_INT32 version2; TQ_INT32 version2;
s >> version1; s >> version1;
s >> version2; s >> version2;
text = i18n("KGame Version mismatch!\nExpected Version: %1\nReceived Version: %2\n").tqarg(version1).tqarg(version2); text = i18n("KGame Version mismatch!\nExpected Version: %1\nReceived Version: %2\n").arg(version1).arg(version2);
break; break;
} }
default: default:
text = i18n("Unknown error code %1").tqarg(errorCode); text = i18n("Unknown error code %1").arg(errorCode);
} }
return text; return text;
} }

@ -174,13 +174,13 @@ TQString KGamePropertyHandler::propertyName(int id) const
TQString s; TQString s;
if (d->mIdDict.find(id)) { if (d->mIdDict.find(id)) {
if (d->mNameMap.contains(id)) { if (d->mNameMap.contains(id)) {
s = i18n("%1 (%2)").tqarg(d->mNameMap[id]).tqarg(id); s = i18n("%1 (%2)").arg(d->mNameMap[id]).arg(id);
} else { } else {
s = i18n("Unnamed - ID: %1").tqarg(id); s = i18n("Unnamed - ID: %1").arg(id);
} }
} else { } else {
// Should _never_ happen // Should _never_ happen
s = i18n("%1 unregistered").tqarg(id); s = i18n("%1 unregistered").arg(id);
} }
return s; return s;
} }

@ -228,9 +228,9 @@ void KMessageClient::processMessage (const TQByteArray &msg)
case KMessageServer::MSG_FORWARD: case KMessageServer::MSG_FORWARD:
{ {
TQ_UINT32 clientID; TQ_UINT32 clientID;
TQValueList <TQ_UINT32> tqreceivers; TQValueList <TQ_UINT32> receivers;
in_stream >> clientID >> tqreceivers; in_stream >> clientID >> receivers;
emit forwardReceived (in_buffer.readAll(), clientID, tqreceivers); emit forwardReceived (in_buffer.readAll(), clientID, receivers);
} }
break; break;

@ -284,7 +284,7 @@ signals:
senderID contains the ID of the client that sent the broadcast message. You can senderID contains the ID of the client that sent the broadcast message. You can
use this e.g. to send a reply message to only that client. use this e.g. to send a reply message to only that client.
tqreceivers contains the list of the clients that got the message. (If this list receivers contains the list of the clients that got the message. (If this list
only contains one number, this will be your client ID, and it was exclusivly only contains one number, this will be your client ID, and it was exclusivly
sent to you.) sent to you.)
@ -302,9 +302,9 @@ signals:
Then connect the broadcast signal to your slot that analyzes the message. Then connect the broadcast signal to your slot that analyzes the message.
@param msg The message that has been sent to us @param msg The message that has been sent to us
@param senderID The ID of the client which sent the message @param senderID The ID of the client which sent the message
@param tqreceivers All clients which receive this message @param receivers All clients which receive this message
*/ */
void forwardReceived (const TQByteArray &msg, TQ_UINT32 senderID, const TQValueList <TQ_UINT32> &tqreceivers); void forwardReceived (const TQByteArray &msg, TQ_UINT32 senderID, const TQValueList <TQ_UINT32> &receivers);
/** /**
This signal is emitted when the connection to the KMessageServer is broken. This signal is emitted when the connection to the KMessageServer is broken.

@ -245,7 +245,7 @@ KMessageProcess::KMessageProcess(TQObject *parent, TQString file) : KMessageIO(p
mProcessName=file; mProcessName=file;
mProcess=new KProcess; mProcess=new KProcess;
int id=0; int id=0;
*mProcess << mProcessName << TQString("%1").tqarg(id); *mProcess << mProcessName << TQString("%1").arg(id);
kdDebug(11001) << "@@@KMessageProcess::Init:Id= " << id << endl; kdDebug(11001) << "@@@KMessageProcess::Init:Id= " << id << endl;
kdDebug(11001) << "@@@KMessgeProcess::Init:Processname: " << mProcessName << endl; kdDebug(11001) << "@@@KMessgeProcess::Init:Processname: " << mProcessName << endl;
connect(mProcess, TQT_SIGNAL(receivedStdout(KProcess *, char *, int )), connect(mProcess, TQT_SIGNAL(receivedStdout(KProcess *, char *, int )),

@ -83,7 +83,7 @@ class KMessageServerPrivate;
TQ_UINT32 clientID; // the ID of the client that sent the broadcast request TQ_UINT32 clientID; // the ID of the client that sent the broadcast request
- TQByteArray << static_cast&lt;TQ_UINT32>( RETQ_FORWARD ) << client_list << raw_data - TQByteArray << static_cast&lt;TQ_UINT32>( RETQ_FORWARD ) << client_list << raw_data
TQValueList &lt;TQ_UINT32> client_list; // list of tqreceivers TQValueList &lt;TQ_UINT32> client_list; // list of receivers
When the server receives this message, it sends the following message to When the server receives this message, it sends the following message to
the clients in client_list: the clients in client_list:

@ -196,13 +196,13 @@ int KGameProgress::recalcValue(int range)
void KGameProgress::valueChange() void KGameProgress::valueChange()
{ {
tqrepaint(contentsRect(), FALSE); repaint(contentsRect(), FALSE);
emit percentageChanged(recalcValue(100)); emit percentageChanged(recalcValue(100));
} }
void KGameProgress::rangeChange() void KGameProgress::rangeChange()
{ {
tqrepaint(contentsRect(), FALSE); repaint(contentsRect(), FALSE);
emit percentageChanged(recalcValue(100)); emit percentageChanged(recalcValue(100));
} }

@ -587,7 +587,7 @@ void LSkatApp::slotStatusNames(){
if (!doc->IsRunning()) msg=i18n("No game running"); if (!doc->IsRunning()) msg=i18n("No game running");
else else
{ {
msg=i18n("%1 to move...").tqarg(doc->GetName(doc->GetCurrentPlayer())); msg=i18n("%1 to move...").arg(doc->GetName(doc->GetCurrentPlayer()));
} }
slotStatusMover(msg); slotStatusMover(msg);
} }
@ -677,11 +677,11 @@ bool LSkatApp::MakeInputDevice(int no)
tim=10000; tim=10000;
if (!host.isEmpty()) if (!host.isEmpty())
{ {
s=i18n("Remote connection to %1:%2...").tqarg(host).tqarg(port); s=i18n("Remote connection to %1:%2...").arg(host).arg(port);
} }
else else
{ {
s=i18n("Offering remote connection on port %1...").tqarg(port); s=i18n("Offering remote connection on port %1...").arg(port);
} }
progress=new TQProgressDialog(s, i18n("Abort"), tim, this,0,true ); progress=new TQProgressDialog(s, i18n("Abort"), tim, this,0,true );
progress->setCaption(i18n("Lieutenant Skat")); progress->setCaption(i18n("Lieutenant Skat"));

@ -135,7 +135,7 @@ void LSkatDoc::slotUpdateAllViews(LSkatView *sender)
for(w=pViewList->first(); w!=0; w=pViewList->next()) for(w=pViewList->first(); w!=0; w=pViewList->next())
{ {
if(w!=sender) if(w!=sender)
w->tqrepaint(); w->repaint();
} }
} }
} }

@ -216,7 +216,7 @@ public:
int cardvalues[14]; int cardvalues[14];
public slots: public slots:
/** calls tqrepaint() on all views connected to the document object and is called by the view by which the document has been changed. /** calls repaint() on all views connected to the document object and is called by the view by which the document has been changed.
* As this view normally repaints itself, it is excluded from the paintEvent. * As this view normally repaints itself, it is excluded from the paintEvent.
*/ */
void slotUpdateAllViews(LSkatView *sender); void slotUpdateAllViews(LSkatView *sender);

@ -403,7 +403,7 @@ void LSkatView::drawFinal(TQPainter *p)
TQRect brect1_3,brect2_3,brect3_3,brect4_3; TQRect brect1_3,brect2_3,brect3_3,brect4_3;
TQRect brect1_4,brect2_4,brect3_4,brect4_4; TQRect brect1_4,brect2_4,brect3_4,brect4_4;
// Calculate tqgeometry // Calculate geometry
line1=i18n("Game over"); line1=i18n("Game over");
rect=p->window(); rect=p->window();
//rect1.moveBy(0,FINAL_Y0-24); //rect1.moveBy(0,FINAL_Y0-24);
@ -429,11 +429,11 @@ void LSkatView::drawFinal(TQPainter *p)
} }
else if (sc0>sc1) else if (sc0>sc1)
{ {
line2=i18n("Player 1 - %1 won ").tqarg(getDocument()->GetName(0)); line2=i18n("Player 1 - %1 won ").arg(getDocument()->GetName(0));
} }
else else
{ {
line2=i18n("Player 2 - %1 won ").tqarg(getDocument()->GetName(1)); line2=i18n("Player 2 - %1 won ").arg(getDocument()->GetName(1));
} }
int hp=getDocument()->mPixTrump[trump].height()+5; int hp=getDocument()->mPixTrump[trump].height()+5;
rect=TQRect(0,hp>sumrect.height()?hp:sumrect.height(),p->window().width(),p->window().height()); rect=TQRect(0,hp>sumrect.height()?hp:sumrect.height(),p->window().width(),p->window().height());
@ -469,11 +469,11 @@ void LSkatView::drawFinal(TQPainter *p)
rect=brect3_3|brect3_4; rect=brect3_3|brect3_4;
ts[2]=ts[1]+rect.width()+30; ts[2]=ts[1]+rect.width()+30;
col4_3=i18n("%1 points").tqarg(pt0); col4_3=i18n("%1 points").arg(pt0);
rect=TQRect(0,0,p->window().width(),p->window().height()); rect=TQRect(0,0,p->window().width(),p->window().height());
brect4_3=p->boundingRect(rect,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop,col4_3); brect4_3=p->boundingRect(rect,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop,col4_3);
col4_4=i18n("%1 points").tqarg(pt1); col4_4=i18n("%1 points").arg(pt1);
rect=TQRect(0,0,p->window().width(),p->window().height()); rect=TQRect(0,0,p->window().width(),p->window().height());
brect4_4=p->boundingRect(rect,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop,col4_4); brect4_4=p->boundingRect(rect,TQt::AlignLeft|TQt::SingleLine|TQt::AlignTop,col4_4);
@ -492,7 +492,7 @@ void LSkatView::drawFinal(TQPainter *p)
p->setFont(font14); p->setFont(font14);
if (sc0>=120) if (sc0>=120)
{ {
line5=i18n("%1 won to nil. Congratulations!").tqarg(getDocument()->GetName(0)); line5=i18n("%1 won to nil. Congratulations!").arg(getDocument()->GetName(0));
rect=TQRect(0,sumrect.height()+10,p->window().width(),p->window().height()); rect=TQRect(0,sumrect.height()+10,p->window().width(),p->window().height());
brect5=p->boundingRect(rect,TQt::AlignHCenter|TQt::SingleLine|TQt::AlignTop,line5); brect5=p->boundingRect(rect,TQt::AlignHCenter|TQt::SingleLine|TQt::AlignTop,line5);
sumrect|=brect5; sumrect|=brect5;
@ -500,16 +500,16 @@ void LSkatView::drawFinal(TQPainter *p)
else if (sc0>=90) else if (sc0>=90)
{ {
if (sc0==90) if (sc0==90)
line5=i18n("%1 won with 90 points. Super!").tqarg(getDocument()->GetName(0)); line5=i18n("%1 won with 90 points. Super!").arg(getDocument()->GetName(0));
else else
line5=i18n("%1 won over 90 points. Super!").tqarg(getDocument()->GetName(0)); line5=i18n("%1 won over 90 points. Super!").arg(getDocument()->GetName(0));
rect=TQRect(0,sumrect.height()+10,p->window().width(),p->window().height()); rect=TQRect(0,sumrect.height()+10,p->window().width(),p->window().height());
brect5=p->boundingRect(rect,TQt::AlignHCenter|TQt::SingleLine|TQt::AlignTop,line5); brect5=p->boundingRect(rect,TQt::AlignHCenter|TQt::SingleLine|TQt::AlignTop,line5);
sumrect|=brect5; sumrect|=brect5;
} }
if (sc1>=120) if (sc1>=120)
{ {
line5=i18n("%1 won to nil. Congratulations!").tqarg(getDocument()->GetName(1)); line5=i18n("%1 won to nil. Congratulations!").arg(getDocument()->GetName(1));
rect=TQRect(0,sumrect.height()+10,p->window().width(),p->window().height()); rect=TQRect(0,sumrect.height()+10,p->window().width(),p->window().height());
brect5=p->boundingRect(rect,TQt::AlignHCenter|TQt::SingleLine|TQt::AlignTop,line5); brect5=p->boundingRect(rect,TQt::AlignHCenter|TQt::SingleLine|TQt::AlignTop,line5);
sumrect|=brect5; sumrect|=brect5;
@ -517,9 +517,9 @@ void LSkatView::drawFinal(TQPainter *p)
else if (sc1>=90) else if (sc1>=90)
{ {
if (sc1==90) if (sc1==90)
line5=i18n("%1 won with 90 points. Super!").tqarg(getDocument()->GetName(1)); line5=i18n("%1 won with 90 points. Super!").arg(getDocument()->GetName(1));
else else
line5=i18n("%1 won over 90 points. Super!").tqarg(getDocument()->GetName(1)); line5=i18n("%1 won over 90 points. Super!").arg(getDocument()->GetName(1));
rect=TQRect(0,sumrect.height()+10,p->window().width(),p->window().height()); rect=TQRect(0,sumrect.height()+10,p->window().width(),p->window().height());
brect5=p->boundingRect(rect,TQt::AlignHCenter|TQt::SingleLine|TQt::AlignTop,line5); brect5=p->boundingRect(rect,TQt::AlignHCenter|TQt::SingleLine|TQt::AlignTop,line5);
sumrect|=brect5; sumrect|=brect5;
@ -760,7 +760,7 @@ void LSkatView::paintEvent( TQPaintEvent * e)
TQPixmap pm(this->rect().size()); TQPixmap pm(this->rect().size());
TQPainter p; TQPainter p;
TQBrush brush; TQBrush brush;
p.tqbegin(TQT_TQPAINTDEVICE(&pm),this); p.begin(TQT_TQPAINTDEVICE(&pm),this);
brush.setPixmap( getDocument()->mPixBackground ); brush.setPixmap( getDocument()->mPixBackground );
p.fillRect(0,0,this->rect().width(),this->rect().height(),brush); p.fillRect(0,0,this->rect().width(),this->rect().height(),brush);
drawIntro(&p); drawIntro(&p);
@ -890,7 +890,7 @@ void LSkatView::introTimerReady()
} }
else if (introcnt<NO_OF_CARDS) else if (introcnt<NO_OF_CARDS)
{ {
tqrepaint(false); repaint(false);
} }
} }

@ -165,7 +165,7 @@
<property name="text"> <property name="text">
<string>Host:</string> <string>Host:</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignLeft</set> <set>AlignVCenter|AlignLeft</set>
</property> </property>
<property name="hAlign" stdset="0"> <property name="hAlign" stdset="0">
@ -194,7 +194,7 @@
<property name="text"> <property name="text">
<string>Port:</string> <string>Port:</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignLeft</set> <set>AlignVCenter|AlignLeft</set>
</property> </property>
<property name="hAlign" stdset="0"> <property name="hAlign" stdset="0">

@ -90,7 +90,7 @@ void KSpriteCache::deleteAllItems()
void KSpriteCache::deleteItem(TQString s,int no) void KSpriteCache::deleteItem(TQString s,int no)
{ {
TQCanvasItem *item; TQCanvasItem *item;
TQString name=s+TQString("_%1").tqarg(no); TQString name=s+TQString("_%1").arg(no);
//kdDebug(11002) << "KSpriteCache::deleteItem name=" << name << endl; //kdDebug(11002) << "KSpriteCache::deleteItem name=" << name << endl;
item=mItemDict[name]; item=mItemDict[name];
if (item) if (item)
@ -122,7 +122,7 @@ void KSpriteCache::deleteItem(TQCanvasItem *item)
TQCanvasItem *KSpriteCache::getItem(TQString name,int no) TQCanvasItem *KSpriteCache::getItem(TQString name,int no)
{ {
TQString dictname=name+TQString("_%1").tqarg(no); TQString dictname=name+TQString("_%1").arg(no);
TQCanvasItem *item=mItemDict[dictname]; TQCanvasItem *item=mItemDict[dictname];
//kdDebug(11002) << " -> getItem("<<name<<","<<no<<") =>"<<dictname<<endl; //kdDebug(11002) << " -> getItem("<<name<<","<<no<<") =>"<<dictname<<endl;
// Directly found item // Directly found item
@ -496,7 +496,7 @@ void KSpriteCache::createAnimations(KConfig *config,KSprite *sprite)
if (!sprite) return ; if (!sprite) return ;
for (int i=0;i<1000;i++) for (int i=0;i<1000;i++)
{ {
TQString anim=TQString("anim%1").tqarg(i); TQString anim=TQString("anim%1").arg(i);
if (config->hasKey(anim)) if (config->hasKey(anim))
{ {
//kdDebug(11002) << "Found animation key " << anim << endl; //kdDebug(11002) << "Found animation key " << anim << endl;

@ -148,12 +148,12 @@ void ScoreWidget::Paint(TQPainter *p,TQRect /*cliprect*/)
void ScoreWidget::setMove(int i) void ScoreWidget::setMove(int i)
{ {
TextLabel5->setText( TQString("%1").tqarg(i)); TextLabel5->setText( TQString("%1").arg(i));
} }
void ScoreWidget::setLevel(int i) void ScoreWidget::setLevel(int i)
{ {
TextLabel4->setText( TQString("%1").tqarg(i)); TextLabel4->setText( TQString("%1").arg(i));
} }
void ScoreWidget::setChance(int i) void ScoreWidget::setChance(int i)
@ -165,7 +165,7 @@ void ScoreWidget::setChance(int i)
else if (i<=-999) else if (i<=-999)
TextLabel6->setText(i18n("Loser")); TextLabel6->setText(i18n("Loser"));
else else
TextLabel6->setText(TQString("%1").tqarg(i)); TextLabel6->setText(TQString("%1").arg(i));
} }
void ScoreWidget::setPlayer(TQString s,int no) void ScoreWidget::setPlayer(TQString s,int no)

@ -81,7 +81,7 @@
<property name="text"> <property name="text">
<string>Hard</string> <string>Hard</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignVCenter|AlignRight</set> <set>AlignVCenter|AlignRight</set>
</property> </property>
</widget> </widget>

@ -70,7 +70,7 @@
<property name="text"> <property name="text">
<string>Name</string> <string>Name</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignCenter</set> <set>AlignCenter</set>
</property> </property>
</widget> </widget>
@ -81,7 +81,7 @@
<property name="text"> <property name="text">
<string>Won</string> <string>Won</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignCenter</set> <set>AlignCenter</set>
</property> </property>
</widget> </widget>
@ -97,7 +97,7 @@
<property name="text"> <property name="text">
<string>Lost</string> <string>Lost</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignCenter</set> <set>AlignCenter</set>
</property> </property>
</widget> </widget>
@ -118,7 +118,7 @@
<property name="text"> <property name="text">
<string>Sum</string> <string>Sum</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignCenter</set> <set>AlignCenter</set>
</property> </property>
</widget> </widget>
@ -129,7 +129,7 @@
<property name="text"> <property name="text">
<string>Aborted</string> <string>Aborted</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignCenter</set> <set>AlignCenter</set>
</property> </property>
</widget> </widget>
@ -201,7 +201,7 @@
<property name="text"> <property name="text">
<string>Drawn</string> <string>Drawn</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignCenter</set> <set>AlignCenter</set>
</property> </property>
</widget> </widget>

@ -69,7 +69,7 @@
<property name="text"> <property name="text">
<string>W</string> <string>W</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignCenter</set> <set>AlignCenter</set>
</property> </property>
</widget> </widget>
@ -80,7 +80,7 @@
<property name="text"> <property name="text">
<string>D</string> <string>D</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignCenter</set> <set>AlignCenter</set>
</property> </property>
</widget> </widget>
@ -91,7 +91,7 @@
<property name="text"> <property name="text">
<string>L</string> <string>L</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignCenter</set> <set>AlignCenter</set>
</property> </property>
</widget> </widget>
@ -102,7 +102,7 @@
<property name="text"> <property name="text">
<string>No</string> <string>No</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignCenter</set> <set>AlignCenter</set>
</property> </property>
</widget> </widget>
@ -113,7 +113,7 @@
<property name="text"> <property name="text">
<string>Bk</string> <string>Bk</string>
</property> </property>
<property name="tqalignment"> <property name="alignment">
<set>AlignCenter</set> <set>AlignCenter</set>
</property> </property>
</widget> </widget>

@ -509,7 +509,7 @@ void Kwin4App::slotGameOver(int status, KPlayer * p, KGame * /*me*/)
EndGame(TWin); EndGame(TWin);
else else
EndGame(TLost); EndGame(TLost);
TQString msg=i18n("%1 won the game. Please restart next round.").tqarg(doc->QueryName(((FARBE)p->userId()))); TQString msg=i18n("%1 won the game. Please restart next round.").arg(doc->QueryName(((FARBE)p->userId())));
slotStatusMsg(msg); slotStatusMsg(msg);
} }
else if (status==2) // Abort else if (status==2) // Abort

@ -601,7 +601,7 @@ bool Kwin4View::wrongPlayer(KPlayer *player,KGameIO::IOMode io)
clearError(); clearError();
int rnd=(kapp->random()%4) +1; int rnd=(kapp->random()%4) +1;
TQString m; TQString m;
m=TQString("text%1").tqarg(rnd); m=TQString("text%1").arg(rnd);
TQString ms; TQString ms;
if (rnd==1) ms=i18n("Hold on... the other player has not been yet..."); if (rnd==1) ms=i18n("Hold on... the other player has not been yet...");
else if (rnd==2) ms=i18n("Hold your horses..."); else if (rnd==2) ms=i18n("Hold your horses...");

Loading…
Cancel
Save