[Kde-games-devel] Review Request: Add KScore2 framework to libkdegames (implementation incomplete)

Stefan Majewsky majewsky at gmx.net
Sun Aug 8 23:34:14 CEST 2010


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/4919/
-----------------------------------------------------------

(Updated 2010-08-08 21:34:14.532105)


Review request for KDE Games.


Changes
-------

Score recording works, KDiamond is fully ported.


Summary (updated)
-------

KScore2 is a new framework which ought to replace the commonly used KHighscore/KScoreDialog and perhaps also KExtHighscore. The most central class (and the point where you should start reading the APIDOX) is KScore2::Model. Using the Model/View concept of Qt, KScore2 provides a simple, extensible, yet future-proof API, which includes no assumptions about the internal data structures. Similar to KScoreDialog and KScoreManager (the other new highscore library which is in playground ATM), simple tasks are easy and complex tasks achievable.

KScore2 accomodates the special needs of applications which previously used custom highscore systems: The score model can be made to retrieve its data from arbitrary locations by writing a custom KScore2::Engine subclass. Similarly, a KScore2::CategoryModel can be implemented to support custom highscore grouping (e.g. by difficulty, by level, or by levelpack and level). As an example, the KGameDifficulty::categoryModel() contains difficulty levels as categories. The internal selection is automatically updated to match the selected difficulty level, so showing the highscore table for the current difficulty level becomes a one-liner.

In the presented state, KScore2 is nearly ready for prime-time. On the technical side, unit tests are missing. On the user-visible side, the process of entering one's name on a new highscore needs to be polished.

The code is also available from my Git-SVN repository at git://git.bethselamin.de/kdegames-work.git (branch "kscore2").


Diffs (updated)
-----

  /trunk/KDE/kdegames/kdiamond/src/mainwindow.cpp 1160372 
  /trunk/KDE/kdegames/libkdegames/CMakeLists.txt 1160372 
  /trunk/KDE/kdegames/libkdegames/kgamedifficulty.h 1160372 
  /trunk/KDE/kdegames/libkdegames/kgamedifficulty.cpp 1160372 
  /trunk/KDE/kdegames/libkdegames/kscore2/categorymodel.h PRE-CREATION 
  /trunk/KDE/kdegames/libkdegames/kscore2/categorymodel.cpp PRE-CREATION 
  /trunk/KDE/kdegames/libkdegames/kscore2/dialog.cpp PRE-CREATION 
  /trunk/KDE/kdegames/libkdegames/kscore2/dialog_p.h PRE-CREATION 
  /trunk/KDE/kdegames/libkdegames/kscore2/engine.h PRE-CREATION 
  /trunk/KDE/kdegames/libkdegames/kscore2/engine.cpp PRE-CREATION 
  /trunk/KDE/kdegames/libkdegames/kscore2/flags.h PRE-CREATION 
  /trunk/KDE/kdegames/libkdegames/kscore2/flags.cpp PRE-CREATION 
  /trunk/KDE/kdegames/libkdegames/kscore2/model.h PRE-CREATION 
  /trunk/KDE/kdegames/libkdegames/kscore2/model.cpp PRE-CREATION 
  /trunk/KDE/kdegames/libkdegames/kscore2/model_p.h PRE-CREATION 
  /trunk/KDE/kdegames/libkdegames/kscore2/record.h PRE-CREATION 
  /trunk/KDE/kdegames/libkdegames/kscore2/record.cpp PRE-CREATION 
  /trunk/KDE/kdegames/libkdegames/kscore2/recordformat.h PRE-CREATION 
  /trunk/KDE/kdegames/libkdegames/kscore2/recordformat.cpp PRE-CREATION 

Diff: http://reviewboard.kde.org/r/4919/diff


Testing (updated)
-------

KDiamond has been ported. The data storage logic (powered by KScore2::DefaultEngine) is compatible to the old KHighscore/KScoreDialog-based system.


Screenshots
-----------

Relation of the different data sources in KScore2
  http://reviewboard.kde.org/r/4919/s/473/
First KScore2 integration in KDiamond
  http://reviewboard.kde.org/r/4919/s/474/


Thanks,

Stefan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-games-devel/attachments/20100808/c570a2b2/attachment.htm 


More information about the kde-games-devel mailing list