|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Qt table model exposing the meta-properties of a MatchPoint registration algorithm. More...
#include <QmitkMAPAlgorithmModel.h>


Public Member Functions | |
| QmitkMAPAlgorithmModel (QObject *parent=nullptr) | |
| Constructs the algorithm model. More... | |
| ~QmitkMAPAlgorithmModel () override | |
| Destructor. More... | |
| void | SetAlgorithm (map::algorithm::RegistrationAlgorithmBase *pAlgorithm) |
| Sets the algorithm whose meta-properties should be displayed. More... | |
| void | SetAlgorithm (map::algorithm::facet::MetaPropertyAlgorithmInterface *pMetaInterface) |
| Sets the meta-property interface directly as data source. More... | |
| Qt::ItemFlags | flags (const QModelIndex &index) const override |
| Returns item flags for the given model index. More... | |
| QVariant | data (const QModelIndex &index, int role) const override |
| Returns data for the given model index and role. More... | |
| QVariant | headerData (int section, Qt::Orientation orientation, int role) const override |
| Returns header data for the table columns. More... | |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
| Returns the number of rows (meta-properties) in the model. More... | |
| int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
| Returns the number of columns in the model. More... | |
| bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override |
| Sets a property value at the given index. More... | |
Qt table model exposing the meta-properties of a MatchPoint registration algorithm.
This model wraps the MetaPropertyAlgorithmInterface of a MatchPoint algorithm and presents its configurable properties as a two-column table (Property / Value). An algorithm can be set as data source; the model retrieves all information through the MetaPropertyInterface. Editable properties (writable meta-properties) can be modified directly through the model, and changes are propagated back into the algorithm.
Supported meta-property types for display and editing: bool, int, unsigned int, long, unsigned long, float, double, and map::core::String. Unsupported types are shown with an error message.
Definition at line 46 of file QmitkMAPAlgorithmModel.h.
| QmitkMAPAlgorithmModel::QmitkMAPAlgorithmModel | ( | QObject * | parent = nullptr | ) |
Constructs the algorithm model.
| [in] | parent | Optional parent QObject for Qt memory management. |
|
inlineoverride |
Destructor.
Definition at line 58 of file QmitkMAPAlgorithmModel.h.
|
override |
Returns the number of columns in the model.
| [in] | parent | The parent index. Must be invalid for a flat table model. |
|
override |
Returns data for the given model index and role.
Column 0 returns the property name (Qt::DisplayRole). Column 1 returns the property value for Qt::DisplayRole and Qt::EditRole (if the property is readable/writable).
| [in] | index | The model index to query. |
| [in] | role | The data role. |
|
override |
Returns item flags for the given model index.
Items in the value column (column 1) are editable if the corresponding meta-property is writable and its type is supported.
| [in] | index | The model index to query. |
|
override |
Returns header data for the table columns.
Provides "Property" for column 0 and "Value" for column 1 (Qt::DisplayRole, Qt::Horizontal).
| [in] | section | The column index. |
| [in] | orientation | The header orientation. |
| [in] | role | The data role. |
|
override |
Returns the number of rows (meta-properties) in the model.
| [in] | parent | The parent index. Must be invalid for a flat table model. |
| void QmitkMAPAlgorithmModel::SetAlgorithm | ( | map::algorithm::facet::MetaPropertyAlgorithmInterface * | pMetaInterface | ) |
Sets the meta-property interface directly as data source.
Resets the model and refreshes the property list from the given interface.
| [in] | pMetaInterface | Pointer to the meta-property interface. May be nullptr to clear. |
| void QmitkMAPAlgorithmModel::SetAlgorithm | ( | map::algorithm::RegistrationAlgorithmBase * | pAlgorithm | ) |
Sets the algorithm whose meta-properties should be displayed.
Attempts to cast the algorithm to MetaPropertyAlgorithmInterface and delegates to the overload accepting that interface.
| [in] | pAlgorithm | Pointer to the registration algorithm. May be nullptr to clear. |
|
override |
Sets a property value at the given index.
Only operates on column 1 with Qt::EditRole. Attempts to cast the QVariant value to the matching meta-property type and writes it back to the algorithm. If successful, the model is reset to reflect the change.
| [in] | index | The model index (must be in column 1). |
| [in] | value | The new value to set. |
| [in] | role | Must be Qt::EditRole. |