From dbeba838ea813b620ec571265c8ea417403fc81c Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 12 Apr 2011 14:45:24 +0200 Subject: make the server a non gui application this required a lot of reorganization: - don't create ANY pixmaps. that requires QtGui - don't create and QtWidgets - thus SceneHolder is now a QGraphisScene itself - and MainWidgets is a QWidget having SceneHolder as member variable --- pacman-c++/sceneholder.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'pacman-c++/sceneholder.h') diff --git a/pacman-c++/sceneholder.h b/pacman-c++/sceneholder.h index ccb2a42..61cff3e 100644 --- a/pacman-c++/sceneholder.h +++ b/pacman-c++/sceneholder.h @@ -1,30 +1,30 @@ #ifndef SCENEHOLDER_H #define SCENEHOLDER_H -#include - #include "constants.h" +#include class PixmapItem; class Actor; class SceneHolder - : public QWidget + : public QGraphicsScene { Q_OBJECT public: - SceneHolder(QWidget* parent = 0); + SceneHolder(QObject *parent = 0); virtual ~SceneHolder() {}; unsigned int pointsLeft(); + void updateMap(const Transmission::map_t& map); + void setColor(Color::Color color = Color::none); + Color::Color color(); private slots: void decrementPoints(); protected: - virtual void updateMap(const Transmission::map_t& map); - /* data conversion */ QPoint mapPositionToCoord(unsigned int x, unsigned int y); QPoint mapPositionToCoord(QPoint point); @@ -42,8 +42,6 @@ protected: /* points left before round ends */ unsigned int m_pointsLeft; - - QGraphicsScene *m_scene; }; #endif // SCENEHOLDER_H -- cgit v1.2.3