1 #ifndef ORIENTATIONCONTROLLEDGRAPHICSPIXMAPOBJECT_H
2 #define ORIENTATIONCONTROLLEDGRAPHICSPIXMAPOBJECT_H
4 #include <QGraphicsPixmapItem>
5 #include <QRotationSensor>
11 class OrientationControlledGraphicsPixmapObject : public QObject, public QGraphicsPixmapItem
15 // explicit OrientationControlledGraphicsPixmapObject(QGraphicsItem *parent = 0);
16 explicit OrientationControlledGraphicsPixmapObject(QPixmap pixmap = 0, QGraphicsItem *parent = 0);
23 void readRotationSensor();
27 /*! Returns true if the new position is to be maintained and false if a revert back to the old position is needed.
28 This stub always just returns true. Actual collision handling is left for subclasses to implement (by reimplementing this function).
30 virtual bool handleCollisions();
34 QRotationSensor rotationSensor_;
41 #endif // ORIENTATIONCONTROLLEDGRAPHICSPIXMAPOBJECT_H