diff options
Diffstat (limited to 'src/ParallaxScrollerItem.h')
| -rw-r--r-- | src/ParallaxScrollerItem.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/ParallaxScrollerItem.h b/src/ParallaxScrollerItem.h new file mode 100644 index 0000000..13269c8 --- /dev/null +++ b/src/ParallaxScrollerItem.h @@ -0,0 +1,24 @@ +#ifndef ParallaxScrollerItem_h +#define ParallaxScrollerItem_h + +#include <QGraphicsPixmapItem> + +class ParallaxScrollerItem : public QGraphicsPixmapItem +{ +public: + ParallaxScrollerItem(QString layer, QPointF pos, + qreal depthFactor, qreal speed, + qreal factor, QGraphicsScene* scene, + QGraphicsItem* parent = 0); + virtual ~ParallaxScrollerItem(); + + void advance(int phase); + +private: + int m_scrollingSpeedSlowingFactor; + int m_factor; + qreal m_scrollSpeed; + QPixmap m_layer; +}; + +#endif // ParallaxScrollerItem_h |
