MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / eventFilter

Method eventFilter

pj_plotting/widget/src/PlotDocker.cpp:432–447  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

430}
431
432bool PlotDocker::eventFilter(QObject* watched, QEvent* event) {
433 const QEvent::Type type = event->type();
434 if (focus_overlay_ != nullptr && (type == QEvent::Enter || type == QEvent::Leave)) {
435 // Walk up from the watched child (canvas or axis widget) to its
436 // containing DockWidget so we can hand the overlay its CDockAreaWidget.
437 for (QObject* node = watched; node != nullptr; node = node->parent()) {
438 auto* dock_widget = qobject_cast<ads::CDockWidget*>(node);
439 if (dock_widget == nullptr) {
440 continue;
441 }
442 focus_overlay_->setHoveredArea(type == QEvent::Enter ? dock_widget->dockAreaWidget() : nullptr);
443 break;
444 }
445 }
446 return ads::CDockManager::eventFilter(watched, event);
447}
448
449void PlotDocker::setDataServices(SessionManager* session, CatalogModel* catalog) {
450 session_ = session;

Callers

nothing calls this directly

Calls 3

eventFilterFunction · 0.85
setHoveredAreaMethod · 0.80
typeMethod · 0.45

Tested by

no test coverage detected