diff options
Diffstat (limited to 'examples/graphicsview/portedasteroids/animateditem.h')
-rw-r--r-- | examples/graphicsview/portedasteroids/animateditem.h | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/examples/graphicsview/portedasteroids/animateditem.h b/examples/graphicsview/portedasteroids/animateditem.h index 712d70d..23117b4 100644 --- a/examples/graphicsview/portedasteroids/animateditem.h +++ b/examples/graphicsview/portedasteroids/animateditem.h @@ -49,18 +49,12 @@ public: AnimatedPixmapItem(const QList<QPixmap> &animation, QGraphicsScene *scene = 0); void setFrame(int frame); - inline int frame() const - { return currentFrame; } - inline int frameCount() const - { return frames.size(); } - inline QPixmap image(int frame) const - { return frames.isEmpty() ? QPixmap() : frames.at(frame % frames.size()).pixmap; } - inline void setVelocity(qreal xvel, qreal yvel) - { vx = xvel; vy = yvel; } - inline qreal xVelocity() const - { return vx; } - inline qreal yVelocity() const - { return vy; } + inline int frame() const { return currentFrame; } + inline int frameCount() const { return frames.size(); } + inline QPixmap image(int frame) const { return frames.isEmpty() ? QPixmap() : frames.at(frame % frames.size()).pixmap; } + inline void setVelocity(qreal xvel, qreal yvel) { vx = xvel; vy = yvel; } + inline qreal xVelocity() const { return vx; } + inline qreal yVelocity() const { return vy; } QRectF boundingRect() const; QPainterPath shape() const; |