summaryrefslogtreecommitdiffstats
path: root/pacman-c++/sceneholder.h
diff options
context:
space:
mode:
authortotycro <totycro@unknown-horizons.org>2011-04-09 13:54:18 +0200
committertotycro <totycro@unknown-horizons.org>2011-04-09 13:54:18 +0200
commitd547dec802f76c346538144f4eacf6d8ca6310c4 (patch)
tree50613653be09988bfd1a122496faed93c960de45 /pacman-c++/sceneholder.h
parent7e4bc8ece49543533c4e27f5d6bc867c1bada601 (diff)
downloadfoop-d547dec802f76c346538144f4eacf6d8ca6310c4.tar.gz
foop-d547dec802f76c346538144f4eacf6d8ca6310c4.tar.bz2
foop-d547dec802f76c346538144f4eacf6d8ca6310c4.zip
Pull up methods from mainwidget to sceneholder for sharing in both client and server
Diffstat (limited to 'pacman-c++/sceneholder.h')
-rw-r--r--pacman-c++/sceneholder.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/pacman-c++/sceneholder.h b/pacman-c++/sceneholder.h
new file mode 100644
index 0000000..d69e07e
--- /dev/null
+++ b/pacman-c++/sceneholder.h
@@ -0,0 +1,37 @@
1#ifndef SCENEHOLDER_H
2#define SCENEHOLDER_H
3
4#include <QtGui>
5
6#include "constants.h"
7
8class PixmapItem;
9class Actor;
10
11class SceneHolder
12 : public QWidget
13{
14 Q_OBJECT
15
16public:
17 SceneHolder(QWidget* parent = 0);
18 virtual ~SceneHolder() {};
19
20protected:
21
22 virtual void updateMap(const Transmission::map_t& map);
23
24 // data conversion
25 QPoint mapPositionToCoord(unsigned int x, unsigned int y);
26
27 // map of all pixmap instances
28 QVector< QVector<PixmapItem *> > visualMap;
29
30 // map of actors in order to keep track of those instances
31 QMap<Color::Color, Actor*> m_actors;
32
33 QGraphicsScene *m_scene;
34
35};
36
37#endif // SCENEHOLDER_H \ No newline at end of file