[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdegames/libkdegames
From: Stefan Majewsky <majewsky () gmx ! net>
Date: 2012-02-20 21:57:26
Message-ID: 20120220215726.57538AC895 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1281269 by majewsky:
Import KgDifficulty class (coming from Project Tagaro).
This is the GUI-independent essence of KGameDifficulty, and a bit more:
* KgDifficulty automatically saves and restores the level selection
across application restarts.
* The levels are virtual base classes, so applications can add more
metadata to them if desired.
* Instead of addStandardLevel (which can be replicated in a one-liner),
there is the incredibly useful addStandardLevelRange call.
* All KgDifficulty capabilities are exposed through Q_PROPERTY, so it's
QML-ready.
Where possible, I tried to retain compatibility to KGameDifficulty, e.g.
in the StandardLevel enum. There are some intentional incompatibilites
though, most notably:
* KGameDifficulty::Configurable has been removed from the StandardLevel
enum. There's only ::Custom.
* setRestartOnChange() has been removed. If you want that behavior, use
setGameRunning(), otherwise just don't.
* The whole localization API has been removed. Iterate over the levels
to retrieve that information if necessary.
M +2 -0 CMakeLists.txt
M +1 -0 includes/CMakeLists.txt
A includes/KgDifficulty
A kgdifficulty.cpp [License: LGPL (v2)]
A kgdifficulty.h [License: LGPL (v2)]
--- trunk/KDE/kdegames/libkdegames/CMakeLists.txt #1281268:1281269
@@ -88,6 +88,7 @@
kgamethemeselector.cpp
kstandardgameaction.cpp
kgamedifficulty.cpp
+ kgdifficulty.cpp
)
if(Q_WS_X11)
set(kdegames_LIB_SRCS ${kdegames_LIB_SRCS} chooserastergraphicssystem.cpp)
@@ -129,5 +130,6 @@
kgametheme.h
kgamethemeselector.h
kgamedifficulty.h
+ kgdifficulty.h
DESTINATION ${INCLUDE_INSTALL_DIR} COMPONENT Devel
)
--- trunk/KDE/kdegames/libkdegames/includes/CMakeLists.txt #1281268:1281269
@@ -1,6 +1,7 @@
install( FILES
KgAudioScene
+ KgDifficulty
KgSound
KChat
KChatBase
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic