summaryrefslogtreecommitdiffstats
path: root/libtdegames/highscore
diff options
context:
space:
mode:
Diffstat (limited to 'libtdegames/highscore')
-rw-r--r--libtdegames/highscore/kexthighscore.cpp2
-rw-r--r--libtdegames/highscore/kexthighscore_gui.cpp10
-rw-r--r--libtdegames/highscore/kexthighscore_internal.cpp20
-rw-r--r--libtdegames/highscore/kexthighscore_item.cpp8
-rw-r--r--libtdegames/highscore/kexthighscore_item.h10
-rw-r--r--libtdegames/highscore/kexthighscore_tab.cpp8
-rw-r--r--libtdegames/highscore/khighscore.cpp18
-rw-r--r--libtdegames/highscore/khighscore.h2
-rw-r--r--libtdegames/highscore/kscoredialog.cpp42
9 files changed, 60 insertions, 60 deletions
diff --git a/libtdegames/highscore/kexthighscore.cpp b/libtdegames/highscore/kexthighscore.cpp
index 46010c41..d352a266 100644
--- a/libtdegames/highscore/kexthighscore.cpp
+++ b/libtdegames/highscore/kexthighscore.cpp
@@ -19,7 +19,7 @@
#include "kexthighscore.h"
-#include <layout.h>
+#include <tqlayout.h>
#include <kdebug.h>
diff --git a/libtdegames/highscore/kexthighscore_gui.cpp b/libtdegames/highscore/kexthighscore_gui.cpp
index eb715273..02ea99b6 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 <layout.h>
-#include <textstream.h>
+#include <tqlayout.h>
+#include <tqtextstream.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()->alignment());
+ setColumnAlignment(k, container.item()->tqalignment());
}
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()->alignment());
+ setColumnAlignment(i, container->item()->tqalignment());
}
}
}
@@ -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()->alignment());
+ setColumnAlignment(i, container->item()->tqalignment());
}
}
}
diff --git a/libtdegames/highscore/kexthighscore_internal.cpp b/libtdegames/highscore/kexthighscore_internal.cpp
index 4803909a..a679002c 100644
--- a/libtdegames/highscore/kexthighscore_internal.cpp
+++ b/libtdegames/highscore/kexthighscore_internal.cpp
@@ -24,7 +24,7 @@
#include <unistd.h>
#include <tqfile.h>
-#include <layout.h>
+#include <tqlayout.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_").arg(_oldLocalId+1);
+ TQString prefix = TQString("%1_").tqarg(_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").arg(sh[sh.size()-1]);
- return TQString("nb scores less than %1").arg(sh[i]);
+ return TQString("nb scores greater than %1").tqarg(sh[sh.size()-1]);
+ return TQString("nb scores less than %1").tqarg(sh[i]);
}
uint PlayerInfos::histoSize() const
@@ -497,10 +497,10 @@ void PlayerInfos::removeKey()
TQString sk;
do {
i++;
- sk = str.arg(HS_KEY).arg(i);
+ sk = str.tqarg(HS_KEY).tqarg(i);
} while ( !cg.config()->readEntry(sk, TQString()).isEmpty() );
cg.config()->writeEntry(sk, key());
- cg.config()->writeEntry(str.arg(HS_REGISTERED_NAME).arg(i),
+ cg.config()->writeEntry(str.tqarg(HS_REGISTERED_NAME).tqarg(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").arg(url.host());
+ TQString details = i18n("Server URL: %1").tqarg(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").arg(content);
+ TQString details = i18n("Raw message: %1").tqarg(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).").arg(name));
+ "highscores server (missing item: %1).").tqarg(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::currentDateTime());
+ score.setData("date", TQDateTime::tqcurrentDateTime());
// 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 b491d3f8..4b48a0ee 100644
--- a/libtdegames/highscore/kexthighscore_item.cpp
+++ b/libtdegames/highscore/kexthighscore_item.cpp
@@ -19,7 +19,7 @@
#include "kexthighscore_item.h"
-#include <layout.h>
+#include <tqlayout.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 alignment)
- : _default(def), _label(label), _alignment(alignment),
+Item::Item(const TQVariant &def, const TQString &label, int tqalignment)
+ : _default(def), _label(label), _tqalignment(tqalignment),
_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:")
- .arg(_nbGames[0]), vbox);
+ .tqarg(_nbGames[0]), vbox);
(void)new TotalMultipleScoresList(ordered, vbox);
}
diff --git a/libtdegames/highscore/kexthighscore_item.h b/libtdegames/highscore/kexthighscore_item.h
index 8379433b..b32f32e7 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 alignment the alignment of the item.
+ * @param tqalignment the tqalignment of the item.
*/
Item(const TQVariant &def = TQVariant::Invalid,
- const TQString &label = TQString(), int alignment = TQt::AlignRight);
+ const TQString &label = TQString(), int tqalignment = TQt::AlignRight);
virtual ~Item();
@@ -114,9 +114,9 @@ class KDE_EXPORT Item
TQString label() const { return _label; }
/**
- * @return the alignment.
+ * @return the tqalignment.
*/
- int alignment() const { return _alignment; }
+ int tqalignment() const { return _tqalignment; }
/**
* Set default value.
@@ -149,7 +149,7 @@ class KDE_EXPORT Item
private:
TQVariant _default;
TQString _label;
- int _alignment;
+ int _tqalignment;
Format _format;
Special _special;
diff --git a/libtdegames/highscore/kexthighscore_tab.cpp b/libtdegames/highscore/kexthighscore_tab.cpp
index 811b1132..d47b35a6 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 <layout.h>
+#include <tqlayout.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%").arg(100.0 * n / total, 0, 'f', 1);
+ TQString s = TQString("%1%").tqarg(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 *>(layout());
+ TQVBoxLayout *top = static_cast<TQVBoxLayout *>(tqlayout());
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 *>(layout());
+ TQVBoxLayout *top = static_cast<TQVBoxLayout *>(tqlayout());
_list = new KListView(this);
_list->setSelectionMode(TQListView::NoSelection);
diff --git a/libtdegames/highscore/khighscore.cpp b/libtdegames/highscore/khighscore.cpp
index 3ff2d248..6d696020 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")
- .arg(HIGHSCORE_DIRECTORY).arg(appname);
+ .tqarg(HIGHSCORE_DIRECTORY).tqarg(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").arg(entry).arg(key);
+ TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(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").arg(entry).arg(key);
+ TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(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").arg(entry).arg(key);
+ TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(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").arg(entry).arg(key);
+ TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(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").arg(entry).arg(key);
+ TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(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").arg(entry).arg(key);
+ TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(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").arg(entry).arg(key);
+ TQString confKey = TQString("%1_%2").tqarg(entry).tqarg(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").arg(GROUP).arg(highscoreGroup()));
+ : TQString("%1_%2").tqarg(GROUP).tqarg(highscoreGroup()));
}
bool KHighscore::hasTable() const
diff --git a/libtdegames/highscore/khighscore.h b/libtdegames/highscore/khighscore.h
index 3cd14e8c..b7b6fb5e 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").arg(player).arg(level);
+ * TQString group = TQString("%1_%2").tqarg(player).tqarg(level);
* table->setGroup(group);
* writeHighscore(table, player, level);
* \endcode
diff --git a/libtdegames/highscore/kscoredialog.cpp b/libtdegames/highscore/kscoredialog.cpp
index b22cc232..e799883b 100644
--- a/libtdegames/highscore/kscoredialog.cpp
+++ b/libtdegames/highscore/kscoredialog.cpp
@@ -25,7 +25,7 @@ this software.
#include "config.h"
#include <tqlabel.h>
-#include <layout.h>
+#include <tqlayout.h>
#include <tqlineedit.h>
#include <tqwidgetstack.h>
#include <tqtimer.h>
@@ -44,7 +44,7 @@ class KScoreDialog::KScoreDialogPrivate
public:
TQPtrList<FieldInfo> scores;
TQWidget *page;
- TQGridLayout *layout;
+ TQGridLayout *tqlayout;
TQLineEdit *edit;
TQPtrVector<TQWidgetStack> stack;
TQPtrVector<TQLabel> labels;
@@ -126,36 +126,36 @@ void KScoreDialog::setupDialog()
d->col[field] = d->nrCols++;
}
- d->layout = new TQGridLayout(d->page, 15, d->nrCols, marginHint() + 20, spacingHint());
- d->layout->addRowSpacing(4, 15);
+ d->tqlayout = new TQGridLayout(d->page, 15, d->nrCols, marginHint() + 20, spacingHint());
+ d->tqlayout->addRowSpacing(4, 15);
d->commentLabel = new TQLabel(d->page);
- d->commentLabel->setAlignment(AlignVCenter | AlignHCenter);
- d->layout->addMultiCellWidget(d->commentLabel, 1, 1, 0, d->nrCols-1);
+ d->commentLabel->tqsetAlignment(AlignVCenter | AlignHCenter);
+ d->tqlayout->addMultiCellWidget(d->commentLabel, 1, 1, 0, d->nrCols-1);
TQFont bold = font();
bold.setBold(true);
TQLabel *label;
- d->layout->addColSpacing(0, 50);
+ d->tqlayout->addColSpacing(0, 50);
label = new TQLabel(i18n("Rank"), d->page);
- d->layout->addWidget(label, 3, 0);
+ d->tqlayout->addWidget(label, 3, 0);
label->setFont(bold);
for(int field = 1; field < d->fields; field = field * 2)
{
if (d->fields & field)
{
- d->layout->addColSpacing(d->col[field], 50);
+ d->tqlayout->addColSpacing(d->col[field], 50);
label = new TQLabel(d->header[field], d->page);
- d->layout->addWidget(label, 3, d->col[field], field <= Name ? AlignLeft : AlignRight);
+ d->tqlayout->addWidget(label, 3, d->col[field], field <= Name ? AlignLeft : AlignRight);
label->setFont(bold);
}
}
KSeparator *sep = new KSeparator(Qt::Horizontal, d->page);
- d->layout->addMultiCellWidget(sep, 4, 4, 0, d->nrCols-1);
+ d->tqlayout->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").arg(num), d->page);
+ label = new TQLabel(i18n("#%1").tqarg(num), d->page);
d->labels.insert((i-1)*d->nrCols + 0, label);
- d->layout->addWidget(label, i+4, 0);
+ d->tqlayout->addWidget(label, i+4, 0);
if (d->fields & Name)
{
TQWidgetStack *stack = new TQWidgetStack(d->page);
d->stack.insert(i-1, stack);
- d->layout->addWidget(stack, i+4, d->col[Name]);
+ d->tqlayout->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->layout->addWidget(label, i+4, d->col[field], AlignRight);
+ d->tqlayout->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->layout->addRowSpacing(0, -15);
- d->layout->addRowSpacing(2, -15);
+ d->tqlayout->addRowSpacing(0, -15);
+ d->tqlayout->addRowSpacing(2, -15);
}
else
{
- d->commentLabel->setMinimumSize(d->commentLabel->sizeHint());
+ d->commentLabel->setMinimumSize(d->commentLabel->tqsizeHint());
d->commentLabel->show();
- d->layout->addRowSpacing(0, -10);
- d->layout->addRowSpacing(2, 10);
+ d->tqlayout->addRowSpacing(0, -10);
+ d->tqlayout->addRowSpacing(2, 10);
}
d->comment = TQString();
@@ -267,7 +267,7 @@ void KScoreDialog::aboutToShow()
}
}
d->latest = -1;
- setFixedSize(minimumSizeHint());
+ setFixedSize(tqminimumSizeHint());
}
void KScoreDialog::loadScores()