summaryrefslogtreecommitdiffstats
path: root/kolf/statedb.h
blob: 522d147fb3f6749a1898b74ce9627ef5670e80b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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