| 1040 | } |
| 1041 | |
| 1042 | void InfoElementPrivate::paint(QPainter* painter, const QStyleOptionGraphicsItem*, QWidget*) { |
| 1043 | if (!insidePlot || !valid) |
| 1044 | return; |
| 1045 | |
| 1046 | if (q->markerpoints.isEmpty()) |
| 1047 | return; |
| 1048 | |
| 1049 | // do not draw connection line when the label is not visible |
| 1050 | if (connectionLine->style() != Qt::NoPen && q->m_title->isVisible() && !m_connectionLine.isNull()) { |
| 1051 | painter->setOpacity(connectionLine->opacity()); |
| 1052 | painter->setPen(connectionLine->pen()); |
| 1053 | painter->drawLine(m_connectionLine); |
| 1054 | } |
| 1055 | |
| 1056 | // draw vertical line, which connects all points together |
| 1057 | if (verticalLine->style() != Qt::NoPen && !xposLine.isNull()) { |
| 1058 | painter->setOpacity(verticalLine->opacity()); |
| 1059 | painter->setPen(verticalLine->pen()); |
| 1060 | painter->drawLine(xposLine); |
| 1061 | } |
| 1062 | } |
| 1063 | |
| 1064 | void InfoElementPrivate::mousePressEvent(QGraphicsSceneMouseEvent* event) { |
| 1065 | if (event->button() == Qt::MouseButton::LeftButton) { |
nothing calls this directly
no test coverage detected