QetShapeItem : improve mouse interaction

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@3512 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
blacksun
2014-11-24 17:36:02 +00:00
parent 80e78b4e04
commit dec5d3002c
2 changed files with 55 additions and 21 deletions

View File

@@ -68,6 +68,8 @@ class QetShapeItem : public QetGraphicsItem
protected:
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
virtual void hoverEnterEvent (QGraphicsSceneHoverEvent *event);
virtual void hoverLeaveEvent (QGraphicsSceneHoverEvent *event);
private:
void changeGraphicsItem (const ShapeType &newtype);
@@ -81,5 +83,6 @@ class QetShapeItem : public QetGraphicsItem
Qt::PenStyle m_shapeStyle;
QPointF m_P1, m_P2;
QPolygonF m_polygon;
bool m_hovered;
};
#endif // QETSHAPEITEM_H