From d547dec802f76c346538144f4eacf6d8ca6310c4 Mon Sep 17 00:00:00 2001 From: totycro Date: Sat, 9 Apr 2011 13:54:18 +0200 Subject: Pull up methods from mainwidget to sceneholder for sharing in both client and server --- pacman-c++/sceneholder.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 pacman-c++/sceneholder.h (limited to 'pacman-c++/sceneholder.h') 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 @@ +#ifndef SCENEHOLDER_H +#define SCENEHOLDER_H + +#include + +#include "constants.h" + +class PixmapItem; +class Actor; + +class SceneHolder + : public QWidget +{ + Q_OBJECT + +public: + SceneHolder(QWidget* parent = 0); + virtual ~SceneHolder() {}; + +protected: + + virtual void updateMap(const Transmission::map_t& map); + + // data conversion + QPoint mapPositionToCoord(unsigned int x, unsigned int y); + + // map of all pixmap instances + QVector< QVector > visualMap; + + // map of actors in order to keep track of those instances + QMap m_actors; + + QGraphicsScene *m_scene; + +}; + +#endif // SCENEHOLDER_H \ No newline at end of file -- cgit v1.2.3