20 #ifndef KEXTHIGHSCORE_H
21 #define KEXTHIGHSCORE_H
23 #include "kexthighscore_item.h"
26 #include <tdemacros.h>
31 namespace KExtHighscore
38 extern ManagerPrivate *
internal;
43 TDE_EXPORT uint gameType();
48 TDE_EXPORT
void setGameType(uint gameType);
54 TDE_EXPORT
bool configure(TQWidget *parent);
59 TDE_EXPORT
void show(TQWidget *parent);
66 TDE_EXPORT
void submitScore(
const Score &score, TQWidget *widget);
72 TDE_EXPORT Score lastScore();
78 TDE_EXPORT Score firstScore();
150 Manager(uint nbGameTypes = 1, uint maxNbEntries = 10);
160 void setTrackLostGames(
bool track);
170 void setTrackDrawGames(
bool track);
182 void setShowStatistics(
bool show);
186 void showStatistics(
bool show) TDE_DEPRECATED;
194 void setShowDrawGamesStatistic(
bool show);
196 enum ScoreTypeBound { ScoreNotBound, ScoreBound };
202 void setScoreHistogram(
const TQMemArray<uint> &scores, ScoreTypeBound type);
219 void setShowMode(ShowMode mode);
233 void setScoreType(ScoreType type);
243 enum ItemType { ScoreDefault, MeanScoreDefault, BestScoreDefault,
248 static Item *createItem(ItemType type);
256 void setScoreItem(uint worstScore,
Item *item);
263 void addScoreItem(
const TQString &name,
Item *item);
265 enum PlayerItemType { MeanScore, BestScore };
271 void setPlayerItem(PlayerItemType type, Item *item);
282 virtual bool isStrictlyLess(
const Score &s1,
const Score &s2)
const;
298 virtual TQString gameTypeLabel(uint gameType, LabelType type)
const;
323 void submitLegacyScore(
const Score &score)
const;
325 friend class ManagerPrivate;
This class defines how to convert and how to display a highscore element (such as the score,...
This class manages highscores and players entries (several players can share the same highscores list...
ShowMode
Enumerate different conditions under which to show the high score dialog.
@ AlwaysShow
Always show the dialog.
@ NeverShow
Never show the dialog.
@ ShowForHigherScore
Show if score has improved.
ItemType
Some predefined item types.
LabelType
Possible type of label (.
virtual void convertLegacy(uint gameType)
This method is called once for each player (ie for each user).
This class contains data for a score.