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 /kolf/statedb.h | |
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 'kolf/statedb.h')
-rw-r--r-- | kolf/statedb.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/kolf/statedb.h b/kolf/statedb.h new file mode 100644 index 00000000..522d147f --- /dev/null +++ b/kolf/statedb.h @@ -0,0 +1,23 @@ +#ifndef KOLF_STATEDB_H +#define KOLF_STATEDB_H + +#include <qmap.h> +#include <qstring.h> +#include <qpoint.h> + +// items can save their per-game states here +// most don't have to do anything +class StateDB +{ +public: + void setPoint(const QPoint &point) { points[curName] = point; } + QPoint point() { return points[curName]; } + void setName(const QString &name) { curName = name; } + void clear() { points.clear(); } + +private: + QMap<QString, QPoint> points; + QString curName; +}; + +#endif |