blob: 13269c875eb7e3f9b87702a4f29aae42b6b1cd12 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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
|