- QRectF boundingRect() const {
- qreal penWidth = 1;
- QRectF result(- penWidth / 2, - penWidth / 2,
- width + penWidth, height + penWidth);
- return result;
- }
-
- void mouseMoveEvent(QGraphicsSceneMouseEvent * event) {
- QGraphicsItem::mouseMoveEvent(event);
- scene()->update();
- }
-
- QPointF getEntry() const {
- return mapToScene(QPointF(width/2, 0));
- }
-
- std::array<QPointF, 3> getExits() const {
- return { { mapToScene(QPointF( width/3, height)),
- mapToScene(QPointF( width/2, height)),
- mapToScene(QPointF(2*width/3, height)) } };
- }
+ void mouseMoveEvent(QGraphicsSceneMouseEvent * event)
+ { QGraphicsItem::mouseMoveEvent(event); scene()->update(); }