20 #ifndef KEXTHIGHSCORE_H
21 #define KEXTHIGHSCORE_H
23 #include "kexthighscore_item.h"
26 #include <kdemacros.h>
31 namespace KExtHighscore
38 extern ManagerPrivate *
internal;
43 KDE_EXPORT uint gameType();
48 KDE_EXPORT
void setGameType(uint gameType);
54 KDE_EXPORT
bool configure(TQWidget *parent);
59 KDE_EXPORT
void show(TQWidget *parent);
66 KDE_EXPORT
void submitScore(
const Score &score, TQWidget *widget);
72 KDE_EXPORT Score lastScore();
78 KDE_EXPORT Score firstScore();
150 Manager(uint nbGameTypes = 1, uint maxNbEntries = 10);
163 void setWWHighscores(
const KURL &url,
const TQString &version);
172 void setTrackLostGames(
bool track);
182 void setTrackDrawGames(
bool track);
194 void setShowStatistics(
bool show);
198 void showStatistics(
bool show) KDE_DEPRECATED;
206 void setShowDrawGamesStatistic(
bool show);
208 enum ScoreTypeBound { ScoreNotBound, ScoreBound };
214 void setScoreHistogram(
const TQMemArray<uint> &scores, ScoreTypeBound type);
231 void setShowMode(ShowMode mode);
245 void setScoreType(ScoreType type);
255 enum ItemType { ScoreDefault, MeanScoreDefault, BestScoreDefault,
260 static Item *createItem(ItemType type);
268 void setScoreItem(uint worstScore,
Item *item);
275 void addScoreItem(
const TQString &name,
Item *item);
277 enum PlayerItemType { MeanScore, BestScore };
283 void setPlayerItem(PlayerItemType type, Item *item);
294 virtual bool isStrictlyLess(
const Score &s1,
const Score &s2)
const;
310 virtual TQString gameTypeLabel(uint gameType, LabelType type)
const;
335 void submitLegacyScore(
const Score &score)
const;
346 { Q_UNUSED(url); Q_UNUSED(score); }
355 static void addToQueryURL(KURL &url,
const TQString &item,
356 const TQString &content);
358 friend class ManagerPrivate;
ItemType
Some predefined item types.
@ NeverShow
Never show the dialog.
virtual void convertLegacy(uint gameType)
This method is called once for each player (ie for each user).
This class contains data for a score.
This class defines how to convert and how to display a highscore element (such as the score,...
virtual void additionalQueryItems(KURL &url, const Score &score) const
This method is called before submitting a score to the world-wide highscores server.
ShowMode
Enumerate different conditions under which to show the high score dialog.
This class manages highscores and players entries (several players can share the same highscores list...
@ ShowForHigherScore
Show if score has improved.
LabelType
Possible type of label (.