diff options
| author | manuel <manuel@mausz.at> | 2011-04-05 12:26:04 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2011-04-05 12:26:04 +0200 |
| commit | bfaf2e63e64169abbb1a4c079a937091060574b7 (patch) | |
| tree | 4054c7cce1f9e8aaa467ef51e28c581c40986b93 /pacman-c++/block.cpp | |
| parent | 897bc2bb42d79369d2f915d0da4e3b7f3b1a6fce (diff) | |
| download | foop-bfaf2e63e64169abbb1a4c079a937091060574b7.tar.gz foop-bfaf2e63e64169abbb1a4c079a937091060574b7.tar.bz2 foop-bfaf2e63e64169abbb1a4c079a937091060574b7.zip | |
forgot some commits..
replace std::map with QMap
Diffstat (limited to 'pacman-c++/block.cpp')
| -rw-r--r-- | pacman-c++/block.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pacman-c++/block.cpp b/pacman-c++/block.cpp index 6383b3a..87c69a7 100644 --- a/pacman-c++/block.cpp +++ b/pacman-c++/block.cpp | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | #include "block.h" | 1 | #include "block.h" |
| 2 | #include "constants.h" | 2 | #include "constants.h" |
| 3 | #include <QtGui> | 3 | #include <QtDebug> |
| 4 | 4 | ||
| 5 | std::map<Color, QPixmap> Block::m_pixmaps; | 5 | QMap<Color, QPixmap> Block::m_pixmaps; |
| 6 | 6 | ||
| 7 | Block::Block(Color color, QGraphicsItem *parent) | 7 | Block::Block(Color color, QGraphicsItem *parent) |
| 8 | : PixmapItem(parent) | 8 | : PixmapItem(parent) |
| @@ -12,6 +12,6 @@ Block::Block(Color color, QGraphicsItem *parent) | |||
| 12 | QString pixmapName = ":/" + QString("block%1").arg(color); | 12 | QString pixmapName = ":/" + QString("block%1").arg(color); |
| 13 | m_pixmaps[color] = QPixmap(pixmapName); | 13 | m_pixmaps[color] = QPixmap(pixmapName); |
| 14 | } | 14 | } |
| 15 | setPixmap(m_pixmaps.find(color)->second); | 15 | setPixmap(m_pixmaps.find(color).value()); |
| 16 | qDebug() << "loading block w color: " << color; | 16 | qDebug() << "loading block w color: " << color; |
| 17 | } | 17 | } |
