libkdegames/highscore
kexthighscore_internal.cpp
Go to the documentation of this file.
252 if ( item(QLatin1String( "score" ))->read(i)==item(QLatin1String( "score" ))->item()->defaultValue() )
471 if ( newName.toLower()==item(QLatin1String( "name" ))->read(i).toString().toLower() ) return true;
Definition: kexthighscore_item.h:168
void setGroup(const QString &group)
Definition: kexthighscore_internal.cpp:171
void setSubGroup(const QString &subGroup)
Definition: kexthighscore_internal.cpp:179
bool isWWEnabled() const
Definition: kexthighscore_internal.cpp:379
void submitScore(const Score &) const
Definition: kexthighscore_internal.cpp:399
QVariant read(uint i) const
Definition: kexthighscore_internal.cpp:75
bool isAnonymous() const
Definition: kexthighscore_internal.cpp:361
uint increment(uint i) const
Definition: kexthighscore_internal.cpp:101
KUrl queryUrl(QueryType type, const QString &newName=QLatin1String("")) const
Definition: kexthighscore_internal.cpp:543
This class manages highscores and players entries (several players can share the same highscores list...
Definition: kexthighscore.h:141
~ManagerPrivate()
Definition: kexthighscore_internal.cpp:536
void append(const T &value)
void exportToText(QTextStream &) const
Definition: kexthighscore_internal.cpp:204
QDateTime toDateTime() const
uint nbEntries() const
Definition: kexthighscore_internal.cpp:248
void exportHighscores(QTextStream &)
Definition: kexthighscore_internal.cpp:853
int histoSize() const
Definition: kexthighscore_internal.cpp:394
QDomElement documentElement() const
void setData(const QString &name, const QVariant &value)
Set the data associated with the named Item.
Definition: kexthighscore_item.cpp:165
static const char ANONYMOUS_LABEL[]
Definition: kexthighscore_internal.h:109
QString registeredName() const
Definition: kexthighscore_internal.cpp:493
bool modifySettings(const QString &newName, const QString &comment, bool WWEnabled, QWidget *widget)
Definition: kexthighscore_internal.cpp:695
Definition: kexthighscore_item.h:168
void addItem(const QString &name, Item *, bool stored=true, bool canHaveSubGroup=false)
Definition: kexthighscore_internal.cpp:151
virtual QVariant read(uint i, const QVariant &value) const
Definition: kexthighscore_item.cpp:48
bool isNull() const
Score readScore(uint i) const
Definition: kexthighscore_internal.cpp:679
Definition: kexthighscore_item.h:168
QDomElement toElement() const
bool hasEntry(int entry, const QString &key) const
Definition: khighscore.cpp:216
int submitScore(const Score &score, QWidget *widget, bool askIfAnonymous)
Definition: kexthighscore_internal.cpp:785
QString number(int n, int base)
int count(const T &value) const
uint toUInt(bool *ok) const
This class defines how to convert and how to display a highscore element (such as the score...
Definition: kexthighscore_item.h:39
int toInt(bool *ok) const
QString histoName(int i) const
Definition: kexthighscore_internal.cpp:385
virtual void additionalQueryItems(KUrl &url, const Score &score) const
This method is called before submitting a score to the world-wide highscores server.
Definition: kexthighscore.h:340
ManagerPrivate(uint nbGameTypes, Manager &manager)
Definition: kexthighscore_internal.cpp:522
bool isEmpty() const
void setGameType(uint type)
Definition: kexthighscore_internal.cpp:746
QString trimmed() const
static const char ANONYMOUS[]
Definition: kexthighscore_internal.h:108
void writeAndUnlock()
Effectively write and unlock the system-wide highscore file (.
Definition: khighscore.cpp:147
void init(uint maxNbentries)
Definition: kexthighscore_internal.cpp:529
void checkFirst()
Definition: kexthighscore_internal.cpp:780
bool trackLostGames
Definition: kexthighscore_internal.h:257
void write(uint k, const Score &data, uint maxNbLines) const
Definition: kexthighscore_internal.cpp:195
virtual QString gameTypeLabel(uint gameType, LabelType type) const
Definition: kexthighscore.cpp:261
Definition: kexthighscore.h:298
void createHistoItems(const QVector< uint > &scores, bool bound)
Definition: kexthighscore_internal.cpp:352
iterator end()
QString pretty(uint i) const
Definition: kexthighscore_internal.cpp:87
iterator begin()
static void addToQueryURL(KUrl &url, const QString &item, const QString &content)
Add an entry to the url to be submitted (.
Definition: kexthighscore.cpp:275
QString right(int n) const
QDomNode namedItem(const QString &name) const
QString toLower() const
bool isOldLocalPlayer() const
Definition: kexthighscore_internal.h:194
bool dontAskAgain() const
Definition: kexthighscore_gui.h:191
QString value() const
bool isNameUsed(const QString &name) const
Definition: kexthighscore_internal.cpp:467
bool isNull() const
bool isStored() const
Definition: kexthighscore_internal.h:103
const T & at(int i) const
ScoreInfos(uint maxNbEntries, const PlayerInfos &infos)
Definition: kexthighscore_internal.cpp:238
QDateTime currentDateTime()
QDomNode firstChild() const
QByteArray toLatin1() const
void modifySettings(const QString &newName, const QString &comment, bool WWEnabled, const QString &newKey) const
Definition: kexthighscore_internal.cpp:481
QString readEntry(int entry, const QString &key, const QString &pDefault=QLatin1String("")) const
Reads an entry from the highscore table.
Definition: khighscore.cpp:202
const char * HS_REGISTERED_NAME
Definition: kexthighscore_internal.cpp:259
uint oldLocalId() const
Definition: kexthighscore_internal.h:205
void read(uint k, Score &data) const
Definition: kexthighscore_internal.cpp:187
virtual uint nbEntries() const =0
void write(uint i, const QVariant &value) const
Definition: kexthighscore_internal.cpp:93
Definition: kexthighscore.h:298
const char * UNABLE_TO_CONTACT
Definition: kexthighscore_internal.cpp:611
QDomAttr toAttr() const
bool trackDrawGames
Definition: kexthighscore_internal.h:257
int length() const
virtual QString pretty(uint i, const QVariant &value) const
Definition: kexthighscore_item.cpp:110
QString fromLatin1(const char *str, int size)
int findIndex(const QString &name) const
Definition: kexthighscore_internal.cpp:118
uint nbEntries() const
Definition: kexthighscore_internal.cpp:366
int submitLocal(const Score &score)
Definition: kexthighscore_internal.cpp:825
double toDouble(bool *ok) const
KHighscore & hsConfig()
Definition: kexthighscore_internal.h:248
QString tagName() const
int find(QChar c, int i, bool cs) const
void modifyName(const QString &newName) const
Definition: kexthighscore_internal.cpp:476
void setItem(Item *item)
Definition: kexthighscore_internal.cpp:63
virtual void convertLegacy(uint gameType)
This method is called once for each player (ie for each user).
Definition: kexthighscore.h:315
const ItemContainer * item(const QString &name) const
Definition: kexthighscore_internal.cpp:125
int size() const
bool lockForWriting(QWidget *widget=0)
Lock the system-wide highscore file for writing (does nothing and return true if the local file is us...
Definition: khighscore.cpp:119
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
QString toString() const
void setItem(const QString &name, Item *)
Definition: kexthighscore_internal.cpp:141
~ItemContainer()
Definition: kexthighscore_internal.cpp:58
QVariant data(const QString &name) const
Definition: kexthighscore_item.cpp:159
bool isNewPlayer() const
Definition: kexthighscore_internal.h:193
bool setContent(const QByteArray &data, bool namespaceProcessing, QString *errorMsg, int *errorLine, int *errorColumn)
uint toUInt(bool *ok, int base) const
QDomNamedNodeMap attributes() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:46 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:46 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.