Reusable UI widget for selecting detection models and configuring class selection.
More...
#include <ModelSettingsWidget.h>
|
| void | modelChanged (const QString &modelName, bool isValid) |
| | Emitted when user selects a different model.
|
| |
| void | classSelectionChanged (const QVector< uint > &selectedClassIds) |
| | Emitted when user changes class selection.
|
| |
|
void | modelConfigChanged () |
| | Emitted when any model configuration parameter changes This includes normalizeTo01, applyMeanStd, or inputAlignment changes.
|
| |
|
| | ModelSettingsWidget (ModelManager &manager, QWidget *parent=nullptr) |
| | Construct the settings widget.
|
| |
|
| ~ModelSettingsWidget ()=default |
| | Destructor.
|
| |
|
void | refreshModelList () |
| | Refresh the model list from the manager Call this after the manager's refresh() method or when models change.
|
| |
| bool | setSelectedModel (const QString &modelName) |
| | Set the currently selected model.
|
| |
| QString | selectedModel () const |
| | Get the currently selected model name.
|
| |
| QVector< uint > | selectedClassIds () const |
| | Get the class selection state for the current model.
|
| |
| void | setSelectedClassIds (const QVector< uint > &classIds) |
| | Set which classes are selected (by class ID)
|
| |
|
|
void | updateModelDisplay () |
| | Update the display based on currently selected model.
|
| |
|
void | updateClassList () |
| | Rebuild the class checkbox list.
|
| |
|
void | showModelError (ModelManager::ModelState state, const QString &errorMessage) |
| | Show error message for invalid model.
|
| |
|
void | setupUi () |
| | Create all UI elements.
|
| |
|
void | setupManagerConnections () |
| | Setup connections to ModelManager signals/slots.
|
| |
|
QString | getResolutionHint (ModelManager::ModelState state) const |
| | Get human-readable hint for resolving model errors.
|
| |
|
QString | getStateString (ModelManager::ModelState state) const |
| | Get human-readable string for model state.
|
| |
|
void | updateConfigurationSection () |
| | Update configuration section with current model config.
|
| |
|
void | checkConfigurationChanges () |
| | Check if configuration has changed from original values.
|
| |
Reusable UI widget for selecting detection models and configuring class selection.
This widget integrates with ModelManager to:
- Display all available models (valid and invalid) in a dropdown
- Show classes as checkboxes for valid models
- Display error messages for invalid models with resolution hints
- Emit signals when model or class selection changes
The widget automatically handles model state (Ready, MissingModel, InvalidConfig, etc.) and provides appropriate feedback to the user.
The underlying model-config format is documented in ModelConfig.md.
- Author
- Dominik Wüst (domin.nosp@m.ik.w.nosp@m.uest@.nosp@m.iosb.nosp@m..frau.nosp@m.nhof.nosp@m.er.de)
- Date
- March 2026
◆ ModelSettingsWidget()
| MCFG::ModelSettingsWidget::ModelSettingsWidget |
( |
ModelManager & |
manager, |
|
|
QWidget * |
parent = nullptr |
|
) |
| |
|
explicit |
Construct the settings widget.
- Parameters
-
| manager | Reference to the model manager (must outlive this widget) |
| parent | Parent widget |
◆ classSelectionChanged
| void MCFG::ModelSettingsWidget::classSelectionChanged |
( |
const QVector< uint > & |
selectedClassIds | ) |
|
|
signal |
Emitted when user changes class selection.
- Parameters
-
| selectedClassIds | Vector of class IDs that are now selected |
◆ modelChanged
| void MCFG::ModelSettingsWidget::modelChanged |
( |
const QString & |
modelName, |
|
|
bool |
isValid |
|
) |
| |
|
signal |
Emitted when user selects a different model.
- Parameters
-
| modelName | Name of the newly selected model |
| isValid | true if the model is valid and ready, false if it has errors |
◆ selectedClassIds()
| QVector< uint > MCFG::ModelSettingsWidget::selectedClassIds |
( |
| ) |
const |
Get the class selection state for the current model.
- Returns
- Vector of class IDs that are currently selected
◆ selectedModel()
| QString MCFG::ModelSettingsWidget::selectedModel |
( |
| ) |
const |
Get the currently selected model name.
- Returns
- Name of the selected model, or empty string if none selected
◆ setSelectedClassIds()
| void MCFG::ModelSettingsWidget::setSelectedClassIds |
( |
const QVector< uint > & |
classIds | ) |
|
Set which classes are selected (by class ID)
- Parameters
-
| classIds | Vector of class IDs to select |
◆ setSelectedModel()
| bool MCFG::ModelSettingsWidget::setSelectedModel |
( |
const QString & |
modelName | ) |
|
Set the currently selected model.
- Parameters
-
| modelName | Name of the model to select |
- Returns
- true if model was found and selected, false otherwise
The documentation for this class was generated from the following files:
- iVS3D/src/iVS3D-modelConfig/include/ModelSettingsWidget.h
- iVS3D/src/iVS3D-modelConfig/src/ModelSettingsWidget.cpp