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

Method eventFilter

pj_plotting/widget/src/PlotFocusOverlay.cpp:99–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

97}
98
99bool PlotFocusOverlay::eventFilter(QObject* watched, QEvent* event) {
100 if (watched == container_) {
101 const QEvent::Type type = event->type();
102 if (type == QEvent::Resize || type == QEvent::LayoutRequest) {
103 syncGeometryToContainer();
104 } else if (type == QEvent::ChildAdded || type == QEvent::ChildPolished) {
105 // ADS may add new top-level QSplitters as direct siblings, which
106 // would otherwise stack above us. Bounce back to the top.
107 raise();
108 update();
109 }
110 }
111 return QWidget::eventFilter(watched, event);
112}
113
114void PlotFocusOverlay::syncGeometryToContainer() {
115 setGeometry(container_->rect());

Callers

nothing calls this directly

Calls 2

eventFilterFunction · 0.85
typeMethod · 0.45

Tested by

no test coverage detected