MCPcopy Create free account
hub / github.com/KDE/labplot / childHovered

Method childHovered

src/backend/worksheet/plots/cartesian/CartesianPlot.cpp:2595–2608  ·  view source on GitHub ↗

! * \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) */

Source from the content-addressed store, hash-verified

2593 * because the hover should set when the curve is hovered and not just the bounding rect (for more see hoverMoveEvent)
2594 */
2595void 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
2610void CartesianPlot::updateLegend() {
2611 if (m_legend)

Callers

nothing calls this directly

Calls 3

setHoverMethod · 0.80
isSelectedMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected