| 112 | } |
| 113 | |
| 114 | QPainterPath TOPPASEdge::shape() const |
| 115 | { |
| 116 | QPainterPath shape_1; |
| 117 | shape_1.moveTo(startPos() + QPointF(-10, -10)); |
| 118 | shape_1.lineTo(endPos() + QPointF(-10, -10)); |
| 119 | shape_1.lineTo(endPos() + QPointF(10, 10)); |
| 120 | shape_1.lineTo(startPos() + QPointF(10, 10)); |
| 121 | shape_1.closeSubpath(); |
| 122 | |
| 123 | QPainterPath shape_2; |
| 124 | shape_2.moveTo(startPos() + QPointF(-10, 10)); |
| 125 | shape_2.lineTo(endPos() + QPointF(-10, 10)); |
| 126 | shape_2.lineTo(endPos() + QPointF(10, -10)); |
| 127 | shape_2.lineTo(startPos() + QPointF(10, -10)); |
| 128 | shape_2.closeSubpath(); |
| 129 | |
| 130 | return shape_1.united(shape_2); |
| 131 | } |
| 132 | |
| 133 | void TOPPASEdge::paint(QPainter* painter, const QStyleOptionGraphicsItem* /*option*/, QWidget* /*widget*/) |
| 134 | { |