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

Method onStylesheetChanged

pj_plotting/widget/src/CurveEditor.cpp:465–486  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

463}
464
465void CurveEditor::onStylesheetChanged(QString theme) {
466 current_theme_ = std::move(theme);
467 // Header chrome icons: search glyph + kebab.
468 ui_->buttonSearchCurves->setIcon(loadSvg(":/resources/svg/search_light.svg", current_theme_));
469 ui_->buttonCurvesMenu->setIcon(loadSvg(":/resources/svg/more_vert.svg", current_theme_));
470 // Re-tint every row's visibility + trash toggles to the new theme ink.
471 // The buttons are owned by the row widgets stored as itemWidget on each
472 // QListWidgetItem; QObject::findChildren walks that subtree.
473 for (int i = 0; i < ui_->listWidget->count(); ++i) {
474 QWidget* row = ui_->listWidget->itemWidget(ui_->listWidget->item(i));
475 if (row == nullptr) {
476 continue;
477 }
478 for (auto* button : row->findChildren<QToolButton*>()) {
479 if (button->property(kVisibilityButtonProperty).isValid()) {
480 button->setIcon(loadSvg(button->isChecked() ? kVisibilityOnPath : kVisibilityOffPath, current_theme_));
481 } else if (button->property(kTrashButtonProperty).isValid()) {
482 button->setIcon(loadSvg(kTrashIconPath, current_theme_));
483 }
484 }
485 }
486}
487
488void CurveEditor::onFilterChanged(const QString& /*text*/) {
489 applyFilter();

Callers

nothing calls this directly

Calls 4

setIconMethod · 0.45
countMethod · 0.45
isValidMethod · 0.45
isCheckedMethod · 0.45

Tested by

no test coverage detected