summaryrefslogtreecommitdiffstats
path: root/examples/statemachine/errorstate/gameitem.h
blob: 98087067e76cc5f5952d84de5df90b6a263d3eb6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#ifndef GAMEITEM_H
#define GAMEITEM_H

#include <QGraphicsItem>

class QLineF;
class GameItem: public QGraphicsItem
{
public:
    virtual void idle(qreal elapsed) = 0;

protected:
    QPointF tryMove(const QPointF &requestedPosition, QLineF *collidedLine = 0, 
        QGraphicsItem **collidedItem = 0) const;
};

#endif