summaryrefslogtreecommitdiffstats
path: root/libkdegames/highscore/kexthighscore_internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'libkdegames/highscore/kexthighscore_internal.h')
-rw-r--r--libkdegames/highscore/kexthighscore_internal.h104
1 files changed, 52 insertions, 52 deletions
diff --git a/libkdegames/highscore/kexthighscore_internal.h b/libkdegames/highscore/kexthighscore_internal.h
index 3b206877..639c059b 100644
--- a/libkdegames/highscore/kexthighscore_internal.h
+++ b/libkdegames/highscore/kexthighscore_internal.h
@@ -48,16 +48,16 @@ class RankItem : public Item
RankItem()
: Item((uint)0, i18n("Rank"), Qt::AlignRight) {}
- QVariant read(uint rank, const QVariant &) const { return rank; }
- QString pretty(uint rank, const QVariant &) const
- { return QString::number(rank+1); }
+ TQVariant read(uint rank, const TQVariant &) const { return rank; }
+ TQString pretty(uint rank, const TQVariant &) const
+ { return TQString::number(rank+1); }
};
class NameItem : public Item
{
public:
NameItem()
- : Item(QString::null, i18n("Name"), Qt::AlignLeft) {
+ : Item(TQString::null, i18n("Name"), Qt::AlignLeft) {
setPrettySpecial(Anonymous);
}
};
@@ -66,7 +66,7 @@ class DateItem : public Item
{
public:
DateItem()
- : Item(QDateTime(), i18n("Date"), Qt::AlignRight) {
+ : Item(TQDateTime(), i18n("Date"), Qt::AlignRight) {
setPrettyFormat(DateTime);
}
};
@@ -92,29 +92,29 @@ class ItemContainer
const Item *item() const { return _item; }
Item *item() { return _item; }
- void setName(const QString &name) { _name = name; }
- QString name() const { return _name; }
+ void setName(const TQString &name) { _name = name; }
+ TQString name() const { return _name; }
- void setGroup(const QString &group) { _group = group; }
+ void setGroup(const TQString &group) { _group = group; }
bool isStored() const { return !_group.isNull(); }
- void setSubGroup(const QString &subGroup) { _subGroup = subGroup; }
+ void setSubGroup(const TQString &subGroup) { _subGroup = subGroup; }
bool canHaveSubGroup() const { return !_subGroup.isNull(); }
static const char ANONYMOUS[]; // name assigned to anonymous players
static const char ANONYMOUS_LABEL[];
- QVariant read(uint i) const;
- QString pretty(uint i) const;
- void write(uint i, const QVariant &value) const;
- // for UInt QVariant (return new value)
+ TQVariant read(uint i) const;
+ TQString pretty(uint i) const;
+ void write(uint i, const TQVariant &value) const;
+ // for UInt TQVariant (return new value)
uint increment(uint i) const;
private:
Item *_item;
- QString _name, _group, _subGroup;
+ TQString _name, _group, _subGroup;
- QString entryName() const;
+ TQString entryName() const;
ItemContainer(const ItemContainer &);
ItemContainer &operator =(const ItemContainer &);
@@ -125,7 +125,7 @@ class ItemContainer
* Manage a bunch of @ref Item which are saved under the same group
* in KHighscores config file.
*/
-class ItemArray : public QMemArray<ItemContainer *>
+class ItemArray : public TQMemArray<ItemContainer *>
{
public:
ItemArray();
@@ -133,26 +133,26 @@ class ItemArray : public QMemArray<ItemContainer *>
virtual uint nbEntries() const = 0;
- const ItemContainer *item(const QString &name) const;
- ItemContainer *item(const QString &name);
+ const ItemContainer *item(const TQString &name) const;
+ ItemContainer *item(const TQString &name);
- void addItem(const QString &name, Item *, bool stored = true,
+ void addItem(const TQString &name, Item *, bool stored = true,
bool canHaveSubGroup = false);
- void setItem(const QString &name, Item *);
- int findIndex(const QString &name) const;
+ void setItem(const TQString &name, Item *);
+ int findIndex(const TQString &name) const;
- void setGroup(const QString &group);
- void setSubGroup(const QString &subGroup);
+ void setGroup(const TQString &group);
+ void setSubGroup(const TQString &subGroup);
void read(uint k, Score &data) const;
void write(uint k, const Score &data, uint maxNbLines) const;
- void exportToText(QTextStream &) const;
+ void exportToText(TQTextStream &) const;
private:
- QString _group, _subGroup;
+ TQString _group, _subGroup;
- void _setItem(uint i, const QString &name, Item *, bool stored,
+ void _setItem(uint i, const TQString &name, Item *, bool stored,
bool canHaveSubGroup);
ItemArray(const ItemArray &);
@@ -176,7 +176,7 @@ class ScoreInfos : public ItemArray
class ConfigGroup : public KConfigGroupSaver
{
public:
- ConfigGroup(const QString &group = QString::null)
+ ConfigGroup(const TQString &group = TQString::null)
: KConfigGroupSaver(kapp->config(), group) {}
};
@@ -189,34 +189,34 @@ class PlayerInfos : public ItemArray
bool isNewPlayer() const { return _newPlayer; }
bool isOldLocalPlayer() const { return _oldLocalPlayer; }
uint nbEntries() const;
- QString name() const { return item("name")->read(_id).toString(); }
+ TQString name() const { return item("name")->read(_id).toString(); }
bool isAnonymous() const;
- QString prettyName() const { return prettyName(_id); }
- QString prettyName(uint id) const { return item("name")->pretty(id); }
- QString registeredName() const;
- QString comment() const { return item("comment")->pretty(_id); }
+ TQString prettyName() const { return prettyName(_id); }
+ TQString prettyName(uint id) const { return item("name")->pretty(id); }
+ TQString registeredName() const;
+ TQString comment() const { return item("comment")->pretty(_id); }
bool isWWEnabled() const;
- QString key() const;
+ TQString key() const;
uint id() const { return _id; }
uint oldLocalId() const { return _oldLocalId; }
- void createHistoItems(const QMemArray<uint> &scores, bool bound);
- QString histoName(uint i) const;
+ void createHistoItems(const TQMemArray<uint> &scores, bool bound);
+ TQString histoName(uint i) const;
uint histoSize() const;
- const QMemArray<uint> &histogram() const { return _histogram; }
+ const TQMemArray<uint> &histogram() const { return _histogram; }
void submitScore(const Score &) const;
// return true if the nickname is already used locally
- bool isNameUsed(const QString &name) const;
- void modifyName(const QString &newName) const;
- void modifySettings(const QString &newName, const QString &comment,
- bool WWEnabled, const QString &newKey) const;
+ bool isNameUsed(const TQString &name) const;
+ void modifyName(const TQString &newName) const;
+ void modifySettings(const TQString &newName, const TQString &comment,
+ bool WWEnabled, const TQString &newKey) const;
void removeKey();
private:
bool _newPlayer, _bound, _oldLocalPlayer;
uint _id, _oldLocalId;
- QMemArray<uint> _histogram;
+ TQMemArray<uint> _histogram;
};
//-----------------------------------------------------------------------------
@@ -227,13 +227,13 @@ class ManagerPrivate
void init(uint maxNbentries);
~ManagerPrivate();
- bool modifySettings(const QString &newName, const QString &comment,
- bool WWEnabled, QWidget *widget);
+ bool modifySettings(const TQString &newName, const TQString &comment,
+ bool WWEnabled, TQWidget *widget);
void setGameType(uint type);
void checkFirst();
int submitLocal(const Score &score);
- int submitScore(const Score &score, QWidget *widget, bool askIfAnonymous);
+ int submitScore(const Score &score, TQWidget *widget, bool askIfAnonymous);
Score readScore(uint i) const;
uint gameType() const { return _gameType; }
@@ -243,13 +243,13 @@ class ManagerPrivate
PlayerInfos &playerInfos() { return *_playerInfos; }
KHighscore &hsConfig() { return *_hsConfig; }
enum QueryType { Submit, Register, Change, Players, Scores };
- KURL queryURL(QueryType type, const QString &newName=QString::null) const;
+ KURL queryURL(QueryType type, const TQString &newName=TQString::null) const;
- void exportHighscores(QTextStream &);
+ void exportHighscores(TQTextStream &);
Manager &manager;
KURL serverURL;
- QString version;
+ TQString version;
bool showStatistics, showDrawGames, trackLostGames, trackDrawGames;
Manager::ShowMode showMode;
@@ -264,11 +264,11 @@ class ManagerPrivate
// return -1 if not a local best score
int rank(const Score &score) const;
- bool submitWorldWide(const Score &score, QWidget *parent) const;
- static bool doQuery(const KURL &url, QWidget *parent,
- QDomNamedNodeMap *map = 0);
- static bool getFromQuery(const QDomNamedNodeMap &map, const QString &name,
- QString &value, QWidget *parent);
+ bool submitWorldWide(const Score &score, TQWidget *parent) const;
+ static bool doQuery(const KURL &url, TQWidget *parent,
+ TQDomNamedNodeMap *map = 0);
+ static bool getFromQuery(const TQDomNamedNodeMap &map, const TQString &name,
+ TQString &value, TQWidget *parent);
void convertToGlobal();
};