| 1642 | } |
| 1643 | |
| 1644 | bool Viewer::eventFilter(QObject *obj, QEvent *event) |
| 1645 | { |
| 1646 | if (obj == continuousWidget && event->type() == QEvent::MouseMove) { |
| 1647 | auto *mouseEvent = static_cast<QMouseEvent *>(event); |
| 1648 | // Map position from continuousWidget coords to Viewer coords so the |
| 1649 | // go-to-flow proximity check and cursor management work correctly. |
| 1650 | QPointF viewerPos = mapFromGlobal(mouseEvent->globalPosition().toPoint()); |
| 1651 | QMouseEvent mappedEvent(mouseEvent->type(), |
| 1652 | viewerPos, |
| 1653 | mouseEvent->globalPosition(), |
| 1654 | mouseEvent->button(), |
| 1655 | mouseEvent->buttons(), |
| 1656 | mouseEvent->modifiers()); |
| 1657 | mouseHandler->mouseMoveEvent(&mappedEvent); |
| 1658 | // Consume this event so we don't process the same drag movement again |
| 1659 | // via Viewer::mouseMoveEvent() after bubbling. |
| 1660 | event->accept(); |
| 1661 | return true; |
| 1662 | } |
| 1663 | return QScrollArea::eventFilter(obj, event); |
| 1664 | } |
| 1665 | |
| 1666 | void Viewer::setActiveWidget(QWidget *w) |
| 1667 | { |
nothing calls this directly
no test coverage detected