- return QRectF(x - penWidth / 2, y - penWidth / 2,
- dx + penWidth, dy + penWidth);
+ 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)) } };