| 109 | } |
| 110 | |
| 111 | void SegmentPrivate::paint(QPainter* painter, const QStyleOptionGraphicsItem* /*option*/, QWidget*) { |
| 112 | painter->setPen(pen); |
| 113 | painter->drawPath(linePath); |
| 114 | |
| 115 | if (m_hovered && !isSelected()) { |
| 116 | painter->setPen(QPen(QApplication::palette().color(QPalette::Highlight), 2, Qt::SolidLine)); |
| 117 | painter->drawPath(linePath); |
| 118 | } |
| 119 | |
| 120 | // if (isSelected()) { |
| 121 | // painter->setPen(QPen(QApplication::palette().color(QPalette::Highlight), 2, Qt::SolidLine)); |
| 122 | // painter->setOpacity(selectedOpacity); |
| 123 | // painter->drawPath(itemShape); |
| 124 | // } |
| 125 | } |
| 126 | |
| 127 | void SegmentPrivate::hoverEnterEvent(QGraphicsSceneHoverEvent*) { |
| 128 | if (!isSelected()) { |