diff options
Diffstat (limited to 'pacman-c++/pixmapitem.h')
| -rw-r--r-- | pacman-c++/pixmapitem.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/pacman-c++/pixmapitem.h b/pacman-c++/pixmapitem.h index a94c251..853604d 100644 --- a/pacman-c++/pixmapitem.h +++ b/pacman-c++/pixmapitem.h | |||
| @@ -5,19 +5,19 @@ | |||
| 5 | #include <QtGui/QGraphicsScene> | 5 | #include <QtGui/QGraphicsScene> |
| 6 | 6 | ||
| 7 | class PixmapItem | 7 | class PixmapItem |
| 8 | : public QGraphicsObject | 8 | : public QGraphicsObject |
| 9 | { | 9 | { |
| 10 | public: | 10 | public: |
| 11 | PixmapItem(const QString &fileName, QGraphicsItem *parent = 0); | 11 | PixmapItem(const QString &fileName, QGraphicsItem *parent = 0); |
| 12 | PixmapItem(const QString &fileName, QGraphicsScene *scene); | 12 | PixmapItem(const QString &fileName, QGraphicsScene *scene); |
| 13 | void setSprite(int x, int y, int width, int height); | 13 | void setSprite(int x, int y, int width, int height); |
| 14 | QSizeF size() const; | 14 | QSizeF size() const; |
| 15 | QRectF boundingRect() const; | 15 | QRectF boundingRect() const; |
| 16 | void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *); | 16 | void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *); |
| 17 | private: | 17 | private: |
| 18 | QPixmap m_pix; | 18 | QPixmap m_pix; |
| 19 | int m_x, m_y; | 19 | int m_x, m_y; |
| 20 | int m_width, m_height; | 20 | int m_width, m_height; |
| 21 | }; | 21 | }; |
| 22 | 22 | ||
| 23 | #endif | 23 | #endif |
