diff options
| author | manuel <manuel@mausz.at> | 2011-04-04 11:27:54 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2011-04-04 11:27:54 +0200 |
| commit | a35824a3319ae9c304263185c4efc449e2c2cf73 (patch) | |
| tree | f769dc8e8e06265594b2f0e5bda47163428c47be /pacman-c++/pixmapitem.h | |
| parent | 2a2c8d3b30e99e2bd636891a2eef27c0f35dcbc3 (diff) | |
| download | foop-a35824a3319ae9c304263185c4efc449e2c2cf73.tar.gz foop-a35824a3319ae9c304263185c4efc449e2c2cf73.tar.bz2 foop-a35824a3319ae9c304263185c4efc449e2c2cf73.zip | |
added simple pacman animation
Diffstat (limited to 'pacman-c++/pixmapitem.h')
| -rw-r--r-- | pacman-c++/pixmapitem.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pacman-c++/pixmapitem.h b/pacman-c++/pixmapitem.h index 853604d..e6aa79e 100644 --- a/pacman-c++/pixmapitem.h +++ b/pacman-c++/pixmapitem.h | |||
| @@ -7,13 +7,25 @@ | |||
| 7 | class PixmapItem | 7 | class PixmapItem |
| 8 | : public QGraphicsObject | 8 | : public QGraphicsObject |
| 9 | { | 9 | { |
| 10 | Q_PROPERTY(bool visibleX READ isVisible WRITE setVisible) | ||
| 11 | |||
| 10 | public: | 12 | public: |
| 13 | PixmapItem(QGraphicsItem *parent = 0); | ||
| 11 | PixmapItem(const QString &fileName, QGraphicsItem *parent = 0); | 14 | PixmapItem(const QString &fileName, QGraphicsItem *parent = 0); |
| 12 | PixmapItem(const QString &fileName, QGraphicsScene *scene); | 15 | PixmapItem(const QString &fileName, QGraphicsScene *scene); |
| 16 | PixmapItem(const QPixmap &pix, QGraphicsItem *parent = 0); | ||
| 17 | PixmapItem(const QPixmap &pix, QGraphicsScene *scene); | ||
| 18 | void setPixmap(const QPixmap &pix); | ||
| 13 | void setSprite(int x, int y, int width, int height); | 19 | void setSprite(int x, int y, int width, int height); |
| 14 | QSizeF size() const; | 20 | QSizeF size() const; |
| 15 | QRectF boundingRect() const; | 21 | QRectF boundingRect() const; |
| 16 | void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *); | 22 | void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *); |
| 23 | |||
| 24 | #if 0 | ||
| 25 | bool isVisible() const; | ||
| 26 | void setVisible(bool v); | ||
| 27 | #endif | ||
| 28 | |||
| 17 | private: | 29 | private: |
| 18 | QPixmap m_pix; | 30 | QPixmap m_pix; |
| 19 | int m_x, m_y; | 31 | int m_x, m_y; |
