! * \brief CartesianPlot::childHovered * Unhover all curves, when another child is hovered. The hover handling for the curves is done in their parent (CartesianPlot), * because the hover should set when the curve is hovered and not just the bounding rect (for more see hoverMoveEvent) */
| 2593 | * because the hover should set when the curve is hovered and not just the bounding rect (for more see hoverMoveEvent) |
| 2594 | */ |
| 2595 | void CartesianPlot::childHovered() { |
| 2596 | Q_D(CartesianPlot); |
| 2597 | bool curveSender = qobject_cast<XYCurve*>(QObject::sender()) != nullptr; |
| 2598 | if (!d->isSelected()) { |
| 2599 | if (isHovered()) |
| 2600 | setHover(false); |
| 2601 | else |
| 2602 | d->update(); // realy needed? |
| 2603 | } |
| 2604 | if (!curveSender) { |
| 2605 | for (auto curve : children<XYCurve>()) |
| 2606 | curve->setHover(false); |
| 2607 | } |
| 2608 | } |
| 2609 | |
| 2610 | void CartesianPlot::updateLegend() { |
| 2611 | if (m_legend) |
nothing calls this directly
no test coverage detected