diff options
Diffstat (limited to 'pacman-c++/pixmapitem.h')
| -rw-r--r-- | pacman-c++/pixmapitem.h | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/pacman-c++/pixmapitem.h b/pacman-c++/pixmapitem.h deleted file mode 100644 index f57c22a..0000000 --- a/pacman-c++/pixmapitem.h +++ /dev/null | |||
| @@ -1,32 +0,0 @@ | |||
| 1 | #ifndef PIXMAPITEM__H | ||
| 2 | #define PIXMAPITEM__H | ||
| 3 | |||
| 4 | #include <QtGui/QGraphicsObject> | ||
| 5 | #include <QtGui/QGraphicsScene> | ||
| 6 | |||
| 7 | class PixmapItem | ||
| 8 | : public QGraphicsObject | ||
| 9 | { | ||
| 10 | public: | ||
| 11 | PixmapItem(QGraphicsItem *parent = 0); | ||
| 12 | PixmapItem(const QString &fileName, QGraphicsItem *parent = 0); | ||
| 13 | PixmapItem(const QString &fileName, QGraphicsScene *scene); | ||
| 14 | PixmapItem(const QPixmap &pix, QGraphicsItem *parent = 0); | ||
| 15 | PixmapItem(const QPixmap &pix, QGraphicsScene *scene); | ||
| 16 | virtual ~PixmapItem() | ||
| 17 | {}; | ||
| 18 | |||
| 19 | void setPixmap(const QPixmap &pix); | ||
| 20 | void setSprite(int x, int y, int width, int height); | ||
| 21 | QSizeF size() const; | ||
| 22 | QRectF boundingRect() const; | ||
| 23 | QPainterPath shape() const; | ||
| 24 | void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *); | ||
| 25 | |||
| 26 | private: | ||
| 27 | QPixmap m_pix; | ||
| 28 | int m_x, m_y; | ||
| 29 | int m_width, m_height; | ||
| 30 | }; | ||
| 31 | |||
| 32 | #endif | ||
