diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | c90c389a8a8d9d8661e9772ec4144c5cf2039f23 (patch) | |
tree | 6d8391395bce9eaea4ad78958617edb20c6a7573 /klickety/highscores.cpp | |
download | tdegames-c90c389a8a8d9d8661e9772ec4144c5cf2039f23.tar.gz tdegames-c90c389a8a8d9d8661e9772ec4144c5cf2039f23.zip |
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegames@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'klickety/highscores.cpp')
-rw-r--r-- | klickety/highscores.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/klickety/highscores.cpp b/klickety/highscores.cpp new file mode 100644 index 00000000..6c49952e --- /dev/null +++ b/klickety/highscores.cpp @@ -0,0 +1,27 @@ +#include "highscores.h" + +#include "base/factory.h" +#include "base/board.h" + + +using namespace KExtHighscore; + +KLHighscores::KLHighscores() +{ + Item *item = createItem(ScoreDefault); + setScoreItem(bfactory->bbi.width * bfactory->bbi.height + 1, item); + addScoreItem("time", createItem(ElapsedTime)); +} + +bool KLHighscores::isStrictlyLess(const Score &s1, const Score &s2) const +{ + if ( s1.score()==s2.score() ) + return s1.data("time").toUInt()<s2.data("time").toUInt(); + return s1.score()>s2.score(); +} + +void KLHighscores::additionalQueryItems(KURL &url, const Score &s) const +{ + uint time = s.data("time").toUInt(); + addToQueryURL(url, "scoreTime", QString::number(time)); +} |