Rename old tq methods that no longer need a unique name

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

@ -315,7 +315,7 @@ void Atlantik::showSelectServer()
initNetworkObject();
connect(m_selectServer, TQT_SIGNAL(serverConnect(const TQString, int)), m_atlantikNetwork, TQT_SLOT(serverConnect(const TQString, int)));
connect(m_selectServer, TQT_SIGNAL(msgtqStatus(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotMsgtqStatus(const TQString &)));
connect(m_selectServer, TQT_SIGNAL(msgStatus(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotMsgStatus(const TQString &)));
m_selectServer->slotRefresh( m_config.connectOnStart );
}
@ -357,7 +357,7 @@ void Atlantik::showSelectGame()
connect(m_selectGame, TQT_SIGNAL(joinGame(int)), m_atlantikNetwork, TQT_SLOT(joinGame(int)));
connect(m_selectGame, TQT_SIGNAL(newGame(const TQString &)), m_atlantikNetwork, TQT_SLOT(newGame(const TQString &)));
connect(m_selectGame, TQT_SIGNAL(leaveServer()), TQT_TQOBJECT(this), TQT_SLOT(showSelectServer()));
connect(m_selectGame, TQT_SIGNAL(msgtqStatus(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotMsgtqStatus(const TQString &)));
connect(m_selectGame, TQT_SIGNAL(msgStatus(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotMsgStatus(const TQString &)));
}
void Atlantik::showSelectConfiguration()
@ -383,7 +383,7 @@ void Atlantik::showSelectConfiguration()
connect(m_selectConfiguration, TQT_SIGNAL(changeOption(int, const TQString &)), m_atlantikNetwork, TQT_SLOT(changeOption(int, const TQString &)));
connect(m_selectConfiguration, TQT_SIGNAL(buttonCommand(TQString)), m_atlantikNetwork, TQT_SLOT(writeData(TQString)));
connect(m_selectConfiguration, TQT_SIGNAL(iconSelected(const TQString &)), m_atlantikNetwork, TQT_SLOT(setImage(const TQString &)));
connect(m_selectConfiguration, TQT_SIGNAL(statusMessage(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotMsgtqStatus(const TQString &)));
connect(m_selectConfiguration, TQT_SIGNAL(statusMessage(const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotMsgStatus(const TQString &)));
}
void Atlantik::initBoard()
@ -475,12 +475,12 @@ void Atlantik::networkClosed(int status)
switch( status )
{
case KBufferedIO::involuntary:
slotMsgtqStatus( 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.").tqarg(m_atlantikNetwork->host()).tqarg(m_atlantikNetwork->port()), TQString("connect_no") );
showSelectServer();
break;
default:
if ( !m_atlantikNetwork->host().isEmpty() )
slotMsgtqStatus( i18n("Disconnected from %1:%2.").tqarg(m_atlantikNetwork->host()).tqarg(m_atlantikNetwork->port()), TQString("connect_no") );
slotMsgStatus( i18n("Disconnected from %1:%2.").tqarg(m_atlantikNetwork->host()).tqarg(m_atlantikNetwork->port()), TQString("connect_no") );
break;
}
}
@ -625,7 +625,7 @@ void Atlantik::slotMsgError(TQString msg)
serverMsgsAppend("Error: " + msg);
}
void Atlantik::slotMsgtqStatus(const TQString &message, const TQString &icon)
void Atlantik::slotMsgStatus(const TQString &message, const TQString &icon)
{
KMainWindow::statusBar()->changeItem(message, 1);
m_eventLog->addEvent(message, icon);
@ -730,7 +730,7 @@ void Atlantik::initNetworkObject()
m_atlantikNetwork = new AtlantikNetwork(m_atlanticCore);
connect(m_atlantikNetwork, TQT_SIGNAL(msgInfo(TQString)), TQT_TQOBJECT(this), TQT_SLOT(slotMsgInfo(TQString)));
connect(m_atlantikNetwork, TQT_SIGNAL(msgError(TQString)), TQT_TQOBJECT(this), TQT_SLOT(slotMsgError(TQString)));
connect(m_atlantikNetwork, TQT_SIGNAL(msgtqStatus(const TQString &, const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotMsgtqStatus(const TQString &, const TQString &)));
connect(m_atlantikNetwork, TQT_SIGNAL(msgStatus(const TQString &, const TQString &)), TQT_TQOBJECT(this), TQT_SLOT(slotMsgStatus(const TQString &, const TQString &)));
connect(m_atlantikNetwork, TQT_SIGNAL(msgChat(TQString, TQString)), TQT_TQOBJECT(this), TQT_SLOT(slotMsgChat(TQString, TQString)));
connect(m_atlantikNetwork, TQT_SIGNAL(connectionSuccess()), TQT_TQOBJECT(this), TQT_SLOT(slotNetworkConnected()));

@ -188,7 +188,7 @@ public slots:
*/
void slotMsgInfo(TQString msg);
void slotMsgtqStatus(const TQString &message, const TQString &icon = TQString());
void slotMsgStatus(const TQString &message, const TQString &icon = TQString());
/**
* Informs serverMsgs() to append an incoming message from the

@ -53,7 +53,7 @@ ConfigDialog::ConfigDialog(Atlantik* parent, const char *name) : KDialogBase(Ico
configBoard = new ConfigBoard(this, p_board, "configBoard");
configMonopigator = new ConfigMonopigator(this, p_monopigator, "configMonopigator");
setMinimumSize(tqsizeHint());
setMinimumSize(sizeHint());
}
bool ConfigDialog::chatTimestamps()

@ -37,7 +37,7 @@ EventLog::EventLog()
void EventLog::addEvent(const TQString &description, const TQString &icon)
{
Event *event = new Event(TQDateTime::tqcurrentDateTime(), description, icon);
Event *event = new Event(TQDateTime::currentDateTime(), description, icon);
m_events.append(event);
emit newEvent(event);
}
@ -113,7 +113,7 @@ void EventLogWidget::save()
{
TQTextStream stream(&file);
stream << i18n( "Atlantik log file, saved at %1." ).tqarg( TQDateTime::tqcurrentDateTime().toString("yyyy-MM-dd hh:mm:ss") ) << endl;
stream << i18n( "Atlantik log file, saved at %1." ).tqarg( TQDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss") ) << endl;
TQPtrList<Event> events = m_eventLog->events();
for (TQPtrListIterator<Event> it( events ); (*it) ; ++it)

@ -46,7 +46,7 @@ void Monopigator::loadData(const KURL &url)
m_downloadData->reset();
m_job = KIO::get(url, true, false);
m_job->addMetaData(TQString::tqfromLatin1("UserAgent"), TQString::tqfromLatin1("Atlantik/" ATLANTIK_VERSION_STRING));
m_job->addMetaData(TQString::fromLatin1("UserAgent"), TQString::fromLatin1("Atlantik/" ATLANTIK_VERSION_STRING));
if (!m_timer)
{

@ -52,7 +52,7 @@ signals:
void joinGame(int gameId);
void newGame(const TQString &gameType);
void leaveServer();
void msgtqStatus(const TQString &status);
void msgStatus(const TQString &status);
private:
TQListViewItem *findItem(Game *game);

@ -42,12 +42,12 @@ SelectServer::SelectServer(bool useMonopigatorOnStart, bool hideDevelopmentServe
TQLabel *hostLabel = new TQLabel(i18n("Hostname:"), customGroup);
m_hostEdit = new KLineEdit(customGroup);
m_hostEdit->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Minimum));
m_hostEdit->setSizePolicy(TQSizePolicy(TQSizePolicy::MinimumExpanding, TQSizePolicy::Minimum));
TQLabel *portLabel = new TQLabel(i18n("Port:"), customGroup);
m_portEdit = new KLineEdit(TQString::number(1234), customGroup);
m_portEdit->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Minimum));
m_portEdit->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Minimum));
KPushButton *connectButton = new KPushButton( KGuiItem(i18n("Connect"), "network"), customGroup);
connect(connectButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(customConnect()));
@ -113,7 +113,7 @@ void SelectServer::setHideDevelopmentServers(bool hideDevelopmentServers)
void SelectServer::initMonopigator()
{
// Hardcoded, but there aren't any other Monopigator root servers at the moment
emit msgtqStatus(i18n("Retrieving server list..."));
emit msgStatus(i18n("Retrieving server list..."));
m_refreshButton->setGuiItem(KGuiItem(i18n("Reload Server List"), "reload"));
m_monopigator->loadData(KURL( "http://monopd-gator.kde.org/"));
@ -135,13 +135,13 @@ void SelectServer::slotMonopigatorAdd(TQString ip, TQString host, TQString port,
void SelectServer::monopigatorFinished()
{
emit msgtqStatus(i18n("Retrieved server list."));
emit msgStatus(i18n("Retrieved server list."));
m_refreshButton->setEnabled(true);
}
void SelectServer::monopigatorTimeout()
{
emit msgtqStatus(i18n("Error while retrieving the server list."));
emit msgStatus(i18n("Error while retrieving the server list."));
m_refreshButton->setEnabled(true);
}

@ -57,7 +57,7 @@ private slots:
signals:
void serverConnect(const TQString host, int port);
void msgtqStatus(const TQString &message);
void msgStatus(const TQString &message);
void showDevelopmentServers(bool show);
private:

@ -32,7 +32,7 @@ Auction::~Auction()
emit completed();
}
void Auction::settqStatus(int status)
void Auction::setStatus(int status)
{
if (m_status != status)
{

@ -36,7 +36,7 @@ public:
int auctionId() { return m_auctionId; }
Estate *estate() { return m_estate; }
void settqStatus(int status);
void setStatus(int status);
int status() { return m_status; }
void newBid(Player *player, int bid);

@ -872,7 +872,7 @@ void AtlantikNetwork::processNode(TQDomNode n)
if (auction && !a.isNull())
{
int status = a.value().toInt();
auction->settqStatus(status);
auction->setStatus(status);
// TODO: find a good way to visualise "sold!"
if (status == 3)
@ -906,23 +906,23 @@ void AtlantikNetwork::serverConnect(const TQString host, int port)
{
setAddress(host, port);
enableRead(true);
emit msgtqStatus(i18n("Connecting to %1:%2...").tqarg(host).tqarg(TQString::number(port)), "connect_creating");
emit msgStatus(i18n("Connecting to %1:%2...").tqarg(host).tqarg(TQString::number(port)), "connect_creating");
startAsyncConnect();
}
void AtlantikNetwork::slotLookupFinished(int count)
{
emit msgtqStatus(i18n("Server host name lookup finished..."));
emit msgStatus(i18n("Server host name lookup finished..."));
}
void AtlantikNetwork::slotConnectionSuccess()
{
emit msgtqStatus(i18n("Connected to %1:%2.").tqarg(host()).tqarg(port()), "connect_established");
emit msgStatus(i18n("Connected to %1:%2.").tqarg(host()).tqarg(port()), "connect_established");
}
void AtlantikNetwork::slotConnectionFailed(int error)
{
emit msgtqStatus(i18n("Connection failed! Error code: %1").tqarg(error), "connect_no");
emit msgStatus(i18n("Connection failed! Error code: %1").tqarg(error), "connect_no");
}
#include "atlantik_network.moc"

@ -102,7 +102,7 @@ signals:
void msgInfo(TQString);
void msgError(TQString);
void msgChat(TQString, TQString);
void msgtqStatus(const TQString &data, const TQString &icon = TQString());
void msgStatus(const TQString &data, const TQString &icon = TQString());
void networkEvent(const TQString &data, const TQString &icon);
void displayDetails(TQString text, bool clearText, bool clearButtons, Estate *estate = 0);

@ -36,12 +36,12 @@ MonopdProtocol::MonopdProtocol() : TQObject()
void MonopdProtocol::auctionEstate()
{
sendData(TQString::tqfromLatin1(".ea"));
sendData(TQString::fromLatin1(".ea"));
}
void MonopdProtocol::buyEstate()
{
sendData(TQString::tqfromLatin1(".eb"));
sendData(TQString::fromLatin1(".eb"));
}
void MonopdProtocol::confirmTokenLocation(Estate *estate)
@ -53,12 +53,12 @@ void MonopdProtocol::confirmTokenLocation(Estate *estate)
void MonopdProtocol::endTurn()
{
sendData(TQString::tqfromLatin1(".E"));
sendData(TQString::fromLatin1(".E"));
}
void MonopdProtocol::rollDice()
{
sendData(TQString::tqfromLatin1(".r"));
sendData(TQString::fromLatin1(".r"));
}
void MonopdProtocol::setName(TQString name)
@ -70,7 +70,7 @@ void MonopdProtocol::setName(TQString name)
void MonopdProtocol::startGame()
{
sendData(TQString::tqfromLatin1(".gs"));
sendData(TQString::fromLatin1(".gs"));
}
void MonopdProtocol::sendData(TQString)

@ -80,7 +80,7 @@ AuctionWidget::AuctionWidget(AtlanticCore *atlanticCore, Auction *auction, TQWid
KPushButton *bidButton = new KPushButton(i18n("Make Bid"), bidBox, "bidButton");
connect(bidButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotBidButtonClicked()));
// tqStatus label
// Status label
m_statusLabel = new TQLabel(this, "statusLabel");
m_mainLayout->addWidget(m_statusLabel);
}

@ -76,7 +76,7 @@ void KALedMeter::drawContents( TQPainter *p )
unsigned cidx = 0;
int ncol = mCount;
TQColor col = tqcolorGroup().foreground();
TQColor col = colorGroup().foreground();
if ( !mCRanges.isEmpty() )
{

@ -102,7 +102,7 @@ KAstTopLevel::KAstTopLevel()
label = new TQLabel( i18n("Score"), mainWin );
label->setFont( labelFont );
label->setPalette( pal );
label->setFixedWidth( label->tqsizeHint().width() );
label->setFixedWidth( label->sizeHint().width() );
hb->addWidget( label );
scoreLCD = new TQLCDNumber( 6, mainWin );
@ -116,7 +116,7 @@ KAstTopLevel::KAstTopLevel()
label = new TQLabel( i18n("Level"), mainWin );
label->setFont( labelFont );
label->setPalette( pal );
label->setFixedWidth( label->tqsizeHint().width() );
label->setFixedWidth( label->sizeHint().width() );
hb->addWidget( label );
levelLCD = new TQLCDNumber( 2, mainWin );
@ -129,7 +129,7 @@ KAstTopLevel::KAstTopLevel()
label = new TQLabel( i18n("Ships"), mainWin );
label->setFont( labelFont );
label->setFixedWidth( label->tqsizeHint().width() );
label->setFixedWidth( label->sizeHint().width() );
label->setPalette( pal );
hb->addWidget( label );
@ -168,7 +168,7 @@ KAstTopLevel::KAstTopLevel()
/*
label = new TQLabel( i18n( "T" ), mainWin );
label->setFont( smallFont );
label->setFixedWidth( label->tqsizeHint().width() );
label->setFixedWidth( label->sizeHint().width() );
label->setPalette( pal );
hbd->addWidget( label );
@ -184,7 +184,7 @@ KAstTopLevel::KAstTopLevel()
TQPixmap pm( sprites_prefix + "powerups/brake.png" );
label = new TQLabel( mainWin );
label->setPixmap( pm );
label->setFixedWidth( label->tqsizeHint().width() );
label->setFixedWidth( label->sizeHint().width() );
label->setPalette( pal );
hbd->addWidget( label );
@ -200,7 +200,7 @@ KAstTopLevel::KAstTopLevel()
pm.load( sprites_prefix + "powerups/shield.png" );
label = new TQLabel( mainWin );
label->setPixmap( pm );
label->setFixedWidth( label->tqsizeHint().width() );
label->setFixedWidth( label->sizeHint().width() );
label->setPalette( pal );
hbd->addWidget( label );
@ -216,7 +216,7 @@ KAstTopLevel::KAstTopLevel()
pm.load( sprites_prefix + "powerups/shoot.png" );
label = new TQLabel( mainWin );
label->setPixmap( pm );
label->setFixedWidth( label->tqsizeHint().width() );
label->setFixedWidth( label->sizeHint().width() );
label->setPalette( pal );
hbd->addWidget( label );
@ -231,7 +231,7 @@ KAstTopLevel::KAstTopLevel()
label = new TQLabel( i18n( "Fuel" ), mainWin );
label->setFont( smallFont );
label->setFixedWidth( label->tqsizeHint().width() + 10 );
label->setFixedWidth( label->sizeHint().width() + 10 );
label->setPalette( pal );
hbd->addWidget( label );

@ -78,7 +78,7 @@ KAsteroidsView::KAsteroidsView( TQWidget *parent, const char *name )
field.setBackgroundColor(black);
TQPixmap pm( locate("sprite", IMG_BACKGROUND) );
field.tqsetBackgroundPixmap( pm );
field.setBackgroundPixmap( pm );
textSprite = new TQCanvasText( &field );
TQFont font( KGlobalSettings::generalFont().family(), 18 );

@ -124,7 +124,7 @@ void Feld::mousePressEvent (TQMouseEvent *e)
resetValidDirs();
chosen = false;
}
emittqStatus();
emitStatus();
}
const atom& Feld::getAtom(uint index) const
@ -154,7 +154,7 @@ void Feld::nextAtom()
xpos = x; ypos = y;
chosen = true;
resetValidDirs();
emittqStatus();
emitStatus();
return;
}
}
@ -187,7 +187,7 @@ void Feld::previousAtom()
xpos = x; ypos = y;
chosen = true;
resetValidDirs();
emittqStatus();
emitStatus();
return;
}
}
@ -198,7 +198,7 @@ void Feld::previousAtom()
}
void Feld::emittqStatus()
void Feld::emitStatus()
{
if (!chosen || moving) {}
else {
@ -231,7 +231,7 @@ void Feld::done ()
if (moving)
return;
emittqStatus();
emitStatus();
if (checkDone())
emit gameOver(moves);

@ -65,7 +65,7 @@ protected:
void paintMovingAtom();
void mousePressEvent (TQMouseEvent *);
void mouseMoveEvent (TQMouseEvent *);
void emittqStatus();
void emitStatus();
protected:
struct UndoInfo {

@ -214,7 +214,7 @@ GameWidget::GameWidget ( TQWidget *parent, const char* name )
headerFont.setBold(true);
hs = new TQLabel (highest, bg);
hs->tqsetAlignment(TQt::AlignRight);
hs->setAlignment(TQt::AlignRight);
hs->setFont(headerFont);
slay->addWidget(hs);
@ -223,7 +223,7 @@ GameWidget::GameWidget ( TQWidget *parent, const char* name )
slay->addWidget(new TQLabel(i18n("Your score so far:"), bg));
ys = new TQLabel (current, bg);
ys->tqsetAlignment(TQt::AlignRight);
ys->setAlignment(TQt::AlignRight);
ys->setFont(headerFont);
slay->addWidget(ys);

@ -947,7 +947,7 @@ void KBgEngineFIBS::connected()
/*
* Initialize the rx state machine
*/
rxtqStatus = RxConnect;
rxStatus = RxConnect;
rxCollect = "";
/*
@ -992,7 +992,7 @@ void KBgEngineFIBS::newAccount()
if (!queryConnection(true))
return;
rxtqStatus = RxNewLogin;
rxStatus = RxNewLogin;
rxCollect = "";
login = false;
connectFIBS();
@ -1289,7 +1289,7 @@ void KBgEngineFIBS::handleServerData(TQString &line)
*/
line.replace(pat[TabChar], " ");
switch (rxtqStatus) {
switch (rxStatus) {
case RxConnect:
handleMessageConnect(line, rawline);
@ -1345,7 +1345,7 @@ void KBgEngineFIBS::handleMessageWhois(const TQString &line)
{
rxCollect += "<br>&nbsp;&nbsp;&nbsp;&nbsp;" + line;
if (line.contains(pat[WhoisE1]) || line.contains(pat[WhoisE2])) {
rxtqStatus = RxNormal;
rxStatus = RxNormal;
emit infoText("<font color=\"darkgreen\">" + rxCollect + "<br></font>");
}
}
@ -1358,7 +1358,7 @@ void KBgEngineFIBS::handleMessageRating(const TQString &line)
rxCollect += "<br>" + line;
if (line.contains(pat[EndRate]) && ++rxCount == 2) {
emit infoText("<font color=\"blue\">" + rxCollect + "<br></font>");
rxtqStatus = RxNormal;
rxStatus = RxNormal;
}
}
@ -1368,7 +1368,7 @@ void KBgEngineFIBS::handleMessageRating(const TQString &line)
void KBgEngineFIBS::handleMessageMotd(const TQString &line)
{
if (line.contains(pat[MotdEnd])) {
rxtqStatus = RxNormal;
rxStatus = RxNormal;
emit infoText("<font color=\"blue\"><pre>" + rxCollect + "</pre></font>");
/*
* just to be on the safe side, we set the value of boardstyle.
@ -1398,7 +1398,7 @@ void KBgEngineFIBS::handleMessageConnect(const TQString &line, const TQString &r
* This can only happen if the password/login is wrong.
*/
if (rxCollect.isEmpty()) {
rxtqStatus = RxIgnore;
rxStatus = RxIgnore;
int ret = KMessageBox::warningContinueCancel
((TQWidget *)parent(), i18n("There was a problem with "
"your login and password. "
@ -1411,9 +1411,9 @@ void KBgEngineFIBS::handleMessageConnect(const TQString &line, const TQString &r
infoFIBS[FIBSUser] = "";
infoFIBS[FIBSPswd] = "";
login = true;
connectFIBS(); // will reset the rxtqStatus
connectFIBS(); // will reset the rxStatus
} else {
rxtqStatus = RxConnect;
rxStatus = RxConnect;
emit serverString("");
emit serverString("");
}
@ -1473,7 +1473,7 @@ void KBgEngineFIBS::handleMessageConnect(const TQString &line, const TQString &r
*/
if (line.contains(pat[OwnInfo])) {
rxtqStatus = RxNormal;
rxStatus = RxNormal;
int fibsOptions[NumFIBSOpt];
@ -1538,7 +1538,7 @@ void KBgEngineFIBS::handleMessageConnect(const TQString &line, const TQString &r
* The beginning of a new login procedure starts starts here
*/
if (line.contains(pat[OneName])) {
rxtqStatus = RxNewLogin;
rxStatus = RxNewLogin;
emit infoText(TQString("<font color=\"red\">") + rxCollect + "</font>");
rxCollect = "";
TQString tmp = rawline;
@ -1613,7 +1613,7 @@ void KBgEngineFIBS::handleMessageNewLogin(const TQString &line)
"playing backgammon on FIBS.").tqarg(infoFIBS[FIBSUser]);
emit infoText("<br><hr><font color=\"blue\">" + text + "</font><br><hr>");
emit serverString("bye");
rxtqStatus = RxNormal;
rxStatus = RxNormal;
rxCollect = "";
return;
}
@ -1717,7 +1717,7 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline)
/*
* Save the board string and create a new game state
*/
KBgtqStatus *st = new KBgtqStatus(currBoard = rawline);
KBgStatus *st = new KBgStatus(currBoard = rawline);
/*
* Save important state data and stop the timeout
@ -1779,13 +1779,13 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline)
*/
else if (line.contains(pat[YouAway])) {
emit changePlayertqStatus(infoFIBS[FIBSUser], KFibsPlayerList::Away, true);
emit changePlayerStatus(infoFIBS[FIBSUser], KFibsPlayerList::Away, true);
actBack->setEnabled(true);
line += "<br><pre> </pre>" + i18n("(or use the corresponding menu entry to join the match)");
}
else if (line.contains(pat[YouBack])) {
emit changePlayertqStatus(infoFIBS[FIBSUser], KFibsPlayerList::Away, false);
emit changePlayerStatus(infoFIBS[FIBSUser], KFibsPlayerList::Away, false);
actBack->setEnabled(false);
actAway->setEnabled(true);
}
@ -1863,23 +1863,23 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline)
// - rx status changes ------------------------------------------------------------
else if (line.contains(pat[WhoisBG])) {
rxtqStatus = RxWhois;
rxStatus = RxWhois;
rxCollect = TQString("<br><u>") + line + "</u>";
return;
}
else if (line.contains(pat[MotdBeg])) {
rxtqStatus = RxMotd;
rxStatus = RxMotd;
rxCollect = "";
return;
}
else if (line.contains(pat[BegRate])) {
rxtqStatus = RxRating;
rxStatus = RxRating;
rxCount = 0;
rxCollect = "<br>" + line;
return;
}
else if (line.contains(pat[Goodbye])) {
rxtqStatus = RxGoodbye;
rxStatus = RxGoodbye;
rxCollect = "<br><hr><br>";
handleServerData(rawline); // danger: recursion!
return;
@ -1944,13 +1944,13 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline)
else if (line.contains(pat[BegBlnd])) {
rawline.replace(pat[BegBlnd], "");
rawline.truncate(rawline.length()-1);
emit changePlayertqStatus(rawline, KFibsPlayerList::Blind, true);
emit changePlayerStatus(rawline, KFibsPlayerList::Blind, true);
line = "<font color=\"red\">" + line + "</font>";
}
else if (line.contains(pat[EndBlnd])) {
rawline.replace(pat[EndBlnd], "");
rawline.truncate(rawline.length()-1);
emit changePlayertqStatus(rawline, KFibsPlayerList::Blind, false);
emit changePlayerStatus(rawline, KFibsPlayerList::Blind, false);
line = "<font color=\"red\">" + line + "</font>";
}
/*
@ -2128,8 +2128,8 @@ KBgEngineFIBS::KBgEngineFIBS(TQWidget *parent, TQString *name, TQPopupMenu *pmen
connect(this, TQT_SIGNAL(fibsLogout (const TQString &)), playerlist, TQT_SLOT(deletePlayer(const TQString &)));
connect(this, TQT_SIGNAL(fibsWhoEnd()), playerlist, TQT_SLOT(stopUpdate()));
connect(this, TQT_SIGNAL(fibsConnectionClosed()), playerlist, TQT_SLOT(stopUpdate()));
connect(this, TQT_SIGNAL(changePlayertqStatus(const TQString &, int, bool)),
playerlist, TQT_SLOT(changePlayertqStatus(const TQString &, int, bool)));
connect(this, TQT_SIGNAL(changePlayerStatus(const TQString &, int, bool)),
playerlist, TQT_SLOT(changePlayerStatus(const TQString &, int, bool)));
connect(playerlist, TQT_SIGNAL(fibsCommand(const TQString &)), this, TQT_SLOT(handleCommand(const TQString &)));
connect(playerlist, TQT_SIGNAL(fibsInvite(const TQString &)), this, TQT_SLOT(fibsRequestInvitation(const TQString &)));

@ -175,7 +175,7 @@ signals:
void fibsConnectionClosed();
void changePlayertqStatus(const TQString &, int, bool);
void changePlayerStatus(const TQString &, int, bool);
void chatMessage(const TQString &msg);
@ -199,7 +199,7 @@ private:
TQString currBoard, caption;
//KBgtqStatus *currBoard
//KBgStatus *currBoard
//KBgFIBSBoard *boardHandler;
TQStringList invitations;
@ -400,10 +400,10 @@ protected slots:
protected:
enum RxtqStatus {RxIgnore, RxConnect, RxWhois, RxMotd, RxRating,
enum RxStatus {RxIgnore, RxConnect, RxWhois, RxMotd, RxRating,
RxNewLogin, RxGoodbye, RxNormal};
int rxtqStatus, rxCount;
int rxStatus, rxCount;
TQString rxCollect;

@ -123,7 +123,7 @@ protected:
*/
virtual void paint(TQPainter *p)
{
t->draw(p, 1, 1, TQRegion(p->viewport()), w->tqcolorGroup());
t->draw(p, 1, 1, TQRegion(p->viewport()), w->colorGroup());
}
private:

@ -103,9 +103,9 @@ KBgInvite::KBgInvite(const char *name)
* Adjust widget sizes and resize the dialog
*/
KDialog::resizeLayout(this, marginHint(), spacingHint());
setMinimumSize(tqchildrenRect().size());
setMinimumSize(childrenRect().size());
vbox->activate();
resize(tqminimumSize());
resize(minimumSize());
/*
* Set focus and default buttons

@ -101,7 +101,7 @@ public:
case KFibsPlayerList::Watches:
case KFibsPlayerList::Client:
case KFibsPlayerList::Email:
case KFibsPlayerList::tqStatus:
case KFibsPlayerList::Status:
case KFibsPlayerList::Host:
s = s.lower();
break;
@ -175,7 +175,7 @@ public:
/*
* Short abbreviations for Blind, Ready, and Away.
*/
TQString mAbrv[KFibsPlayerList::MaxtqStatus];
TQString mAbrv[KFibsPlayerList::MaxStatus];
/*
* Name of the last selected player - for internal purposes
@ -218,7 +218,7 @@ KFibsPlayerList::KFibsPlayerList(TQWidget *parent, const char *name)
d->mCol[Player]->name = i18n("Player");
d->mCol[Opponent]->name = i18n("Opponent");
d->mCol[Watches]->name = i18n("Watches");
d->mCol[tqStatus]->name = i18n("Status");
d->mCol[Status]->name = i18n("Status");
d->mCol[Rating]->name = i18n("Rating");
d->mCol[Experience]->name = i18n("Exp.");
d->mCol[Idle]->name = i18n("Idle");
@ -231,7 +231,7 @@ KFibsPlayerList::KFibsPlayerList(TQWidget *parent, const char *name)
d->mCol[Player]->key = "player";
d->mCol[Opponent]->key = "opponent";
d->mCol[Watches]->key = "watches";
d->mCol[tqStatus]->key = "status";
d->mCol[Status]->key = "status";
d->mCol[Rating]->key = "rating";
d->mCol[Experience]->key = "experience";
d->mCol[Idle]->key = "idle";
@ -592,9 +592,9 @@ void KFibsPlayerList::showContextMenu(KListView *, TQListViewItem *i, const TQPo
d->mMail = (i && d->mCol[Email]->show ? i->text(d->mCol[Email]->index) : TQString());
d->mAct[KFibsPlayerListPrivate::Mail]->setEnabled(!d->mMail.isEmpty());
if (i && d->mCol[tqStatus]->show)
if (i && d->mCol[Status]->show)
d->mAct[KFibsPlayerListPrivate::BlindAct]->setText
((i->text(d->mCol[tqStatus]->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));
else
d->mAct[KFibsPlayerListPrivate::BlindAct]->setText(i18n("Blind"));
@ -721,7 +721,7 @@ void KFibsPlayerList::changePlayer(const TQString &line)
TQDateTime fromEpoch;
TQString str_entry[LVEnd], tmp;
entry[tqStatus][0] = '\0';
entry[Status][0] = '\0';
// the line comes from FIBS and is 7 bit ASCII
sscanf(line.latin1(), "%99s %99s %99s %1s %1s %99s %99s %99s %99s %99s %99s %99s", entry[Player], entry[Opponent],
@ -738,9 +738,9 @@ void KFibsPlayerList::changePlayer(const TQString &line)
if ((str_entry[j] = entry[j]) == "-")
str_entry[j] = "";
}
str_entry[tqStatus].replace(Ready, 1, ready[0] == '0' ? "-" : d->mAbrv[Ready]);
str_entry[tqStatus].replace(Away, 1, away [0] == '0' ? "-" : d->mAbrv[Away ]);
str_entry[tqStatus].replace(Blind, 1, "-");
str_entry[Status].replace(Ready, 1, ready[0] == '0' ? "-" : d->mAbrv[Ready]);
str_entry[Status].replace(Away, 1, away [0] == '0' ? "-" : d->mAbrv[Away ]);
str_entry[Status].replace(Blind, 1, "-");
// disable drawing until the end of update
setUpdatesEnabled(false);
@ -771,7 +771,7 @@ void KFibsPlayerList::changePlayer(const TQString &line)
found:
// getting here means the player is in the list - update private status
str_entry[tqStatus].replace(Blind,1,i->text(tqStatus).contains
str_entry[Status].replace(Blind,1,i->text(Status).contains
(d->mAbrv[Blind]) ? d->mAbrv[Blind] : "-");
update:
@ -808,7 +808,7 @@ void KFibsPlayerList::deletePlayer(const TQString &player)
/*
* Set/Unset the status stat in the corresponding column of the list
*/
void KFibsPlayerList::changePlayertqStatus(const TQString &player, int stat, bool flag)
void KFibsPlayerList::changePlayerStatus(const TQString &player, int stat, bool flag)
{
TQListViewItem *i = 0;
@ -827,7 +827,7 @@ void KFibsPlayerList::changePlayertqStatus(const TQString &player, int stat, boo
/*
* Update the status flag
*/
i->setText(tqStatus, i->text(tqStatus).replace(stat, 1, (flag) ? d->mAbrv[stat] : "-"));
i->setText(Status, i->text(Status).replace(stat, 1, (flag) ? d->mAbrv[stat] : "-"));
}

@ -53,12 +53,12 @@ public:
/**
* Enumerate player status
*/
enum PtqStatus {Ready, Away, Blind, MaxtqStatus};
enum PStatus {Ready, Away, Blind, MaxStatus};
/**
* Enumerate the different columns of the list
*/
enum {Player, Opponent, Watches, tqStatus, Rating, Experience,
enum {Player, Opponent, Watches, Status, Rating, Experience,
Idle, Time, Host, Client, Email, LVEnd};
/**
@ -111,7 +111,7 @@ public slots:
/**
* Change the status of a player
*/
void changePlayertqStatus(const TQString &player, int stat, bool flag);
void changePlayerStatus(const TQString &player, int stat, bool flag);
/**
* Fills the playerlist page into the notebook

@ -35,7 +35,7 @@ class TQPopupMenu;
class KDialogBase;
class KBgtqStatus;
class KBgStatus;
/**
*
@ -249,12 +249,12 @@ signals:
/**
* Emit the most recent game state
*/
void newState (const KBgtqStatus &);
void newState (const KBgStatus &);
/**
* Tell the board that we need the current state of the board.
*/
void getState (KBgtqStatus *);
void getState (KBgStatus *);
/**
* Starts/ends the edit mode of the board

@ -117,7 +117,7 @@ void KBgEngineGNU::handleLine(const TQString &l)
// redoubles mess up the game counter "turn"
//KBgtqStatus st(board);
//KBgStatus st(board);
//st.setCube(32, BOTH);
//emit newState(st);
@ -128,7 +128,7 @@ void KBgEngineGNU::handleLine(const TQString &l)
// can be shared between all engines
#if 0
KBgtqStatus st(board);
KBgStatus st(board);
int ret = KMessageBox::warningYesNoCancel
(0, i18n("gnubg doubles the cube to %1.").tqarg(2*st.cube(THEM)),
@ -164,7 +164,7 @@ void KBgEngineGNU::handleLine(const TQString &l)
*/
if (line.contains(TQRegExp("^board:"))) {
KBgtqStatus st(line);
KBgStatus st(line);
/*
* Do preliminary analysis of board

@ -202,7 +202,7 @@ void KBgEngineNg::setGame()
// we are still having problems with player creation...
// FIXME - which status _game->setGametqStatus(KGame::End);
// FIXME - which status _game->setGameStatus(KGame::End);
}
void KBgEngineNg::slotPlayerJoinedGame(KPlayer *p)

@ -60,7 +60,7 @@ public:
/*
* Store two copies of the game: one backup and a working copy
*/
KBgtqStatus mGame[2];
KBgStatus mGame[2];
/*
* Use the standard method of obtaining random numbers

@ -293,8 +293,8 @@ void KBg::setupEngine()
connect(engine[currEngine], TQT_SIGNAL(redoMove()), board, TQT_SLOT(redoMove()));
connect(engine[currEngine], TQT_SIGNAL(setEditMode(const bool)), board, TQT_SLOT(setEditMode(const bool)));
connect(engine[currEngine], TQT_SIGNAL(allowMoving(const bool)), board, TQT_SLOT(allowMoving(const bool)));
connect(engine[currEngine], TQT_SIGNAL(getState(KBgtqStatus *)), board, TQT_SLOT(getState(KBgtqStatus *)));
connect(engine[currEngine], TQT_SIGNAL(newState(const KBgtqStatus &)), board, TQT_SLOT(setState(const KBgtqStatus &)));
connect(engine[currEngine], TQT_SIGNAL(getState(KBgStatus *)), board, TQT_SLOT(getState(KBgStatus *)));
connect(engine[currEngine], TQT_SIGNAL(newState(const KBgStatus &)), board, TQT_SLOT(setState(const KBgStatus &)));
// now that all signals are connected, start the engine
engine[currEngine]->start();
@ -575,7 +575,7 @@ void KBg::setupDlg()
TQGridLayout *gle = new TQGridLayout(gbe, 1, 1, nb->spacingHint());
KURLLabel *lab = new KURLLabel("kcmshell kcmnotify",
i18n("Klick here to configure the event notification"), gbe);
lab->setMaximumSize(lab->tqsizeHint());
lab->setMaximumSize(lab->sizeHint());
gle->addWidget(lab, 0, 0);
connect(lab, TQT_SIGNAL(leftClickedURL(const TQString &)), TQT_SLOT(startKCM(const TQString &)));
@ -622,7 +622,7 @@ void KBg::setupDlg()
connect(nb, TQT_SIGNAL(finished()), TQT_TQOBJECT(this), TQT_SLOT(setupDone()));
nb->resize(nb->tqminimumSize());
nb->resize(nb->minimumSize());
nb->show();
}

@ -196,7 +196,7 @@ void KBgBoardSetup::getSetupPages(KDialogBase *nb)
"move a checker the shortest possible distance."));
for (int i = 0; i < 3; i++) {
rbMove[i]->setMinimumSize(rbMove[i]->tqsizeHint());
rbMove[i]->setMinimumSize(rbMove[i]->sizeHint());
blm->addWidget(rbMove[i]);
rbMove[i]->setChecked(i == getShortMoveMode());
}
@ -360,7 +360,7 @@ void KBgBoard::setFont(const TQFont& f)
*/
void KBgBoard::queryCube()
{
KBgtqStatus *st = new KBgtqStatus();
KBgStatus *st = new KBgStatus();
getState(st);
KBgBoardQCube *dlg =
new KBgBoardQCube(abs(st->cube()), (st->cube(US) > 0), (st->cube(THEM) > 0));
@ -395,7 +395,7 @@ KBgBoardQCube::KBgBoardQCube(int val, bool us, bool them)
"double. Note that a face value of 1 automatically allows both\n"
"players to double."));
info->setMinimumSize(info->tqsizeHint());
info->setMinimumSize(info->sizeHint());
vbox->addWidget(info, 0);
@ -454,17 +454,17 @@ KBgBoardQCube::KBgBoardQCube(int val, bool us, bool them)
else if (them)
cb[1]->setCurrentItem(THEM);
cb[0]->setMinimumSize(cb[0]->tqsizeHint());
cb[1]->setMinimumSize(cb[1]->tqsizeHint());
cb[0]->setMinimumSize(cb[0]->sizeHint());
cb[1]->setMinimumSize(cb[1]->sizeHint());
ok->setMinimumSize(ok->tqsizeHint());
cancel->setMinimumSize(cancel->tqsizeHint());
ok->setMinimumSize(ok->sizeHint());
cancel->setMinimumSize(cancel->sizeHint());
setMinimumSize(tqchildrenRect().size());
setMinimumSize(childrenRect().size());
vbox->activate();
resize(tqminimumSize());
resize(minimumSize());
ok->setAutoDefault (true);
ok->setDefault(true);
@ -544,7 +544,7 @@ KBgBoardQDice::KBgBoardQDice(const char *name)
info->setText(i18n("Set the face values of the selected dice. The other player's\n"
"dice will be cleared and it will be the dice's owner's turn."));
info->setMinimumSize(info->tqsizeHint());
info->setMinimumSize(info->sizeHint());
vbox->addWidget(info, 0);
@ -560,17 +560,17 @@ KBgBoardQDice::KBgBoardQDice(const char *name)
hbox_2->addWidget(ok);
hbox_2->addWidget(cancel);
sb[0]->setMinimumSize(sb[0]->tqsizeHint());
sb[1]->setMinimumSize(sb[1]->tqsizeHint());
sb[0]->setMinimumSize(sb[0]->sizeHint());
sb[1]->setMinimumSize(sb[1]->sizeHint());
ok->setMinimumSize(ok->tqsizeHint());
cancel->setMinimumSize(cancel->tqsizeHint());
ok->setMinimumSize(ok->sizeHint());
cancel->setMinimumSize(cancel->sizeHint());
setMinimumSize(tqchildrenRect().size());
setMinimumSize(childrenRect().size());
vbox->activate();
resize(tqminimumSize());
resize(minimumSize());
ok->setAutoDefault (true);
ok->setDefault(true);
@ -628,10 +628,10 @@ bool KBgBoard::getEditMode() const
}
/*
* This function takes a KBgtqStatus object and fills it with the current
* This function takes a KBgStatus object and fills it with the current
* board status.
*/
KBgtqStatus* KBgBoard::getState(KBgtqStatus *st) const
KBgStatus* KBgBoard::getState(KBgStatus *st) const
{
st->setColor(color);
st->setDirection(direction);
@ -1337,7 +1337,7 @@ void KBgBoardHome::mouseDoubleClickEvent(TQMouseEvent * e)
KBgBoardQDice *dlg = new KBgBoardQDice();
if (dlg->exec()) {
KBgtqStatus *st = new KBgtqStatus();
KBgStatus *st = new KBgStatus();
board->getState(st);
st->setDice(w, 0, dlg->getDice(0));
st->setDice(w, 1, dlg->getDice(1));
@ -2085,7 +2085,7 @@ bool KBgBoard::diceAllowMove(int src, int dest)
* This is the most important of all members of the board class. It takes
* a single board status object and initializes the internal status.
*/
void KBgBoard::setState(const KBgtqStatus &st)
void KBgBoard::setState(const KBgStatus &st)
{
color = st.color();
direction = st.direction();
@ -2820,7 +2820,7 @@ void KBgBoard::getRollDice(const int w)
* This is the constructor of the KBgBoard class. It creates
* a backgammon board with an initial distribution of checkers, empty
* dice and a cube with face value 1. The initial board is not usable!
* You have to change the status by passing a KBgtqStatus
* You have to change the status by passing a KBgStatus
* object to setState(...) before you can play!
*/
KBgBoard::KBgBoard(TQWidget *parent, const char *name, TQPopupMenu *menu)
@ -2868,7 +2868,7 @@ KBgBoard::KBgBoard(TQWidget *parent, const char *name, TQPopupMenu *menu)
* Get the default seeting of the board and initialize the
* state of it.
*/
KBgtqStatus *st = new KBgtqStatus();
KBgStatus *st = new KBgStatus();
st->setCube(1, true, true);
st->setDirection(+1);
@ -2907,12 +2907,12 @@ KBgBoard::KBgBoard(TQWidget *parent, const char *name, TQPopupMenu *menu)
setFont(TQApplication::font());
}
TQSize KBgBoard::tqminimumSizeHint() const
TQSize KBgBoard::minimumSizeHint() const
{
return TQSize(MINIMUM_CHECKER_SIZE * 15, MINIMUM_CHECKER_SIZE * 11);
}
TQSize KBgBoard::tqsizeHint() const {
TQSize KBgBoard::sizeHint() const {
return TQSize(MINIMUM_CHECKER_SIZE *15*4,MINIMUM_CHECKER_SIZE*11*2);
}

@ -64,9 +64,9 @@
/*
* Just some internal constants and classes
*/
const int US = KBgtqStatus::US;
const int THEM = KBgtqStatus::THEM;
const int BOTH = KBgtqStatus::BOTH;
const int US = KBgStatus::US;
const int THEM = KBgStatus::THEM;
const int BOTH = KBgStatus::BOTH;
const int HOME_US_LEFT = 101;
const int HOME_US_RIGHT = 102;
@ -181,7 +181,7 @@ class KBgBoard : public TQWidget
* This function has to be reimplemented to provide a minimum size for
* the playing area.
*/
TQSize tqminimumSizeHint() const;
TQSize minimumSizeHint() const;
public slots:
/**
@ -211,10 +211,10 @@ public slots:
/**
* This is the most important public member. It takes
* a board status - s. the KBgBoardtqStatus class -
* a board status - s. the KBgBoardStatus class -
* and sets the board accordingly.
*/
void setState(const KBgtqStatus &);
void setState(const KBgStatus &);
/**
* Set the context menu
@ -224,7 +224,7 @@ public slots:
/**
* Get the current state of the board.
*/
KBgtqStatus *getState(KBgtqStatus *st) const;
KBgStatus *getState(KBgStatus *st) const;
/**
* Sets the edit mode of the board. In that mode the board can be
@ -292,7 +292,7 @@ public slots:
/* ************************************************** */
protected:
virtual TQSize tqsizeHint() const;
virtual TQSize sizeHint() const;
TQColor baseColors[2];
TQFont boardFont;
@ -535,7 +535,7 @@ protected:
virtual void drawContents(TQPainter *);
/**
* tqStatus numbers that store the current board status.
* Status numbers that store the current board status.
*/
int mouseButton;
int direction;

@ -29,7 +29,7 @@
/*
* Parse a rawboard description from FIBS and initialize members.
*/
KBgtqStatus::KBgtqStatus(const TQString &rawboard)
KBgStatus::KBgStatus(const TQString &rawboard)
{
/*
* This is the format string from hell...
@ -116,7 +116,7 @@ KBgtqStatus::KBgtqStatus(const TQString &rawboard)
* Constructor initializes the status to an empty board with cube one
* and empty dice.
*/
KBgtqStatus::KBgtqStatus()
KBgStatus::KBgStatus()
: TQObject()
{
/*
@ -146,7 +146,7 @@ KBgtqStatus::KBgtqStatus()
/*
* Copy constructor calls private utility function.
*/
KBgtqStatus::KBgtqStatus(const KBgtqStatus &rhs)
KBgStatus::KBgStatus(const KBgStatus &rhs)
: TQObject()
{
copy(rhs);
@ -155,7 +155,7 @@ KBgtqStatus::KBgtqStatus(const KBgtqStatus &rhs)
/*
* Destructor
*/
KBgtqStatus::~KBgtqStatus()
KBgStatus::~KBgStatus()
{
// nothing to do
}
@ -164,14 +164,14 @@ KBgtqStatus::~KBgtqStatus()
* Assignment operator shares a lot of code with the copy
* constructor.
*/
KBgtqStatus& KBgtqStatus::operator=(const KBgtqStatus &rhs)
KBgStatus& KBgStatus::operator=(const KBgStatus &rhs)
{
if (this == &rhs) return *this;
copy(rhs);
return *this;
}
void KBgtqStatus::copy(const KBgtqStatus &rhs)
void KBgStatus::copy(const KBgStatus &rhs)
{
for (int i = 0; i < 26; i++)
board_[i] = rhs.board_[i];
@ -199,32 +199,32 @@ void KBgtqStatus::copy(const KBgtqStatus &rhs)
/*
* Access functions
*/
int KBgtqStatus::board(const int &i) const
int KBgStatus::board(const int &i) const
{
return ((0 < i && i < 25) ? color_*board_[i] : 0);
}
int KBgtqStatus::home(const int &w) const
int KBgStatus::home(const int &w) const
{
return ((w == US || w == THEM) ? color_*home_[w] : 0);
}
int KBgtqStatus::bar(const int &w) const
int KBgStatus::bar(const int &w) const
{
return ((w == US || w == THEM) ? color_*bar_[w] : 0);
}
int KBgtqStatus::color(const int &w) const
int KBgStatus::color(const int &w) const
{
return ((w == THEM) ? -color_ : color_);
}
int KBgtqStatus::direction() const
int KBgStatus::direction() const
{
return direction_;
}
int KBgtqStatus::dice(const int &w, const int &n) const
int KBgStatus::dice(const int &w, const int &n) const
{
if ((w == US || w == THEM) && (n == 0 || n == 1))
return dice_[w][n];
@ -232,34 +232,34 @@ int KBgtqStatus::dice(const int &w, const int &n) const
return 0;
}
int KBgtqStatus::cube(const int &w) const
int KBgStatus::cube(const int &w) const
{
if (w == US || w == THEM)
return ((maydouble_[w]) ? cube_ : -cube_);
return 0;
}
int KBgtqStatus::points(const int& w) const
int KBgStatus::points(const int& w) const
{
return ((w == US || w == THEM) ? points_[w] : -1);
}
TQString KBgtqStatus::player(const int &w) const
TQString KBgStatus::player(const int &w) const
{
return ((w == US || w == THEM) ? player_[w] : TQString());
}
int KBgtqStatus::length() const
int KBgStatus::length() const
{
return length_;
}
int KBgtqStatus::turn() const
int KBgStatus::turn() const
{
return turn_;
}
bool KBgtqStatus::doubled() const
bool KBgStatus::doubled() const
{
return doubled_;
}
@ -268,7 +268,7 @@ bool KBgtqStatus::doubled() const
/*
* Assignment functions
*/
void KBgtqStatus::setBoard(const int &i, const int &w, const int &v)
void KBgStatus::setBoard(const int &i, const int &w, const int &v)
{
if (0 < i && i < 25) {
if (w == US)
@ -278,7 +278,7 @@ void KBgtqStatus::setBoard(const int &i, const int &w, const int &v)
}
}
void KBgtqStatus::setHome(const int &w, const int &v)
void KBgStatus::setHome(const int &w, const int &v)
{
if (w == US)
home_[w] = abs(v);
@ -286,7 +286,7 @@ void KBgtqStatus::setHome(const int &w, const int &v)
home_[w] = -abs(v);
}
void KBgtqStatus::setBar(const int& w, const int& v)
void KBgStatus::setBar(const int& w, const int& v)
{
if (w == US)
bar_[w] = abs(v);
@ -294,7 +294,7 @@ void KBgtqStatus::setBar(const int& w, const int& v)
bar_[w] = -abs(v);
}
void KBgtqStatus::setColor(const int &c, const int &w)
void KBgStatus::setColor(const int &c, const int &w)
{
if (w == US)
color_ = ((c < 0) ? Black : White);
@ -302,12 +302,12 @@ void KBgtqStatus::setColor(const int &c, const int &w)
color_ = ((c < 0) ? White : Black);
}
void KBgtqStatus::setDirection(const int &dir)
void KBgStatus::setDirection(const int &dir)
{
direction_ = ((dir < 0) ? -1 : +1);
}
void KBgtqStatus::setDice(const int &w, const int &n, const int &v)
void KBgStatus::setDice(const int &w, const int &n, const int &v)
{
if ((w == US || w == THEM) && (n == 0 || n == 1)) {
if (0 <= v && v <= 6)
@ -317,7 +317,7 @@ void KBgtqStatus::setDice(const int &w, const int &n, const int &v)
}
}
void KBgtqStatus::setCube(const int &c, const bool &us, const bool &them)
void KBgStatus::setCube(const int &c, const bool &us, const bool &them)
{
int w = NONE;
if (us) w = US;
@ -326,7 +326,7 @@ void KBgtqStatus::setCube(const int &c, const bool &us, const bool &them)
setCube(c, w);
}
void KBgtqStatus::setCube(const int &c, const int &w)
void KBgStatus::setCube(const int &c, const int &w)
{
// assume that int has at least 32 bits...
for (int i = 0; i < 31; i++) {
@ -337,24 +337,24 @@ void KBgtqStatus::setCube(const int &c, const int &w)
maydouble_[THEM] = (w == THEM || w == BOTH);
}
void KBgtqStatus::setPoints(const int &w, const int &p)
void KBgStatus::setPoints(const int &w, const int &p)
{
if (w == US || w == THEM)
points_[w] = p;
}
void KBgtqStatus::setPlayer(const int &w, const TQString &name)
void KBgStatus::setPlayer(const int &w, const TQString &name)
{
if (w == US || w == THEM)
player_[w] = name;
}
void KBgtqStatus::setLength(const int &l)
void KBgStatus::setLength(const int &l)
{
length_ = l;
}
void KBgtqStatus::setTurn(const int &w)
void KBgStatus::setTurn(const int &w)
{
if (w == US || w == THEM || w == BOTH)
turn_ = w;
@ -364,7 +364,7 @@ void KBgtqStatus::setTurn(const int &w)
/*
* Utility functions
*/
int KBgtqStatus::moves() const
int KBgStatus::moves() const
{
int start, dir;
@ -407,7 +407,7 @@ int KBgtqStatus::moves() const
* Get a copy of ourselves. That way we can mess around with
* the internals of the game.
*/
KBgtqStatus sc(*this);
KBgStatus sc(*this);
/*
* Start with getting all checkers off the bar
@ -490,7 +490,7 @@ int KBgtqStatus::moves() const
}
}
bool KBgtqStatus::movePossible(KBgtqStatus &sc, int a, int start, int dir) const
bool KBgStatus::movePossible(KBgStatus &sc, int a, int start, int dir) const
{
/*
* Determine where the first checker in moving direction is

@ -43,7 +43,7 @@
* @author Jens Hoefkens <jens@hoefkens.com>
* @version $Id$
*/
class KBgtqStatus : public TQObject
class KBgStatus : public TQObject
{
Q_OBJECT
@ -66,27 +66,27 @@ class KBgtqStatus : public TQObject
* The default constructor initializes the status to an "empty"
* state. The board and dice are empty and the cube shows 1.
*/
KBgtqStatus();
KBgStatus();
/**
* Constructor from a FIBS rawboard string
*/
KBgtqStatus(const TQString &rawboard);
KBgStatus(const TQString &rawboard);
/**
* Copy constructor
*/
KBgtqStatus(const KBgtqStatus &rhs);
KBgStatus(const KBgStatus &rhs);
/**
* Assignment operator
*/
KBgtqStatus& operator=(const KBgtqStatus &rhs);
KBgStatus& operator=(const KBgStatus &rhs);
/**
* Destructor
*/
virtual ~KBgtqStatus();
virtual ~KBgStatus();
/*
@ -289,12 +289,12 @@ class KBgtqStatus : public TQObject
* anywhere starting from start or later into direction
* dir in the game given by sc.
*/
bool movePossible(KBgtqStatus &sc, int a, int start, int dir) const;
bool movePossible(KBgStatus &sc, int a, int start, int dir) const;
/*
* Copy constr. and assignment share a lot of code.
*/
void copy(const KBgtqStatus &rhs);
void copy(const KBgStatus &rhs);
/*
* Private variables with self-expalanatory names.

@ -1,6 +1,6 @@
Information about other KBattleship-compatible clients:
Client OS tqStatus Homepage/Screenshots
Client OS Status Homepage/Screenshots
KBattleship Linux/KDE 100% http://games.kde.org/kbattleship
Mac KBattleship Mac OS + Mac OS X 100% http://www.sebek.de/

@ -32,7 +32,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
@ -63,7 +63,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
@ -132,7 +132,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
@ -151,7 +151,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
@ -224,7 +224,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
@ -315,7 +315,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
@ -403,7 +403,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
@ -441,7 +441,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>

@ -42,7 +42,7 @@ KClientDialog::KClientDialog(TQWidget *parent, const char *name)
connect(m_mainWidget->serverEdit, TQT_SIGNAL(textChanged(const TQString &)), this, TQT_SLOT(slotCheckEnableOk()));
m_config->setGroup("History");
m_browser = new DNSSD::ServiceBrowser(TQString::tqfromLatin1(BATTLESHIP_SERVICE));
m_browser = new DNSSD::ServiceBrowser(TQString::fromLatin1(BATTLESHIP_SERVICE));
connect(m_browser,TQT_SIGNAL(finished()),TQT_SLOT(nextBatch()));
m_browser->startBrowse();
connect(m_mainWidget->lanBox,TQT_SIGNAL(activated(int)),TQT_SLOT(gameSelected(int)));

@ -156,7 +156,7 @@ void KonnectionHandling::slotNewMessage(KMessage *msg)
{
// First message....got client information
case KMessage::GETVERSION:
if(msg->field("protocolVersion") != TQString::tqfromLatin1(protocolVersion))
if(msg->field("protocolVersion") != TQString::fromLatin1(protocolVersion))
{
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));

@ -137,7 +137,7 @@ int KBBGraphic::width() { return cellW * numRows; }
int KBBGraphic::height() { return cellH * numCols; }
int KBBGraphic::wHint() const { return minW; }
int KBBGraphic::hHint() const { return minH; }
TQSize KBBGraphic::tqsizeHint() const { return TQSize(wHint(), hHint()); }
TQSize KBBGraphic::sizeHint() const { return TQSize(wHint(), hHint()); }
/*
Returns a pointer to graphicBoard

@ -88,7 +88,7 @@ signals:
void endMouseClicked();
protected:
virtual TQSize tqsizeHint() const;
virtual TQSize sizeHint() const;
void paintEvent( TQPaintEvent* );
void mousePressEvent( TQMouseEvent* );
void mouseMoveEvent( TQMouseEvent* );

@ -107,7 +107,7 @@ AbTop::AbTop()
showSpy = false;
renderBalls = true;
updatetqStatus();
updateStatus();
updateActions();
setupGUI();
}
@ -391,8 +391,8 @@ void AbTop::setupStatusBar()
warningPix = BarIcon( "warning" );
okPix = BarIcon( "ok" );
validLabel = new TQLabel( "", statusBar(), "validLabel" );
validLabel->setFixedSize( 18, statusLabel->tqsizeHint().height() );
validLabel->tqsetAlignment( AlignCenter );
validLabel->setFixedSize( 18, statusLabel->sizeHint().height() );
validLabel->setAlignment( AlignCenter );
validLabel->hide();
validShown = false;
@ -401,8 +401,8 @@ void AbTop::setupStatusBar()
noBall = BarIcon( "noball" );
ballLabel = new TQLabel( "", statusBar(), "ballLabel" );
ballLabel->setPixmap(noBall);
ballLabel->setFixedSize( 18, statusLabel->tqsizeHint().height() );
ballLabel->tqsetAlignment( AlignCenter );
ballLabel->setFixedSize( 18, statusLabel->sizeHint().height() );
ballLabel->setAlignment( AlignCenter );
statusBar()->addWidget(ballLabel, 0, true);
moveLabel = new TQLabel( i18n("Move %1").tqarg("--"), statusBar(), "moveLabel" );
@ -436,7 +436,7 @@ void AbTop::updateSpy(TQString s)
{
if (showSpy) {
if (s.isEmpty()) {
updatetqStatus();
updateStatus();
// statusBar()->clear();
}
else
@ -458,7 +458,7 @@ void AbTop::updateBestMove(Move& m, int value)
}
void AbTop::updatetqStatus()
void AbTop::updateStatus()
{
TQString tmp;
bool showValid = false;
@ -522,7 +522,7 @@ void AbTop::edited(int vState)
if (vState == Board::empty)
timerState = noGame;
updatetqStatus();
updateStatus();
}
/* only <stop search>, <hint>, <take back> have to be updated */
@ -662,7 +662,7 @@ void AbTop::playGame()
timerState = gameOver;
}
updatetqStatus();
updateStatus();
updateActions();
boardWidget->setCursor(crossCursor);
if (stop) return;
@ -814,7 +814,7 @@ void AbTop::editModify(bool on)
timerState = noGame;
updateActions();
updatetqStatus();
updateStatus();
if (!editMode && vState == Board::valid) {
actMove.type = Move::none;
timerState = moveShown;
@ -864,7 +864,7 @@ void AbTop::setMoveNo(int m, bool updateGUI)
board->setActColor( ((moveNo%2)==0) ? Board::color1 : Board::color2 );
if (updateGUI) {
updatetqStatus();
updateStatus();
updateActions();
}
}

@ -90,7 +90,7 @@ public slots:
private:
void setupActions();
void updatetqStatus();
void updateStatus();
void userMove();
void playGame();
void loadPixmaps();

@ -237,7 +237,7 @@ void BoardWidget::drawBoard()
#ifndef HAVE_KIR
TQColorGroup g = TQPalette( *boardColor ).active();
TQColorGroup g2 = TQWidget::tqcolorGroup();
TQColorGroup g2 = TQWidget::colorGroup();
int boardSize = width() *10/12;
if (boardSize > height()) boardSize = height();
@ -1019,7 +1019,7 @@ void BoardWidget::mouseReleaseEvent( TQMouseEvent* pEvent )
emit updateSpy(tmp);
}
TQSize BoardWidget::tqsizeHint() const
TQSize BoardWidget::sizeHint() const
{
return TQSize(400, 350);
}

@ -78,7 +78,7 @@ class BoardWidget : public BallWidget
void updateSpy(TQString);
void edited(int);
protected:
virtual TQSize tqsizeHint() const;
virtual TQSize sizeHint() const;
private:
int positionOf(int x, int y);

@ -90,7 +90,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>30</width>
<height>32767</height>
@ -125,7 +125,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>30</width>
<height>32767</height>
@ -160,7 +160,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>30</width>
<height>32767</height>
@ -360,7 +360,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>30</width>
<height>32767</height>
@ -384,7 +384,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>30</width>
<height>32767</height>
@ -474,7 +474,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>30</width>
<height>32767</height>
@ -642,7 +642,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>30</width>
<height>32767</height>
@ -688,7 +688,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>30</width>
<height>32767</height>
@ -734,7 +734,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>30</width>
<height>32767</height>
@ -822,7 +822,7 @@
<property name="name">
<cstring>TextLabel5</cstring>
</property>
<property name="tqminimumSize">
<property name="minimumSize">
<size>
<width>0</width>
<height>20</height>
@ -920,7 +920,7 @@
<property name="name">
<cstring>posEval3</cstring>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>30</width>
<height>32767</height>
@ -936,7 +936,7 @@
<property name="name">
<cstring>posEval5</cstring>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>30</width>
<height>32767</height>
@ -952,7 +952,7 @@
<property name="name">
<cstring>posEval2</cstring>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>30</width>
<height>32767</height>
@ -976,7 +976,7 @@
<property name="name">
<cstring>diffEval2</cstring>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>30</width>
<height>32767</height>
@ -992,7 +992,7 @@
<property name="name">
<cstring>diffEval3</cstring>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>30</width>
<height>32767</height>
@ -1008,7 +1008,7 @@
<property name="name">
<cstring>posEval4</cstring>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>30</width>
<height>32767</height>
@ -1032,7 +1032,7 @@
<property name="name">
<cstring>diffEval5</cstring>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>30</width>
<height>32767</height>
@ -1048,7 +1048,7 @@
<property name="name">
<cstring>posEval1</cstring>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>30</width>
<height>32767</height>
@ -1088,7 +1088,7 @@
<property name="name">
<cstring>diffEval4</cstring>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>30</width>
<height>32767</height>
@ -1227,7 +1227,7 @@
<property name="name">
<cstring>rowEval3</cstring>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>30</width>
<height>32767</height>
@ -1243,7 +1243,7 @@
<property name="name">
<cstring>rowEval2</cstring>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>30</width>
<height>32767</height>
@ -1259,7 +1259,7 @@
<property name="name">
<cstring>rowEval5</cstring>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>30</width>
<height>32767</height>
@ -1275,7 +1275,7 @@
<property name="name">
<cstring>rowEval4</cstring>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>30</width>
<height>32767</height>
@ -1422,7 +1422,7 @@
<property name="name">
<cstring>countEval2</cstring>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>40</width>
<height>32767</height>
@ -1446,7 +1446,7 @@
<property name="name">
<cstring>countEval5</cstring>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>40</width>
<height>32767</height>
@ -1462,7 +1462,7 @@
<property name="name">
<cstring>countEval4</cstring>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>40</width>
<height>32767</height>
@ -1494,7 +1494,7 @@
<property name="name">
<cstring>countEval1</cstring>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>40</width>
<height>32767</height>
@ -1518,7 +1518,7 @@
<property name="name">
<cstring>countEval3</cstring>
</property>
<property name="tqmaximumSize">
<property name="maximumSize">
<size>
<width>40</width>
<height>32767</height>

@ -23,8 +23,8 @@ Spy::Spy(Board& b)
TQLabel *l = new TQLabel(this);
l->setText( i18n("Actual examined position:") );
l->setFixedHeight( l->tqsizeHint().height() );
l->tqsetAlignment( AlignVCenter | AlignLeft );
l->setFixedHeight( l->sizeHint().height() );
l->setAlignment( AlignVCenter | AlignLeft );
top->addWidget( l );
TQHBoxLayout* b1 = new TQHBoxLayout();
@ -38,8 +38,8 @@ Spy::Spy(Board& b)
actLabel[i] = new TQLabel(this);
actLabel[i]->setText("---");
// actLabel[i]->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
actLabel[i]->tqsetAlignment( AlignHCenter | AlignVCenter);
actLabel[i]->setFixedHeight( actLabel[i]->tqsizeHint().height() );
actLabel[i]->setAlignment( AlignHCenter | AlignVCenter);
actLabel[i]->setFixedHeight( actLabel[i]->sizeHint().height() );
b2->addWidget( actBoard[i] );
b2->addWidget( actLabel[i] );
@ -48,8 +48,8 @@ Spy::Spy(Board& b)
l = new TQLabel(this);
l->setText( i18n("Best move so far:") );
l->setFixedHeight( l->tqsizeHint().height() );
l->tqsetAlignment( AlignVCenter | AlignLeft );
l->setFixedHeight( l->sizeHint().height() );
l->setAlignment( AlignVCenter | AlignLeft );
top->addWidget( l );
b1 = new TQHBoxLayout();
@ -63,8 +63,8 @@ Spy::Spy(Board& b)
bestLabel[i] = new TQLabel(this);
bestLabel[i]->setText("---");
// bestLabel[i]->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
bestLabel[i]->tqsetAlignment( AlignHCenter | AlignVCenter);
bestLabel[i]->setFixedHeight( bestLabel[i]->tqsizeHint().height() );
bestLabel[i]->setAlignment( AlignHCenter | AlignVCenter);
bestLabel[i]->setFixedHeight( bestLabel[i]->sizeHint().height() );
b2->addWidget( bestBoard[i] );
b2->addWidget( bestLabel[i] );

@ -9,7 +9,7 @@
#include <config.h>
#endif
// tqStatus bar
// Status bar
const int ID_LIVES = 0; // Field IDs in KDE status bar.
const int ID_SCORE = 1;
const int ID_LEVEL = 2;
@ -137,7 +137,7 @@ private slots:
void showLevel (int); // Show the current level number.
void showLives (long); // Show how many lives are remaining.
void showScore (long); // Show the player's score.
void gameFreeze (bool); // tqStatus feedback on freeze/unfreeze.
void gameFreeze (bool); // Status feedback on freeze/unfreeze.
void adjustHintAction (bool); // Enable/disable "Hint" action.
void markRuleType (char ruleType); // Check game's rule type in the menu.

@ -117,7 +117,7 @@ bool KGrCanvas::changeSize (int d)
return FALSE;
}
TQWMatrix wm = tqworldMatrix();
TQWMatrix wm = worldMatrix();
double wmScale = 1.0;
// Set the scale back to 1:1 and calculate the new scale factor.
@ -210,7 +210,7 @@ void KGrCanvas::makeTitle ()
title->setPaletteForegroundColor (textColor);
title->setFont (TQFont (fontInfo().family(),
(baseFontSize * scaleStep) / baseScale, TQFont::Bold));
title->tqsetAlignment (TQt::AlignCenter);
title->setAlignment (TQt::AlignCenter);
title->raise();
title->show();
}
@ -257,12 +257,12 @@ void KGrCanvas::makeHeroSprite (int i, int j, int startFrame)
i++; j++;
heroSprite->move (i * 4 * STEP, j * 4 * STEP, startFrame);
heroSprite->setZ (1);
heroSprite->tqsetVisible (TRUE);
heroSprite->setVisible (TRUE);
}
void KGrCanvas::setHeroVisible (bool newState)
{
heroSprite->tqsetVisible (newState); // Show or hide the hero.
heroSprite->setVisible (newState); // Show or hide the hero.
}
void KGrCanvas::makeEnemySprite (int i, int j, int startFrame)

@ -70,7 +70,7 @@ enum Position {RIGHTWALK1,RIGHTWALK2,RIGHTWALK3,RIGHTWALK4,
LEFTCLIMB1,LEFTCLIMB2,LEFTCLIMB3,LEFTCLIMB4,
CLIMB1,CLIMB2,
FALL1,FALL2};
enum tqStatus {STANDING,FALLING,WALKING,CLIMBING,CAPTIVE};
enum Status {STANDING,FALLING,WALKING,CLIMBING,CAPTIVE};
enum Direction {RIGHT,LEFT,UP,DOWN,STAND};
enum SearchStrategy {LOW,MEDIUM,HIGH};

@ -544,7 +544,7 @@ KGrNHDialog::KGrNHDialog(const TQString & levelName, const TQString & levelHint,
mle-> setMinimumSize ((FIELDWIDTH*c/2), (FIELDHEIGHT/2)*c);
// Configure the text box.
mle-> tqsetAlignment (AlignLeft);
mle-> setAlignment (AlignLeft);
#ifndef QT3
mle-> setWordWrap (TQMultiLineEdit::WidgetWidth);
mle-> setFixedVisibleLines (9);
@ -694,7 +694,7 @@ KGrECDialog::KGrECDialog (int action, int collnIndex,
}
// Configure the edit box.
mle-> tqsetAlignment (AlignLeft);
mle-> setAlignment (AlignLeft);
#ifndef QT3
mle-> setWordWrap (TQMultiLineEdit::WidgetWidth);
mle-> setFixedVisibleLines (8);
@ -950,7 +950,7 @@ void KGrMessage::wrapped (TQWidget * parent, TQString title, TQString contents)
OK-> setMaximumWidth (3*c);
mle-> setFrameStyle (TQFrame::NoFrame);
mle-> tqsetAlignment (AlignLeft);
mle-> setAlignment (AlignLeft);
mle-> setReadOnly (TRUE);
mle-> setText (contents);

@ -76,7 +76,7 @@ int KGrFigure::gety()
return absy;
}
tqStatus KGrFigure::gettqStatus()
Status KGrFigure::getStatus()
{
return status;
}
@ -733,7 +733,7 @@ bool KGrHero::standOnEnemy()
(((absx - 16) < enemy->getx()) &&
((absx + 16) > enemy->getx()))) {
if (((absy + 12) == enemy->gety()) &&
(enemy->gettqStatus() != FALLING)) {
(enemy->getStatus() != FALLING)) {
absy = absy - rely; // Bounce back from overlap, to avoid
rely = 0; // hero-enemy mid-cycle deadlock.
walkCounter = 1;
@ -807,7 +807,7 @@ KGrEnemy :: KGrEnemy (KGrCanvas * view, int x, int y)
walkCounter = 1;
captiveCounter = 0;
searchtqStatus = HORIZONTAL;
searchStatus = HORIZONTAL;
birthX=x;
birthY=y;
@ -849,7 +849,7 @@ void KGrEnemy::showState(char option)
case 's': printf (" nuggets %02d status %d walk-ctr %d ",
nuggets, status, walkCounter);
printf ("dirn %d search %d capt-ctr %d\n",
direction, searchtqStatus, captiveCounter);
direction, searchStatus, captiveCounter);
printf (" rel (%02d,%02d) abs (%03d,%03d)",
relx, rely, absx, absy);
printf (" pix %02d", actualPixmap);
@ -907,7 +907,7 @@ void KGrEnemy::walkTimeDone ()
case RIGHT: walkRight (WALKDELAY, FALLDELAY); break;
case LEFT: walkLeft (WALKDELAY, FALLDELAY); break;
default: // Switch search direction in KGoldrunner search (only).
searchtqStatus = (searchtqStatus==VERTIKAL) ?
searchStatus = (searchStatus==VERTIKAL) ?
HORIZONTAL : VERTIKAL;
// In KGoldrunner rules, if a hole opens under an enemy
@ -942,7 +942,7 @@ void KGrEnemy::walkTimeDone ()
// In KGoldrunner rules, change the search strategy,
// to avoid enemy-enemy deadlock.
searchtqStatus = (searchtqStatus==VERTIKAL) ? HORIZONTAL : VERTIKAL;
searchStatus = (searchStatus==VERTIKAL) ? HORIZONTAL : VERTIKAL;
dirn = searchbestway (x, y, herox, heroy);
if ((dirn != direction) && ((*playfield)[x][y]->whatIam() != USEDHOLE)) {
@ -1221,7 +1221,7 @@ Direction KGrEnemy::searchbestway(int ew,int eh,int hw,int hh)
// KGoldrunner search strategy.
case MEDIUM:
case HIGH:
if(searchtqStatus==VERTIKAL){
if(searchStatus==VERTIKAL){
if (eh > hh)
return searchupway(ew,eh);
if (eh < hh)

@ -54,7 +54,7 @@ public:
// dependent on number of enemies.
int getx();
int gety();
tqStatus gettqStatus();
Status getStatus();
int getnuggets();
void setNuggets(int n);
@ -81,7 +81,7 @@ protected:
TQTimer *fallTimer;
KGrObject *(*playfield)[30][22];
tqStatus status;
Status status;
Direction direction;
bool canWalkRight();
bool canWalkLeft();
@ -185,7 +185,7 @@ public:
private:
KGrCanvas * enemyView;
int birthX, birthY;
int searchtqStatus;
int searchStatus;
int captiveCounter;
TQTimer *captiveTimer;
bool canWalkUp();

@ -778,7 +778,7 @@ void KGrGame::saveGame() // Save game ID, score and level.
"level, not as they are now."));
}
TQDate today = TQDate::tqcurrentDate();
TQDate today = TQDate::currentDate();
TQTime now = TQTime::currentTime();
TQString saved;
TQString day;
@ -1034,7 +1034,7 @@ void KGrGame::checkHighScore()
delete hsn;
TQDate today = TQDate::tqcurrentDate();
TQDate today = TQDate::currentDate();
TQString hsDate;
#ifdef QT3
TQString day = today.shortDayName(today.dayOfWeek());

@ -504,7 +504,7 @@ void KCubeBoxWidget::initCubes()
}
TQSize KCubeBoxWidget::tqsizeHint() const
TQSize KCubeBoxWidget::sizeHint() const
{
return TQSize(400,400);
}

@ -131,7 +131,7 @@ signals:
void stoppedThinking();
protected:
virtual TQSize tqsizeHint() const;
virtual TQSize sizeHint() const;
virtual void deleteCubes();
virtual void initCubes();

@ -64,7 +64,7 @@ KJumpingCube::KJumpingCube()
statusBar()->insertItem(s,ID_STATUS_TURN_TEXT, false);
statusBar()->changeItem(s,ID_STATUS_TURN_TEXT);
statusBar()->setItemAlignment (ID_STATUS_TURN_TEXT, AlignLeft | AlignVCenter);
statusBar()->setFixedHeight( statusBar()->tqsizeHint().height() );
statusBar()->setFixedHeight( statusBar()->sizeHint().height() );
currentPlayer = new TQWidget(this, "currentPlayer");
currentPlayer->setFixedWidth(40);

@ -110,7 +110,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>16</height>

@ -711,13 +711,13 @@ void LinesBoard::showDemoText(const TQString &text)
demoLabel->setAutoMask( FALSE );
demoLabel->setFrameStyle( TQFrame::Plain | TQFrame::Box );
demoLabel->setLineWidth( 1 );
demoLabel->tqsetAlignment( AlignHCenter | AlignTop );
demoLabel->setAlignment( AlignHCenter | AlignTop );
demoLabel->setPalette(TQToolTip::palette());
demoLabel->polish();
}
demoLabel->setText(text);
demoLabel->adjustSize();
TQSize s = demoLabel->tqsizeHint();
TQSize s = demoLabel->sizeHint();
TQPoint p = TQPoint(x() + (width()-s.width())/2, y() + (height()-s.height())/2);
demoLabel->move(mapToGlobal(p));
demoLabel->show();

@ -46,7 +46,7 @@ MainWidget::MainWidget( TQWidget* parent, const char* name )
// warning("width: %i height: %i", width(), height() );
// warning("wh: %i hh: %i", tqsizeHint().width(), tqsizeHint().height() );
// warning("wh: %i hh: %i", sizeHint().width(), sizeHint().height() );
}

@ -170,7 +170,7 @@ void Editor::setupToolbar()
// status in the toolbar for now (ick)
theLabel = new TQLabel(statusText(), topToolbar);
int lWidth = theLabel->tqsizeHint().width();
int lWidth = theLabel->sizeHint().width();
topToolbar->insertWidget(ID_TOOL_STATUS,lWidth, theLabel );
topToolbar->alignItemRight( ID_TOOL_STATUS, true );

@ -62,7 +62,7 @@ HighScore::HighScore
qtarch_Label_3->setGeometry( 10, 45, 30, 30 );
qtarch_Label_3->setFrameStyle( 50 );
qtarch_Label_3->setText( i18n("Pos") );
qtarch_Label_3->tqsetAlignment( AlignCenter );
qtarch_Label_3->setAlignment( AlignCenter );
fnt = qtarch_Label_3->font();
fnt.setBold(true);
qtarch_Label_3->setFont(fnt);
@ -341,7 +341,7 @@ void HighScore::addRow(int num) {
numbersWidgets[num] = new TQLabel( this);
numbersWidgets[num]->setGeometry( 10, 75+(num*30), 30, 30 );
numbersWidgets[num]->setFrameStyle( 50 );
numbersWidgets[num]->tqsetAlignment( AlignRight | AlignVCenter );
numbersWidgets[num]->setAlignment( AlignRight | AlignVCenter );
numbersWidgets[num]->setNum(num+1);
@ -349,13 +349,13 @@ void HighScore::addRow(int num) {
namesWidgets[num] = new TQLabel( this);
namesWidgets[num]->setGeometry( 40, 75+(num*30), 150, 30 );
namesWidgets[num]->setFrameStyle( 50 );
namesWidgets[num]->tqsetAlignment( 289 );
namesWidgets[num]->setAlignment( 289 );
// board
boardWidgets[num] = new TQLabel( this);
boardWidgets[num]->setGeometry( 190, 75+(num*30), 80, 30 );
boardWidgets[num]->setFrameStyle( 50 );
boardWidgets[num]->tqsetAlignment( 289 );
boardWidgets[num]->setAlignment( 289 );
// score
scoresWidgets[num] = new TQLabel( this);

@ -41,7 +41,7 @@ Preview::Preview(TQWidget* parent) : KDialogBase(parent), m_tiles(true)
m_changed = false;
setMainWidget(page);
setFixedSize(tqsizeHint());
setFixedSize(sizeHint());
}
Preview::~Preview()

@ -179,19 +179,19 @@ void KMahjongg::setupStatusBar()
tilesLeftLabel= new TQLabel("Removed: 0000/0000", statusBar());
tilesLeftLabel->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
statusBar()->addWidget(tilesLeftLabel, tilesLeftLabel->tqsizeHint().width(), ID_STATUS_GAME);
statusBar()->addWidget(tilesLeftLabel, tilesLeftLabel->sizeHint().width(), ID_STATUS_GAME);
gameNumLabel = new TQLabel("Game: 000000000000000000000", statusBar());
gameNumLabel->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
statusBar()->addWidget(gameNumLabel, gameNumLabel->tqsizeHint().width(), ID_STATUS_TILENUMBER);
statusBar()->addWidget(gameNumLabel, gameNumLabel->sizeHint().width(), ID_STATUS_TILENUMBER);
statusLabel= new TQLabel("Kmahjongg", statusBar());
statusLabel->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
statusBar()->addWidget(statusLabel, statusLabel->tqsizeHint().width(), ID_STATUS_MESSAGE);
statusBar()->addWidget(statusLabel, statusLabel->sizeHint().width(), ID_STATUS_MESSAGE);
// pStatusBar->tqsetAlignment( ID_STATUS_TILENUMBER, AlignCenter );
// pStatusBar->setAlignment( ID_STATUS_TILENUMBER, AlignCenter );
}
void KMahjongg::setDisplayedWidth()

@ -92,7 +92,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>16</height>

@ -57,7 +57,7 @@ void Field::readSettings()
if ( Settings::magicReveal() ) emit setCheating();
}
TQSize Field::tqsizeHint() const
TQSize Field::sizeHint() const
{
return TQSize(2*frameWidth() + _level.width()*Settings::caseSize(),
2*frameWidth() + _level.height()*Settings::caseSize());
@ -117,7 +117,7 @@ void Field::changeCase(const Coord &p, CaseState newState)
BaseField::changeCase(p, newState);
TQPainter painter(this);
drawCase(painter, p);
if ( isActive() ) emit updatetqStatus( hasMine(p) );
if ( isActive() ) emit updateStatus( hasMine(p) );
}
TQPoint Field::toPoint(const Coord &p) const

@ -39,7 +39,7 @@ class Field : public FieldFrame, public BaseField
public:
Field(TQWidget *parent);
virtual TQSize tqsizeHint() const;
virtual TQSize sizeHint() const;
void setLevel(const Level &level);
void setReplayField(const TQString &field);
@ -68,7 +68,7 @@ class Field : public FieldFrame, public BaseField
SolvingState solvingState() const { return _solvingState; }
signals:
void updatetqStatus(bool);
void updateStatus(bool);
void gameStateChanged(GameState);
void setMood(Mood);
void setCheating();

@ -36,7 +36,7 @@ FieldFrame::FieldFrame(TQWidget *parent)
void FieldFrame::adjustSize()
{
setFixedSize(tqsizeHint());
setFixedSize(sizeHint());
_button.resize(Settings::caseSize(), Settings::caseSize());
TQBitmap mask;
@ -124,22 +124,22 @@ void FieldFrame::drawBox(TQPainter &painter, const TQPoint &p,
bool hasFocus) const
{
qDrawShadePanel(&painter, p.x(), p.y(), _button.width(), _button.height(),
tqcolorGroup(), pressed, 2,
&tqcolorGroup().brush(TQColorGroup::Background));
colorGroup(), pressed, 2,
&colorGroup().brush(TQColorGroup::Background));
if (hasFocus) {
painter.translate(p.x(), p.y());
TQRect fbr = tqstyle().subRect(TQStyle::SR_PushButtonFocusRect, &_button);
tqstyle().tqdrawPrimitive(TQStyle::PE_FocusRect, &painter, fbr,
tqcolorGroup(), TQStyle::Style_Enabled);
colorGroup(), TQStyle::Style_Enabled);
painter.resetXForm();
}
TQRect r(p, _button.size());
const TQPixmap *pixmap = (type==NoPixmap ? 0 : &_pixmaps[type]);
TQColor color = (nbMines==0 ? black : Settings::mineColor(nbMines-1));
tqstyle().drawItem(&painter, r, AlignCenter, tqcolorGroup(), true, pixmap,
tqstyle().drawItem(&painter, r, AlignCenter, colorGroup(), true, pixmap,
text, -1, &color);
if ( advised!=-1 )
tqstyle().drawItem(&painter, r, AlignCenter, tqcolorGroup(), true,
tqstyle().drawItem(&painter, r, AlignCenter, colorGroup(), true,
&_advised[advised], TQString());
}

@ -58,7 +58,7 @@ void KZoomMainWindow::init(const char *popupName)
void KZoomMainWindow::addWidget(TQWidget *widget)
{
widget->adjustSize();
TQWidget *tlw = widget->tqtopLevelWidget();
TQWidget *tlw = widget->topLevelWidget();
KZoomMainWindow *zm =
static_cast<KZoomMainWindow *>(tlw->qt_cast("KZoomMainWindow"));
Q_ASSERT(zm);
@ -74,7 +74,7 @@ void KZoomMainWindow::widgetDestroyed()
bool KZoomMainWindow::eventFilter(TQObject *o, TQEvent *e)
{
if ( e->type()==TQEvent::LayoutHint )
setFixedSize(tqminimumSize()); // because K/TQMainWindow
setFixedSize(minimumSize()); // because K/TQMainWindow
// does not manage fixed central widget
// with hidden menubar...
return KMainWindow::eventFilter(o, e);

@ -50,7 +50,7 @@ public:
/** Add a widget to be managed i.e. the adjustSize() method of the
* widget is called whenever the zoom is changed.
* This function assumes that the tqtopLevelWidget() is the KZoomMainWindow.
* This function assumes that the topLevelWidget() is the KZoomMainWindow.
*/
static void addWidget(TQWidget *widget);

@ -62,7 +62,7 @@ MainWidget::MainWidget()
{
KNotifyClient::startDaemon();
_status = new tqStatus(this);
_status = new Status(this);
connect(_status, TQT_SIGNAL(gameStateChangedSignal(KMines::GameState)),
TQT_SLOT(gameStateChanged(KMines::GameState)));
connect(_status, TQT_SIGNAL(pause()), TQT_SLOT(pause()));

@ -26,7 +26,7 @@
class KAction;
class KToggleAction;
class KSelectAction;
class tqStatus;
class Status;
class MainWidget : public KZoomMainWindow, public KMines
{
@ -50,7 +50,7 @@ class MainWidget : public KZoomMainWindow, public KMines
virtual bool queryExit();
private:
tqStatus *_status;
Status *_status;
KToggleAction *_pause;
KSelectAction *_levels;
KAction *_advise, *_solve;

@ -45,7 +45,7 @@
#include "version.h"
tqStatus::tqStatus(TQWidget *parent)
Status::Status(TQWidget *parent)
: TQWidget(parent, "status"), _oldLevel(Level::Easy)
{
_timer = new TQTimer(this);
@ -93,7 +93,7 @@ tqStatus::tqStatus(TQWidget *parent)
_field = new Field(_fieldContainer);
_field->readSettings();
g->addWidget(_field, 0, 0, AlignCenter);
connect( _field, TQT_SIGNAL(updatetqStatus(bool)), TQT_SLOT(updatetqStatus(bool)) );
connect( _field, TQT_SIGNAL(updateStatus(bool)), TQT_SLOT(updateStatus(bool)) );
connect(_field, TQT_SIGNAL(gameStateChanged(GameState)),
TQT_SLOT(gameStateChangedSlot(GameState)) );
connect(_field, TQT_SIGNAL(setMood(Mood)), smiley, TQT_SLOT(setMood(Mood)));
@ -120,13 +120,13 @@ tqStatus::tqStatus(TQWidget *parent)
top->addMultiCellWidget(_stack, 1, 1, 0, 4);
}
void tqStatus::smileyClicked()
void Status::smileyClicked()
{
if ( _field->gameState()==Paused ) emit pause();
else restartGame();
}
void tqStatus::newGame(int t)
void Status::newGame(int t)
{
if ( _field->gameState()==Paused ) emit pause();
Level::Type type = (Level::Type)t;
@ -135,7 +135,7 @@ void tqStatus::newGame(int t)
else newGame( Settings::customLevel() );
}
void tqStatus::newGame(const Level &level)
void Status::newGame(const Level &level)
{
_timer->stop();
if ( level.type()!=Level::Custom )
@ -143,14 +143,14 @@ void tqStatus::newGame(const Level &level)
_field->setLevel(level);
}
bool tqStatus::checkBlackMark()
bool Status::checkBlackMark()
{
bool bm = ( _field->gameState()==Playing );
if (bm) KExtHighscore::submitScore(KExtHighscore::Lost, this);
return bm;
}
void tqStatus::restartGame()
void Status::restartGame()
{
if ( _field->gameState()==Paused ) emit pause();
else if ( _field->gameState()==Replaying ) {
@ -162,7 +162,7 @@ void tqStatus::restartGame()
}
}
void tqStatus::settingsChanged()
void Status::settingsChanged()
{
_field->readSettings();
@ -173,7 +173,7 @@ void tqStatus::settingsChanged()
newGame(l);
}
void tqStatus::updatetqStatus(bool mine)
void Status::updateStatus(bool mine)
{
int r = _field->nbMines() - _field->nbMarked();
TQColor color = (r<0 && !_field->isSolved() ? red : white);
@ -184,7 +184,7 @@ void tqStatus::updatetqStatus(bool mine)
gameStateChanged(GameOver, true); // ends only for wins
}
void tqStatus::setGameOver(bool won)
void Status::setGameOver(bool won)
{
if ( !won )
KNotifyClient::event(winId(), "explosion", i18n("Explosion!"));
@ -218,16 +218,16 @@ void tqStatus::setGameOver(bool won)
f.appendChild(data);
}
void tqStatus::setStopped()
void Status::setStopped()
{
smiley->setMood(Normal);
updatetqStatus(false);
updateStatus(false);
bool custom = ( _field->level().type()==Level::Custom );
dg->reset(custom);
_field->setSolvingState(Regular);
}
void tqStatus::setPlaying()
void Status::setPlaying()
{
smiley->setMood(Normal);
dg->start();
@ -238,7 +238,7 @@ void tqStatus::setPlaying()
_log = TQDomDocument("kmineslog");
_logRoot = _log.createElement("kmineslog");
_logRoot.setAttribute("version", SHORT_VERSION);
TQDateTime date = TQDateTime::tqcurrentDateTime();
TQDateTime date = TQDateTime::currentDateTime();
_logRoot.setAttribute("date", date.toString(Qt::ISODate));
_logRoot.setAttribute("width", level.width());
_logRoot.setAttribute("height", level.height());
@ -248,7 +248,7 @@ void tqStatus::setPlaying()
_logRoot.appendChild(_logList);
}
void tqStatus::gameStateChanged(GameState state, bool won)
void Status::gameStateChanged(GameState state, bool won)
{
TQWidget *w = _fieldContainer;
@ -280,7 +280,7 @@ void tqStatus::gameStateChanged(GameState state, bool won)
emit gameStateChangedSignal(state);
}
void tqStatus::addAction(const KGrid2D::Coord &c, Field::ActionType type)
void Status::addAction(const KGrid2D::Coord &c, Field::ActionType type)
{
TQDomElement action = _log.createElement("Action");
action.setAttribute("time", dg->pretty());
@ -291,7 +291,7 @@ void tqStatus::addAction(const KGrid2D::Coord &c, Field::ActionType type)
dg->addAction();
}
void tqStatus::advise()
void Status::advise()
{
int res = KMessageBox::warningContinueCancel(this,
i18n("When the solver gives "
@ -304,25 +304,25 @@ void tqStatus::advise()
_field->setAdvised(c, probability);
}
void tqStatus::solve()
void Status::solve()
{
dg->setCheating();
_solver->solve(*_field, false);
_field->setSolvingState(Solved);
}
void tqStatus::solvingDone(bool success)
void Status::solvingDone(bool success)
{
if ( !success ) gameStateChanged(GameOver, false);
}
void tqStatus::solveRate()
void Status::solveRate()
{
SolvingRateDialog sd(*_field, this);
sd.exec();
}
void tqStatus::viewLog()
void Status::viewLog()
{
KDialogBase d(this, "view_log", true, i18n("View Game Log"),
KDialogBase::Close, KDialogBase::Close);
@ -335,7 +335,7 @@ void tqStatus::viewLog()
d.exec();
}
void tqStatus::saveLog()
void Status::saveLog()
{
KURL url = KFileDialog::getSaveURL(TQString(), TQString(), this);
if ( url.isEmpty() ) return;
@ -354,7 +354,7 @@ void tqStatus::saveLog()
tmp.unlink();
}
void tqStatus::loadLog()
void Status::loadLog()
{
KURL url = KFileDialog::getOpenURL(TQString(), TQString(), this);
if ( url.isEmpty() ) return;
@ -390,7 +390,7 @@ void tqStatus::loadLog()
}
}
bool tqStatus::checkLog(const TQDomDocument &doc)
bool Status::checkLog(const TQDomDocument &doc)
{
// check root element
if ( doc.doctype().name()!="kmineslog" ) return false;
@ -435,7 +435,7 @@ bool tqStatus::checkLog(const TQDomDocument &doc)
}
void tqStatus::replayLog()
void Status::replayLog()
{
uint w = _logRoot.attribute("width").toUInt();
uint h = _logRoot.attribute("height").toUInt();
@ -454,7 +454,7 @@ void tqStatus::replayLog()
_timer->start(500);
}
void tqStatus::replayStep()
void Status::replayStep()
{
if ( _index>=_actions.count() ) {
_timer->stop();

@ -30,12 +30,12 @@ class Solver;
class TQWidgetStack;
class TQTimer;
class tqStatus : public TQWidget, public KMines
class Status : public TQWidget, public KMines
{
Q_OBJECT
TQ_OBJECT
public :
tqStatus(TQWidget *parent);
Status(TQWidget *parent);
const Level &currentLevel() const { return _field->level(); }
bool isPlaying() const { return _field->gameState()==Playing; }
@ -51,7 +51,7 @@ class tqStatus : public TQWidget, public KMines
public slots:
void newGame(int type);
void restartGame();
void updatetqStatus(bool);
void updateStatus(bool);
void pauseGame() { _field->pause(); }
void moveUp() { _field->moveCursor(KGrid2D::SquareBase::Up); }

@ -78,7 +78,7 @@ MainWindow::MainWindow(TQWidget *parent, const char* name, WFlags /*fl*/) :
lst += i18n("Master");
m_levels->setItems(lst);
setFixedSize(tqminimumSizeHint());
setFixedSize(minimumSizeHint());
statusBar()->insertItem("abcdefghijklmnopqrst: 0 ",1);
setAutoSaveSettings();

@ -33,7 +33,7 @@ Ball::Ball(TQCanvas *canvas)
//font.setPixelSize(10);
label = new TQCanvasText("", font, canvas);
label->setColor(white);
label->tqsetVisible(false);
label->setVisible(false);
// this sets z
setState(Stopped);
@ -438,12 +438,12 @@ BallState Ball::currentState()
void Ball::showInfo()
{
label->tqsetVisible(isVisible());
label->setVisible(isVisible());
}
void Ball::hideInfo()
{
label->tqsetVisible(false);
label->setVisible(false);
}
void Ball::setName(const TQString &name)
@ -459,8 +459,8 @@ void Ball::setCanvas(TQCanvas *c)
void Ball::setVisible(bool yes)
{
TQCanvasEllipse::tqsetVisible(yes);
TQCanvasEllipse::setVisible(yes);
label->tqsetVisible(yes && game && game->isInfoShowing());
label->setVisible(yes && game && game->isInfoShowing());
}

@ -113,7 +113,7 @@ public:
*/
virtual void clean() {};
/**
* scale factor changed (game->scaleFactor(), the world matrix is game->tqworldMatrix())
* scale factor changed (game->scaleFactor(), the world matrix is game->worldMatrix())
* NOTE: not used in Kolf 1.1, which comes with KDE 3.1.
*/
virtual void scaleChanged() {};

@ -144,9 +144,9 @@ void Arrow::setZ(double newz)
void Arrow::setVisible(bool yes)
{
TQCanvasLine::tqsetVisible(yes);
line1->tqsetVisible(yes);
line2->tqsetVisible(yes);
TQCanvasLine::setVisible(yes);
line1->setVisible(yes);
line2->setVisible(yes);
}
void Arrow::moveBy(double dx, double dy)
@ -264,10 +264,10 @@ Bridge::Bridge(TQRect rect, TQCanvas *canvas)
setWallZ(z() + 0.01);
setWallColor(color);
topWall->tqsetVisible(false);
botWall->tqsetVisible(false);
leftWall->tqsetVisible(false);
rightWall->tqsetVisible(false);
topWall->setVisible(false);
botWall->setVisible(false);
leftWall->setVisible(false);
rightWall->setVisible(false);
point = new RectPoint(color, this, canvas);
editModeChanged(false);
@ -321,7 +321,7 @@ void Bridge::aboutToDie()
void Bridge::editModeChanged(bool changed)
{
point->tqsetVisible(changed);
point->setVisible(changed);
moveBy(0, 0);
}
@ -454,7 +454,7 @@ Windmill::Windmill(TQRect rect, TQCanvas *canvas)
{
guard = new WindmillGuard(canvas);
guard->setPen(TQPen(black, 5));
guard->tqsetVisible(true);
guard->setVisible(true);
guard->setAlwaysShow(true);
setSpeed(5);
guard->setZ(wallZ() + .1);
@ -467,8 +467,8 @@ Windmill::Windmill(TQRect rect, TQCanvas *canvas)
right->setAlwaysShow(true);
left->setZ(wallZ());
right->setZ(wallZ());
left->tqsetVisible(true);
right->tqsetVisible(true);
left->setVisible(true);
right->setVisible(true);
setTopWallVisible(false);
setBotWallVisible(false);
@ -629,12 +629,12 @@ void Sign::draw(TQPainter &painter)
TQSimpleRichText txt(m_text, kapp->font());
const int indent = wallPen().width() + 3;
txt.setWidth(width() - 2*indent);
TQColorGroup tqcolorGroup;
tqcolorGroup.setColor(TQColorGroup::Foreground, black);
tqcolorGroup.setColor(TQColorGroup::Text, black);
tqcolorGroup.setColor(TQColorGroup::Background, black);
tqcolorGroup.setColor(TQColorGroup::Base, black);
txt.draw(&painter, x() + indent, y(), TQRect(x() + indent, y(), width() - indent, height() - indent), tqcolorGroup);
TQColorGroup colorGroup;
colorGroup.setColor(TQColorGroup::Foreground, black);
colorGroup.setColor(TQColorGroup::Text, black);
colorGroup.setColor(TQColorGroup::Background, black);
colorGroup.setColor(TQColorGroup::Base, black);
txt.draw(&painter, x() + indent, y(), TQRect(x() + indent, y(), width() - indent, height() - indent), colorGroup);
}
/////////////////////////
@ -733,7 +733,7 @@ Ellipse::Ellipse(TQCanvas *canvas)
setChangeEnabled(false);
setChangeEvery(50);
count = 0;
tqsetVisible(true);
setVisible(true);
point = new RectPoint(black, this, canvas);
point->setSizeFactor(2.0);
@ -750,7 +750,7 @@ void Ellipse::setChangeEnabled(bool changeEnabled)
setAnimated(m_changeEnabled);
if (!m_changeEnabled)
tqsetVisible(true);
setVisible(true);
}
TQPtrList<TQCanvasItem> Ellipse::moveableItems() const
@ -775,7 +775,7 @@ void Ellipse::moveBy(double dx, double dy)
void Ellipse::editModeChanged(bool changed)
{
point->tqsetVisible(changed);
point->setVisible(changed);
moveBy(0, 0);
}
@ -788,7 +788,7 @@ void Ellipse::advance(int phase)
if (count > (m_changeEvery + 10) * 1.8)
count = 0;
if (count == 0)
tqsetVisible(!isVisible());
setVisible(!isVisible());
count++;
}
@ -819,7 +819,7 @@ Config *Ellipse::config(TQWidget *parent)
void Ellipse::aboutToSave()
{
tqsetVisible(true);
setVisible(true);
dontHide = true;
}
@ -860,7 +860,7 @@ bool Puddle::collision(Ball *ball, long int /*id*/)
if (ball->isVisible())
{
TQCanvasRectangle i(TQRect(ball->x(), ball->y(), 1, 1), canvas());
i.tqsetVisible(true);
i.setVisible(true);
// is center of ball in?
if (i.collidesWith(this)/* && ball->curVector().magnitude() < 4*/)
@ -868,7 +868,7 @@ bool Puddle::collision(Ball *ball, long int /*id*/)
playSound("puddle");
ball->setAddStroke(ball->addStroke() + 1);
ball->setPlaceOnGround(true);
ball->tqsetVisible(false);
ball->setVisible(false);
ball->setState(Stopped);
ball->setVelocity(0, 0);
if (game && game->curBall() == ball)
@ -911,7 +911,7 @@ Sand::Sand(TQCanvas *canvas)
bool Sand::collision(Ball *ball, long int /*id*/)
{
TQCanvasRectangle i(TQRect(ball->x(), ball->y(), 1, 1), canvas());
i.tqsetVisible(true);
i.setVisible(true);
// is center of ball in?
if (i.collidesWith(this)/* && ball->curVector().magnitude() < 4*/)
@ -954,12 +954,12 @@ Putter::Putter(TQCanvas *canvas)
void Putter::showInfo()
{
guideLine->tqsetVisible(isVisible());
guideLine->setVisible(isVisible());
}
void Putter::hideInfo()
{
guideLine->tqsetVisible(m_showGuideLine? isVisible() : false);
guideLine->setVisible(m_showGuideLine? isVisible() : false);
}
void Putter::moveBy(double dx, double dy)
@ -976,8 +976,8 @@ void Putter::setShowGuideLine(bool yes)
void Putter::setVisible(bool yes)
{
TQCanvasLine::tqsetVisible(yes);
guideLine->tqsetVisible(m_showGuideLine? yes : false);
TQCanvasLine::setVisible(yes);
guideLine->setVisible(m_showGuideLine? yes : false);
}
void Putter::setOrigin(int _x, int _y)
@ -1002,11 +1002,11 @@ void Putter::go(Direction d, Amount amount)
{
case Forwards:
len -= 1;
guideLine->tqsetVisible(false);
guideLine->setVisible(false);
break;
case Backwards:
len += 1;
guideLine->tqsetVisible(false);
guideLine->setVisible(false);
break;
case D_Left:
angle += addition;
@ -1085,7 +1085,7 @@ void Bumper::moveBy(double dx, double dy)
void Bumper::editModeChanged(bool changed)
{
inside->tqsetVisible(!changed);
inside->setVisible(!changed);
}
void Bumper::advance(int phase)
@ -1166,7 +1166,7 @@ HoleResult Hole::result(TQPoint p, double s, bool * /*wasCenter*/)
return Result_Miss;
TQCanvasRectangle i(TQRect(p, TQSize(1, 1)), canvas());
i.tqsetVisible(true);
i.setVisible(true);
// is center of ball in cup?
if (i.collidesWith(this))
@ -1238,7 +1238,7 @@ BlackHole::BlackHole(TQCanvas *canvas)
setSize(width(), width() / .8);
const float factor = 1.3;
outside->setSize(width() * factor, height() * factor);
outside->tqsetVisible(true);
outside->setVisible(true);
moveBy(0, 0);
@ -1249,7 +1249,7 @@ void BlackHole::showInfo()
{
delete infoLine;
infoLine = new TQCanvasLine(canvas());
infoLine->tqsetVisible(true);
infoLine->setVisible(true);
infoLine->setPen(TQPen(exitItem->pen().color(), 2));
infoLine->setZ(10000);
infoLine->setPoints(x(), y(), exitItem->x(), exitItem->y());
@ -1277,7 +1277,7 @@ void BlackHole::updateInfo()
{
if (infoLine)
{
infoLine->tqsetVisible(true);
infoLine->setVisible(true);
infoLine->setPoints(x(), y(), exitItem->x(), exitItem->y());
exitItem->showInfo();
}
@ -1338,7 +1338,7 @@ bool BlackHole::place(Ball *ball, bool /*wasCenter*/)
ball->setVelocity(0, 0);
ball->setState(Stopped);
ball->tqsetVisible(false);
ball->setVisible(false);
ball->setForceStillGoing(true);
double magnitude = Vector(TQPoint(x(), y()), TQPoint(exitItem->x(), exitItem->y())).magnitude();
@ -1367,7 +1367,7 @@ void BlackHole::eject(Ball *ball, double speed)
ball->setVector(v);
ball->setForceStillGoing(false);
ball->tqsetVisible(true);
ball->setVisible(true);
ball->setState(Rolling);
runs++;
@ -1418,7 +1418,7 @@ void BlackHole::finishMe()
}
exitItem->setPoints(start.x(), start.y(), end.x(), end.y());
exitItem->tqsetVisible(true);
exitItem->setVisible(true);
}
void BlackHole::save(KConfig *cfg)
@ -1439,7 +1439,7 @@ BlackHoleExit::BlackHoleExit(BlackHole *blackHole, TQCanvas *canvas)
setZ(blackHole->z());
arrow->setZ(z() - .00001);
updateArrowLength();
arrow->tqsetVisible(false);
arrow->setVisible(false);
}
void BlackHoleExit::aboutToDie()
@ -1484,12 +1484,12 @@ void BlackHoleExit::editModeChanged(bool editing)
void BlackHoleExit::showInfo()
{
arrow->tqsetVisible(true);
arrow->setVisible(true);
}
void BlackHoleExit::hideInfo()
{
arrow->tqsetVisible(false);
arrow->setVisible(false);
}
Config *BlackHoleExit::config(TQWidget *parent)
@ -1639,7 +1639,7 @@ void WallPoint::updateVisible()
void WallPoint::editModeChanged(bool changed)
{
editing = changed;
tqsetVisible(true);
setVisible(true);
if (!editing)
updateVisible();
}
@ -1741,8 +1741,8 @@ Wall::Wall(TQCanvas *canvas)
startItem = new WallPoint(true, this, canvas);
endItem = new WallPoint(false, this, canvas);
startItem->tqsetVisible(true);
endItem->tqsetVisible(true);
startItem->setVisible(true);
endItem->setVisible(true);
setPen(TQPen(darkRed, 3));
setPoints(-15, 10, 15, -5);
@ -1777,10 +1777,10 @@ void Wall::setAlwaysShow(bool yes)
void Wall::setVisible(bool yes)
{
TQCanvasLine::tqsetVisible(yes);
TQCanvasLine::setVisible(yes);
startItem->tqsetVisible(yes);
endItem->tqsetVisible(yes);
startItem->setVisible(yes);
endItem->setVisible(yes);
startItem->updateVisible();
endItem->updateVisible();
}
@ -2212,7 +2212,7 @@ KolfGame::KolfGame(ObjectList *obj, PlayerList *players, TQString filename, TQWi
pic.load(locate("appdata", "pics/grass.png"));
TQPixmapCache::insert("grass", pic);
}
course->tqsetBackgroundPixmap(pic);
course->setBackgroundPixmap(pic);
setCanvas(course);
move(0, 0);
@ -2225,7 +2225,7 @@ KolfGame::KolfGame(ObjectList *obj, PlayerList *players, TQString filename, TQWi
highlighter = new TQCanvasRectangle(course);
highlighter->setPen(TQPen(yellow, 1));
highlighter->setBrush(TQBrush(NoBrush));
highlighter->tqsetVisible(false);
highlighter->setVisible(false);
highlighter->setZ(10000);
// shows some info about hole
@ -2237,14 +2237,14 @@ KolfGame::KolfGame(ObjectList *obj, PlayerList *players, TQString filename, TQWi
infoText->move(15, width/2);
infoText->setZ(10001);
infoText->setFont(font);
infoText->tqsetVisible(false);
infoText->setVisible(false);
// create the advanced putting indicator
strokeCircle = new StrokeCircle(course);
strokeCircle->move(width - 90, height - 90);
strokeCircle->setSize(80, 80);
strokeCircle->setThickness(8);
strokeCircle->tqsetVisible(false);
strokeCircle->setVisible(false);
strokeCircle->setValue(0);
strokeCircle->setMaxValue(360);
@ -2252,7 +2252,7 @@ KolfGame::KolfGame(ObjectList *obj, PlayerList *players, TQString filename, TQWi
whiteBall = new Ball(course);
whiteBall->setGame(this);
whiteBall->setColor(white);
whiteBall->tqsetVisible(false);
whiteBall->setVisible(false);
whiteBall->setDoDetect(false);
int highestLog = 0;
@ -2382,7 +2382,7 @@ void KolfGame::addBorderWall(TQPoint start, TQPoint end)
{
Wall *wall = new Wall(course);
wall->setPoints(start.x(), start.y(), end.x(), end.y());
wall->tqsetVisible(true);
wall->setVisible(true);
wall->setGame(this);
wall->setZ(998.7);
borderWalls.append(wall);
@ -2420,7 +2420,7 @@ void KolfGame::handleMousePressEvent(TQMouseEvent *e)
list.pop_front();
moving = false;
highlighter->tqsetVisible(false);
highlighter->setVisible(false);
selectedItem = 0;
movingItem = 0;
@ -2458,7 +2458,7 @@ void KolfGame::handleMousePressEvent(TQMouseEvent *e)
setCursor(KCursor::sizeAllCursor());
emit newSelectedItem(citem);
highlighter->tqsetVisible(true);
highlighter->setVisible(true);
TQRect rect = selectedItem->boundingRect();
highlighter->move(rect.x() + 1, rect.y() + 1);
highlighter->setSize(rect.width(), rect.height());
@ -2608,7 +2608,7 @@ void KolfGame::keyPressEvent(TQKeyEvent *e)
putting = false;
stroking = false;
finishStroking = false;
strokeCircle->tqsetVisible(false);
strokeCircle->setVisible(false);
putterTimer->stop();
putter->setOrigin((*curPlayer).ball()->x(), (*curPlayer).ball()->y());
break;
@ -2701,7 +2701,7 @@ void KolfGame::puttPress()
strokeCircle->move(px + pw / 2 + 10, py + 10);
else
strokeCircle->move(px + pw / 2 + 10, py - 10 - strokeCircle->height());
strokeCircle->tqsetVisible(true);
strokeCircle->setVisible(true);
}
putterTimer->start(putterTimerMsec);
}
@ -2741,7 +2741,7 @@ void KolfGame::keyReleaseEvent(TQKeyEvent *e)
{
lastDelId = citem->curId();
highlighter->tqsetVisible(false);
highlighter->setVisible(false);
items.removeRef(item);
citem->hideInfo();
citem->aboutToDelete();
@ -2907,7 +2907,7 @@ void KolfGame::putterTimeout()
{
// aborted
putting = false;
strokeCircle->tqsetVisible(false);
strokeCircle->setVisible(false);
}
else if (strength > maxStrength || puttReverse)
{
@ -2950,7 +2950,7 @@ void KolfGame::putterTimeout()
putter->go(Forwards);
else
{
strokeCircle->tqsetVisible(false);
strokeCircle->setVisible(false);
finishStroking = false;
putterTimer->stop();
putting = false;
@ -3084,7 +3084,7 @@ void KolfGame::loadStateList()
if ((*curPlayer).id() == info.id)
ballMoved();
else
player.ball()->tqsetVisible(!info.beginningOfHole);
player.ball()->setVisible(!info.beginningOfHole);
player.setScoreForHole(info.score, curHole);
player.ball()->setState(info.state);
emit scoreChanged(info.id, curHole, info.score);
@ -3186,7 +3186,7 @@ void KolfGame::shotDone()
}
}
ball->tqsetVisible(true);
ball->setVisible(true);
ball->setState(Stopped);
(*it).ball()->setDoDetect(true);
@ -3207,7 +3207,7 @@ void KolfGame::shotDone()
if (curStrokes >= holeInfo.maxStrokes() && holeInfo.hasMaxStrokes())
{
ball->setState(Holed);
ball->tqsetVisible(false);
ball->setVisible(false);
// move to center in case he/she hit out
ball->move(width / 2, height / 2);
@ -3236,7 +3236,7 @@ void KolfGame::shotDone()
emit newPlayersTurn(&(*curPlayer));
(*curPlayer).ball()->tqsetVisible(true);
(*curPlayer).ball()->setVisible(true);
putter->setAngle((*curPlayer).ball());
putter->setOrigin((*curPlayer).ball()->x(), (*curPlayer).ball()->y());
@ -3256,7 +3256,7 @@ void KolfGame::startBall(const Vector &vector)
playSound("hit");
emit inPlayStart();
putter->tqsetVisible(false);
putter->setVisible(false);
(*curPlayer).ball()->setState(Rolling);
(*curPlayer).ball()->setVector(vector);
@ -3310,7 +3310,7 @@ void KolfGame::sayWhosGoing()
void KolfGame::holeDone()
{
for (PlayerList::Iterator it = players->begin(); it != players->end(); ++it)
(*it).ball()->tqsetVisible(false);
(*it).ball()->setVisible(false);
startNextHole();
sayWhosGoing();
}
@ -3407,7 +3407,7 @@ void KolfGame::startNextHole()
if ((int)(*it).scores().count() < curHole)
(*it).addHole();
(*it).ball()->setVelocity(0, 0);
(*it).ball()->tqsetVisible(false);
(*it).ball()->setVisible(false);
}
emit newPlayersTurn(&(*curPlayer));
@ -3437,7 +3437,7 @@ void KolfGame::startNextHole()
updateShowInfo();
// this is from shotDone()
(*curPlayer).ball()->tqsetVisible(true);
(*curPlayer).ball()->setVisible(true);
putter->setOrigin((*curPlayer).ball()->x(), (*curPlayer).ball()->y());
updateMouse();
@ -3455,7 +3455,7 @@ void KolfGame::showInfo()
infoText->move((width - TQFontMetrics(infoText->font()).width(text)) / 2, infoText->y());
infoText->setText(text);
// I hate this text! Let's not show it
//infoText->tqsetVisible(true);
//infoText->setVisible(true);
emit newStatusText(text);
}
@ -3473,7 +3473,7 @@ void KolfGame::showInfoDlg(bool addDontShowAgain)
void KolfGame::hideInfo()
{
infoText->setText("");
infoText->tqsetVisible(false);
infoText->setVisible(false);
emit newStatusText(TQString());
}
@ -3593,7 +3593,7 @@ void KolfGame::openFile()
newItem->move(x, y);
canvasItem->firstMove(x, y);
newItem->tqsetVisible(true);
newItem->setVisible(true);
// make things actually show
if (!hasFinalLoad)
@ -3634,7 +3634,7 @@ void KolfGame::openFile()
clearHole();
setModified(false);
for (PlayerList::Iterator it = players->begin(); it != players->end(); ++it)
(*it).ball()->tqsetVisible(false);
(*it).ball()->setVisible(false);
return;
}
@ -3719,7 +3719,7 @@ void KolfGame::addNewObject(Object *newObj)
{
TQCanvasItem *newItem = newObj->newObject(course);
items.append(newItem);
newItem->tqsetVisible(true);
newItem->setVisible(true);
CanvasItem *canvasItem = dynamic_cast<CanvasItem *>(newItem);
if (!canvasItem)
@ -3826,11 +3826,11 @@ void KolfGame::addNewHole()
// make sure even the current player isn't showing
for (PlayerList::Iterator it = players->begin(); it != players->end(); ++it)
(*it).ball()->tqsetVisible(false);
(*it).ball()->setVisible(false);
whiteBall->tqsetVisible(editing);
highlighter->tqsetVisible(false);
putter->tqsetVisible(!editing);
whiteBall->setVisible(editing);
highlighter->setVisible(false);
putter->setVisible(!editing);
inPlay = false;
// add default objects
@ -4066,16 +4066,16 @@ void KolfGame::toggleEditMode()
{
// curplayer shouldn't be hidden no matter what
if ((*it).ball()->beginningOfHole() && it != curPlayer)
(*it).ball()->tqsetVisible(false);
(*it).ball()->setVisible(false);
else
(*it).ball()->tqsetVisible(!editing);
(*it).ball()->setVisible(!editing);
}
whiteBall->tqsetVisible(editing);
highlighter->tqsetVisible(false);
whiteBall->setVisible(editing);
highlighter->setVisible(false);
// shouldn't see putter whilst editing
putter->tqsetVisible(!editing);
putter->setVisible(!editing);
if (editing)
autoSaveTimer->start(autoSaveMsec);
@ -4103,7 +4103,7 @@ void KolfGame::playSound(TQString file, double vol)
}
}
file = soundDir + file + TQString::tqfromLatin1(".wav");
file = soundDir + file + TQString::fromLatin1(".wav");
// not needed when all of the files are in the distribution
//if (!TQFile::exists(file))
@ -4183,7 +4183,7 @@ void KolfGame::setBorderWalls(bool showing)
{
Wall *wall = 0;
for (wall = borderWalls.first(); wall; wall = borderWalls.next())
wall->tqsetVisible(showing);
wall->setVisible(showing);
}
void KolfGame::setUseAdvancedPutting(bool yes)

@ -537,7 +537,7 @@ void Kolf::saveGame()
void Kolf::loadGame()
{
loadedGame = KFileDialog::getOpenFileName(":savedkolf", TQString::tqfromLatin1("application/x-kolf"), this, i18n("Pick Kolf Saved Game"));
loadedGame = KFileDialog::getOpenFileName(":savedkolf", TQString::fromLatin1("application/x-kolf"), this, i18n("Pick Kolf Saved Game"));
if (loadedGame.isNull())
return;

@ -253,7 +253,7 @@ void NewGameDialog::selectionChanged()
void NewGameDialog::addCourse()
{
TQStringList files = KFileDialog::getOpenFileNames(":kourses", TQString::tqfromLatin1("application/x-kourse"), this, i18n("Pick Kolf Course"));
TQStringList files = KFileDialog::getOpenFileNames(":kourses", TQString::fromLatin1("application/x-kourse"), this, i18n("Pick Kolf Course"));
bool hasDuplicates = false;

@ -71,7 +71,7 @@ void Slope::showInfo()
arrow->setZ(z() + .01);
arrow->setVisible(true);
}
text->tqsetVisible(true);
text->setVisible(true);
}
void Slope::hideInfo()
@ -80,7 +80,7 @@ void Slope::hideInfo()
Arrow *arrow = 0;
for (arrow = arrows.first(); arrow; arrow = arrows.next())
arrow->setVisible(false);
text->tqsetVisible(false);
text->setVisible(false);
}
void Slope::aboutToDie()
@ -179,7 +179,7 @@ void Slope::moveArrow()
void Slope::editModeChanged(bool changed)
{
point->tqsetVisible(changed);
point->setVisible(changed);
moveBy(0, 0);
}

@ -46,10 +46,10 @@ FleetDlg::FleetDlg( TQWidget *parent, AttackFleetList *fleets )
fleetTable->addColumn(i18n("Ships"));
fleetTable->addColumn(i18n("Kill Percentage"));
fleetTable->addColumn(i18n("Arrival Turn"));
fleetTable->setMinimumSize( fleetTable->tqsizeHint() );
fleetTable->setMinimumSize( fleetTable->sizeHint() );
KPushButton *okButton = new KPushButton( KStdGuiItem::ok(), this );
okButton->setMinimumSize( okButton->tqsizeHint() );
okButton->setMinimumSize( okButton->sizeHint() );
okButton->setDefault(true);
TQVBoxLayout *tqlayout1 = new TQVBoxLayout( this );

@ -60,10 +60,10 @@ GameBoard::GameBoard( TQWidget *parent )
turnCounter = new TQLabel( this );
turnCounter->setPalette( palette );
turnCounter->setText( "Turn" );
turnCounter->setMaximumHeight( turnCounter->tqsizeHint().height() );
turnCounter->setMaximumHeight( turnCounter->sizeHint().height() );
endTurn = new TQPushButton( i18n("End Turn"), this );
endTurn->setFixedSize( endTurn->tqsizeHint() );
endTurn->setFixedSize( endTurn->sizeHint() );
endTurn->setPalette( palette );
shipCountEdit = new TQLineEdit( this );
@ -137,7 +137,7 @@ GameBoard::~GameBoard()
}
#if 0
TQSize GameBoard::tqsizeHint() const
TQSize GameBoard::sizeHint() const
{
return TQSize( 600, 550 );
}

@ -32,7 +32,7 @@ public:
bool isGameInProgress(void) const { return gameInProgress; }
// virtual TQSize tqsizeHint() const;
// virtual TQSize sizeHint() const;
protected slots:
void startNewGame();

@ -20,7 +20,7 @@ GameEndDlg::GameEndDlg( TQWidget *parent )
// Create controls
TQLabel *label1 = new TQLabel( i18n("This is the last turn.\nDo you wish to add extra turns?")+"\n\n", page );
label1->tqsetAlignment( AlignCenter );
label1->setAlignment( AlignCenter );
turnCountLbl = new TQLabel( page );
turnCount = new TQSlider( 1, 40, 1, 5, Qt::Horizontal, page );

@ -147,7 +147,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>0</width>
<height>20</height>
@ -172,7 +172,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>0</width>
<height>20</height>
@ -193,7 +193,7 @@
<property name="sizeType">
<enum>Fixed</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>
@ -262,7 +262,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>0</width>
<height>20</height>
@ -284,7 +284,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>0</width>
<height>20</height>
@ -303,7 +303,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>16</height>
@ -328,7 +328,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>31</width>
<height>20</height>
@ -353,7 +353,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>51</width>
<height>20</height>

@ -38,8 +38,8 @@ PlanetInfo::PlanetInfo( TQWidget *parent, TQPalette palette )
setMouseTracking( true );
setMinimumSize( tqsizeHint() );
setMaximumHeight( tqsizeHint().height() );
setMinimumSize( sizeHint() );
setMaximumHeight( sizeHint().height() );
}
PlanetInfo::~PlanetInfo()
@ -47,15 +47,15 @@ PlanetInfo::~PlanetInfo()
emptyPlanetInfoList();
}
TQSize PlanetInfo::tqsizeHint() const
TQSize PlanetInfo::sizeHint() const
{
int height;
height = name->tqsizeHint().height() +
owner->tqsizeHint().height() +
ships->tqsizeHint().height() +
production->tqsizeHint().height()+
kill_percent->tqsizeHint().height();
height = name->sizeHint().height() +
owner->sizeHint().height() +
ships->sizeHint().height() +
production->sizeHint().height()+
kill_percent->sizeHint().height();
return TQSize( 100, height );
}

@ -31,7 +31,7 @@ public:
void setPlanetList( PlanetList &newPlanets );
void rescanPlanets();
TQSize tqsizeHint() const;
TQSize sizeHint() const;
public slots:
void showPlanet( Planet * );

@ -39,10 +39,10 @@ ScoreDlg::ScoreDlg( TQWidget *parent, const TQString& title, PlayerList *players
scoreTable->addColumn(i18n("Fleets Launched"));
scoreTable->addColumn(i18n("Fleets Destroyed"));
scoreTable->addColumn(i18n("Ships Destroyed"));
scoreTable->setMinimumSize( scoreTable->tqsizeHint() );
scoreTable->setMinimumSize( scoreTable->sizeHint() );
KPushButton *okButton = new KPushButton( KStdGuiItem::ok(), this );
okButton->setMinimumSize( okButton->tqsizeHint() );
okButton->setMinimumSize( okButton->sizeHint() );
okButton->setDefault(true);
TQVBoxLayout *tqlayout1 = new TQVBoxLayout( this );

@ -132,7 +132,7 @@ since kpat-0.2
since kpat-0.1
- changed shading tqcolorGroup (Paul)
- changed shading colorGroup (Paul)
- fixed drawing of suit symbols (Paul)
- renamed "very easy" to "cheating" :) (Paul)
- fixed spurious core dump(Paul)

@ -99,7 +99,7 @@ const Dealer *Dealer::instance()
void Dealer::setBackgroundPixmap(const TQPixmap &background, const TQColor &midcolor)
{
_midcolor = midcolor;
canvas()->tqsetBackgroundPixmap(background);
canvas()->setBackgroundPixmap(background);
for (PileList::Iterator it = piles.begin(); it != piles.end(); ++it) {
(*it)->resetCache();
(*it)->initSizes();
@ -114,7 +114,7 @@ void Dealer::setupActions() {
if (actions() & Dealer::Hint) {
ahint = new KAction( i18n("&Hint"), TQString::tqfromLatin1("wizard"), Key_H, TQT_TQOBJECT(this),
ahint = new KAction( i18n("&Hint"), TQString::fromLatin1("wizard"), Key_H, TQT_TQOBJECT(this),
TQT_SLOT(hint()),
parent()->actionCollection(), "game_hint");
actionlist.append(ahint);
@ -122,7 +122,7 @@ void Dealer::setupActions() {
ahint = 0;
if (actions() & Dealer::Demo) {
ademo = new KToggleAction( i18n("&Demo"), TQString::tqfromLatin1("1rightarrow"), CTRL+Key_D, TQT_TQOBJECT(this),
ademo = new KToggleAction( i18n("&Demo"), TQString::fromLatin1("1rightarrow"), CTRL+Key_D, TQT_TQOBJECT(this),
TQT_SLOT(toggleDemo()),
parent()->actionCollection(), "game_demo");
actionlist.append(ademo);
@ -130,14 +130,14 @@ void Dealer::setupActions() {
ademo = 0;
if (actions() & Dealer::Redeal) {
aredeal = new KAction (i18n("&Redeal"), TQString::tqfromLatin1("queue"), 0, TQT_TQOBJECT(this),
aredeal = new KAction (i18n("&Redeal"), TQString::fromLatin1("queue"), 0, TQT_TQOBJECT(this),
TQT_SLOT(redeal()),
parent()->actionCollection(), "game_redeal");
actionlist.append(aredeal);
} else
aredeal = 0;
parent()->guiFactory()->plugActionList( parent(), TQString::tqfromLatin1("game_actions"), actionlist);
parent()->guiFactory()->plugActionList( parent(), TQString::fromLatin1("game_actions"), actionlist);
}
Dealer::~Dealer()
@ -145,7 +145,7 @@ Dealer::~Dealer()
if (!_won)
countLoss();
clearHints();
parent()->guiFactory()->unplugActionList( parent(), TQString::tqfromLatin1("game_actions"));
parent()->guiFactory()->unplugActionList( parent(), TQString::fromLatin1("game_actions"));
while (!piles.isEmpty())
delete piles.first(); // removes itself
@ -535,8 +535,8 @@ void Dealer::resizeEvent(TQResizeEvent *e)
{
int x = width();
int y = height();
int hs = horizontalScrollBar()->tqsizeHint().height();
int vs = verticalScrollBar()->tqsizeHint().width();
int hs = horizontalScrollBar()->sizeHint().height();
int vs = verticalScrollBar()->sizeHint().width();
int mx = minsize.width();
int my = minsize.height();
@ -778,7 +778,7 @@ void Dealer::setState(State *st)
CardState s = *it;
bool target = c->takenDown(); // abused
s.source->add(c, s.source_index);
c->tqsetVisible(s.source->isVisible());
c->setVisible(s.source->isVisible());
c->setAnimated(false);
c->setX(s.x);
c->setY(s.y);
@ -962,7 +962,7 @@ void Dealer::openGame(TQDomDocument &doc)
(*it2)->setX(card.attribute("x").toInt());
(*it2)->setY(card.attribute("y").toInt());
(*it2)->setZ(card.attribute("z").toInt());
(*it2)->tqsetVisible(p->isVisible());
(*it2)->setVisible(p->isVisible());
cards.remove(it2);
break;
}

@ -379,7 +379,7 @@ TQString FreecellBase::solverFormat() const
tmp += suitToString(target[i]->top()->suit()) + "-" + rankToString(target[i]->top()->rank()) + " ";
}
if (!tmp.isEmpty())
output += TQString::tqfromLatin1("Foundations: %1\n").tqarg(tmp);
output += TQString::fromLatin1("Foundations: %1\n").tqarg(tmp);
tmp.truncate(0);
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()) + " ";
}
if (!tmp.isEmpty())
output += TQString::tqfromLatin1("Freecells: %1\n").tqarg(tmp);
output += TQString::fromLatin1("Freecells: %1\n").tqarg(tmp);
for (uint i = 0; i < store.count(); i++)
{

@ -173,7 +173,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>250</width>
<height>20</height>
@ -192,7 +192,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>71</height>
@ -223,7 +223,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>

@ -32,7 +32,7 @@ Pile::Pile( int _index, Dealer* _dealer)
// Make the patience aware of this pile.
dealer()->addPile(this);
TQCanvasRectangle::tqsetVisible(true); // default
TQCanvasRectangle::setVisible(true); // default
_checkIndex = -1;
m_addFlags = 0;
m_removeFlags = 0;
@ -193,12 +193,12 @@ bool Pile::legalRemove(const Card *c) const
void Pile::setVisible(bool vis)
{
TQCanvasRectangle::tqsetVisible(vis);
TQCanvasRectangle::setVisible(vis);
dealer()->enlargeCanvas(this);
for (CardList::Iterator it = m_cards.begin(); it != m_cards.end(); ++it)
{
(*it)->tqsetVisible(vis);
(*it)->setVisible(vis);
dealer()->enlargeCanvas(*it);
}
}

@ -75,7 +75,7 @@ pWidget::pWidget()
actionCollection(), "save");
(void)new KAction(i18n("&Choose Game..."), 0, TQT_TQOBJECT(this), TQT_SLOT(chooseGame()),
actionCollection(), "choose_game");
(void)new KAction(i18n("Restart &Game"), TQString::tqfromLatin1("reload"), 0,
(void)new KAction(i18n("Restart &Game"), TQString::fromLatin1("reload"), 0,
TQT_TQOBJECT(this), TQT_SLOT(restart()),
actionCollection(), "restart_game");
(void)KStdAction::help(TQT_TQOBJECT(this), TQT_SLOT(helpGame()), actionCollection(), "help_game");
@ -468,11 +468,11 @@ void pWidget::gameLost()
// The following code is taken out of kmessagebox.cpp in tdeui.
// Is there a better way?
KConfig *config = 0;
TQString grpNotifMsgs = TQString::tqfromLatin1("Notification Messages");
TQString grpNotifMsgs = TQString::fromLatin1("Notification Messages");
config = KGlobal::config();
KConfigGroupSaver saver(config,
TQString::tqfromLatin1("Notification Messages"));
TQString::fromLatin1("Notification Messages"));
TQString dontAsk = config->readEntry(dontAskAgainName).lower();
// If we are ordered never to ask again and to continue the game,

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

@ -275,7 +275,7 @@ void kpok::initWindow()
wonLabel = new TQLabel(mWonWidget);
wonLabel->setFont(wonFont);
wonLabel->tqsetAlignment(AlignCenter);
wonLabel->setAlignment(AlignCenter);
wonLabel->hide();
inputLayout->addStretch(1);

@ -52,7 +52,7 @@ PlayerBox::PlayerBox(bool playerOne, TQWidget* parent, const char* name)
vl->addWidget(cardBox, 0);
cardBox->setFrameStyle(Box | Sunken);
m_cardWidgets[i] = new CardWidget(cardBox);
cardBox->setFixedSize(cardBox->tqsizeHint());
cardBox->setFixedSize(cardBox->sizeHint());
// Only add the "held" labels if this is the first player (the human one).
if (playerOne) {
@ -60,7 +60,7 @@ PlayerBox::PlayerBox(bool playerOne, TQWidget* parent, const char* name)
m_heldLabels[i] = new TQLabel(b);
m_heldLabels[i]->setText(i18n("Held"));
b->setFrameStyle(Box | Sunken);
b->setFixedSize(b->tqsizeHint());
b->setFixedSize(b->sizeHint());
m_cardWidgets[i]->heldLabel = m_heldLabels[i];
TQHBoxLayout* heldLayout = new TQHBoxLayout(0);

@ -65,7 +65,7 @@ void KZoomMainWindow::addWidget(TQWidget *widget)
{
widget->adjustSize();
TQWidget *tlw = widget->tqtopLevelWidget();
TQWidget *tlw = widget->topLevelWidget();
KZoomMainWindow *zm =
static_cast<KZoomMainWindow *>(tlw->qt_cast("KZoomMainWindow"));
@ -84,7 +84,7 @@ void KZoomMainWindow::widgetDestroyed()
bool KZoomMainWindow::eventFilter(TQObject *o, TQEvent *e)
{
if ( e->type()==TQEvent::LayoutHint )
setFixedSize(tqminimumSize()); // because K/TQMainWindow
setFixedSize(minimumSize()); // because K/TQMainWindow
// does not manage fixed central widget
// with hidden menubar...
return KMainWindow::eventFilter(o, e);

@ -55,7 +55,7 @@ public:
/** Add a widget to be managed i.e. the adjustSize() method of the
* widget is called whenever the zoom is changed.
* This function assumes that the tqtopLevelWidget() is the KZoomMainWindow.
* This function assumes that the topLevelWidget() is the KZoomMainWindow.
*/
static void addWidget(TQWidget *widget);

@ -164,16 +164,16 @@ void QReversiGameView::createView()
tqlayout->addMultiCellWidget(m_boardView, 0, 3, 0, 0);
// The status widgets
m_blacktqStatus = new StatusWidget(TQString(), this);
m_blacktqStatus->setPixmap(m_boardView->chipPixmap(Black, 20));
tqlayout->addWidget(m_blacktqStatus, 0, 1);
m_whitetqStatus = new StatusWidget(TQString(), this);
m_whitetqStatus->setPixmap(m_boardView->chipPixmap(White, 20));
tqlayout->addWidget(m_whitetqStatus, 1, 1);
m_blackStatus = new StatusWidget(TQString(), this);
m_blackStatus->setPixmap(m_boardView->chipPixmap(Black, 20));
tqlayout->addWidget(m_blackStatus, 0, 1);
m_whiteStatus = new StatusWidget(TQString(), this);
m_whiteStatus->setPixmap(m_boardView->chipPixmap(White, 20));
tqlayout->addWidget(m_whiteStatus, 1, 1);
// The "Moves" label
TQLabel *movesLabel = new TQLabel( i18n("Moves"), this);
movesLabel->tqsetAlignment(AlignCenter);
movesLabel->setAlignment(AlignCenter);
tqlayout->addWidget(movesLabel, 2, 1);
// The list of moves.
@ -193,7 +193,7 @@ void QReversiGameView::newGame()
{
m_boardView->updateBoard(true);
m_movesView->clear();
updatetqStatus();
updateStatus();
}
@ -225,7 +225,7 @@ void QReversiGameView::moveMade(uint moveNum, Move &move)
m_boardView->updateBoard();
// Update the score.
updatetqStatus();
updateStatus();
}
@ -236,16 +236,16 @@ void QReversiGameView::updateView()
{
m_boardView->updateBoard(true);
updateMovelist();
updatetqStatus();
updateStatus();
}
// Only updates the status widgets (score).
void QReversiGameView::updatetqStatus()
void QReversiGameView::updateStatus()
{
m_blacktqStatus->setScore(m_game->score(Black));
m_whitetqStatus->setScore(m_game->score(White));
m_blackStatus->setScore(m_game->score(Black));
m_whiteStatus->setScore(m_game->score(White));
}
@ -285,12 +285,12 @@ void QReversiGameView::setHumanColor(Color color)
m_humanColor = color;
if (color == Black) {
m_blacktqStatus->setText(i18n("You"));
m_whitetqStatus->setText("");
m_blackStatus->setText(i18n("You"));
m_whiteStatus->setText("");
}
else {
m_blacktqStatus->setText("");
m_whitetqStatus->setText(i18n("You"));
m_blackStatus->setText("");
m_whiteStatus->setText(i18n("You"));
}
}

@ -104,7 +104,7 @@ public:
void insertMove(TQString moveString) { m_movesView->insertItem(moveString); }
void removeMove(int moveNum) {
m_movesView->removeItem(moveNum);
updatetqStatus();
updateStatus();
}
void setCurrentMove(int moveNum) {
m_movesView->setCurrentItem(moveNum);
@ -129,7 +129,7 @@ public slots:
void moveMade(uint moveNum, Move &move);
void updateView(); // Update the entire view.
void updatetqStatus(); // Update the status widgets (score)
void updateStatus(); // Update the status widgets (score)
void updateBoard(bool force = FALSE); // Update the board.
void updateMovelist(); // Update the move list.
@ -153,8 +153,8 @@ private:
// Widgets in the view.
QReversiBoardView *m_boardView;
TQListBox *m_movesView;
StatusWidget *m_blacktqStatus;
StatusWidget *m_whitetqStatus;
StatusWidget *m_blackStatus;
StatusWidget *m_whiteStatus;
};

@ -52,7 +52,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>

@ -113,7 +113,7 @@ void KSameWidget::saveProperties(KConfig *conf) {
}
void KSameWidget::sizeChanged() {
stone->setFixedSize(stone->tqsizeHint());
stone->setFixedSize(stone->sizeHint());
}
void KSameWidget::showNumberRemainingToggled()
@ -162,7 +162,7 @@ void KSameWidget::m_new() {
bno.setRange(0, 1000000, 1);
bno.setLabel(i18n("Select a board:"));
bno.setFocus();
bno.setFixedSize(bno.tqsizeHint());
bno.setFixedSize(bno.sizeHint());
bno.setValue(stone->board());
if (dlg.exec()) newGame(bno.value(),default_colors);

@ -136,7 +136,7 @@ StoneWidget::colors() {
}
TQSize
StoneWidget::tqsizeHint () const {
StoneWidget::sizeHint () const {
return TQSize(field_width,field_height);
}

@ -55,7 +55,7 @@ public:
int marked();
TQSize size();
int colors();
virtual TQSize tqsizeHint() const;
virtual TQSize sizeHint() const;
bool undoPossible() const;

@ -356,21 +356,21 @@ TQString App::getPlayerName()
TQDialog *dlg = new TQDialog(this, "Hall of Fame", true);
TQLabel *l1 = new TQLabel(i18n("You've made it into the \"Hall Of Fame\". Type in\nyour name so mankind will always remember\nyour cool rating."), dlg);
l1->setFixedSize(l1->tqsizeHint());
l1->setFixedSize(l1->sizeHint());
TQLabel *l2 = new TQLabel(i18n("Your name:"), dlg);
l2->setFixedSize(l2->tqsizeHint());
l2->setFixedSize(l2->sizeHint());
TQLineEdit *e = new TQLineEdit(dlg);
e->setText("XXXXXXXXXXXXXXXX");
e->setMinimumWidth(e->tqsizeHint().width());
e->setFixedHeight(e->tqsizeHint().height());
e->setMinimumWidth(e->sizeHint().width());
e->setFixedHeight(e->sizeHint().height());
e->setText( lastPlayerName );
e->setFocus();
TQPushButton *b = new KPushButton(KStdGuiItem::ok(), dlg);
b->setDefault(true);
b->setFixedSize(b->tqsizeHint());
b->setFixedSize(b->sizeHint());
connect(b, TQT_SIGNAL(released()), dlg, TQT_SLOT(accept()));
connect(e, TQT_SIGNAL(returnPressed()), dlg, TQT_SLOT(accept()));
@ -603,9 +603,9 @@ void App::showHighscore(int focusitem)
f.setPointSize(24);
f.setBold(true);
l->setFont(f);
l->setFixedSize(l->tqsizeHint());
l->setFixedSize(l->sizeHint());
l->setFixedWidth(l->width() + 32);
l->tqsetAlignment(AlignCenter);
l->setAlignment(AlignCenter);
tl->addWidget(l);
// insert highscores in a gridtqlayout
@ -621,23 +621,23 @@ void App::showHighscore(int focusitem)
f.setBold(true);
l = new TQLabel(i18n("Rank"), dlg);
l->setFont(f);
l->setMinimumSize(l->tqsizeHint());
l->setMinimumSize(l->sizeHint());
table->addWidget(l, 0, 0);
l = new TQLabel(i18n("Name"), dlg);
l->setFont(f);
l->setMinimumSize(l->tqsizeHint());
l->setMinimumSize(l->sizeHint());
table->addWidget(l, 0, 1);
l = new TQLabel(i18n("Time"), dlg);
l->setFont(f);
l->setMinimumSize(l->tqsizeHint());
l->setMinimumSize(l->sizeHint());
table->addWidget(l, 0, 2);
l = new TQLabel(i18n("Size"), dlg);
l->setFont(f);
l->setMinimumSize(l->tqsizeHint());
l->setMinimumSize(l->sizeHint());
table->addWidget(l, 0, 3);
l = new TQLabel(i18n("Score"), dlg);
l->setFont(f);
l->setMinimumSize(l->tqsizeHint().width()*3, l->tqsizeHint().height());
l->setMinimumSize(l->sizeHint().width()*3, l->sizeHint().height());
table->addWidget(l, 0, 4);
TQString s;
@ -694,7 +694,7 @@ void App::showHighscore(int focusitem)
}
e[i][4] = new TQLabel(s, dlg);
e[i][4]->tqsetAlignment(AlignRight);
e[i][4]->setAlignment(AlignRight);
}
f = font();
@ -704,12 +704,12 @@ void App::showHighscore(int focusitem)
{
for(j = 0; j < 5; j++)
{
e[i][j]->setMinimumHeight(e[i][j]->tqsizeHint().height());
e[i][j]->setMinimumHeight(e[i][j]->sizeHint().height());
if(j == 1)
e[i][j]->setMinimumWidth(std::max(e[i][j]->tqsizeHint().width(), 100));
e[i][j]->setMinimumWidth(std::max(e[i][j]->sizeHint().width(), 100));
else
e[i][j]->setMinimumWidth(std::max(e[i][j]->tqsizeHint().width(), 60));
e[i][j]->setMinimumWidth(std::max(e[i][j]->sizeHint().width(), 60));
if((int)i == focusitem)
e[i][j]->setFont(f);
@ -720,7 +720,7 @@ void App::showHighscore(int focusitem)
TQPushButton *b = new KPushButton(KStdGuiItem::close(), dlg);
b->setFixedSize(b->tqsizeHint());
b->setFixedSize(b->sizeHint());
// connect the "Close"-button to done
connect(b, TQT_SIGNAL(clicked()), dlg, TQT_SLOT(accept()));

@ -1071,7 +1071,7 @@ bool Board::pause()
return paused;
}
TQSize Board::tqsizeHint() const
TQSize Board::sizeHint() const
{
int dpi = TQPaintDeviceMetrics(this).logicalDpiX();
if (dpi < 75)

@ -135,7 +135,7 @@ private slots:
void gravity(int, bool);
protected:
virtual TQSize tqsizeHint() const;
virtual TQSize sizeHint() const;
private: // functions
void initBoard();

@ -242,7 +242,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>

@ -71,7 +71,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>21</width>
<height>40</height>

@ -98,7 +98,7 @@ void Game::setTrys(int tries){
void Game::gameEnd(int score){
KScoreDialog di(KScoreDialog::Name | KScoreDialog::Score | KScoreDialog::Date, this);
KScoreDialog::FieldInfo scoreInfo;
TQString date = TQDateTime::tqcurrentDateTime().toString();
TQString date = TQDateTime::currentDateTime().toString();
scoreInfo.insert(KScoreDialog::Date, date);
if (di.addScore(score, scoreInfo, true))
di.exec();

@ -189,7 +189,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>70</height>

@ -314,7 +314,7 @@ void Rattler::pause()
label->setFont( TQFont( "Times", 14, TQFont::Bold ) );
label->setText(i18n("Game Paused\n Press %1 to resume\n")
.tqarg(tempPauseAction->shortcutText()));
label->tqsetAlignment( AlignCenter );
label->setAlignment( AlignCenter );
label->setFrameStyle( TQFrame::Panel | TQFrame::Raised );
label->setGeometry(182, 206, 198, 80);
label->show();

@ -51,7 +51,7 @@ void View::resizeEvent( TQResizeEvent * )
rattler->setGeometry(0, BAR_HEIGHT, width(), height()-BAR_HEIGHT);
}
TQSize View::tqsizeHint() const
TQSize View::sizeHint() const
{
return TQSize(490,502);
}

@ -42,7 +42,7 @@ public:
protected:
void resizeEvent( TQResizeEvent * );
virtual TQSize tqsizeHint() const;
virtual TQSize sizeHint() const;
};
#endif // VIEW_H

@ -163,10 +163,10 @@ ImageData::brighten(TQImage& img) {
void
ImageData::wall(TQPainter &p, int x, int y, int index, bool left, bool right) {
if (left) p.tqdrawPixmap(x, y, upperLarge(index-1), halfSize_);
if (left) p.drawPixmap(x, y, upperLarge(index-1), halfSize_);
else p.drawPixmap(x, y, leftSmall(index));
if (right) p.tqdrawPixmap(x+halfSize_, y, upperLarge(index), 0, 0, halfSize_);
if (right) p.drawPixmap(x+halfSize_, y, upperLarge(index), 0, 0, halfSize_);
else p.drawPixmap(x+halfSize_, y, rightSmall(index));
p.drawPixmap(x, y+halfSize_, lowerLarge(index));

@ -57,7 +57,7 @@ ModalLabel::ModalLabel(const TQString &text, TQWidget *parent,
if (width < 300) width = 300;
if (height < 75) height = 75;
tqsetAlignment (AlignCenter);
setAlignment (AlignCenter);
setFrameStyle (TQFrame::Panel | TQFrame::Raised);
setLineWidth (4);
setFont (font);
@ -65,7 +65,7 @@ ModalLabel::ModalLabel(const TQString &text, TQWidget *parent,
resize (width, height);
show ();
TQWidgetList *list = TQApplication::tqallWidgets();
TQWidgetList *list = TQApplication::allWidgets();
TQWidgetListIt it( *list );
while (it.current()) {
it.current()->installEventFilter (this);

@ -48,7 +48,7 @@ New features:
* Bookmarks
* Animation speed menu
* tqStatus bar
* Status bar
* Internationalisation
-------------------------------------------------------------------------------

@ -154,7 +154,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>91</height>

@ -27,7 +27,7 @@ MyMainView::MyMainView(TQWidget *parent)
setMinimumSize(600,400);
random.setSeed(0);
TQPixmap backgr(locate("appdata", MV_BACKGROUND));
field.tqsetBackgroundPixmap(backgr);
field.setBackgroundPixmap(backgr);
view.setResizePolicy(TQScrollView::AutoOne);
view.setHScrollBarMode(TQScrollView::AlwaysOff);

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

@ -78,7 +78,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>101</width>
<height>20</height>
@ -126,7 +126,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>60</height>

@ -261,7 +261,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>16</height>

@ -204,7 +204,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>21</height>

@ -46,7 +46,7 @@ KTron::KTron(TQWidget *parent, const char *name) : KMainWindow(parent, name) {
playerPoints[0]=playerPoints[1]=0;
tron=new Tron(this, "Tron");
connect(tron,TQT_SIGNAL(gameEnds(Player)),TQT_SLOT(changetqStatus(Player)));
connect(tron,TQT_SIGNAL(gameEnds(Player)),TQT_SLOT(changeStatus(Player)));
setCentralWidget(tron);
tron->setMinimumSize(200,180);
@ -118,7 +118,7 @@ void KTron::updateStatusbar(){
}
}
void KTron::changetqStatus(Player player) {
void KTron::changeStatus(Player player) {
// if player=Nobody, then new game
if(player==Nobody){
playerPoints[0]=playerPoints[1]=0;

@ -58,7 +58,7 @@ protected:
private slots:
void loadSettings();
/** updates players points in statusbar and checks if someone has won */
void changetqStatus(Player);
void changeStatus(Player);
void showWinner(Player winner);
void showSettings();

@ -313,8 +313,8 @@ void Tron::updatePixmap()
}
// draw frame
TQColor light=parentWidget()->tqcolorGroup().midlight();
TQColor dark=parentWidget()->tqcolorGroup().mid();
TQColor light=parentWidget()->colorGroup().midlight();
TQColor dark=parentWidget()->colorGroup().mid();
p.setPen(NoPen);
p.setBrush(light);

@ -16,7 +16,7 @@ FixedCanvasView::FixedCanvasView(TQWidget *parent, const char *name)
: TQCanvasView(parent, name, WNoAutoErase)
{}
TQSize FixedCanvasView::tqsizeHint() const
TQSize FixedCanvasView::sizeHint() const
{
if ( canvas()==0 ) return TQSize();
return canvas()->size() + 2 * TQSize(frameWidth(), frameWidth());
@ -24,7 +24,7 @@ TQSize FixedCanvasView::tqsizeHint() const
void FixedCanvasView::adjustSize()
{
setFixedSize(tqsizeHint());
setFixedSize(sizeHint());
}
//-----------------------------------------------------------------------------

@ -19,7 +19,7 @@ class KDE_EXPORT FixedCanvasView : public TQCanvasView
public:
FixedCanvasView(TQWidget *parent = 0, const char *name = 0);
virtual TQSize tqsizeHint() const;
virtual TQSize sizeHint() const;
public slots:
virtual void adjustSize();

@ -81,7 +81,7 @@ void BaseField::setMessage(const TQString &label, ButtonType type)
TQString str = (isArcade() ? i18n("Arcade game") + '\n'
: TQString()) + label;
_label = new TQLabel(str, board);
_label->tqsetAlignment(TQt::AlignCenter);
_label->setAlignment(TQt::AlignCenter);
_label->setFrameStyle( TQFrame::Panel | TQFrame::Sunken );
_boardLayout->addWidget(_label, 0, TQt::AlignCenter);
_label->show();

@ -58,7 +58,7 @@ void KZoomMainWindow::init(const char *popupName)
void KZoomMainWindow::addWidget(TQWidget *widget)
{
widget->adjustSize();
TQWidget *tlw = widget->tqtopLevelWidget();
TQWidget *tlw = widget->topLevelWidget();
KZoomMainWindow *zm =
static_cast<KZoomMainWindow *>(tlw->qt_cast("KZoomMainWindow"));
Q_ASSERT(zm);
@ -74,7 +74,7 @@ void KZoomMainWindow::widgetDestroyed()
bool KZoomMainWindow::eventFilter(TQObject *o, TQEvent *e)
{
if ( e->type()==TQEvent::LayoutHint )
setFixedSize(tqminimumSize()); // because K/TQMainWindow
setFixedSize(minimumSize()); // because K/TQMainWindow
// does not manage fixed central widget
// with hidden menubar...
return KMainWindow::eventFilter(o, e);

@ -52,7 +52,7 @@ public:
/** Add a widget to be managed i.e. the adjustSize() method of the
* widget is called whenever the zoom is changed.
* This function assumes that the tqtopLevelWidget() is the KZoomMainWindow.
* This function assumes that the topLevelWidget() is the KZoomMainWindow.
*/
static void addWidget(TQWidget *widget);

@ -39,7 +39,7 @@ Field::Field(TQWidget *parent)
// level progress
levelLabel = new TQLabel(this);
levelLabel->tqsetAlignment(AlignCenter);
levelLabel->setAlignment(AlignCenter);
lcds->addWidget(levelLabel, 5, 0);
toLevel = new KProgress(this);
toLevel->setTextEnabled(true);
@ -77,7 +77,7 @@ Field::Field(TQWidget *parent)
vbl->addStretch(1);
labShowNext = new TQLabel(i18n("Next Tile"), this);
labShowNext->tqsetAlignment(AlignCenter);
labShowNext->setAlignment(AlignCenter);
vbl->addWidget(labShowNext, 0);
showNext = new ShowNextPiece(board, this);
_snRootPixmap = new KCanvasRootPixmap(showNext);

@ -41,7 +41,7 @@ Shadow::Shadow(BaseBoard *board, TQWidget *parent)
connect(board, TQT_SIGNAL(updatePieceConfigSignal()), TQT_SLOT(update()));
}
TQSize Shadow::tqsizeHint() const
TQSize Shadow::sizeHint() const
{
return TQSize(_xOffset + _board->matrix().width() * BasePrefs::blockSize(),
SHADOW_HEIGHT);
@ -86,7 +86,7 @@ class Led : public TQWidget
TQSizePolicy sizePolicy() const
{ return TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); }
TQSize tqsizeHint() const { return TQSize(LED_WIDTH, LED_HEIGHT); }
TQSize sizeHint() const { return TQSize(LED_WIDTH, LED_HEIGHT); }
void on() { if (!_on) { _on = TRUE; tqrepaint(); } }
void off() { if (_on) {_on = FALSE; tqrepaint(); } }
@ -114,9 +114,9 @@ GiftPool::GiftPool(TQWidget *parent)
leds.insert(i, new Led(yellow, this));
}
TQSize GiftPool::tqsizeHint() const
TQSize GiftPool::sizeHint() const
{
TQSize s = (leds.size() ? leds[0]->tqsizeHint() : TQSize());
TQSize s = (leds.size() ? leds[0]->sizeHint() : TQSize());
return TQSize((s.width()+LED_SPACING)*leds.size()-LED_SPACING, s.height());
}
@ -182,7 +182,7 @@ PlayerProgress::PlayerProgress(BaseBoard *board, TQWidget *parent,
KZoomMainWindow::addWidget(this);
}
TQSize PlayerProgress::tqsizeHint() const
TQSize PlayerProgress::sizeHint() const
{
return TQSize(10, _board->matrix().height() * BasePrefs::blockSize())
+ 2 * TQSize(frameWidth(), frameWidth());

@ -27,7 +27,7 @@ class LIBKSIRTET_EXPORT Shadow : public TQWidget
public:
Shadow(BaseBoard *, TQWidget *parent);
virtual TQSize tqsizeHint() const;
virtual TQSize sizeHint() const;
virtual TQSizePolicy sizePolicy() const;
void setDisplay(bool show);
@ -49,7 +49,7 @@ class LIBKSIRTET_EXPORT GiftPool : public TQHBox
public:
GiftPool(TQWidget *parent);
virtual TQSize tqsizeHint() const;
virtual TQSize sizeHint() const;
virtual TQSizePolicy sizePolicy() const;
void reset();
@ -75,7 +75,7 @@ class LIBKSIRTET_EXPORT PlayerProgress : public KGameProgress
public:
PlayerProgress(BaseBoard *board, TQWidget *parent = 0, const char *name = 0);
virtual TQSize tqsizeHint() const;
virtual TQSize sizeHint() const;
virtual TQSizePolicy sizePolicy() const;
private:

@ -37,7 +37,7 @@ NetMeeting::NetMeeting(const cId &_id, Socket *socket,
top->addWidget(wl);
labWait = new TQLabel(i18n("Waiting for clients"), plainPage());
labWait->tqsetAlignment(AlignCenter);
labWait->setAlignment(AlignCenter);
top->addWidget(labWait);
// options widget

@ -9,7 +9,7 @@
#define PAUSE_ACTION \
((KToggleAction *)((KMainWindow *)tqtopLevelWidget())->action("game_pause"))
((KToggleAction *)((KMainWindow *)topLevelWidget())->action("game_pause"))
MPSimpleInterface::MPSimpleInterface(const MPGameInfo &gi,
uint nbActions, const ActionData *data,

@ -26,7 +26,7 @@ MeetingLine::MeetingLine(bool isOwner, bool serverIsReader, bool serverLine,
/* Name */
lname = new TQLabel(" ", this);
lname->tqsetAlignment(AlignCenter);
lname->setAlignment(AlignCenter);
lname->setFrameStyle(TQFrame::Panel | TQFrame::Sunken);
lname->setLineWidth(2);
lname->setMidLineWidth(3);
@ -34,7 +34,7 @@ MeetingLine::MeetingLine(bool isOwner, bool serverIsReader, bool serverLine,
f.setBold(TRUE);
lname->setFont(f);
lname->setFixedSize(lname->fontMetrics().maxWidth()*NAME_MAX_LENGTH,
lname->tqsizeHint().height());
lname->sizeHint().height());
hbl->addWidget(lname);
hbl->addStretch(1);
@ -51,7 +51,7 @@ MeetingLine::MeetingLine(bool isOwner, bool serverIsReader, bool serverLine,
qle->setMaxLength(TALKER_MAX_LENGTH);
qle->setFont( TQFont("fixed", 12, TQFont::Bold) );
qle->setFixedSize(qle->fontMetrics().maxWidth()*TALKER_MAX_LENGTH,
qle->tqsizeHint().height());
qle->sizeHint().height());
connect(qle, TQT_SIGNAL(textChanged(const TQString &)),
TQT_SLOT(_textChanged(const TQString &)));
qle->setEnabled(isOwner);
@ -102,7 +102,7 @@ PlayerLine::PlayerLine(PlayerComboBox::Type type, const TQString &txt,
edit = new TQLineEdit(txt, this);
edit->setMaxLength(NAME_MAX_LENGTH);
edit->setFixedSize(edit->fontMetrics().maxWidth()*(NAME_MAX_LENGTH+2),
edit->tqsizeHint().height());
edit->sizeHint().height());
hbl->addWidget(edit);
/* settings button */

@ -780,7 +780,7 @@ int ManagerPrivate::submitScore(const Score &ascore,
Score score = ascore;
score.setData("id", _playerInfos->id() + 1);
score.setData("date", TQDateTime::tqcurrentDateTime());
score.setData("date", TQDateTime::currentDateTime());
// ask new name if anonymous and winner
const char *dontAskAgainName = "highscore_ask_name_dialog";

@ -130,7 +130,7 @@ void KScoreDialog::setupDialog()
d->tqlayout->addRowSpacing(4, 15);
d->commentLabel = new TQLabel(d->page);
d->commentLabel->tqsetAlignment(AlignVCenter | AlignHCenter);
d->commentLabel->setAlignment(AlignVCenter | AlignHCenter);
d->tqlayout->addMultiCellWidget(d->commentLabel, 1, 1, 0, d->nrCols-1);
TQFont bold = font();
@ -207,7 +207,7 @@ void KScoreDialog::aboutToShow()
}
else
{
d->commentLabel->setMinimumSize(d->commentLabel->tqsizeHint());
d->commentLabel->setMinimumSize(d->commentLabel->sizeHint());
d->commentLabel->show();
d->tqlayout->addRowSpacing(0, -10);
d->tqlayout->addRowSpacing(2, 10);
@ -267,7 +267,7 @@ void KScoreDialog::aboutToShow()
}
}
d->latest = -1;
setFixedSize(tqminimumSizeHint());
setFixedSize(minimumSizeHint());
}
void KScoreDialog::loadScores()

@ -33,7 +33,7 @@ KCanvasRootPixmap::KCanvasRootPixmap(TQCanvasView *view, const char *name)
void KCanvasRootPixmap::backgroundUpdatedSlot(const TQPixmap &pixmap)
{
if ( _view && _view->canvas() )
_view->canvas()->tqsetBackgroundPixmap(pixmap);
_view->canvas()->setBackgroundPixmap(pixmap);
}
#include "kcanvasrootpixmap.moc"

@ -41,9 +41,9 @@
#include <tqpushbutton.h>
#include <kdebug.h>
#define KCARD_DEFAULTDECK TQString::tqfromLatin1("deck0.png")
#define KCARD_DEFAULTCARD TQString::tqfromLatin1("11.png")
#define KCARD_DEFAULTCARDDIR TQString::tqfromLatin1("cards-default/")
#define KCARD_DEFAULTDECK TQString::fromLatin1("deck0.png")
#define KCARD_DEFAULTCARD TQString::fromLatin1("11.png")
#define KCARD_DEFAULTCARDDIR TQString::fromLatin1("cards-default/")
// values for the resize slider
#define SLIDER_MIN 400
@ -51,19 +51,19 @@
// KConfig entries
#define CONF_GROUP "KCardDialog"
#define CONF_RANDOMDECK TQString::tqfromLatin1("RandomDeck")
#define CONF_DECK TQString::tqfromLatin1("Deck")
#define CONF_CARDDIR TQString::tqfromLatin1("CardDir")
#define CONF_RANDOMCARDDIR TQString::tqfromLatin1("RandomCardDir")
#define CONF_USEGLOBALDECK TQString::tqfromLatin1("GlobalDeck")
#define CONF_USEGLOBALCARDDIR TQString::tqfromLatin1("GlobalCardDir")
#define CONF_SCALE TQString::tqfromLatin1("Scale")
#define CONF_RANDOMDECK TQString::fromLatin1("RandomDeck")
#define CONF_DECK TQString::fromLatin1("Deck")
#define CONF_CARDDIR TQString::fromLatin1("CardDir")
#define CONF_RANDOMCARDDIR TQString::fromLatin1("RandomCardDir")
#define CONF_USEGLOBALDECK TQString::fromLatin1("GlobalDeck")
#define CONF_USEGLOBALCARDDIR TQString::fromLatin1("GlobalCardDir")
#define CONF_SCALE TQString::fromLatin1("Scale")
#define CONF_GLOBAL_GROUP TQString::tqfromLatin1("KCardDialog Settings")
#define CONF_GLOBAL_DECK TQString::tqfromLatin1("GlobalDeck")
#define CONF_GLOBAL_CARDDIR TQString::tqfromLatin1("GlobalCardDir")
#define CONF_GLOBAL_RANDOMDECK TQString::tqfromLatin1("GlobalRandomDeck")
#define CONF_GLOBAL_RANDOMCARDDIR TQString::tqfromLatin1("GlobalRandomCardDir")
#define CONF_GLOBAL_GROUP TQString::fromLatin1("KCardDialog Settings")
#define CONF_GLOBAL_DECK TQString::fromLatin1("GlobalDeck")
#define CONF_GLOBAL_CARDDIR TQString::fromLatin1("GlobalCardDir")
#define CONF_GLOBAL_RANDOMDECK TQString::fromLatin1("GlobalRandomDeck")
#define CONF_GLOBAL_RANDOMCARDDIR TQString::fromLatin1("GlobalRandomCardDir")
class KCardDialogPrivate
@ -128,9 +128,9 @@ int KCardDialog::getCardDeck(TQString &pDeck, TQString &pCardDir, TQWidget *pPar
// TODO check for global cards/decks!!!!
pDeck=dlg.deck();
pCardDir=dlg.cardDir();
if (!pCardDir.isNull() && pCardDir.right(1)!=TQString::tqfromLatin1("/"))
if (!pCardDir.isNull() && pCardDir.right(1)!=TQString::fromLatin1("/"))
{
pCardDir+=TQString::tqfromLatin1("/");
pCardDir+=TQString::fromLatin1("/");
}
if (pRandomDeck)
{
@ -218,7 +218,7 @@ void KCardDialog::getConfigCardDeck(KConfig* conf, TQString &pDeck, TQString &pC
TQString KCardDialog::getDefaultDeck()
{
KCardDialog::init();
return locate("cards", TQString::tqfromLatin1("decks/") + KCARD_DEFAULTDECK);
return locate("cards", TQString::fromLatin1("decks/") + KCARD_DEFAULTDECK);
}
TQString KCardDialog::getDefaultCardDir()
@ -234,12 +234,12 @@ TQString KCardDialog::getCardPath(const TQString &carddir, int index)
KCardDialog::init();
TQString entry = carddir + TQString::number(index);
if (KStandardDirs::exists(entry + TQString::tqfromLatin1(".png")))
return entry + TQString::tqfromLatin1(".png");
if (KStandardDirs::exists(entry + TQString::fromLatin1(".png")))
return entry + TQString::fromLatin1(".png");
// rather theoretical
if (KStandardDirs::exists(entry + TQString::tqfromLatin1(".xpm")))
return entry + TQString::tqfromLatin1(".xpm");
if (KStandardDirs::exists(entry + TQString::fromLatin1(".xpm")))
return entry + TQString::fromLatin1(".xpm");
return TQString();
}
@ -299,7 +299,7 @@ void KCardDialog::setupDialog(bool showResizeBox)
l->addWidget(grp3, 0, AlignTop|AlignHCenter);
d->deckLabel = new TQLabel(grp3);
d->deckLabel->setText(i18n("empty"));
d->deckLabel->tqsetAlignment(AlignHCenter|AlignVCenter);
d->deckLabel->setAlignment(AlignHCenter|AlignVCenter);
d->deckLabel->setGeometry(10, 20, 80, 90);
d->randomDeck = new TQCheckBox(plainPage());
@ -349,7 +349,7 @@ void KCardDialog::setupDialog(bool showResizeBox)
l->addWidget(grp4, 0, AlignTop|AlignHCenter);
d->cardLabel = new TQLabel(grp4);
d->cardLabel->setText(i18n("empty"));
d->cardLabel->tqsetAlignment(AlignHCenter|AlignVCenter);
d->cardLabel->setAlignment(AlignHCenter|AlignVCenter);
d->cardLabel->setGeometry(10, 20, 80, 90 );
d->randomCardDir = new TQCheckBox(plainPage());
@ -465,7 +465,7 @@ void KCardDialog::insertCardIcons()
for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it)
{
KSimpleConfig cfg(*it);
cfg.setGroup(TQString::tqfromLatin1("KDE Backdeck"));
cfg.setGroup(TQString::fromLatin1("KDE Backdeck"));
TQString path = (*it).left((*it).findRev('/') + 1);
assert(path[path.length() - 1] == '/');
TQPixmap pixmap(path + cfg.readEntry("Preview", "12c.png"));
@ -507,7 +507,7 @@ void KCardDialog::insertDeckIcons()
// pixmap=pixmap.xForm(m);
cfg.setGroup(TQString::tqfromLatin1("KDE Cards"));
cfg.setGroup(TQString::fromLatin1("KDE Cards"));
TQString name=cfg.readEntry("Name", i18n("unnamed"));
TQIconViewItem *item= new TQIconViewItem(d->deckIconView,name, pixmap);
@ -562,12 +562,12 @@ void KCardDialog::slotCardClicked(TQIconViewItem *item)
TQString KCardDialog::getDeckName(const TQString &desktop)
{
TQString entry = desktop.left(desktop.length() - strlen(".desktop"));
if (KStandardDirs::exists(entry + TQString::tqfromLatin1(".png")))
return entry + TQString::tqfromLatin1(".png");
if (KStandardDirs::exists(entry + TQString::fromLatin1(".png")))
return entry + TQString::fromLatin1(".png");
// rather theoretical
if (KStandardDirs::exists(entry + TQString::tqfromLatin1(".xpm")))
return entry + TQString::tqfromLatin1(".xpm");
if (KStandardDirs::exists(entry + TQString::fromLatin1(".xpm")))
return entry + TQString::fromLatin1(".xpm");
return TQString();
}
@ -634,8 +634,8 @@ void KCardDialog::slotRandomCardDirToggled(bool on)
if (on) {
d->cardLabel->setText("random");
setCardDir(getRandomCardDir());
if (cardDir().length()>0 && cardDir().right(1)!=TQString::tqfromLatin1("/")) {
setCardDir(cardDir() + TQString::tqfromLatin1("/"));
if (cardDir().length()>0 && cardDir().right(1)!=TQString::fromLatin1("/")) {
setCardDir(cardDir() + TQString::fromLatin1("/"));
}
} else {
d->cardLabel->setText("empty");
@ -742,7 +742,7 @@ void KCardDialog::saveConfig(KConfig* conf)
void KCardDialog::slotSetGlobalDeck()
{
KSimpleConfig* conf = new KSimpleConfig(TQString::tqfromLatin1("kdeglobals"), false);
KSimpleConfig* conf = new KSimpleConfig(TQString::fromLatin1("kdeglobals"), false);
conf->setGroup(CONF_GLOBAL_GROUP);
conf->writeEntry(CONF_GLOBAL_DECK, deck());
@ -753,7 +753,7 @@ void KCardDialog::slotSetGlobalDeck()
void KCardDialog::slotSetGlobalCardDir()
{
KSimpleConfig* conf = new KSimpleConfig(TQString::tqfromLatin1("kdeglobals"), false);
KSimpleConfig* conf = new KSimpleConfig(TQString::fromLatin1("kdeglobals"), false);
conf->setGroup(CONF_GLOBAL_GROUP);
conf->writePathEntry(CONF_GLOBAL_CARDDIR, cardDir());
@ -764,7 +764,7 @@ void KCardDialog::slotSetGlobalCardDir()
void KCardDialog::getGlobalDeck(TQString& deck, bool& random)
{
KSimpleConfig* conf = new KSimpleConfig(TQString::tqfromLatin1("kdeglobals"), true);
KSimpleConfig* conf = new KSimpleConfig(TQString::fromLatin1("kdeglobals"), true);
conf->setGroup(CONF_GLOBAL_GROUP);
if (!conf->hasKey(CONF_GLOBAL_DECK) || conf->readBoolEntry(CONF_GLOBAL_RANDOMDECK, false)) {
@ -780,7 +780,7 @@ void KCardDialog::getGlobalDeck(TQString& deck, bool& random)
void KCardDialog::getGlobalCardDir(TQString& dir, bool& random)
{
KSimpleConfig* conf = new KSimpleConfig(TQString::tqfromLatin1("kdeglobals"), true);
KSimpleConfig* conf = new KSimpleConfig(TQString::fromLatin1("kdeglobals"), true);
conf->setGroup(CONF_GLOBAL_GROUP);
if (!conf->hasKey(CONF_GLOBAL_CARDDIR) || conf->readBoolEntry(CONF_GLOBAL_RANDOMCARDDIR, false)) {
@ -799,7 +799,7 @@ void KCardDialog::init()
static bool _inited = false;
if (_inited)
return;
KGlobal::dirs()->addResourceType("cards", KStandardDirs::kde_default("data") + TQString::tqfromLatin1("carddecks/"));
KGlobal::dirs()->addResourceType("cards", KStandardDirs::kde_default("data") + TQString::fromLatin1("carddecks/"));
KGlobal::locale()->insertCatalogue("libtdegames");
_inited = true;

@ -364,7 +364,7 @@ TQListBoxItem* KChatBase::layoutMessage(const TQString& fromName, const TQString
if (text.startsWith("/me ")) {
// replace "/me" by a nice star. leave one space after the star
TQPixmap pix;
pix.load(locate("data", TQString::tqfromLatin1("tdegames/pics/star.png")));
pix.load(locate("data", TQString::fromLatin1("tdegames/pics/star.png")));
//TODO KChatBasePixmap? Should change the font here!

@ -359,7 +359,7 @@ KDialogBase::addVBoxPage() (for example).
5.1.1 Debug KGame
-----------------
The first page, "Debug KGame" shows on the left most or even all status values of
KGame. That contains e.g. minPlayers(), isAdmin(), gametqStatus(), ...
KGame. That contains e.g. minPlayers(), isAdmin(), gameStatus(), ...
The right side is probably the more important one. It lists *all* KGameProperties
which have been inserted to this KGame object (only to this KGame object - not
the ones that have been added to the players!). Most of the status variables of

@ -56,7 +56,7 @@ public:
mGameMaster = 0;
mGameAdmin = 0;
mGameOffering = 0;
mGametqStatus = 0;
mGameStatus = 0;
mGameRunning = 0;
mGameMaxPlayers = 0;
mGameMinPlayers = 0;
@ -93,7 +93,7 @@ public:
TQListViewItem* mGameMaster;
TQListViewItem* mGameAdmin;
TQListViewItem* mGameOffering;
TQListViewItem* mGametqStatus;
TQListViewItem* mGameStatus;
TQListViewItem* mGameRunning;
TQListViewItem* mGameMaxPlayers;
TQListViewItem* mGameMinPlayers;
@ -166,7 +166,7 @@ void KGameDebugDialog::initGamePage()
d->mGameMaster = new TQListViewItem(v, i18n("Is Master"));
d->mGameAdmin = new TQListViewItem(v, i18n("Is Admin"));
d->mGameOffering = new TQListViewItem(v, i18n("Is Offering Connections"));
d->mGametqStatus = new TQListViewItem(v, i18n("Game Status"));
d->mGameStatus = new TQListViewItem(v, i18n("Game Status"));
d->mGameRunning = new TQListViewItem(v, i18n("Game is Running"));
d->mGameMaxPlayers = new TQListViewItem(v, i18n("Maximal Players"));
d->mGameMinPlayers = new TQListViewItem(v, i18n("Minimal Players"));
@ -186,7 +186,7 @@ void KGameDebugDialog::initPlayerPage()
d->mPlayerList = new KListBox(d->mPlayerPage);
connect(d->mPlayerList, TQT_SIGNAL(executed(TQListBoxItem*)), this, TQT_SLOT(slotUpdatePlayerData(TQListBoxItem*)));
listLayout->addWidget(d->mPlayerList);
d->mPlayerList->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding));
d->mPlayerList->setSizePolicy(TQSizePolicy(TQSizePolicy::Preferred, TQSizePolicy::Expanding));
KListView* v = new KListView(d->mPlayerPage);
tqlayout->addWidget(v);
@ -274,7 +274,7 @@ void KGameDebugDialog::clearGameData()
d->mGameMaster->setText(1, "");
d->mGameAdmin->setText(1, "");
d->mGameOffering->setText(1, "");
d->mGametqStatus->setText(1, "");
d->mGameStatus->setText(1, "");
d->mGameRunning->setText(1, "");
d->mGameMaxPlayers->setText(1, "");
d->mGameMinPlayers->setText(1, "");
@ -320,7 +320,7 @@ void KGameDebugDialog::slotUpdateGameData()
d->mGameMaster->setText(1, d->mGame->isMaster() ? i18n("True") : i18n("False"));
d->mGameAdmin->setText(1, d->mGame->isAdmin() ? i18n("True") : i18n("False"));
d->mGameOffering->setText(1, d->mGame->isOfferingConnections() ? i18n("True") : i18n("False"));
d->mGametqStatus->setText(1, TQString::number(d->mGame->gametqStatus()));
d->mGameStatus->setText(1, TQString::number(d->mGame->gameStatus()));
d->mGameRunning->setText(1, d->mGame->isRunning() ? i18n("True") : i18n("False"));
d->mGameMaxPlayers->setText(1, TQString::number(d->mGame->maxPlayers()));
d->mGameMinPlayers->setText(1, TQString::number(d->mGame->minPlayers()));

@ -75,7 +75,7 @@ public:
//KGamePropertys
KGamePropertyInt mMaxPlayer;
KGamePropertyUInt mMinPlayer;
KGamePropertyInt mGametqStatus; // Game running?
KGamePropertyInt mGameStatus; // Game running?
TQValueList<int> mInactiveIdList;
};
@ -95,8 +95,8 @@ KGame::KGame(int cookie,TQObject* parent) : KGameNetwork(cookie,parent)
d->mMaxPlayer.setLocal(-1); // Infinite
d->mMinPlayer.registerData(KGamePropertyBase::IdMinPlayer, this, i18n("MinPlayers"));
d->mMinPlayer.setLocal(0); // Always ok
d->mGametqStatus.registerData(KGamePropertyBase::IdGametqStatus, this, i18n("GameStatus"));
d->mGametqStatus.setLocal(Init);
d->mGameStatus.registerData(KGamePropertyBase::IdGameStatus, this, i18n("GameStatus"));
d->mGameStatus.setLocal(Init);
// d->mUniquePlayerNumber = 0;
d->mRandom = new KRandomSequence;
d->mRandom->setSeed(0);
@ -542,10 +542,10 @@ void KGame::systemRemovePlayer(KPlayer* player,bool deleteit)
kdWarning(11001) << "player " << player << "(" << player->id() << ") Could not be found!" << endl;
}
if (gametqStatus()==(int)Run && playerCount()<minPlayers())
if (gameStatus()==(int)Run && playerCount()<minPlayers())
{
kdWarning(11001) << k_funcinfo ": not enough players, PAUSING game\n" << endl;
setGametqStatus(Pause);
setGameStatus(Pause);
}
}
@ -680,11 +680,11 @@ int KGame::maxPlayers() const
uint KGame::playerCount() const
{ return d->mPlayerList.count(); }
int KGame::gametqStatus() const
{ return d->mGametqStatus.value(); }
int KGame::gameStatus() const
{ return d->mGameStatus.value(); }
bool KGame::isRunning() const
{ return d->mGametqStatus.value() == Run; }
{ return d->mGameStatus.value() == Run; }
KGamePropertyHandler* KGame::dataHandler() const
{ return d->mProperties; }
@ -772,7 +772,7 @@ KPlayer * KGame::playerInputFinished(KPlayer *player)
{
player->setTurn(false);
}
setGametqStatus(End);
setGameStatus(End);
emit signalGameOver(gameOver,player,this);
}
else if (!player->asyncInput())
@ -829,7 +829,7 @@ KPlayer *KGame::nextPlayer(KPlayer *last,bool exclusive)
return 0;
}
void KGame::setGametqStatus(int status)
void KGame::setGameStatus(int status)
{
kdDebug(11001) << k_funcinfo << ": GAMESTATUS CHANGED to" << status << endl;
if (status==(int)Run && playerCount()<minPlayers())
@ -837,7 +837,7 @@ void KGame::setGametqStatus(int status)
kdDebug(11001) << k_funcinfo << ": not enough players, pausing game\n" << endl;
status=Pause;
}
d->mGametqStatus = status;
d->mGameStatus = status;
}
void KGame::networkTransmission(TQDataStream &stream, int msgid, TQ_UINT32 receiver, TQ_UINT32 sender, TQ_UINT32 /*clientID*/)
@ -1244,7 +1244,7 @@ void KGame::Debug()
kdDebug(11001) << "------------------- KGAME -------------------------" << endl;
kdDebug(11001) << "this: " << this << endl;
kdDebug(11001) << "uniquePlayer " << d->mUniquePlayerNumber << endl;
kdDebug(11001) << "gameStatus " << gametqStatus() << endl;
kdDebug(11001) << "gameStatus " << gameStatus() << endl;
kdDebug(11001) << "MaxPlayers : " << maxPlayers() << endl;
kdDebug(11001) << "NoOfPlayers : " << playerCount() << endl;
kdDebug(11001) << "NoOfInactive: " << d->mInactivePlayerList.count() << endl;
@ -1264,7 +1264,7 @@ void KGame::slotServerDisconnected() // Client side
kdDebug(11001) << "======= SERVER DISCONNECT ======="<<endl;
kdDebug(11001) << "+++ (CLIENT)++++++++" << k_funcinfo << ": our GameID="<<gameId() << endl;
int oldgamestatus=gametqStatus();
int oldgamestatus=gameStatus();
KPlayer *player;
KGamePlayerList removeList;
@ -1326,7 +1326,7 @@ void KGame::slotClientDisconnected(TQ_UINT32 clientID,bool /*broken*/) // server
{
kdDebug(11001) << "++++(SERVER)+++++++" << k_funcinfo << " clientId=" << clientID << endl;
int oldgamestatus=gametqStatus();
int oldgamestatus=gameStatus();
KPlayer *player;
KGamePlayerList removeList;

@ -118,7 +118,7 @@ public:
* The KGame e.g. sets the status to Pause when you have
* less player than the minimum amount
*/
enum GametqStatus
enum GameStatus
{
Init = 0,
Run = 1,
@ -127,7 +127,7 @@ public:
Abort = 4,
SystemPause = 5,
Intro = 6,
UsertqStatus = 7
UserStatus = 7
};
// Properties
@ -387,14 +387,14 @@ public:
*
* @return game status
*/
int gametqStatus() const;
int gameStatus() const;
/**
* sets the game status
*
* @param status the new status
*/
void setGametqStatus(int status);
void setGameStatus(int status);
/**
* docu: see KPlayer

@ -51,7 +51,7 @@ public:
IdName=5,
//KGame
IdGametqStatus=6,
IdGameStatus=6,
IdMaxPlayer=7,
IdMinPlayer=8,

@ -132,7 +132,7 @@ TQ_UINT16 KMessageClient::peerPort () const
TQString KMessageClient::peerName () const
{
return d->connection ? d->connection->peerName() : TQString::tqfromLatin1("localhost");
return d->connection ? d->connection->peerName() : TQString::fromLatin1("localhost");
}
// --------------------- Sending messages

@ -123,7 +123,7 @@ public:
@since 3.2
@return "localhost" in the default implementation. Reimplemented in @ref KMessageSocket
*/
virtual TQString peerName () const { return TQString::tqfromLatin1("localhost"); }
virtual TQString peerName () const { return TQString::fromLatin1("localhost"); }
signals:

@ -82,7 +82,7 @@ IdRemovePlayer Q_INT16 playerid
IdError Q_INT32 errorcode
QString errortext
IdGametqStatus Q_INT32 status
IdGameStatus Q_INT32 status
IdPlayerProperty Q_INT16 propertyId
user defined -> the property

@ -217,7 +217,7 @@ void KGameLCDList::init(const TQString &title)
top->setColStretch(1, 1);
_title = new TQLabel(title, this);
_title->tqsetAlignment(AlignCenter);
_title->setAlignment(AlignCenter);
top->addMultiCellWidget(_title, 0, 0, 0, 1, AlignCenter);
}

@ -79,11 +79,11 @@ void KGameProgress::initialize()
void KGameProgress::paletteChange()
{
TQPalette p = kapp->palette();
const TQColorGroup &tqcolorGroup = p.active();
const TQColorGroup &colorGroup = p.active();
if (!use_supplied_bar_color)
bar_color = tqcolorGroup.highlight();
bar_text_color = tqcolorGroup.highlightedText();
text_color = tqcolorGroup.text();
bar_color = colorGroup.highlight();
bar_text_color = colorGroup.highlightedText();
text_color = colorGroup.text();
setPalette(p);
adjustStyle();
@ -151,7 +151,7 @@ bool KGameProgress::textEnabled() const
return text_enabled;
}
TQSize KGameProgress::tqsizeHint() const
TQSize KGameProgress::sizeHint() const
{
TQSize s( size() );
@ -164,9 +164,9 @@ TQSize KGameProgress::tqsizeHint() const
return s;
}
TQSize KGameProgress::tqminimumSizeHint() const
TQSize KGameProgress::minimumSizeHint() const
{
return tqsizeHint();
return sizeHint();
}
TQSizePolicy KGameProgress::sizePolicy() const
@ -213,7 +213,7 @@ void KGameProgress::styleChange(TQStyle&)
void KGameProgress::adjustStyle()
{
switch (tqstyle().tqstyleHint(TQStyle::SH_GUIStyle)) {
switch (tqstyle().styleHint(TQStyle::SH_GUIStyle)) {
case WindowsStyle:
setFrameStyle(TQFrame::WinPanel | TQFrame::Sunken);
break;
@ -242,9 +242,9 @@ void KGameProgress::drawText(TQPainter *p)
// the current value and the maximum value respectively.
TQString s(format_);
s.replace(TQRegExp(TQString::tqfromLatin1("%p")), TQString::number(recalcValue(100)));
s.replace(TQRegExp(TQString::tqfromLatin1("%v")), TQString::number(value()));
s.replace(TQRegExp(TQString::tqfromLatin1("%m")), TQString::number(maxValue()));
s.replace(TQRegExp(TQString::fromLatin1("%p")), TQString::number(recalcValue(100)));
s.replace(TQRegExp(TQString::fromLatin1("%v")), TQString::number(value()));
s.replace(TQRegExp(TQString::fromLatin1("%m")), TQString::number(maxValue()));
p->setPen(text_color);
TQFont font = p->font();

@ -162,11 +162,11 @@ public:
/**
*/
virtual TQSize tqsizeHint() const;
virtual TQSize sizeHint() const;
/**
*/
virtual TQSize tqminimumSizeHint() const;
virtual TQSize minimumSizeHint() const;
/**
*/

@ -30,7 +30,7 @@ KChildConnect::~KChildConnect()
{
}
KR_STATUS KChildConnect::QuerytqStatus()
KR_STATUS KChildConnect::QueryStatus()
{
return KR_OK;
}

@ -42,7 +42,7 @@ class KChildConnect: public TQObject
virtual bool SendMsg(KEMessage *msg);
virtual bool Send(TQString str);
virtual KR_STATUS QuerytqStatus();
virtual KR_STATUS QueryStatus();
public slots:

@ -55,18 +55,18 @@ KInteractiveConnect *KConnectEntry::QueryInteractiveConnect()
return connect.i;
}
KR_STATUS KConnectEntry::QuerytqStatus()
KR_STATUS KConnectEntry::QueryStatus()
{
switch(type)
{
case KG_INPUTTYPE_INTERACTIVE:
return connect.i->QuerytqStatus();
return connect.i->QueryStatus();
break;
case KG_INPUTTYPE_REMOTE:
return connect.r->QuerytqStatus();
return connect.r->QueryStatus();
break;
case KG_INPUTTYPE_PROCESS:
return connect.p->QuerytqStatus();
return connect.p->QueryStatus();
break;
default:
return KR_INVALID;

@ -50,7 +50,7 @@ class KConnectEntry
KConnectEntry &operator=(KConnectEntry &entry);
bool Exit();
bool Init(KG_INPUTTYPE stype,int id=0,KEMessage *msg=0);
KR_STATUS QuerytqStatus();
KR_STATUS QueryStatus();
bool SendMsg(KEMessage *msg);
};
#endif

@ -85,14 +85,14 @@ KG_INPUTTYPE KEInput::QueryType(int no)
return playerArray[no].QueryType();
}
KR_STATUS KEInput::QuerytqStatus(int no)
KR_STATUS KEInput::QueryStatus(int no)
{
if (no==-1) no=QueryNext();
if (no>=number_of_inputs || no<0)
{
return KR_INVALID;
}
return playerArray[no].QuerytqStatus();
return playerArray[no].QueryStatus();
}
bool KEInput::SendMsg(KEMessage *msg,int no)
{
@ -122,7 +122,7 @@ bool KEInput::SetInputDevice(int no, KG_INPUTTYPE type,KEMessage *msg)
result=playerArray[no].Init(type,no,msg);
// if (result)
// Connect even if remote connection is not yet build
if (result || playerArray[no].QuerytqStatus()==KR_WAIT_FOR_CLIENT)
if (result || playerArray[no].QueryStatus()==KR_WAIT_FOR_CLIENT)
{
switch(QueryType(no))
{

@ -56,7 +56,7 @@ class KEInput : public TQObject
bool IsRemote(int no=-1);
int QueryPrevious();
KG_INPUTTYPE QueryType(int no=-1);
KR_STATUS QuerytqStatus(int no=-1);
KR_STATUS QueryStatus(int no=-1);
bool IsInput(int no);
bool SetInputDevice(int no, KG_INPUTTYPE type, KEMessage *msg=0);
bool RemoveInput(int no);

@ -63,7 +63,7 @@ KRemoteConnect::~KRemoteConnect()
printf("DESTGRUCTING KRemoteConenct\n");
}
KR_STATUS KRemoteConnect::QuerytqStatus()
KR_STATUS KRemoteConnect::QueryStatus()
{
return socketStatus;
}

@ -54,7 +54,7 @@ class KRemoteConnect: public KChildConnect
// bool SendMsg(KEMessage *msg);
virtual bool Send(TQString str);
// void Receive(TQString input);
virtual KR_STATUS QuerytqStatus();
virtual KR_STATUS QueryStatus();
protected:
bool OfferServerSocket();

@ -50,7 +50,7 @@ LSkatApp::LSkatApp() : KMainWindow(0)
config=kapp->config();
// localise data file
TQString file=TQString::tqfromLatin1("lskat/grafix/t1.png");
TQString file=TQString::fromLatin1("lskat/grafix/t1.png");
mGrafix=kapp->dirs()->findResourceDir("data", file);
if (mGrafix.isNull()) mGrafix = TQCString("grafix/");
else mGrafix+=TQCString("lskat/grafix/");
@ -625,14 +625,14 @@ void LSkatApp::NewGame()
}
// Connected 0 and we are server
else if (mInput->QueryType(0)==KG_INPUTTYPE_REMOTE &&
mInput->QuerytqStatus()>0 && doc->IsServer())
mInput->QueryStatus()>0 && doc->IsServer())
{
mInput->Unlock();
mInput->Next(doc->GetStartPlayer());
}
// Connected 1 and we are server
else if (mInput->QueryType(1)==KG_INPUTTYPE_REMOTE &&
mInput->QuerytqStatus()>1 && doc->IsServer())
mInput->QueryStatus()>1 && doc->IsServer())
{
mInput->Unlock();
mInput->Next(doc->GetStartPlayer());
@ -659,7 +659,7 @@ bool LSkatApp::MakeInputDevice(int no)
msg=new KEMessage;
PrepareGame(msg);
// Build new connection
if ( mInput->QueryType(no)!=type || mInput->QuerytqStatus(no)<=0)
if ( mInput->QueryType(no)!=type || mInput->QueryStatus(no)<=0)
{
OptionsNetwork();
port=doc->QueryPort();
@ -689,7 +689,7 @@ bool LSkatApp::MakeInputDevice(int no)
{
progress->setProgress( j );
if ( progress->wasCancelled() ) break;
if (mInput->QuerytqStatus(no)>0) break;
if (mInput->QueryStatus(no)>0) break;
usleep(100);
}
// progress.setProgress(tim);
@ -717,7 +717,7 @@ bool LSkatApp::MakeInputDevice(int no)
}
}
delete msg;
if (mInput->QuerytqStatus(no)>0)
if (mInput->QueryStatus(no)>0)
{
res=true;
}

@ -147,7 +147,7 @@ void LSkatDoc::UpdateViews(int mode)
{
for(w=pViewList->first(); w!=0; w=pViewList->next())
{
if (mode & UPDATE_STATUS) w->updatetqStatus();
if (mode & UPDATE_STATUS) w->updateStatus();
}
}
}
@ -528,8 +528,8 @@ int LSkatDoc::WonMove(int c1,int c2)
}
int LSkatDoc::GetMovetqStatus() {return movestatus;}
void LSkatDoc::SetMovetqStatus(int i) { movestatus=i; }
int LSkatDoc::GetMoveStatus() {return movestatus;}
void LSkatDoc::SetMoveStatus(int i) { movestatus=i; }
int LSkatDoc::GetCurrentPlayer() {return currentplayer;}
void LSkatDoc::SetCurrentPlayer(int i) {currentplayer=i;}
int LSkatDoc::GetStartPlayer() {return startplayer;}

@ -97,8 +97,8 @@ class LSkatDoc : public TQObject
bool IsRunning();
CCOLOUR GetTrump();
void SetTrump(CCOLOUR i);
int GetMovetqStatus();
void SetMovetqStatus(int i);
int GetMoveStatus();
void SetMoveStatus(int i);
int GetCurrentPlayer();
void SetCurrentPlayer(int i);
int GetStartPlayer();

@ -206,7 +206,7 @@ void LSkatView::drawMove(TQPainter *p)
int card;
TQPoint point;
card=getDocument()->GetMovetqStatus();
card=getDocument()->GetMoveStatus();
if (card>=0)
{
@ -611,7 +611,7 @@ void LSkatView::drawTabText(TQPainter *p,TQRect rect,TQString s,int *ts)
}
// Draw the status field at the right side
void LSkatView::drawtqStatus(TQPainter *p)
void LSkatView::drawStatus(TQPainter *p)
{
TQPoint p1,p2;
int trump;
@ -740,7 +740,7 @@ void LSkatView::drawtqStatus(TQPainter *p)
void LSkatView::Paint(TQPainter *p)
{
// If game is running
drawtqStatus(p);
drawStatus(p);
drawDeck(p);
if (getDocument()->IsRunning())
{
@ -793,7 +793,7 @@ void LSkatView::mousePressEvent( TQMouseEvent *mouse )
if (mouse->button()!=Qt::LeftButton) return ;
if (!getDocument()->IsRunning()) return ;
if (getDocument()->GetMovetqStatus()!=-1) return ;
if (getDocument()->GetMoveStatus()!=-1) return ;
TQPoint point;
int mx,my,player;
@ -925,7 +925,7 @@ void LSkatView::moveTimerReady()
}
}
void LSkatView::updatetqStatus()
void LSkatView::updateStatus()
{
update(status_rect1);
update(status_rect2);

@ -54,13 +54,13 @@ class LSkatView : public TQWidget
void paintEvent( TQPaintEvent * p);
void Paint(TQPainter *p);
void InitMove(int player,int x,int y);
void updatetqStatus();
void updateStatus();
protected:
void drawDeck(TQPainter *p);
void drawIntro(TQPainter *p);
void drawMove(TQPainter *p);
void drawtqStatus(TQPainter *p);
void drawStatus(TQPainter *p);
void drawFinal(TQPainter *p);
void drawBorder(TQPainter *p,TQRect rect,int offset,int width,int mode);
TQPoint calcCardPos(int x,int y);

@ -48,7 +48,7 @@ NameDlg::NameDlg( TQWidget *parent, const char *name,bool /* modal */, WFlags /*
player_names->tqlayout()->setSpacing( 0 );
player_names->tqlayout()->setMargin( 0 );
vbox_2 = new TQVBoxLayout( player_names->tqlayout() );
vbox_2->tqsetAlignment( TQt::AlignTop );
vbox_2->setAlignment( TQt::AlignTop );
vbox_2->setSpacing( 6 );
vbox_2->setMargin( 11 );

@ -28,7 +28,7 @@ extern const char* LSKAT_SERVICE;
NetworkDlg::NetworkDlg( TQWidget *parent, const char *name )
: NetworkDlgBase( parent, name, TRUE )
{
browser = new DNSSD::ServiceBrowser(TQString::tqfromLatin1(LSKAT_SERVICE));
browser = new DNSSD::ServiceBrowser(TQString::fromLatin1(LSKAT_SERVICE));
connect(browser,TQT_SIGNAL(finished()),TQT_SLOT(gamesFound()));
browser->startBrowse();
}

@ -236,7 +236,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>51</width>
<height>20</height>
@ -261,7 +261,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>61</width>
<height>20</height>

@ -30,7 +30,7 @@ KChildConnect::~KChildConnect()
{
}
KR_STATUS KChildConnect::QuerytqStatus()
KR_STATUS KChildConnect::QueryStatus()
{
return KR_OK;
}

@ -34,7 +34,7 @@ class KChildConnect: public TQObject
virtual bool SendMsg(KEMessage *msg);
virtual bool Send(TQString str);
virtual KR_STATUS QuerytqStatus();
virtual KR_STATUS QueryStatus();
public slots:

@ -52,14 +52,14 @@ ScoreWidget::ScoreWidget( TQWidget* parent, const char* name, WFlags fl )
TextLabel7 = new TQLabel( this, "TextLabel7" );
setPlayer("-----",0);
TextLabel7->setBackgroundColor( COL_STATUSFIELD );
TextLabel7->tqsetAlignment(TQt::AlignHCenter);
TextLabel7->setAlignment(TQt::AlignHCenter);
LayoutB->addMultiCellWidget( TextLabel7, row, row,0,2 );
row++;
TextLabel8 = new TQLabel( this, "TextLabel8" );
TextLabel8->setText( i18n( "vs" ) );
TextLabel8->setBackgroundColor( COL_STATUSFIELD );
TextLabel8->tqsetAlignment(TQt::AlignHCenter);
TextLabel8->setAlignment(TQt::AlignHCenter);
LayoutB->addMultiCellWidget( TextLabel8, row, row,0,2 );
row++;
@ -68,7 +68,7 @@ ScoreWidget::ScoreWidget( TQWidget* parent, const char* name, WFlags fl )
// TextLabel9->setFrameShape(TQFrame::Box );
// TextLabel9->setLineWidth(5);
TextLabel9->setBackgroundColor( COL_STATUSFIELD );
TextLabel9->tqsetAlignment(TQt::AlignHCenter);
TextLabel9->setAlignment(TQt::AlignHCenter);
LayoutB->addMultiCellWidget( TextLabel9, row, row,0,2 );
row++;
@ -86,7 +86,7 @@ ScoreWidget::ScoreWidget( TQWidget* parent, const char* name, WFlags fl )
TextLabel4 = new TQLabel( this, "L" );
setLevel(Prefs::level());
TextLabel4->tqsetAlignment(TQt::AlignRight);
TextLabel4->setAlignment(TQt::AlignRight);
TextLabel4->setBackgroundColor( COL_STATUSFIELD );
LayoutB->addWidget( TextLabel4, row, 2 );
@ -100,7 +100,7 @@ ScoreWidget::ScoreWidget( TQWidget* parent, const char* name, WFlags fl )
TextLabel5 = new TQLabel( this, "M" );
setMove(0);
TextLabel5->tqsetAlignment(TQt::AlignRight);
TextLabel5->setAlignment(TQt::AlignRight);
TextLabel5->setBackgroundColor( COL_STATUSFIELD );
LayoutB->addWidget( TextLabel5, row, 2 );
@ -114,7 +114,7 @@ ScoreWidget::ScoreWidget( TQWidget* parent, const char* name, WFlags fl )
TextLabel6 = new TQLabel( this, "C" );
setChance(0);
TextLabel6->tqsetAlignment(TQt::AlignRight);
TextLabel6->setAlignment(TQt::AlignRight);
TextLabel6->setBackgroundColor( COL_STATUSFIELD );
LayoutB->addWidget( TextLabel6, row, 2 );

@ -235,7 +235,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>20</height>

@ -43,7 +43,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>16</height>
@ -159,7 +159,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>51</width>
<height>20</height>

@ -38,7 +38,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>20</width>
<height>41</height>
@ -55,7 +55,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
<property name="tqsizeHint">
<property name="sizeHint">
<size>
<width>90</width>
<height>20</height>

@ -138,7 +138,7 @@ Kwin4App::Kwin4App(TQWidget *parent, const char *name) : KMainWindow(parent,name
void Kwin4App::checkMenus(CheckFlags menu)
{
bool localgame=(!doc->isNetwork());
bool isRunning = (doc->gametqStatus()==KGame::Run);
bool isRunning = (doc->gameStatus()==KGame::Run);
if (!menu || (menu&CheckFileMenu))
{
changeAction("hint", !(!isRunning && localgame));
@ -338,11 +338,11 @@ void Kwin4App::slotSaveGame()
void Kwin4App::newGame()
{
// End the intro if it is running
doc->setGametqStatus(Kwin4Doc::End);
doc->setGameStatus(Kwin4Doc::End);
// Init the board and Clear the old game out
doc->setGametqStatus(Kwin4Doc::Init);
doc->setGameStatus(Kwin4Doc::Init);
// Run it
doc->setGametqStatus(Kwin4Doc::Run);
doc->setGameStatus(Kwin4Doc::Run);
}
/**
@ -360,7 +360,7 @@ void Kwin4App::slotNewGame()
*/
void Kwin4App::endGame()
{
doc->setGametqStatus(Kwin4Doc::Abort);
doc->setGameStatus(Kwin4Doc::Abort);
}
/**
@ -453,7 +453,7 @@ void Kwin4App::EndGame(TABLE mode)
*/
void Kwin4App::slotStatusNames(){
TQString msg;
if (!(doc->gametqStatus()==KGame::Run))
if (!(doc->gameStatus()==KGame::Run))
msg=i18n("No game ");
else if (doc->QueryCurrentPlayer()==Gelb)
msg=TQString(" ")+doc->QueryName(Gelb)+ i18n(" - Yellow ");
@ -480,7 +480,7 @@ void Kwin4App::slotNetworkBroken(int /*id*/, int oldstatus ,KGame * /*game */)
doc->getPlayer(doc->QueryCurrentPlayer())->setTurn(true,true);
KMessageBox::information(this,i18n("The network game ended!\n"));
doc->setGametqStatus(oldstatus);
doc->setGameStatus(oldstatus);
}
/**
@ -527,7 +527,7 @@ void Kwin4App::slotGameOver(int status, KPlayer * p, KGame * /*me*/)
void Kwin4App::slotInitNetwork()
{
if (doc->gametqStatus()==Kwin4Doc::Intro) doc->setGametqStatus(Kwin4Doc::Pause);
if (doc->gameStatus()==Kwin4Doc::Intro) doc->setGameStatus(Kwin4Doc::Pause);
TQString host = Prefs::host();
int port=Prefs::port();

@ -90,7 +90,7 @@ Kwin4Doc::Kwin4Doc(TQWidget *parent, const char *) : KGame(1234,TQT_TQOBJECT(par
// last in init
ResetGame(false);
setGametqStatus(Intro);
setGameStatus(Intro);
// Listen to network
connect(this,TQT_SIGNAL(signalMessageUpdate(int,TQ_UINT32,TQ_UINT32)),
@ -203,7 +203,7 @@ void Kwin4Doc::preparePlayerTurn()
*/
void Kwin4Doc::EndGame(TABLE mode)
{
setGametqStatus(End);
setGameStatus(End);
pView->clearError();
pView->EndGame();
Kwin4Player *yellow=getPlayer(Gelb);
@ -1181,20 +1181,20 @@ void Kwin4Doc::slotPropertyChanged(KGamePropertyBase *prop,KGame *)
if (global_debug>1) kdDebug(12010) << "Amzug changed to " << mAmzug.value()<<endl;
pView->scoreWidget()->setTurn(mAmzug);
}
else if (prop->id()==KGamePropertyBase::IdGametqStatus)
else if (prop->id()==KGamePropertyBase::IdGameStatus)
{
if (gametqStatus()==Abort)
if (gameStatus()==Abort)
{
if (global_debug>1) kdDebug(12010) << "PropertyChanged::status signal game abort +++" << endl;
emit signalGameOver(2,getPlayer(QueryCurrentPlayer()),0); // 2 indicates Abort
}
else if (gametqStatus()==Run)
else if (gameStatus()==Run)
{
if (global_debug>1) kdDebug(12010) << "PropertyChanged::status signal game run +++" << endl;
preparePlayerTurn(); // Set the current player to play
emit signalGameRun();
}
else if (gametqStatus()==Init)
else if (gameStatus()==Init)
{
if (global_debug>1) kdDebug(12010) << "PropertyChanged::status signal game INIT +++" << endl;
ResetGame(true);
@ -1227,7 +1227,7 @@ bool Kwin4Doc::loadgame(TQDataStream &stream,bool network,bool reset)
{
if (global_debug>1)
kdDebug () << "loadgame() network=" << network << " reset="<< reset << endl;
if (!network) setGametqStatus(End);
if (!network) setGameStatus(End);
// Clear out the old game
if (global_debug>1) kdDebug(12010)<<"loadgame wants to reset the game"<<endl;

@ -200,12 +200,12 @@ void Kwin4View::initView(bool deleteall)
TQPixmap *pixmap=loadPixmap("background.png");
if (pixmap)
mCanvas->tqsetBackgroundPixmap(*pixmap);
mCanvas->setBackgroundPixmap(*pixmap);
else
mCanvas->setBackgroundColor(TQColor(0,0,128));
delete pixmap;
if (doc->gametqStatus()==KGame::Intro)
if (doc->gameStatus()==KGame::Intro)
{
mScoreWidget->hide();
mStatusWidget->hide();
@ -481,7 +481,7 @@ void Kwin4View::setSprite(int no, int x, int col, bool enable)
{
KSprite *sprite;
sprite=(KSprite *)(mCache->getItem("piece",no));
if (sprite) sprite->tqsetVisible(enable);
if (sprite) sprite->setVisible(enable);
setArrow(x,col);
}
@ -497,7 +497,7 @@ void Kwin4View::setHint(int x,int y,bool enabled)
sprite->move(x*(sprite->width()+mSpreadX)+mBoardX,
y*(sprite->height()+mSpreadY)+mBoardY);
}
sprite->tqsetVisible(enabled);
sprite->setVisible(enabled);
}
}

Loading…
Cancel
Save