diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:58:53 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-16 09:58:53 -0600 |
commit | 84ace1135cac57993b72fee7105b92def1638d32 (patch) | |
tree | b8871eb76e3db4a062731b0ce7c99c24fac119e8 /kbackgammon | |
parent | 97d1732e257f8700488d7ca1660ae7eba8fc6065 (diff) | |
download | tdegames-84ace1135cac57993b72fee7105b92def1638d32.tar.gz tdegames-84ace1135cac57993b72fee7105b92def1638d32.zip |
Revert "Rename a number of old tq methods that are no longer tq specific"
This reverts commit 97d1732e257f8700488d7ca1660ae7eba8fc6065.
Diffstat (limited to 'kbackgammon')
-rw-r--r-- | kbackgammon/engines/fibs/kbgfibs.cpp | 102 | ||||
-rw-r--r-- | kbackgammon/engines/fibs/kbgfibs.h | 8 | ||||
-rw-r--r-- | kbackgammon/engines/fibs/kbgfibschat.cpp | 50 | ||||
-rw-r--r-- | kbackgammon/engines/fibs/kbginvite.cpp | 6 | ||||
-rw-r--r-- | kbackgammon/engines/fibs/kplayerlist.cpp | 48 | ||||
-rw-r--r-- | kbackgammon/engines/fibs/kplayerlist.h | 6 | ||||
-rw-r--r-- | kbackgammon/engines/generic/kbgengine.h | 6 | ||||
-rw-r--r-- | kbackgammon/engines/gnubg/kbggnubg.cpp | 20 | ||||
-rw-r--r-- | kbackgammon/engines/nextgen/kbgng.cpp | 26 | ||||
-rw-r--r-- | kbackgammon/engines/offline/kbgoffline.cpp | 18 | ||||
-rw-r--r-- | kbackgammon/kbg.cpp | 14 | ||||
-rw-r--r-- | kbackgammon/kbgboard.cpp | 50 | ||||
-rw-r--r-- | kbackgammon/kbgboard.h | 24 | ||||
-rw-r--r-- | kbackgammon/kbgstatus.cpp | 66 | ||||
-rw-r--r-- | kbackgammon/kbgstatus.h | 16 |
15 files changed, 230 insertions, 230 deletions
diff --git a/kbackgammon/engines/fibs/kbgfibs.cpp b/kbackgammon/engines/fibs/kbgfibs.cpp index d56e633c..57eb6666 100644 --- a/kbackgammon/engines/fibs/kbgfibs.cpp +++ b/kbackgammon/engines/fibs/kbgfibs.cpp @@ -39,7 +39,7 @@ #include <kconfig.h> #include <tqtimer.h> #include <tqcheckbox.h> -#include <layout.h> +#include <tqlayout.h> #include <tqstring.h> #include <tqsocket.h> #include <tqpopupmenu.h> @@ -81,7 +81,7 @@ void KBgEngineFIBS::start() // == configuration handling =================================================== /* - * Restore settings and ask children to do the same + * Restore settings and ask tqchildren to do the same */ void KBgEngineFIBS::readConfig() { @@ -110,7 +110,7 @@ void KBgEngineFIBS::readConfig() autoMsg[MsgLos] = config->readEntry("msg-los", ""); autoMsg[MsgWin] = config->readEntry("msg-win", ""); - // ask the children to read their config options + // ask the tqchildren to read their config options playerlist->readConfig(); chatWindow->readConfig(); } @@ -145,7 +145,7 @@ void KBgEngineFIBS::saveConfig() config->writeEntry("msg-los", autoMsg[MsgLos]); config->writeEntry("msg-win", autoMsg[MsgWin]); - // ask the children to read their config options + // ask the tqchildren to read their config options playerlist->saveConfig(); chatWindow->saveConfig(); } @@ -343,7 +343,7 @@ void KBgEngineFIBS::getSetupPages(KDialogBase *nb) TQWhatsThis::add(cbk, i18n("Usually, FIBS drops the connection after one hour of inactivity. When " "you check this box, %1 will try to keep the connection alive, even " "if you are not actually playing or chatting. Use this with caution " - "if you do not have flat-rate Internet access.").arg(PROG_NAME)); + "if you do not have flat-rate Internet access.").tqarg(PROG_NAME)); cbk->setChecked(keepalive); @@ -357,7 +357,7 @@ void KBgEngineFIBS::getSetupPages(KDialogBase *nb) tc->addTab(w, i18n("&Connection")); /* - * Ask children for settings + * Ask tqchildren for settings */ chatWindow->getSetupPages(tc, nb->spacingHint()); playerlist->getSetupPages(tc, nb->spacingHint()); @@ -431,28 +431,28 @@ void KBgEngineFIBS::changeJoin(const TQString &info) TQString text, menu; if ((*it).contains(TQRegExp(" r$"))) { - menu = i18n("R means resume", "%1 (R)").arg(name); + menu = i18n("R means resume", "%1 (R)").tqarg(name); text = i18n("%1 (experience %2, rating %3) wants to resume a saved match with you. " "If you want to play, use the corresponding menu entry to join (or type " - "'join %4').").arg(name).arg(expi_s).arg(rate_s).arg(name); + "'join %4').").tqarg(name).tqarg(expi_s).tqarg(rate_s).tqarg(name); KNotifyClient::event("invitation", i18n("%1 wants to resume a saved match with you"). arg(name)); } else if ((*it).contains(TQRegExp(" u$"))) { - menu = i18n("U means unlimited", "%1 (U)").arg(name); + menu = i18n("U means unlimited", "%1 (U)").tqarg(name); text = i18n("%1 (experience %2, rating %3) wants to play an unlimited match with you. " "If you want to play, use the corresponding menu entry to join (or type " - "'join %4').").arg(name).arg(expi_s).arg(rate_s).arg(name); + "'join %4').").tqarg(name).tqarg(expi_s).tqarg(rate_s).tqarg(name); KNotifyClient::event("invitation", i18n("%1 has invited you to an unlimited match"). arg(name)); } else { TQString len = (*it).right((*it).length() - name.length() - 1); menu = i18n("If the format of the (U) and (R) strings is changed, it should also be changed here", - "%1 (%2)").arg(name).arg(len); + "%1 (%2)").tqarg(name).tqarg(len); text = i18n("%1 (experience %2, rating %3) wants to play a %4 point match with you. " "If you want to play, use the corresponding menu entry to join (or type " - "'join %5').").arg(name).arg(expi_s).arg(rate_s).arg(len).arg(name); + "'join %5').").tqarg(name).tqarg(expi_s).tqarg(rate_s).tqarg(len).tqarg(name); KNotifyClient::event("invitation", i18n("%1 has invited you for a %2 point match"). - arg(name).arg(len)); + tqarg(name).tqarg(len)); } emit serverString("rawwho " + name); // this avoids a race if (whoisInvite) { @@ -877,7 +877,7 @@ void KBgEngineFIBS::connectFIBS() /* * Connect */ - emit infoText(i18n("Looking up %1").arg(infoFIBS[FIBSHost])); + emit infoText(i18n("Looking up %1").tqarg(infoFIBS[FIBSHost])); connection->connectToHost(infoFIBS[FIBSHost], infoFIBS[FIBSPort].toUShort()); return; @@ -888,7 +888,7 @@ void KBgEngineFIBS::connectFIBS() */ void KBgEngineFIBS::hostFound() { - emit infoText(i18n("Connecting to %1").arg(infoFIBS[FIBSHost])); + emit infoText(i18n("Connecting to %1").tqarg(infoFIBS[FIBSHost])); } /* @@ -947,7 +947,7 @@ void KBgEngineFIBS::connected() /* * Initialize the rx state machine */ - rxStatus = RxConnect; + rxtqStatus = RxConnect; rxCollect = ""; /* @@ -992,7 +992,7 @@ void KBgEngineFIBS::newAccount() if (!queryConnection(true)) return; - rxStatus = RxNewLogin; + rxtqStatus = RxNewLogin; rxCollect = ""; login = false; connectFIBS(); @@ -1077,12 +1077,12 @@ bool KBgEngineFIBS::queryConnection(const bool newlogin) text = i18n("Enter the login you would like to use on the server %1. The login may not\n" "contain spaces or colons. If the login you choose is not available, you'll later be\n" - "given the opportunity to pick another one.\n\n").arg(infoFIBS[FIBSHost]); + "given the opportunity to pick another one.\n\n").tqarg(infoFIBS[FIBSHost]); else text = i18n("Enter your login on the server %1. If you don't have a login, you\n" - "should create one using the corresponding menu option.\n\n").arg(infoFIBS[FIBSHost]); + "should create one using the corresponding menu option.\n\n").tqarg(infoFIBS[FIBSHost]); first = true; @@ -1107,12 +1107,12 @@ bool KBgEngineFIBS::queryConnection(const bool newlogin) text = i18n("Enter the password you would like to use with the login %1\n" "on the server %2. It may not contain colons.\n\n"). - arg(infoFIBS[FIBSUser]).arg(infoFIBS[FIBSHost]); + tqarg(infoFIBS[FIBSUser]).tqarg(infoFIBS[FIBSHost]); else text = i18n("Enter the password for the login %1 on the server %2.\n\n"). - arg(infoFIBS[FIBSUser]).arg(infoFIBS[FIBSHost]); + tqarg(infoFIBS[FIBSUser]).tqarg(infoFIBS[FIBSHost]); first = true; do { @@ -1289,7 +1289,7 @@ void KBgEngineFIBS::handleServerData(TQString &line) */ line.replace(pat[TabChar], " "); - switch (rxStatus) { + switch (rxtqStatus) { case RxConnect: handleMessageConnect(line, rawline); @@ -1345,7 +1345,7 @@ void KBgEngineFIBS::handleMessageWhois(const TQString &line) { rxCollect += "<br> " + line; if (line.contains(pat[WhoisE1]) || line.contains(pat[WhoisE2])) { - rxStatus = RxNormal; + rxtqStatus = 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>"); - rxStatus = RxNormal; + rxtqStatus = RxNormal; } } @@ -1368,7 +1368,7 @@ void KBgEngineFIBS::handleMessageRating(const TQString &line) void KBgEngineFIBS::handleMessageMotd(const TQString &line) { if (line.contains(pat[MotdEnd])) { - rxStatus = RxNormal; + rxtqStatus = 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()) { - rxStatus = RxIgnore; + rxtqStatus = 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 rxStatus + connectFIBS(); // will reset the rxtqStatus } else { - rxStatus = RxConnect; + rxtqStatus = RxConnect; emit serverString(""); emit serverString(""); } @@ -1435,7 +1435,7 @@ void KBgEngineFIBS::handleMessageConnect(const TQString &line, const TQString &r int words = sscanf (line.latin1(), "%255s%255s%li%255s", p[0], p[1], &tmp, p[2]); if (words >= 4) { TQDateTime d; d.setTime_t(tmp); - TQString text = i18n("%1, last logged in from %2 at %3.").arg(p[1]).arg(p[2]).arg(d.toString()); + TQString text = i18n("%1, last logged in from %2 at %3.").tqarg(p[1]).tqarg(p[2]).tqarg(d.toString()); emit infoText("<hr><br>" + text); playerlist->setName(p[1]); } @@ -1473,7 +1473,7 @@ void KBgEngineFIBS::handleMessageConnect(const TQString &line, const TQString &r */ if (line.contains(pat[OwnInfo])) { - rxStatus = RxNormal; + rxtqStatus = 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])) { - rxStatus = RxNewLogin; + rxtqStatus = RxNewLogin; emit infoText(TQString("<font color=\"red\">") + rxCollect + "</font>"); rxCollect = ""; TQString tmp = rawline; @@ -1610,10 +1610,10 @@ void KBgEngineFIBS::handleMessageNewLogin(const TQString &line) TQString text = i18n("Your account has been created. Your new login is <u>%1</u>. To fully activate " "this account, I will now close the connection. Once you reconnect, you can start " - "playing backgammon on FIBS.").arg(infoFIBS[FIBSUser]); + "playing backgammon on FIBS.").tqarg(infoFIBS[FIBSUser]); emit infoText("<br><hr><font color=\"blue\">" + text + "</font><br><hr>"); emit serverString("bye"); - rxStatus = RxNormal; + rxtqStatus = RxNormal; rxCollect = ""; return; } @@ -1717,7 +1717,7 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) /* * Save the board string and create a new game state */ - KBgStatus *st = new KBgStatus(currBoard = rawline); + KBgtqStatus *st = new KBgtqStatus(currBoard = rawline); /* * Save important state data and stop the timeout @@ -1736,15 +1736,15 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) * Update the caption string */ if (st->turn() < 0) - caption = i18n("%1 (%2) vs. %3 (%4) - game over").arg(pname[US]). - arg(st->points(US)).arg(pname[THEM]).arg(st->points(THEM)); + caption = i18n("%1 (%2) vs. %3 (%4) - game over").tqarg(pname[US]). + tqarg(st->points(US)).tqarg(pname[THEM]).tqarg(st->points(THEM)); else if (st->length() < 0) - caption = i18n("%1 (%2) vs. %3 (%4) - unlimited match").arg(pname[US]). - arg(st->points(US)).arg(pname[THEM]).arg(st->points(THEM)); + caption = i18n("%1 (%2) vs. %3 (%4) - unlimited match").tqarg(pname[US]). + tqarg(st->points(US)).tqarg(pname[THEM]).tqarg(st->points(THEM)); else - caption = i18n("%1 (%2) vs. %3 (%4) - %5 point match").arg(pname[US]). - arg(st->points(US)).arg(pname[THEM]).arg(st->points(THEM)). - arg(st->length()); + caption = i18n("%1 (%2) vs. %3 (%4) - %5 point match").tqarg(pname[US]). + tqarg(st->points(US)).tqarg(pname[THEM]).tqarg(st->points(THEM)). + tqarg(st->length()); emit statText(caption); @@ -1779,13 +1779,13 @@ void KBgEngineFIBS::handleMessageNormal(TQString &line, TQString &rawline) */ else if (line.contains(pat[YouAway])) { - emit changePlayerStatus(infoFIBS[FIBSUser], KFibsPlayerList::Away, true); + emit changePlayertqStatus(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 changePlayerStatus(infoFIBS[FIBSUser], KFibsPlayerList::Away, false); + emit changePlayertqStatus(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])) { - rxStatus = RxWhois; + rxtqStatus = RxWhois; rxCollect = TQString("<br><u>") + line + "</u>"; return; } else if (line.contains(pat[MotdBeg])) { - rxStatus = RxMotd; + rxtqStatus = RxMotd; rxCollect = ""; return; } else if (line.contains(pat[BegRate])) { - rxStatus = RxRating; + rxtqStatus = RxRating; rxCount = 0; rxCollect = "<br>" + line; return; } else if (line.contains(pat[Goodbye])) { - rxStatus = RxGoodbye; + rxtqStatus = 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 changePlayerStatus(rawline, KFibsPlayerList::Blind, true); + emit changePlayertqStatus(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 changePlayerStatus(rawline, KFibsPlayerList::Blind, false); + emit changePlayertqStatus(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(changePlayerStatus(const TQString &, int, bool)), - playerlist, TQT_SLOT(changePlayerStatus(const TQString &, int, bool))); + connect(this, TQT_SIGNAL(changePlayertqStatus(const TQString &, int, bool)), + playerlist, TQT_SLOT(changePlayertqStatus(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 &))); diff --git a/kbackgammon/engines/fibs/kbgfibs.h b/kbackgammon/engines/fibs/kbgfibs.h index db79ce51..24555ef2 100644 --- a/kbackgammon/engines/fibs/kbgfibs.h +++ b/kbackgammon/engines/fibs/kbgfibs.h @@ -175,7 +175,7 @@ signals: void fibsConnectionClosed(); - void changePlayerStatus(const TQString &, int, bool); + void changePlayertqStatus(const TQString &, int, bool); void chatMessage(const TQString &msg); @@ -199,7 +199,7 @@ private: TQString currBoard, caption; - //KBgStatus *currBoard + //KBgtqStatus *currBoard //KBgFIBSBoard *boardHandler; TQStringList invitations; @@ -400,10 +400,10 @@ protected slots: protected: - enum RxStatus {RxIgnore, RxConnect, RxWhois, RxMotd, RxRating, + enum RxtqStatus {RxIgnore, RxConnect, RxWhois, RxMotd, RxRating, RxNewLogin, RxGoodbye, RxNormal}; - int rxStatus, rxCount; + int rxtqStatus, rxCount; TQString rxCollect; diff --git a/kbackgammon/engines/fibs/kbgfibschat.cpp b/kbackgammon/engines/fibs/kbgfibschat.cpp index bae73d46..c3490cec 100644 --- a/kbackgammon/engines/fibs/kbgfibschat.cpp +++ b/kbackgammon/engines/fibs/kbgfibschat.cpp @@ -28,17 +28,17 @@ #include <tqstring.h> -#include <layout.h> +#include <tqlayout.h> #include <tqlabel.h> #include <tqpopupmenu.h> #include <tqregexp.h> #include <tqfont.h> #include <tqwhatsthis.h> #include <tqdatetime.h> -#include <clipboard.h> +#include <tqclipboard.h> #include <tqsimplerichtext.h> #include <tqregion.h> -#include <palette.h> +#include <tqpalette.h> #include <tqpainter.h> #include <tqpoint.h> #include <tqlistbox.h> @@ -123,7 +123,7 @@ protected: */ virtual void paint(TQPainter *p) { - t->draw(p, 1, 1, TQRegion(p->viewport()), w->colorGroup()); + t->draw(p, 1, 1, TQRegion(p->viewport()), w->tqcolorGroup()); } private: @@ -200,7 +200,7 @@ KBgChat::KBgChat(TQWidget *parent, const char *name) d->mInvt = new TQPopupMenu(); setAutoAddMessages(false); // we get an echo from FIBS - setFromNickname(i18n("%1 user").arg(PROG_NAME)); + setFromNickname(i18n("%1 user").tqarg(PROG_NAME)); if (!addSendingEntry(i18n("Kibitz to watchers and players"), CLIP_YOU_KIBITZ)) kdDebug(10500) << "adding kibitz" << endl; @@ -450,7 +450,7 @@ void KBgChat::startGame(const TQString &name) if (!id) { id = new int(nextId()); d->mName2ID->insert(name, id); - addSendingEntry(i18n("Talk to %1").arg(name), *id); + addSendingEntry(i18n("Talk to %1").tqarg(name), *id); } setSendingEntry(CLIP_YOU_KIBITZ); } @@ -476,7 +476,7 @@ void KBgChat::fibsTalk(const TQString &name) if (!id) { id = new int(nextId()); d->mName2ID->insert(name, id); - addSendingEntry(i18n("Talk to %1").arg(name), *id); + addSendingEntry(i18n("Talk to %1").tqarg(name), *id); } setSendingEntry(*id); } @@ -549,7 +549,7 @@ void KBgChat::handleData(const TQString &msg) switch (cmd) { case CLIP_SAYS: if (!d->mGag.contains(user)) { - cMsg = i18n("<u>%1 tells you:</u> %2").arg(user).arg(cMsg.replace(TQRegExp("^" + user), "")); + cMsg = i18n("<u>%1 tells you:</u> %2").tqarg(user).tqarg(cMsg.replace(TQRegExp("^" + user), "")); cMsg = "<font color=\"red\">" + cMsg + "</font>"; emit personalMessage(cMsg); } else @@ -558,7 +558,7 @@ void KBgChat::handleData(const TQString &msg) case CLIP_SHOUTS: if ((!((KToggleAction *)d->mAct[KBgChatPrivate::Silent])->isChecked()) && (!d->mGag.contains(user))) { - cMsg = i18n("<u>%1 shouts:</u> %2").arg(user).arg(cMsg.replace(TQRegExp("^" + user), "")); + cMsg = i18n("<u>%1 shouts:</u> %2").tqarg(user).tqarg(cMsg.replace(TQRegExp("^" + user), "")); cMsg = "<font color=\"black\">" + cMsg + "</font>"; } else cMsg = ""; @@ -566,7 +566,7 @@ void KBgChat::handleData(const TQString &msg) case CLIP_WHISPERS: if (!d->mGag.contains(user)) { - cMsg = i18n("<u>%1 whispers:</u> %2").arg(user).arg(cMsg.replace(TQRegExp("^" + user), "")); + cMsg = i18n("<u>%1 whispers:</u> %2").tqarg(user).tqarg(cMsg.replace(TQRegExp("^" + user), "")); cMsg = "<font color=\"red\">" + cMsg + "</font>"; emit personalMessage(cMsg); } else @@ -575,7 +575,7 @@ void KBgChat::handleData(const TQString &msg) case CLIP_KIBITZES: if (!d->mGag.contains(user)) { - cMsg = i18n("<u>%1 kibitzes:</u> %2").arg(user).arg(cMsg.replace(TQRegExp("^" + user), "")); + cMsg = i18n("<u>%1 kibitzes:</u> %2").tqarg(user).tqarg(cMsg.replace(TQRegExp("^" + user), "")); cMsg = "<font color=\"red\">" + cMsg + "</font>"; emit personalMessage(cMsg); } else @@ -583,28 +583,28 @@ void KBgChat::handleData(const TQString &msg) break; case CLIP_YOU_SAY: - cMsg = i18n("<u>You tell %1:</u> %2").arg(user).arg(cMsg.replace(TQRegExp("^" + user), "")); + cMsg = i18n("<u>You tell %1:</u> %2").tqarg(user).tqarg(cMsg.replace(TQRegExp("^" + user), "")); cMsg = "<font color=\"darkgreen\">" + cMsg + "</font>"; emit personalMessage(cMsg); user = TQString(); break; case CLIP_YOU_SHOUT: - cMsg = i18n("<u>You shout:</u> %1").arg(cMsg); + cMsg = i18n("<u>You shout:</u> %1").tqarg(cMsg); cMsg = "<font color=\"darkgreen\">" + cMsg + "</font>"; emit personalMessage(cMsg); user = TQString(); break; case CLIP_YOU_WHISPER: - cMsg = i18n("<u>You whisper:</u> %1").arg(cMsg); + cMsg = i18n("<u>You whisper:</u> %1").tqarg(cMsg); cMsg = "<font color=\"darkgreen\">" + cMsg + "</font>"; emit personalMessage(cMsg); user = TQString(); break; case CLIP_YOU_KIBITZ: - cMsg = i18n("<u>You kibitz:</u> %1").arg(cMsg); + cMsg = i18n("<u>You kibitz:</u> %1").tqarg(cMsg); cMsg = "<font color=\"darkgreen\">" + cMsg + "</font>"; emit personalMessage(cMsg); user = TQString(); @@ -615,21 +615,21 @@ void KBgChat::handleData(const TQString &msg) cMsg.remove(0, cMsg.find(' ')+1); date.setTime_t(cMsg.left(cMsg.find(' ')+1).toUInt()); cMsg.remove(0, cMsg.find(' ')); - cMsg = i18n("<u>User %1 left a message at %2</u>: %3").arg(user).arg(date.toString()).arg(cMsg); + cMsg = i18n("<u>User %1 left a message at %2</u>: %3").tqarg(user).tqarg(date.toString()).tqarg(cMsg); cMsg = "<font color=\"red\">" + cMsg + "</font>"; emit personalMessage(cMsg); user = TQString(); break; case CLIP_MESSAGE_DELIVERED: - cMsg = i18n("Your message for %1 has been delivered.").arg(user); + cMsg = i18n("Your message for %1 has been delivered.").tqarg(user); cMsg = TQString("<font color=\"darkgreen\">") + cMsg + "</font>"; emit personalMessage(cMsg); user = TQString(); break; case CLIP_MESSAGE_SAVED: - cMsg = i18n("Your message for %1 has been saved.").arg(user); + cMsg = i18n("Your message for %1 has been saved.").tqarg(user); cMsg = TQString("<font color=\"darkgreen\">") + cMsg + "</font>"; emit personalMessage(cMsg); user = TQString(); @@ -683,22 +683,22 @@ void KBgChat::contextMenu(TQListBoxItem *i, const TQPoint &p) */ if (!d->mName[0].isNull()) { - d->mAct[KBgChatPrivate::Talk]->setText(i18n("Talk to %1").arg(d->mName[0])); + d->mAct[KBgChatPrivate::Talk]->setText(i18n("Talk to %1").tqarg(d->mName[0])); d->mAct[KBgChatPrivate::Talk]->plug(d->mChat); - d->mAct[KBgChatPrivate::Inquire]->setText(i18n("Info on %1").arg(d->mName[0])); + d->mAct[KBgChatPrivate::Inquire]->setText(i18n("Info on %1").tqarg(d->mName[0])); d->mAct[KBgChatPrivate::Inquire]->plug(d->mChat); // invite menu is always the same - d->mChat->insertItem(i18n("Invite %1").arg(d->mName[0]), d->mInvt); + d->mChat->insertItem(i18n("Invite %1").tqarg(d->mName[0]), d->mInvt); d->mChat->insertSeparator(); if (d->mGag.contains(d->mName[0]) <= 0) { - d->mAct[KBgChatPrivate::Gag]->setText(i18n("Gag %1").arg(d->mName[0])); + d->mAct[KBgChatPrivate::Gag]->setText(i18n("Gag %1").tqarg(d->mName[0])); d->mAct[KBgChatPrivate::Gag]->plug(d->mChat); } else { - d->mAct[KBgChatPrivate::Ungag]->setText(i18n("Ungag %1").arg(d->mName[0])); + d->mAct[KBgChatPrivate::Ungag]->setText(i18n("Ungag %1").tqarg(d->mName[0])); d->mAct[KBgChatPrivate::Ungag]->plug(d->mChat); } } @@ -741,7 +741,7 @@ void KBgChat::slotGag() d->mGag.append(d->mName[0]); TQString msg("<font color=\"blue\">"); - msg += i18n("You won't hear what %1 says and shouts.").arg(d->mName[0]); + msg += i18n("You won't hear what %1 says and shouts.").tqarg(d->mName[0]); msg += "</font>"; addMessage(TQString(), msg); @@ -763,7 +763,7 @@ void KBgChat::slotUngag() d->mGag.remove(d->mName[0]); TQString msg("<font color=\"blue\">"); - msg += i18n("You will again hear what %1 says and shouts.").arg(d->mName[0]); + msg += i18n("You will again hear what %1 says and shouts.").tqarg(d->mName[0]); msg += "</font>"; addMessage(TQString(), msg); diff --git a/kbackgammon/engines/fibs/kbginvite.cpp b/kbackgammon/engines/fibs/kbginvite.cpp index 532cb18a..3870a6d2 100644 --- a/kbackgammon/engines/fibs/kbginvite.cpp +++ b/kbackgammon/engines/fibs/kbginvite.cpp @@ -25,7 +25,7 @@ #include "kbginvite.moc" #include <tqlabel.h> -#include <layout.h> +#include <tqlayout.h> #include <tqframe.h> #include <tqspinbox.h> #include <tqstring.h> @@ -103,9 +103,9 @@ KBgInvite::KBgInvite(const char *name) * Adjust widget sizes and resize the dialog */ KDialog::resizeLayout(this, marginHint(), spacingHint()); - setMinimumSize(childrenRect().size()); + setMinimumSize(tqchildrenRect().size()); vbox->activate(); - resize(minimumSize()); + resize(tqminimumSize()); /* * Set focus and default buttons diff --git a/kbackgammon/engines/fibs/kplayerlist.cpp b/kbackgammon/engines/fibs/kplayerlist.cpp index 25a169b5..62fb9a95 100644 --- a/kbackgammon/engines/fibs/kplayerlist.cpp +++ b/kbackgammon/engines/fibs/kplayerlist.cpp @@ -24,7 +24,7 @@ #include "kplayerlist.moc" #include "kplayerlist.h" -#include <layout.h> +#include <tqlayout.h> #include <tqiconset.h> #include <tqgroupbox.h> #include <tqpopupmenu.h> @@ -101,7 +101,7 @@ public: case KFibsPlayerList::Watches: case KFibsPlayerList::Client: case KFibsPlayerList::Email: - case KFibsPlayerList::Status: + case KFibsPlayerList::tqStatus: case KFibsPlayerList::Host: s = s.lower(); break; @@ -175,7 +175,7 @@ public: /* * Short abbreviations for Blind, Ready, and Away. */ - TQString mAbrv[KFibsPlayerList::MaxStatus]; + TQString mAbrv[KFibsPlayerList::MaxtqStatus]; /* * 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[Status]->name = i18n("Status"); + d->mCol[tqStatus]->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[Status]->key = "status"; + d->mCol[tqStatus]->key = "status"; d->mCol[Rating]->key = "rating"; d->mCol[Experience]->key = "experience"; d->mCol[Idle]->key = "idle"; @@ -469,7 +469,7 @@ void KFibsPlayerList::getSetupPages(KTabCtl *nb, int space) gl = new TQGridLayout(gbl, LVEnd, 2, 20); gl->addWidget(lb, 0, 0); - // two column layout.... + // two column tqlayout.... for (i = 1; i < LVEnd/2; i++) { gl->addWidget(d->mCol[2*i-1]->cb, i, 0); gl->addWidget(d->mCol[2*i ]->cb, i, 1); @@ -569,12 +569,12 @@ void KFibsPlayerList::showContextMenu(KListView *, TQListViewItem *i, const TQPo */ d->mUser = (i ? i->text(Player) : TQString()); - d->mAct[KFibsPlayerListPrivate::Info ]->setText(i18n("Info on %1" ).arg(d->mUser)); - d->mAct[KFibsPlayerListPrivate::Talk ]->setText(i18n("Talk to %1" ).arg(d->mUser)); - d->mAct[KFibsPlayerListPrivate::Mail ]->setText(i18n("Email to %1").arg(d->mUser)); - d->mAct[KFibsPlayerListPrivate::Look ]->setText(i18n("Look at %1" ).arg(d->mUser)); - d->mAct[KFibsPlayerListPrivate::Watch ]->setText(i18n("Watch %1" ).arg(d->mUser)); - d->mAct[KFibsPlayerListPrivate::Update]->setText(i18n("Update %1" ).arg(d->mUser)); + d->mAct[KFibsPlayerListPrivate::Info ]->setText(i18n("Info on %1" ).tqarg(d->mUser)); + d->mAct[KFibsPlayerListPrivate::Talk ]->setText(i18n("Talk to %1" ).tqarg(d->mUser)); + d->mAct[KFibsPlayerListPrivate::Mail ]->setText(i18n("Email to %1").tqarg(d->mUser)); + d->mAct[KFibsPlayerListPrivate::Look ]->setText(i18n("Look at %1" ).tqarg(d->mUser)); + d->mAct[KFibsPlayerListPrivate::Watch ]->setText(i18n("Watch %1" ).tqarg(d->mUser)); + d->mAct[KFibsPlayerListPrivate::Update]->setText(i18n("Update %1" ).tqarg(d->mUser)); d->mAct[KFibsPlayerListPrivate::Info ]->setEnabled(i); d->mAct[KFibsPlayerListPrivate::Talk ]->setEnabled(i); @@ -587,15 +587,15 @@ void KFibsPlayerList::showContextMenu(KListView *, TQListViewItem *i, const TQPo d->mAct[KFibsPlayerListPrivate::Unwatch]->setEnabled(d->mWatch); d->mPm[0]->setItemEnabled(d->mInID, i && d->mName != d->mUser); - d->mPm[0]->changeItem(d->mInID, i18n("Invite %1").arg(d->mUser)); + d->mPm[0]->changeItem(d->mInID, i18n("Invite %1").tqarg(d->mUser)); 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[Status]->show) + if (i && d->mCol[tqStatus]->show) d->mAct[KFibsPlayerListPrivate::BlindAct]->setText - ((i->text(d->mCol[Status]->index).contains(d->mAbrv[Blind])) ? - i18n("Unblind %1").arg(d->mUser) : i18n("Blind %1").arg(d->mUser)); + ((i->text(d->mCol[tqStatus]->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[Status][0] = '\0'; + entry[tqStatus][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[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, "-"); + 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, "-"); // 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[Status].replace(Blind,1,i->text(Status).contains + str_entry[tqStatus].replace(Blind,1,i->text(tqStatus).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::changePlayerStatus(const TQString &player, int stat, bool flag) +void KFibsPlayerList::changePlayertqStatus(const TQString &player, int stat, bool flag) { TQListViewItem *i = 0; @@ -827,7 +827,7 @@ void KFibsPlayerList::changePlayerStatus(const TQString &player, int stat, bool /* * Update the status flag */ - i->setText(Status, i->text(Status).replace(stat, 1, (flag) ? d->mAbrv[stat] : "-")); + i->setText(tqStatus, i->text(tqStatus).replace(stat, 1, (flag) ? d->mAbrv[stat] : "-")); } @@ -886,7 +886,7 @@ void KFibsPlayerList::setName(const TQString &name) */ void KFibsPlayerList::updateCaption() { - setCaption(i18n("Player List - %1 - %2/%3").arg(childCount()).arg(d->mCount[0]).arg(d->mCount[1])); + setCaption(i18n("Player List - %1 - %2/%3").tqarg(childCount()).tqarg(d->mCount[0]).tqarg(d->mCount[1])); } /* diff --git a/kbackgammon/engines/fibs/kplayerlist.h b/kbackgammon/engines/fibs/kplayerlist.h index 63724e06..793e1b39 100644 --- a/kbackgammon/engines/fibs/kplayerlist.h +++ b/kbackgammon/engines/fibs/kplayerlist.h @@ -53,12 +53,12 @@ public: /** * Enumerate player status */ - enum PStatus {Ready, Away, Blind, MaxStatus}; + enum PtqStatus {Ready, Away, Blind, MaxtqStatus}; /** * Enumerate the different columns of the list */ - enum {Player, Opponent, Watches, Status, Rating, Experience, + enum {Player, Opponent, Watches, tqStatus, Rating, Experience, Idle, Time, Host, Client, Email, LVEnd}; /** @@ -111,7 +111,7 @@ public slots: /** * Change the status of a player */ - void changePlayerStatus(const TQString &player, int stat, bool flag); + void changePlayertqStatus(const TQString &player, int stat, bool flag); /** * Fills the playerlist page into the notebook diff --git a/kbackgammon/engines/generic/kbgengine.h b/kbackgammon/engines/generic/kbgengine.h index af74dc4b..48855265 100644 --- a/kbackgammon/engines/generic/kbgengine.h +++ b/kbackgammon/engines/generic/kbgengine.h @@ -35,7 +35,7 @@ class TQPopupMenu; class KDialogBase; -class KBgStatus; +class KBgtqStatus; /** * @@ -249,12 +249,12 @@ signals: /** * Emit the most recent game state */ - void newState (const KBgStatus &); + void newState (const KBgtqStatus &); /** * Tell the board that we need the current state of the board. */ - void getState (KBgStatus *); + void getState (KBgtqStatus *); /** * Starts/ends the edit mode of the board diff --git a/kbackgammon/engines/gnubg/kbggnubg.cpp b/kbackgammon/engines/gnubg/kbggnubg.cpp index 90dd5e05..3ad42dd7 100644 --- a/kbackgammon/engines/gnubg/kbggnubg.cpp +++ b/kbackgammon/engines/gnubg/kbggnubg.cpp @@ -29,7 +29,7 @@ #include <stdlib.h> #include <time.h> #include <unistd.h> -#include <layout.h> +#include <tqlayout.h> #include <kiconloader.h> #include <kstdaction.h> #include <tqbuttongroup.h> @@ -117,7 +117,7 @@ void KBgEngineGNU::handleLine(const TQString &l) // redoubles mess up the game counter "turn" - //KBgStatus st(board); + //KBgtqStatus st(board); //st.setCube(32, BOTH); //emit newState(st); @@ -128,10 +128,10 @@ void KBgEngineGNU::handleLine(const TQString &l) // can be shared between all engines #if 0 - KBgStatus st(board); + KBgtqStatus st(board); int ret = KMessageBox::warningYesNoCancel - (0, i18n("gnubg doubles the cube to %1.").arg(2*st.cube(THEM)), + (0, i18n("gnubg doubles the cube to %1.").tqarg(2*st.cube(THEM)), i18n("gnubg doubles"), i18n("&Accept"), i18n("Re&double"), i18n("&Reject"), true); @@ -164,7 +164,7 @@ void KBgEngineGNU::handleLine(const TQString &l) */ if (line.contains(TQRegExp("^board:"))) { - KBgStatus st(line); + KBgtqStatus st(line); /* * Do preliminary analysis of board @@ -199,7 +199,7 @@ void KBgEngineGNU::handleLine(const TQString &l) case uMove: st.setDice(THEM, 0, 0); st.setDice(THEM, 1, 0); - emit infoText(i18n("You roll %1 and %2.").arg(st.dice(US, 0)).arg(st.dice(US, 1))); + emit infoText(i18n("You roll %1 and %2.").tqarg(st.dice(US, 0)).tqarg(st.dice(US, 1))); switch (st.moves()) { case 0: // get a message @@ -208,7 +208,7 @@ void KBgEngineGNU::handleLine(const TQString &l) emit infoText(i18n("Please move 1 piece.")); break; default: - emit infoText(i18n("Please move %1 pieces.").arg(st.moves())); + emit infoText(i18n("Please move %1 pieces.").tqarg(st.moves())); break; } emit allowCommand(Roll, false); @@ -220,7 +220,7 @@ void KBgEngineGNU::handleLine(const TQString &l) case tMove: st.setDice(US, 0, 0); st.setDice(US, 1, 0); - emit infoText(i18n("gnubg rolls %1 and %2.").arg(st.dice(THEM, 0)).arg(st.dice(THEM, 1))); + emit infoText(i18n("gnubg rolls %1 and %2.").tqarg(st.dice(THEM, 0)).tqarg(st.dice(THEM, 1))); if (st.moves() == 0) emit infoText(i18n("gnubg cannot move.")); @@ -236,7 +236,7 @@ void KBgEngineGNU::handleLine(const TQString &l) emit allowMoving(st.turn() == US); emit newState(st); - emit statText(i18n("%1 vs. %2").arg(st.player(US)).arg(st.player(THEM))); + emit statText(i18n("%1 vs. %2").tqarg(st.player(US)).tqarg(st.player(THEM))); emit allowCommand(Load, true ); emit allowCommand(Undo, false); @@ -533,7 +533,7 @@ void KBgEngineGNU::gnubgExit(KProcess *proc) emit allowMoving(false); emit infoText(TQString("<br/><font color=\"red\">") + i18n("The GNU Backgammon process (%1) has exited. ") - .arg(proc->pid()) + "</font><br/>"); + .tqarg(proc->pid()) + "</font><br/>"); resAction->setEnabled(true); } diff --git a/kbackgammon/engines/nextgen/kbgng.cpp b/kbackgammon/engines/nextgen/kbgng.cpp index 24808e9c..e0c1aed5 100644 --- a/kbackgammon/engines/nextgen/kbgng.cpp +++ b/kbackgammon/engines/nextgen/kbgng.cpp @@ -29,7 +29,7 @@ #include <stdlib.h> #include <time.h> #include <unistd.h> -#include <layout.h> +#include <tqlayout.h> #include <kiconloader.h> #include <kstdaction.h> #include <tqbuttongroup.h> @@ -41,7 +41,7 @@ #include <krandomsequence.h> #include <tqstringlist.h> #include <tqcstring.h> -#include <textstream.h> +#include <tqtextstream.h> #include <version.h> @@ -150,7 +150,7 @@ void KBgEngineNg::setGame() emit infoText(i18n("Now waiting for incoming connections on port %1."). arg(_port = port)); else - emit infoText(i18n("Failed to offer connections on port %1.").arg(port)); + emit infoText(i18n("Failed to offer connections on port %1.").tqarg(port)); _game->addPlayer(createPlayer(0, _name[0])); break; @@ -165,7 +165,7 @@ void KBgEngineNg::setGame() } while (host_s.isEmpty()); label = i18n("Type the port number on %1 you want to connect to.\nThe " - "number should be between 1024 and 65535.").arg(host_s); + "number should be between 1024 and 65535.").tqarg(host_s); port_s.setNum(_port); do { port_s = KLineEditDlg::getText(label, port_s, &ret, (TQWidget *)parent()); @@ -183,10 +183,10 @@ void KBgEngineNg::setGame() _game->addPlayer(createPlayer(0, _name[0])); if (_game->connectToServer(host_s, port)) - emit infoText(i18n("Now connected to %1:%2.").arg(_host = host_s). + emit infoText(i18n("Now connected to %1:%2.").tqarg(_host = host_s). arg(_port = port)); else - emit infoText(i18n("Failed to connect to %1:%2.").arg(_host = host_s). + emit infoText(i18n("Failed to connect to %1:%2.").tqarg(_host = host_s). arg(_port = port)); // <HERE> @@ -202,13 +202,13 @@ void KBgEngineNg::setGame() // we are still having problems with player creation... - // FIXME - which status _game->setGameStatus(KGame::End); + // FIXME - which status _game->setGametqStatus(KGame::End); } void KBgEngineNg::slotPlayerJoinedGame(KPlayer *p) { - emit infoText(i18n("Player %1 (%2) has joined the game.").arg(p->name()).arg(p->id())); - cerr << i18n("Player %1 (%2) has joined the game.").arg(p->name()).arg(p->id()).latin1() << endl; + emit infoText(i18n("Player %1 (%2) has joined the game.").tqarg(p->name()).tqarg(p->id())); + cerr << i18n("Player %1 (%2) has joined the game.").tqarg(p->name()).tqarg(p->id()).latin1() << endl; } void KBgEngineNg::slotCreatePlayer(KPlayer *&p, int rtti, int io, bool v, KGame *g) @@ -216,7 +216,7 @@ void KBgEngineNg::slotCreatePlayer(KPlayer *&p, int rtti, int io, bool v, KGame Q_UNUSED(rtti) Q_UNUSED(g) Q_UNUSED(io) - emit infoText(i18n("creating player. virtual=%1").arg(v)); + emit infoText(i18n("creating player. virtual=%1").tqarg(v)); p = createPlayer(1); } @@ -507,7 +507,7 @@ void KBgEngineNg::slotPropertyChanged(KGamePropertyBase *p, KPlayer *me) case KGamePropertyBase::IdName: emit infoText(i18n("Player %1 has changed the name to %2.") - .arg(_name[player]).arg(me->name())); + .tqarg(_name[player]).tqarg(me->name())); _name[player] = me->name(); break; @@ -567,8 +567,8 @@ void KBgEngineNg::slotNetworkData(int msgid, const TQByteArray &msg, TQ_UINT32 r case KBgGame::Cmd: emit infoText(msg); - emit infoText(i18n("Players are %1 and %2").arg(_player[0]->name()) - .arg(_player[1]->name())); + emit infoText(i18n("Players are %1 and %2").tqarg(_player[0]->name()) + .tqarg(_player[1]->name())); break; default: diff --git a/kbackgammon/engines/offline/kbgoffline.cpp b/kbackgammon/engines/offline/kbgoffline.cpp index 19f08bf7..604d196e 100644 --- a/kbackgammon/engines/offline/kbgoffline.cpp +++ b/kbackgammon/engines/offline/kbgoffline.cpp @@ -24,7 +24,7 @@ #include "kbgoffline.moc" #include "kbgoffline.h" -#include <layout.h> +#include <tqlayout.h> #include <tqbuttongroup.h> #include <tqcheckbox.h> #include <tqtimer.h> @@ -60,7 +60,7 @@ public: /* * Store two copies of the game: one backup and a working copy */ - KBgStatus mGame[2]; + KBgtqStatus mGame[2]; /* * Use the standard method of obtaining random numbers @@ -318,14 +318,14 @@ void KBgEngineOffline::newGame() u = getRandom(); t = getRandom(); emit infoText(i18n("%1 rolls %2, %3 rolls %4."). - arg(d->mName[0]).arg(u).arg(d->mName[1]).arg(t)); + tqarg(d->mName[0]).tqarg(u).tqarg(d->mName[1]).tqarg(t)); } if (u > t) { - emit infoText(i18n("%1 makes the first move.").arg(d->mName[0])); + emit infoText(i18n("%1 makes the first move.").tqarg(d->mName[0])); d->mRoll = US; } else { - emit infoText(i18n("%1 makes the first move.").arg(d->mName[1])); + emit infoText(i18n("%1 makes the first move.").tqarg(d->mName[1])); d->mRoll = THEM; int n = u; u = t; t = n; } @@ -338,7 +338,7 @@ void KBgEngineOffline::newGame() /* * tell the user */ - emit statText(i18n("%1 vs. %2").arg(d->mName[0]).arg(d->mName[1])); + emit statText(i18n("%1 vs. %2").tqarg(d->mName[0]).tqarg(d->mName[1])); } /* @@ -722,7 +722,7 @@ bool KBgEngineOffline::queryExit() void KBgEngineOffline::handleCommand(const TQString& cmd) { emit infoText(i18n("Text commands are not yet working. " - "The command '%1' has been ignored.").arg(cmd)); + "The command '%1' has been ignored.").tqarg(cmd)); } /* @@ -791,11 +791,11 @@ void KBgEngineOffline::toggleEditMode() emit allowCommand(Roll, false); emit allowCommand(Done, false); emit allowCommand(Cube, false); - emit statText(i18n("%1 vs. %2 - Edit Mode").arg(d->mName[0]).arg(d->mName[1])); + emit statText(i18n("%1 vs. %2 - Edit Mode").tqarg(d->mName[0]).tqarg(d->mName[1])); } else { d->mNew->setEnabled(true); d->mSwap->setEnabled(true); - emit statText(i18n("%1 vs. %2").arg(d->mName[0]).arg(d->mName[1])); + emit statText(i18n("%1 vs. %2").tqarg(d->mName[0]).tqarg(d->mName[1])); emit getState(&d->mGame[1]); d->mGame[0] = d->mGame[1]; emit allowCommand(Done, d->mDoneFlag); diff --git a/kbackgammon/kbg.cpp b/kbackgammon/kbg.cpp index cdd3e823..0c01d8f1 100644 --- a/kbackgammon/kbg.cpp +++ b/kbackgammon/kbg.cpp @@ -25,7 +25,7 @@ #include "kbg.moc" #include <tqpainter.h> -#include <layout.h> +#include <tqlayout.h> #include <tqgroupbox.h> #include <tqpixmap.h> #include <tqstring.h> @@ -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(KBgStatus *)), board, TQT_SLOT(getState(KBgStatus *))); - connect(engine[currEngine], TQT_SIGNAL(newState(const KBgStatus &)), board, TQT_SLOT(setState(const KBgStatus &))); + 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 &))); // now that all signals are connected, start the engine engine[currEngine]->start(); @@ -421,7 +421,7 @@ void KBg::setupOk() if (cbm->isChecked()) KMessageBox::enableAllMessages(); - // tell children to read their changes + // tell tqchildren to read their changes board->setupOk(); // engines @@ -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->sizeHint()); + lab->setMaximumSize(lab->tqsizeHint()); 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->minimumSize()); + nb->resize(nb->tqminimumSize()); nb->show(); } @@ -646,7 +646,7 @@ void KBg::print() prt->setPageSize((KPrinter::PageSize) config->readNumEntry("pagesize", KPrinter::A4)); prt->setOrientation((KPrinter::Orientation)config->readNumEntry("orientation", KPrinter::Landscape)); - if (prt->setup(this, i18n("Print %1").arg(baseCaption))) { + if (prt->setup(this, i18n("Print %1").tqarg(baseCaption))) { TQPainter p; p.begin(prt); board->print(&p); diff --git a/kbackgammon/kbgboard.cpp b/kbackgammon/kbgboard.cpp index a95cd671..ba2d1829 100644 --- a/kbackgammon/kbgboard.cpp +++ b/kbackgammon/kbgboard.cpp @@ -39,7 +39,7 @@ #include <math.h> #include <kcolordialog.h> #include <klocale.h> -#include <layout.h> +#include <tqlayout.h> #include <tqgroupbox.h> #include <tqbuttongroup.h> #include <kconfig.h> @@ -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]->sizeHint()); + rbMove[i]->setMinimumSize(rbMove[i]->tqsizeHint()); blm->addWidget(rbMove[i]); rbMove[i]->setChecked(i == getShortMoveMode()); } @@ -360,7 +360,7 @@ void KBgBoard::setFont(const TQFont& f) */ void KBgBoard::queryCube() { - KBgStatus *st = new KBgStatus(); + KBgtqStatus *st = new KBgtqStatus(); 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->sizeHint()); + info->setMinimumSize(info->tqsizeHint()); 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]->sizeHint()); - cb[1]->setMinimumSize(cb[1]->sizeHint()); + cb[0]->setMinimumSize(cb[0]->tqsizeHint()); + cb[1]->setMinimumSize(cb[1]->tqsizeHint()); - ok->setMinimumSize(ok->sizeHint()); - cancel->setMinimumSize(cancel->sizeHint()); + ok->setMinimumSize(ok->tqsizeHint()); + cancel->setMinimumSize(cancel->tqsizeHint()); - setMinimumSize(childrenRect().size()); + setMinimumSize(tqchildrenRect().size()); vbox->activate(); - resize(minimumSize()); + resize(tqminimumSize()); 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->sizeHint()); + info->setMinimumSize(info->tqsizeHint()); 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]->sizeHint()); - sb[1]->setMinimumSize(sb[1]->sizeHint()); + sb[0]->setMinimumSize(sb[0]->tqsizeHint()); + sb[1]->setMinimumSize(sb[1]->tqsizeHint()); - ok->setMinimumSize(ok->sizeHint()); - cancel->setMinimumSize(cancel->sizeHint()); + ok->setMinimumSize(ok->tqsizeHint()); + cancel->setMinimumSize(cancel->tqsizeHint()); - setMinimumSize(childrenRect().size()); + setMinimumSize(tqchildrenRect().size()); vbox->activate(); - resize(minimumSize()); + resize(tqminimumSize()); ok->setAutoDefault (true); ok->setDefault(true); @@ -628,10 +628,10 @@ bool KBgBoard::getEditMode() const } /* - * This function takes a KBgStatus object and fills it with the current + * This function takes a KBgtqStatus object and fills it with the current * board status. */ -KBgStatus* KBgBoard::getState(KBgStatus *st) const +KBgtqStatus* KBgBoard::getState(KBgtqStatus *st) const { st->setColor(color); st->setDirection(direction); @@ -1337,7 +1337,7 @@ void KBgBoardHome::mouseDoubleClickEvent(TQMouseEvent * e) KBgBoardQDice *dlg = new KBgBoardQDice(); if (dlg->exec()) { - KBgStatus *st = new KBgStatus(); + KBgtqStatus *st = new KBgtqStatus(); 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 KBgStatus &st) +void KBgBoard::setState(const KBgtqStatus &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 KBgStatus + * You have to change the status by passing a KBgtqStatus * 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. */ - KBgStatus *st = new KBgStatus(); + KBgtqStatus *st = new KBgtqStatus(); 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::minimumSizeHint() const +TQSize KBgBoard::tqminimumSizeHint() const { return TQSize(MINIMUM_CHECKER_SIZE * 15, MINIMUM_CHECKER_SIZE * 11); } -TQSize KBgBoard::sizeHint() const { +TQSize KBgBoard::tqsizeHint() const { return TQSize(MINIMUM_CHECKER_SIZE *15*4,MINIMUM_CHECKER_SIZE*11*2); } diff --git a/kbackgammon/kbgboard.h b/kbackgammon/kbgboard.h index ed5feeea..f91ab93b 100644 --- a/kbackgammon/kbgboard.h +++ b/kbackgammon/kbgboard.h @@ -64,9 +64,9 @@ /* * Just some internal constants and classes */ -const int US = KBgStatus::US; -const int THEM = KBgStatus::THEM; -const int BOTH = KBgStatus::BOTH; +const int US = KBgtqStatus::US; +const int THEM = KBgtqStatus::THEM; +const int BOTH = KBgtqStatus::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 minimumSizeHint() const; + TQSize tqminimumSizeHint() const; public slots: /** @@ -211,10 +211,10 @@ public slots: /** * This is the most important public member. It takes - * a board status - s. the KBgBoardStatus class - + * a board status - s. the KBgBoardtqStatus class - * and sets the board accordingly. */ - void setState(const KBgStatus &); + void setState(const KBgtqStatus &); /** * Set the context menu @@ -224,7 +224,7 @@ public slots: /** * Get the current state of the board. */ - KBgStatus *getState(KBgStatus *st) const; + KBgtqStatus *getState(KBgtqStatus *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 sizeHint() const; + virtual TQSize tqsizeHint() const; TQColor baseColors[2]; TQFont boardFont; @@ -535,7 +535,7 @@ protected: virtual void drawContents(TQPainter *); /** - * Status numbers that store the current board status. + * tqStatus numbers that store the current board status. */ int mouseButton; int direction; @@ -552,7 +552,7 @@ protected: int cellID; /** - * Indicates whether this cell needs to repaint itself after + * Indicates whether this cell needs to tqrepaint itself after * the board has been processed. */ bool stateChanged; @@ -837,7 +837,7 @@ public: protected: /** - * Spin boxes and buttons are children + * Spin boxes and buttons are tqchildren */ TQSpinBox *sb[2]; TQPushButton *ok; @@ -871,7 +871,7 @@ public: protected: /** - * Spin boxes and buttons are children + * Spin boxes and buttons are tqchildren */ TQComboBox *cb[2]; TQPushButton *ok; diff --git a/kbackgammon/kbgstatus.cpp b/kbackgammon/kbgstatus.cpp index 824ff721..e9e8d4e5 100644 --- a/kbackgammon/kbgstatus.cpp +++ b/kbackgammon/kbgstatus.cpp @@ -29,7 +29,7 @@ /* * Parse a rawboard description from FIBS and initialize members. */ -KBgStatus::KBgStatus(const TQString &rawboard) +KBgtqStatus::KBgtqStatus(const TQString &rawboard) { /* * This is the format string from hell... @@ -116,7 +116,7 @@ KBgStatus::KBgStatus(const TQString &rawboard) * Constructor initializes the status to an empty board with cube one * and empty dice. */ -KBgStatus::KBgStatus() +KBgtqStatus::KBgtqStatus() : TQObject() { /* @@ -146,7 +146,7 @@ KBgStatus::KBgStatus() /* * Copy constructor calls private utility function. */ -KBgStatus::KBgStatus(const KBgStatus &rhs) +KBgtqStatus::KBgtqStatus(const KBgtqStatus &rhs) : TQObject() { copy(rhs); @@ -155,7 +155,7 @@ KBgStatus::KBgStatus(const KBgStatus &rhs) /* * Destructor */ -KBgStatus::~KBgStatus() +KBgtqStatus::~KBgtqStatus() { // nothing to do } @@ -164,14 +164,14 @@ KBgStatus::~KBgStatus() * Assignment operator shares a lot of code with the copy * constructor. */ -KBgStatus& KBgStatus::operator=(const KBgStatus &rhs) +KBgtqStatus& KBgtqStatus::operator=(const KBgtqStatus &rhs) { if (this == &rhs) return *this; copy(rhs); return *this; } -void KBgStatus::copy(const KBgStatus &rhs) +void KBgtqStatus::copy(const KBgtqStatus &rhs) { for (int i = 0; i < 26; i++) board_[i] = rhs.board_[i]; @@ -199,32 +199,32 @@ void KBgStatus::copy(const KBgStatus &rhs) /* * Access functions */ -int KBgStatus::board(const int &i) const +int KBgtqStatus::board(const int &i) const { return ((0 < i && i < 25) ? color_*board_[i] : 0); } -int KBgStatus::home(const int &w) const +int KBgtqStatus::home(const int &w) const { return ((w == US || w == THEM) ? color_*home_[w] : 0); } -int KBgStatus::bar(const int &w) const +int KBgtqStatus::bar(const int &w) const { return ((w == US || w == THEM) ? color_*bar_[w] : 0); } -int KBgStatus::color(const int &w) const +int KBgtqStatus::color(const int &w) const { return ((w == THEM) ? -color_ : color_); } -int KBgStatus::direction() const +int KBgtqStatus::direction() const { return direction_; } -int KBgStatus::dice(const int &w, const int &n) const +int KBgtqStatus::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 KBgStatus::dice(const int &w, const int &n) const return 0; } -int KBgStatus::cube(const int &w) const +int KBgtqStatus::cube(const int &w) const { if (w == US || w == THEM) return ((maydouble_[w]) ? cube_ : -cube_); return 0; } -int KBgStatus::points(const int& w) const +int KBgtqStatus::points(const int& w) const { return ((w == US || w == THEM) ? points_[w] : -1); } -TQString KBgStatus::player(const int &w) const +TQString KBgtqStatus::player(const int &w) const { return ((w == US || w == THEM) ? player_[w] : TQString()); } -int KBgStatus::length() const +int KBgtqStatus::length() const { return length_; } -int KBgStatus::turn() const +int KBgtqStatus::turn() const { return turn_; } -bool KBgStatus::doubled() const +bool KBgtqStatus::doubled() const { return doubled_; } @@ -268,7 +268,7 @@ bool KBgStatus::doubled() const /* * Assignment functions */ -void KBgStatus::setBoard(const int &i, const int &w, const int &v) +void KBgtqStatus::setBoard(const int &i, const int &w, const int &v) { if (0 < i && i < 25) { if (w == US) @@ -278,7 +278,7 @@ void KBgStatus::setBoard(const int &i, const int &w, const int &v) } } -void KBgStatus::setHome(const int &w, const int &v) +void KBgtqStatus::setHome(const int &w, const int &v) { if (w == US) home_[w] = abs(v); @@ -286,7 +286,7 @@ void KBgStatus::setHome(const int &w, const int &v) home_[w] = -abs(v); } -void KBgStatus::setBar(const int& w, const int& v) +void KBgtqStatus::setBar(const int& w, const int& v) { if (w == US) bar_[w] = abs(v); @@ -294,7 +294,7 @@ void KBgStatus::setBar(const int& w, const int& v) bar_[w] = -abs(v); } -void KBgStatus::setColor(const int &c, const int &w) +void KBgtqStatus::setColor(const int &c, const int &w) { if (w == US) color_ = ((c < 0) ? Black : White); @@ -302,12 +302,12 @@ void KBgStatus::setColor(const int &c, const int &w) color_ = ((c < 0) ? White : Black); } -void KBgStatus::setDirection(const int &dir) +void KBgtqStatus::setDirection(const int &dir) { direction_ = ((dir < 0) ? -1 : +1); } -void KBgStatus::setDice(const int &w, const int &n, const int &v) +void KBgtqStatus::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 KBgStatus::setDice(const int &w, const int &n, const int &v) } } -void KBgStatus::setCube(const int &c, const bool &us, const bool &them) +void KBgtqStatus::setCube(const int &c, const bool &us, const bool &them) { int w = NONE; if (us) w = US; @@ -326,7 +326,7 @@ void KBgStatus::setCube(const int &c, const bool &us, const bool &them) setCube(c, w); } -void KBgStatus::setCube(const int &c, const int &w) +void KBgtqStatus::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 KBgStatus::setCube(const int &c, const int &w) maydouble_[THEM] = (w == THEM || w == BOTH); } -void KBgStatus::setPoints(const int &w, const int &p) +void KBgtqStatus::setPoints(const int &w, const int &p) { if (w == US || w == THEM) points_[w] = p; } -void KBgStatus::setPlayer(const int &w, const TQString &name) +void KBgtqStatus::setPlayer(const int &w, const TQString &name) { if (w == US || w == THEM) player_[w] = name; } -void KBgStatus::setLength(const int &l) +void KBgtqStatus::setLength(const int &l) { length_ = l; } -void KBgStatus::setTurn(const int &w) +void KBgtqStatus::setTurn(const int &w) { if (w == US || w == THEM || w == BOTH) turn_ = w; @@ -364,7 +364,7 @@ void KBgStatus::setTurn(const int &w) /* * Utility functions */ -int KBgStatus::moves() const +int KBgtqStatus::moves() const { int start, dir; @@ -407,7 +407,7 @@ int KBgStatus::moves() const * Get a copy of ourselves. That way we can mess around with * the internals of the game. */ - KBgStatus sc(*this); + KBgtqStatus sc(*this); /* * Start with getting all checkers off the bar @@ -490,7 +490,7 @@ int KBgStatus::moves() const } } -bool KBgStatus::movePossible(KBgStatus &sc, int a, int start, int dir) const +bool KBgtqStatus::movePossible(KBgtqStatus &sc, int a, int start, int dir) const { /* * Determine where the first checker in moving direction is diff --git a/kbackgammon/kbgstatus.h b/kbackgammon/kbgstatus.h index 69d1a0b6..255dc049 100644 --- a/kbackgammon/kbgstatus.h +++ b/kbackgammon/kbgstatus.h @@ -43,7 +43,7 @@ * @author Jens Hoefkens <jens@hoefkens.com> * @version $Id$ */ -class KBgStatus : public TQObject +class KBgtqStatus : public TQObject { Q_OBJECT @@ -66,27 +66,27 @@ class KBgStatus : public TQObject * The default constructor initializes the status to an "empty" * state. The board and dice are empty and the cube shows 1. */ - KBgStatus(); + KBgtqStatus(); /** * Constructor from a FIBS rawboard string */ - KBgStatus(const TQString &rawboard); + KBgtqStatus(const TQString &rawboard); /** * Copy constructor */ - KBgStatus(const KBgStatus &rhs); + KBgtqStatus(const KBgtqStatus &rhs); /** * Assignment operator */ - KBgStatus& operator=(const KBgStatus &rhs); + KBgtqStatus& operator=(const KBgtqStatus &rhs); /** * Destructor */ - virtual ~KBgStatus(); + virtual ~KBgtqStatus(); /* @@ -289,12 +289,12 @@ class KBgStatus : public TQObject * anywhere starting from start or later into direction * dir in the game given by sc. */ - bool movePossible(KBgStatus &sc, int a, int start, int dir) const; + bool movePossible(KBgtqStatus &sc, int a, int start, int dir) const; /* * Copy constr. and assignment share a lot of code. */ - void copy(const KBgStatus &rhs); + void copy(const KBgtqStatus &rhs); /* * Private variables with self-expalanatory names. |