diff options
Diffstat (limited to 'libtdegames/highscore')
-rw-r--r-- | libtdegames/highscore/kexthighscore.cpp | 2 | ||||
-rw-r--r-- | libtdegames/highscore/kexthighscore_gui.cpp | 10 | ||||
-rw-r--r-- | libtdegames/highscore/kexthighscore_internal.cpp | 20 | ||||
-rw-r--r-- | libtdegames/highscore/kexthighscore_item.cpp | 8 | ||||
-rw-r--r-- | libtdegames/highscore/kexthighscore_item.h | 10 | ||||
-rw-r--r-- | libtdegames/highscore/kexthighscore_tab.cpp | 8 | ||||
-rw-r--r-- | libtdegames/highscore/khighscore.cpp | 18 | ||||
-rw-r--r-- | libtdegames/highscore/khighscore.h | 2 | ||||
-rw-r--r-- | libtdegames/highscore/kscoredialog.cpp | 42 |
9 files changed, 60 insertions, 60 deletions
diff --git a/libtdegames/highscore/kexthighscore.cpp b/libtdegames/highscore/kexthighscore.cpp index d352a266..46010c41 100644 --- a/libtdegames/highscore/kexthighscore.cpp +++ b/libtdegames/highscore/kexthighscore.cpp @@ -19,7 +19,7 @@ #include "kexthighscore.h" -#include <tqlayout.h> +#include <layout.h> #include <kdebug.h> diff --git a/libtdegames/highscore/kexthighscore_gui.cpp b/libtdegames/highscore/kexthighscore_gui.cpp index 02ea99b6..eb715273 100644 --- a/libtdegames/highscore/kexthighscore_gui.cpp +++ b/libtdegames/highscore/kexthighscore_gui.cpp @@ -20,8 +20,8 @@ #include "kexthighscore_gui.h" #include "kexthighscore_gui.moc" -#include <tqlayout.h> -#include <tqtextstream.h> +#include <layout.h> +#include <textstream.h> #include <tqheader.h> #include <tqgrid.h> #include <tqvgroupbox.h> @@ -92,7 +92,7 @@ void ScoresList::addLineItem(const ItemArray &items, if (line) line->setText(k, itemText(container, index)); else { addColumn( container.item()->label() ); - setColumnAlignment(k, container.item()->tqalignment()); + setColumnAlignment(k, container.item()->alignment()); } k++; } @@ -289,7 +289,7 @@ void LastMultipleScoresList::addLineItem(const ItemArray &si, if (line) line->setText(i, itemText(*container, index)); else { addColumn( container->item()->label() ); - setColumnAlignment(i, container->item()->tqalignment()); + setColumnAlignment(i, container->item()->alignment()); } } } @@ -333,7 +333,7 @@ void TotalMultipleScoresList::addLineItem(const ItemArray &si, TQString label = (i==2 ? i18n("Won Games") : container->item()->label()); addColumn(label); - setColumnAlignment(i, container->item()->tqalignment()); + setColumnAlignment(i, container->item()->alignment()); } } } diff --git a/libtdegames/highscore/kexthighscore_internal.cpp b/libtdegames/highscore/kexthighscore_internal.cpp index a679002c..4803909a 100644 --- a/libtdegames/highscore/kexthighscore_internal.cpp +++ b/libtdegames/highscore/kexthighscore_internal.cpp @@ -24,7 +24,7 @@ #include <unistd.h> #include <tqfile.h> -#include <tqlayout.h> +#include <layout.h> #include <tqdom.h> #include <kglobal.h> @@ -314,7 +314,7 @@ PlayerInfos::PlayerInfos() #ifdef HIGHSCORE_DIRECTORY if (_oldLocalPlayer) { // player already exists in local config file // copy player data - TQString prefix = TQString("%1_").tqarg(_oldLocalId+1); + TQString prefix = TQString("%1_").arg(_oldLocalId+1); TQMap<TQString, TQString> entries = cg.config()->entryMap("KHighscore_players"); TQMap<TQString, TQString>::const_iterator it; @@ -378,8 +378,8 @@ TQString PlayerInfos::histoName(uint i) const const TQMemArray<uint> &sh = _histogram; Q_ASSERT( i<sh.size() || (_bound || i==sh.size()) ); if ( i==sh.size() ) - return TQString("nb scores greater than %1").tqarg(sh[sh.size()-1]); - return TQString("nb scores less than %1").tqarg(sh[i]); + return TQString("nb scores greater than %1").arg(sh[sh.size()-1]); + return TQString("nb scores less than %1").arg(sh[i]); } uint PlayerInfos::histoSize() const @@ -497,10 +497,10 @@ void PlayerInfos::removeKey() TQString sk; do { i++; - sk = str.tqarg(HS_KEY).tqarg(i); + sk = str.arg(HS_KEY).arg(i); } while ( !cg.config()->readEntry(sk, TQString()).isEmpty() ); cg.config()->writeEntry(sk, key()); - cg.config()->writeEntry(str.tqarg(HS_REGISTERED_NAME).tqarg(i), + cg.config()->writeEntry(str.arg(HS_REGISTERED_NAME).arg(i), registeredName()); // clear current key/nickname @@ -609,7 +609,7 @@ bool ManagerPrivate::doQuery(const KURL &url, TQWidget *parent, TQString tmpFile; if ( !KIO::NetAccess::download(url, tmpFile, parent) ) { - TQString details = i18n("Server URL: %1").tqarg(url.host()); + TQString details = i18n("Server URL: %1").arg(url.host()); KMessageBox::detailedSorry(parent, i18n(UNABLE_TO_CONTACT), details); return false; } @@ -647,7 +647,7 @@ bool ManagerPrivate::doQuery(const KURL &url, TQWidget *parent, } } TQString msg = i18n("Invalid answer from world-wide highscores server."); - TQString details = i18n("Raw message: %1").tqarg(content); + TQString details = i18n("Raw message: %1").arg(content); KMessageBox::detailedSorry(parent, msg, details); return false; } @@ -660,7 +660,7 @@ bool ManagerPrivate::getFromQuery(const TQDomNamedNodeMap &map, if ( attr.isNull() ) { KMessageBox::sorry(parent, i18n("Invalid answer from world-wide " - "highscores server (missing item: %1).").tqarg(name)); + "highscores server (missing item: %1).").arg(name)); return false; } value = attr.value(); @@ -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"; diff --git a/libtdegames/highscore/kexthighscore_item.cpp b/libtdegames/highscore/kexthighscore_item.cpp index 4b48a0ee..b491d3f8 100644 --- a/libtdegames/highscore/kexthighscore_item.cpp +++ b/libtdegames/highscore/kexthighscore_item.cpp @@ -19,7 +19,7 @@ #include "kexthighscore_item.h" -#include <tqlayout.h> +#include <layout.h> #include <kglobal.h> #include <kdialogbase.h> #include <kdebug.h> @@ -33,8 +33,8 @@ namespace KExtHighscore { //----------------------------------------------------------------------------- -Item::Item(const TQVariant &def, const TQString &label, int tqalignment) - : _default(def), _label(label), _tqalignment(tqalignment), +Item::Item(const TQVariant &def, const TQString &label, int alignment) + : _default(def), _label(label), _alignment(alignment), _format(NoFormat), _special(NoSpecial) {} @@ -287,7 +287,7 @@ void MultiplayerScores::show(TQWidget *parent) vbox = new TQVBox(dialog.plainPage()); hbox->addWidget(vbox); (void)new TQLabel(i18n("Scores for the last %1 games:") - .tqarg(_nbGames[0]), vbox); + .arg(_nbGames[0]), vbox); (void)new TotalMultipleScoresList(ordered, vbox); } diff --git a/libtdegames/highscore/kexthighscore_item.h b/libtdegames/highscore/kexthighscore_item.h index b32f32e7..8379433b 100644 --- a/libtdegames/highscore/kexthighscore_item.h +++ b/libtdegames/highscore/kexthighscore_item.h @@ -79,10 +79,10 @@ class KDE_EXPORT Item * Be sure to cast the value to the required type (for e.g. with uint). * @param label the label corresponding to the item. If empty, the item * is not shown. - * @param tqalignment the tqalignment of the item. + * @param alignment the alignment of the item. */ Item(const TQVariant &def = TQVariant::Invalid, - const TQString &label = TQString(), int tqalignment = TQt::AlignRight); + const TQString &label = TQString(), int alignment = TQt::AlignRight); virtual ~Item(); @@ -114,9 +114,9 @@ class KDE_EXPORT Item TQString label() const { return _label; } /** - * @return the tqalignment. + * @return the alignment. */ - int tqalignment() const { return _tqalignment; } + int alignment() const { return _alignment; } /** * Set default value. @@ -149,7 +149,7 @@ class KDE_EXPORT Item private: TQVariant _default; TQString _label; - int _tqalignment; + int _alignment; Format _format; Special _special; diff --git a/libtdegames/highscore/kexthighscore_tab.cpp b/libtdegames/highscore/kexthighscore_tab.cpp index d47b35a6..811b1132 100644 --- a/libtdegames/highscore/kexthighscore_tab.cpp +++ b/libtdegames/highscore/kexthighscore_tab.cpp @@ -20,7 +20,7 @@ #include "kexthighscore_tab.h" #include "kexthighscore_tab.moc" -#include <tqlayout.h> +#include <layout.h> #include <tqlabel.h> #include <tqvgroupbox.h> #include <tqgrid.h> @@ -97,7 +97,7 @@ void AdditionalTab::allSelected() TQString AdditionalTab::percent(uint n, uint total, bool withBraces) { if ( n==0 || total==0 ) return TQString(); - TQString s = TQString("%1%").tqarg(100.0 * n / total, 0, 'f', 1); + TQString s = TQString("%1%").arg(100.0 * n / total, 0, 'f', 1); return (withBraces ? TQString("(") + s + ")" : s); } @@ -120,7 +120,7 @@ StatisticsTab::StatisticsTab(TQWidget *parent) : AdditionalTab(parent, "statistics_tab") { // construct GUI - TQVBoxLayout *top = static_cast<TQVBoxLayout *>(tqlayout()); + TQVBoxLayout *top = static_cast<TQVBoxLayout *>(layout()); TQHBoxLayout *hbox = new TQHBoxLayout(top); TQVBoxLayout *vbox = new TQVBoxLayout(hbox); @@ -209,7 +209,7 @@ HistogramTab::HistogramTab(TQWidget *parent) : AdditionalTab(parent, "histogram_tab") { // construct GUI - TQVBoxLayout *top = static_cast<TQVBoxLayout *>(tqlayout()); + TQVBoxLayout *top = static_cast<TQVBoxLayout *>(layout()); _list = new KListView(this); _list->setSelectionMode(TQListView::NoSelection); diff --git a/libtdegames/highscore/khighscore.cpp b/libtdegames/highscore/khighscore.cpp index 6d696020..3ff2d248 100644 --- a/libtdegames/highscore/khighscore.cpp +++ b/libtdegames/highscore/khighscore.cpp @@ -96,7 +96,7 @@ void KHighscore::init(const char *appname) { #ifdef HIGHSCORE_DIRECTORY const TQString filename = TQString::fromLocal8Bit("%1/%2.scores") - .tqarg(HIGHSCORE_DIRECTORY).tqarg(appname); + .arg(HIGHSCORE_DIRECTORY).arg(appname); int fd = open(filename.local8Bit(), O_RDWR); if ( fd<0 ) kdFatal(11002) << "cannot open global highscore file \"" << filename << "\"" << endl; @@ -169,7 +169,7 @@ void KHighscore::writeEntry(int entry, const TQString& key, const TQVariant& val { Q_ASSERT( isLocked() ); KConfigGroupSaver cg(config(), group()); - TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(key); + TQString confKey = TQString("%1_%2").arg(entry).arg(key); cg.config()->writeEntry(confKey, value); } @@ -177,7 +177,7 @@ void KHighscore::writeEntry(int entry, const TQString& key, int value) { Q_ASSERT( isLocked() ); KConfigGroupSaver cg(config(), group()); - TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(key); + TQString confKey = TQString("%1_%2").arg(entry).arg(key); cg.config()->writeEntry(confKey, value); } @@ -185,35 +185,35 @@ void KHighscore::writeEntry(int entry, const TQString& key, const TQString &valu { Q_ASSERT (isLocked() ); KConfigGroupSaver cg(config(), group()); - TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(key); + TQString confKey = TQString("%1_%2").arg(entry).arg(key); cg.config()->writeEntry(confKey, value); } TQVariant KHighscore::readPropertyEntry(int entry, const TQString& key, const TQVariant& pDefault) const { KConfigGroupSaver cg(config(), group()); - TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(key); + TQString confKey = TQString("%1_%2").arg(entry).arg(key); return cg.config()->readPropertyEntry(confKey, pDefault); } TQString KHighscore::readEntry(int entry, const TQString& key, const TQString& pDefault) const { KConfigGroupSaver cg(config(), group()); - TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(key); + TQString confKey = TQString("%1_%2").arg(entry).arg(key); return cg.config()->readEntry(confKey, pDefault); } int KHighscore::readNumEntry(int entry, const TQString& key, int pDefault) const { KConfigGroupSaver cg(config(), group()); - TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(key); + TQString confKey = TQString("%1_%2").arg(entry).arg(key); return cg.config()->readNumEntry(confKey, pDefault); } bool KHighscore::hasEntry(int entry, const TQString& key) const { KConfigGroupSaver cg(config(), group()); - TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(key); + TQString confKey = TQString("%1_%2").arg(entry).arg(key); return cg.config()->hasKey(confKey); } @@ -248,7 +248,7 @@ TQString KHighscore::group() const if ( highscoreGroup().isNull() ) return (d->global ? TQString() : GROUP); return (d->global ? highscoreGroup() - : TQString("%1_%2").tqarg(GROUP).tqarg(highscoreGroup())); + : TQString("%1_%2").arg(GROUP).arg(highscoreGroup())); } bool KHighscore::hasTable() const diff --git a/libtdegames/highscore/khighscore.h b/libtdegames/highscore/khighscore.h index b7b6fb5e..3cd14e8c 100644 --- a/libtdegames/highscore/khighscore.h +++ b/libtdegames/highscore/khighscore.h @@ -67,7 +67,7 @@ class KHighscorePrivate; * single player, so the "best times" of a player. To write highscores for a * specific player in a specific level you will have to use a more complex way: * \code - * TQString group = TQString("%1_%2").tqarg(player).tqarg(level); + * TQString group = TQString("%1_%2").arg(player).arg(level); * table->setGroup(group); * writeHighscore(table, player, level); * \endcode diff --git a/libtdegames/highscore/kscoredialog.cpp b/libtdegames/highscore/kscoredialog.cpp index e799883b..b22cc232 100644 --- a/libtdegames/highscore/kscoredialog.cpp +++ b/libtdegames/highscore/kscoredialog.cpp @@ -25,7 +25,7 @@ this software. #include "config.h" #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include <tqwidgetstack.h> #include <tqtimer.h> @@ -44,7 +44,7 @@ class KScoreDialog::KScoreDialogPrivate public: TQPtrList<FieldInfo> scores; TQWidget *page; - TQGridLayout *tqlayout; + TQGridLayout *layout; TQLineEdit *edit; TQPtrVector<TQWidgetStack> stack; TQPtrVector<TQLabel> labels; @@ -126,36 +126,36 @@ void KScoreDialog::setupDialog() d->col[field] = d->nrCols++; } - d->tqlayout = new TQGridLayout(d->page, 15, d->nrCols, marginHint() + 20, spacingHint()); - d->tqlayout->addRowSpacing(4, 15); + d->layout = new TQGridLayout(d->page, 15, d->nrCols, marginHint() + 20, spacingHint()); + d->layout->addRowSpacing(4, 15); d->commentLabel = new TQLabel(d->page); - d->commentLabel->tqsetAlignment(AlignVCenter | AlignHCenter); - d->tqlayout->addMultiCellWidget(d->commentLabel, 1, 1, 0, d->nrCols-1); + d->commentLabel->setAlignment(AlignVCenter | AlignHCenter); + d->layout->addMultiCellWidget(d->commentLabel, 1, 1, 0, d->nrCols-1); TQFont bold = font(); bold.setBold(true); TQLabel *label; - d->tqlayout->addColSpacing(0, 50); + d->layout->addColSpacing(0, 50); label = new TQLabel(i18n("Rank"), d->page); - d->tqlayout->addWidget(label, 3, 0); + d->layout->addWidget(label, 3, 0); label->setFont(bold); for(int field = 1; field < d->fields; field = field * 2) { if (d->fields & field) { - d->tqlayout->addColSpacing(d->col[field], 50); + d->layout->addColSpacing(d->col[field], 50); label = new TQLabel(d->header[field], d->page); - d->tqlayout->addWidget(label, 3, d->col[field], field <= Name ? AlignLeft : AlignRight); + d->layout->addWidget(label, 3, d->col[field], field <= Name ? AlignLeft : AlignRight); label->setFont(bold); } } KSeparator *sep = new KSeparator(Qt::Horizontal, d->page); - d->tqlayout->addMultiCellWidget(sep, 4, 4, 0, d->nrCols-1); + d->layout->addMultiCellWidget(sep, 4, 4, 0, d->nrCols-1); d->labels.resize(d->nrCols * 10); d->stack.resize(10); @@ -164,14 +164,14 @@ void KScoreDialog::setupDialog() for (int i = 1; i <= 10; ++i) { TQLabel *label; num.setNum(i); - label = new TQLabel(i18n("#%1").tqarg(num), d->page); + label = new TQLabel(i18n("#%1").arg(num), d->page); d->labels.insert((i-1)*d->nrCols + 0, label); - d->tqlayout->addWidget(label, i+4, 0); + d->layout->addWidget(label, i+4, 0); if (d->fields & Name) { TQWidgetStack *stack = new TQWidgetStack(d->page); d->stack.insert(i-1, stack); - d->tqlayout->addWidget(stack, i+4, d->col[Name]); + d->layout->addWidget(stack, i+4, d->col[Name]); label = new TQLabel(d->page); d->labels.insert((i-1)*d->nrCols + d->col[Name], label); stack->addWidget(label); @@ -183,7 +183,7 @@ void KScoreDialog::setupDialog() { label = new TQLabel(d->page); d->labels.insert((i-1)*d->nrCols + d->col[field], label); - d->tqlayout->addWidget(label, i+4, d->col[field], AlignRight); + d->layout->addWidget(label, i+4, d->col[field], AlignRight); } } } @@ -202,15 +202,15 @@ void KScoreDialog::aboutToShow() { d->commentLabel->setMinimumSize(TQSize(1,1)); d->commentLabel->hide(); - d->tqlayout->addRowSpacing(0, -15); - d->tqlayout->addRowSpacing(2, -15); + d->layout->addRowSpacing(0, -15); + d->layout->addRowSpacing(2, -15); } 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); + d->layout->addRowSpacing(0, -10); + d->layout->addRowSpacing(2, 10); } d->comment = TQString(); @@ -267,7 +267,7 @@ void KScoreDialog::aboutToShow() } } d->latest = -1; - setFixedSize(tqminimumSizeHint()); + setFixedSize(minimumSizeHint()); } void KScoreDialog::loadScores() |