diff options
| author | manuel <manuel@mausz.at> | 2011-04-09 15:05:45 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2011-04-09 15:05:45 +0200 |
| commit | 7bfd0036b3297992dc6644eecfcbab5325756a1d (patch) | |
| tree | 326166529ad460a2801fdb7e251c4c26a3441170 /pacman-c++/sceneholder.h | |
| parent | 9f896b86b671b3a05314d2013a315d996b456f95 (diff) | |
| parent | d547dec802f76c346538144f4eacf6d8ca6310c4 (diff) | |
| download | foop-7bfd0036b3297992dc6644eecfcbab5325756a1d.tar.gz foop-7bfd0036b3297992dc6644eecfcbab5325756a1d.tar.bz2 foop-7bfd0036b3297992dc6644eecfcbab5325756a1d.zip | |
Merge branch 'master' of ssh://manuel.mausz.at/foop
Conflicts:
pacman-c++/pacman.pro
Diffstat (limited to 'pacman-c++/sceneholder.h')
| -rw-r--r-- | pacman-c++/sceneholder.h | 37 |
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 | |||
| 8 | class PixmapItem; | ||
| 9 | class Actor; | ||
| 10 | |||
| 11 | class SceneHolder | ||
| 12 | : public QWidget | ||
| 13 | { | ||
| 14 | Q_OBJECT | ||
| 15 | |||
| 16 | public: | ||
| 17 | SceneHolder(QWidget* parent = 0); | ||
| 18 | virtual ~SceneHolder() {}; | ||
| 19 | |||
| 20 | protected: | ||
| 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 | ||
