diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:47:36 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:47:36 -0600 |
commit | 97d1732e257f8700488d7ca1660ae7eba8fc6065 (patch) | |
tree | 4c6397ed2c1dd6f7c3354b5b87f313547d92a35f /kbackgammon/engines/fibs/kbgfibs.cpp | |
parent | 9c27a1a03e02fd53aedc1a182444b35fd8e14967 (diff) | |
download | tdegames-97d1732e257f8700488d7ca1660ae7eba8fc6065.tar.gz tdegames-97d1732e257f8700488d7ca1660ae7eba8fc6065.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kbackgammon/engines/fibs/kbgfibs.cpp')
-rw-r--r-- | kbackgammon/engines/fibs/kbgfibs.cpp | 102 |
1 files changed, 51 insertions, 51 deletions
diff --git a/kbackgammon/engines/fibs/kbgfibs.cpp b/kbackgammon/engines/fibs/kbgfibs.cpp index 57eb6666..d56e633c 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 <tqlayout.h> +#include <layout.h> #include <tqstring.h> #include <tqsocket.h> #include <tqpopupmenu.h> @@ -81,7 +81,7 @@ void KBgEngineFIBS::start() // == configuration handling =================================================== /* - * Restore settings and ask tqchildren to do the same + * Restore settings and ask children 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 tqchildren to read their config options + // ask the children 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 tqchildren to read their config options + // ask the children 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.").tqarg(PROG_NAME)); + "if you do not have flat-rate Internet access.").arg(PROG_NAME)); cbk->setChecked(keepalive); @@ -357,7 +357,7 @@ void KBgEngineFIBS::getSetupPages(KDialogBase *nb) tc->addTab(w, i18n("&Connection")); /* - * Ask tqchildren for settings + * Ask children 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)").tqarg(name); + menu = i18n("R means resume", "%1 (R)").arg(name); text = i18n("%1 (experience %2, rating %3) wants to resume a saved match with you. " "If you want to play, use the corresponding menu entry to join (or type " - "'join %4').").tqarg(name).tqarg(expi_s).tqarg(rate_s).tqarg(name); + "'join %4').").arg(name).arg(expi_s).arg(rate_s).arg(name); KNotifyClient::event("invitation", i18n("%1 wants to resume a saved match with you"). arg(name)); } else if ((*it).contains(TQRegExp(" u$"))) { - menu = i18n("U means unlimited", "%1 (U)").tqarg(name); + menu = i18n("U means unlimited", "%1 (U)").arg(name); text = i18n("%1 (experience %2, rating %3) wants to play an unlimited match with you. " "If you want to play, use the corresponding menu entry to join (or type " - "'join %4').").tqarg(name).tqarg(expi_s).tqarg(rate_s).tqarg(name); + "'join %4').").arg(name).arg(expi_s).arg(rate_s).arg(name); KNotifyClient::event("invitation", i18n("%1 has invited you to an unlimited match"). 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)").tqarg(name).tqarg(len); + "%1 (%2)").arg(name).arg(len); text = i18n("%1 (experience %2, rating %3) wants to play a %4 point match with you. " "If you want to play, use the corresponding menu entry to join (or type " - "'join %5').").tqarg(name).tqarg(expi_s).tqarg(rate_s).tqarg(len).tqarg(name); + "'join %5').").arg(name).arg(expi_s).arg(rate_s).arg(len).arg(name); KNotifyClient::event("invitation", i18n("%1 has invited you for a %2 point match"). - tqarg(name).tqarg(len)); + arg(name).arg(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").tqarg(infoFIBS[FIBSHost])); + emit infoText(i18n("Looking up %1").arg(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").tqarg(infoFIBS[FIBSHost])); + emit infoText(i18n("Connecting to %1").arg(infoFIBS[FIBSHost])); } /* @@ -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(); @@ -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").tqarg(infoFIBS[FIBSHost]); + "given the opportunity to pick another one.\n\n").arg(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").tqarg(infoFIBS[FIBSHost]); + "should create one using the corresponding menu option.\n\n").arg(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"). - tqarg(infoFIBS[FIBSUser]).tqarg(infoFIBS[FIBSHost]); + arg(infoFIBS[FIBSUser]).arg(infoFIBS[FIBSHost]); else text = i18n("Enter the password for the login %1 on the server %2.\n\n"). - tqarg(infoFIBS[FIBSUser]).tqarg(infoFIBS[FIBSHost]); + arg(infoFIBS[FIBSUser]).arg(infoFIBS[FIBSHost]); first = true; do { @@ -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> " + 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(""); } @@ -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.").tqarg(p[1]).tqarg(p[2]).tqarg(d.toString()); + TQString text = i18n("%1, last logged in from %2 at %3.").arg(p[1]).arg(p[2]).arg(d.toString()); emit infoText("<hr><br>" + text); playerlist->setName(p[1]); } @@ -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; @@ -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.").tqarg(infoFIBS[FIBSUser]); + "playing backgammon on FIBS.").arg(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 @@ -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").tqarg(pname[US]). - tqarg(st->points(US)).tqarg(pname[THEM]).tqarg(st->points(THEM)); + caption = i18n("%1 (%2) vs. %3 (%4) - game over").arg(pname[US]). + arg(st->points(US)).arg(pname[THEM]).arg(st->points(THEM)); else if (st->length() < 0) - caption = i18n("%1 (%2) vs. %3 (%4) - unlimited match").tqarg(pname[US]). - tqarg(st->points(US)).tqarg(pname[THEM]).tqarg(st->points(THEM)); + caption = i18n("%1 (%2) vs. %3 (%4) - unlimited match").arg(pname[US]). + arg(st->points(US)).arg(pname[THEM]).arg(st->points(THEM)); else - 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()); + 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()); emit statText(caption); @@ -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 &))); |