MCPcopy Create free account
hub / github.com/BatchDrake/SigDigger / refreshInspectorCombo

Method refreshInspectorCombo

Default/Inspection/InspToolWidget.cpp:78–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78void
79InspToolWidget::refreshInspectorCombo()
80{
81 std::string factory = this->panelConfig->inspFactory;
82 Suscan::Singleton *sus = Suscan::Singleton::get_instance();
83
84 int index = -1;
85 int i = 0;
86
87 this->ui->inspectorCombo->clear();
88
89 for (auto p = sus->getFirstInspectionWidgetFactory();
90 p != sus->getLastInspectionWidgetFactory();
91 ++p, ++i) {
92 this->ui->inspectorCombo->addItem(
93 QString((*p)->description()),
94 QVariant::fromValue<QString>((*p)->name()));
95
96 if ((*p)->name() == factory)
97 index = i;
98 }
99
100 this->ui->inspectorCombo->setEnabled(index != -1);
101
102 if (index != -1)
103 this->ui->inspectorCombo->setCurrentIndex(index);
104
105 this->refreshUi();
106}
107
108void
109InspToolWidget::applyConfig(void)

Callers 1

applyConfigMethod · 0.95

Calls 7

clearMethod · 0.45
descriptionMethod · 0.45
nameMethod · 0.45
setEnabledMethod · 0.45
refreshUiMethod · 0.45

Tested by

no test coverage detected