| 76 | } |
| 77 | |
| 78 | void |
| 79 | InspToolWidget::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 | |
| 108 | void |
| 109 | InspToolWidget::applyConfig(void) |
no test coverage detected