diff options
| author | manuel <manuel@mausz.at> | 2011-04-11 17:30:47 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2011-04-11 17:30:47 +0200 |
| commit | b695f67ef718724144a3a5c4be42be373b0f691f (patch) | |
| tree | f6035441cc93deff90db0c5ba1686856ec6d03d9 /pacman-c++/sceneholder.h | |
| parent | 7667effa9635b0c25088305fe89c15a9805d6dbb (diff) | |
| download | foop-b695f67ef718724144a3a5c4be42be373b0f691f.tar.gz foop-b695f67ef718724144a3a5c4be42be373b0f691f.tar.bz2 foop-b695f67ef718724144a3a5c4be42be373b0f691f.zip | |
implement pointsleft counter
Diffstat (limited to 'pacman-c++/sceneholder.h')
| -rw-r--r-- | pacman-c++/sceneholder.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/pacman-c++/sceneholder.h b/pacman-c++/sceneholder.h index 1ca991e..ccb2a42 100644 --- a/pacman-c++/sceneholder.h +++ b/pacman-c++/sceneholder.h | |||
| @@ -17,25 +17,32 @@ public: | |||
| 17 | SceneHolder(QWidget* parent = 0); | 17 | SceneHolder(QWidget* parent = 0); |
| 18 | virtual ~SceneHolder() | 18 | virtual ~SceneHolder() |
| 19 | {}; | 19 | {}; |
| 20 | unsigned int pointsLeft(); | ||
| 21 | |||
| 22 | private slots: | ||
| 23 | void decrementPoints(); | ||
| 20 | 24 | ||
| 21 | protected: | 25 | protected: |
| 22 | virtual void updateMap(const Transmission::map_t& map); | 26 | virtual void updateMap(const Transmission::map_t& map); |
| 23 | 27 | ||
| 24 | // data conversion | 28 | /* data conversion */ |
| 25 | QPoint mapPositionToCoord(unsigned int x, unsigned int y); | 29 | QPoint mapPositionToCoord(unsigned int x, unsigned int y); |
| 26 | QPoint mapPositionToCoord(QPoint point); | 30 | QPoint mapPositionToCoord(QPoint point); |
| 27 | QPoint CoordToMapPosition(unsigned int x, unsigned int y); | 31 | QPoint CoordToMapPosition(unsigned int x, unsigned int y); |
| 28 | QPoint CoordToMapPosition(QPoint point); | 32 | QPoint CoordToMapPosition(QPoint point); |
| 29 | 33 | ||
| 30 | // map of all pixmap instances | 34 | /* map of all pixmap instances */ |
| 31 | QVector< QVector<PixmapItem *> > visualMap; | 35 | QVector< QVector<PixmapItem *> > visualMap; |
| 32 | 36 | ||
| 33 | // map of actors in order to keep track of those instances | 37 | /* map of actors in order to keep track of those instances */ |
| 34 | QMap<Color::Color, Actor*> m_actors; | 38 | QMap<Color::Color, Actor*> m_actors; |
| 35 | 39 | ||
| 36 | /* my color */ | 40 | /* my local color */ |
| 37 | Color::Color m_color; | 41 | Color::Color m_color; |
| 38 | 42 | ||
| 43 | /* points left before round ends */ | ||
| 44 | unsigned int m_pointsLeft; | ||
| 45 | |||
| 39 | QGraphicsScene *m_scene; | 46 | QGraphicsScene *m_scene; |
| 40 | }; | 47 | }; |
| 41 | 48 | ||
