MCPcopy Create free account
hub / github.com/KDAB/KDChart / mouseMoveEvent

Method mouseMoveEvent

src/KDChart/KDChartChart.cpp:1683–1705  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1681}
1682
1683void Chart::mouseMoveEvent(QMouseEvent *event)
1684{
1685 auto eventReceivers =
1686#if QT_VERSION > QT_VERSION_CHECK(5, 14, 0)
1687 QSet<AbstractCoordinatePlane *>(d->mouseClickedPlanes.begin(), d->mouseClickedPlanes.end());
1688#else
1689 QSet<AbstractCoordinatePlane *>::fromList(d->mouseClickedPlanes);
1690#endif
1691
1692 Q_FOREACH (AbstractCoordinatePlane *plane, d->coordinatePlanes) {
1693 if (plane->geometry().contains(event->pos()) && plane->diagrams().size() > 0) {
1694 eventReceivers.insert(plane);
1695 }
1696 }
1697
1698 const QPoint pos = mapFromGlobal(event->globalPos());
1699
1700 Q_FOREACH (AbstractCoordinatePlane *plane, eventReceivers) {
1701 QMouseEvent ev(QEvent::MouseMove, pos, event->globalPos(),
1702 event->button(), event->buttons(), event->modifiers());
1703 plane->mouseMoveEvent(&ev);
1704 }
1705}
1706
1707void Chart::mouseReleaseEvent(QMouseEvent *event)
1708{

Callers 1

Q_FOREACHFunction · 0.45

Calls 6

sizeMethod · 0.80
Q_FOREACHFunction · 0.70
beginMethod · 0.45
endMethod · 0.45
geometryMethod · 0.45
diagramsMethod · 0.45

Tested by

no test coverage detected