| 430 | } |
| 431 | |
| 432 | bool 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 | |
| 449 | void PlotDocker::setDataServices(SessionManager* session, CatalogModel* catalog) { |
| 450 | session_ = session; |
nothing calls this directly
no test coverage detected