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

Function isInsideHostComposite

pj_dialog_host/src/widget_adapters.cpp:376–383  ·  view source on GitHub ↗

True when `widget` lives inside one of the host composite widgets that manage their own internal child controls (CredentialsEditor's allow-insecure box, DateRangePicker's sub-widgets). Those internals are opaque — adapting a checkbox buried in them would corrupt the composite, so they are left alone.

Source from the content-addressed store, hash-verified

374// DateRangePicker's sub-widgets). Those internals are opaque — adapting a
375// checkbox buried in them would corrupt the composite, so they are left alone.
376static bool isInsideHostComposite(const QWidget* widget) {
377 for (QWidget* p = widget->parentWidget(); p != nullptr; p = p->parentWidget()) {
378 if (qobject_cast<CredentialsEditor*>(p) != nullptr || qobject_cast<DateRangePicker*>(p) != nullptr) {
379 return true;
380 }
381 }
382 return false;
383}
384
385// Push the checkbox's current state onto its ToggleSwitch (keeping it hidden).
386static void syncToggleFromCheckBox(QCheckBox* checkbox) {

Callers 3

tryAdaptCheckBoxFunction · 0.85
adaptComboBoxesFunction · 0.85
adaptScrollAreasFunction · 0.85

Calls 1

parentWidgetMethod · 0.45

Tested by

no test coverage detected