Commit 7445ac83 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

GraphicsCursorItem: Specify a specific item type for this kind of item

parent 0980eb94
......@@ -37,6 +37,8 @@ class GraphicsCursorItem : public QObject, public QGraphicsItem
{
Q_OBJECT
enum { Type = UserType + 5 };
#if QT_VERSION >= 0x40600
Q_INTERFACES( QGraphicsItem )
#endif
......@@ -46,6 +48,7 @@ public:
int cursorPos() const { return ( int )pos().x(); }
virtual QRectF boundingRect() const;
void setHeight( int height );
virtual int type() const { return Type; }
protected:
virtual void paint( QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget = 0 );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment