| 179 | } |
| 180 | |
| 181 | void CustomPointPrivate::paint(QPainter* painter, const QStyleOptionGraphicsItem* /*option*/, QWidget*) { |
| 182 | if (!insidePlot) |
| 183 | return; |
| 184 | |
| 185 | if (symbol->style() != Symbol::Style::NoSymbols) { |
| 186 | painter->setOpacity(symbol->opacity()); |
| 187 | painter->setPen(symbol->pen()); |
| 188 | painter->setBrush(symbol->brush()); |
| 189 | painter->drawPath(m_shape); |
| 190 | } |
| 191 | |
| 192 | if (m_hovered && !isSelected() && !q->isPrinting()) { |
| 193 | painter->setPen(QPen(QApplication::palette().color(QPalette::Shadow), 2, Qt::SolidLine)); |
| 194 | painter->drawPath(m_shape); |
| 195 | } |
| 196 | |
| 197 | if (isSelected() && !q->isPrinting()) { |
| 198 | painter->setPen(QPen(QApplication::palette().color(QPalette::Highlight), 2, Qt::SolidLine)); |
| 199 | painter->drawPath(m_shape); |
| 200 | } |
| 201 | } |
| 202 | |
| 203 | void CustomPointPrivate::mouseReleaseEvent(QGraphicsSceneMouseEvent* event) { |
| 204 | // don't move when the parent is a InfoElement, because there |
nothing calls this directly
no test coverage detected