Qt table model representing a list of MatchPoint registration algorithm DLL handles.
More...
#include <QmitkAlgorithmListModel.h>
|
| | QmitkAlgorithmListModel (QObject *parent=nullptr) |
| | Constructs the algorithm list model. More...
|
| |
| | ~QmitkAlgorithmListModel () override |
| | Destructor. More...
|
| |
| void | SetAlgorithms (::map::deployment::DLLDirectoryBrowser::DLLInfoListType algList) |
| | Sets the list of algorithm DLL info objects to be displayed. 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 given section, orientation, and role. More...
|
| |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
| | Returns the number of rows (algorithms) in the model. More...
|
| |
| int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
| | Returns the number of columns in the model. More...
|
| |
Qt table model representing a list of MatchPoint registration algorithm DLL handles.
This model wraps a list of MatchPoint algorithm DLLInfo objects and exposes them as a four-column table suitable for use in any QAbstractItemView. The columns are:
- Column 0: Algorithm name
- Column 1: Algorithm namespace
- Column 2: Algorithm version
- Column 3: Keywords (semicolon-separated)
The Qt::UserRole returns the row index of the item, which can be used to retrieve the corresponding DLLInfo from the original list.
- See also
- QmitkAlgorithmProfileViewer, QmitkAlgorithmSettingsConfig
Definition at line 41 of file QmitkAlgorithmListModel.h.
◆ QmitkAlgorithmListModel()
| QmitkAlgorithmListModel::QmitkAlgorithmListModel |
( |
QObject * |
parent = nullptr | ) |
|
Constructs the algorithm list model.
- Parameters
-
| [in] | parent | Optional parent QObject for Qt memory management. |
◆ ~QmitkAlgorithmListModel()
| QmitkAlgorithmListModel::~QmitkAlgorithmListModel |
( |
| ) |
|
|
inlineoverride |
◆ columnCount()
| int QmitkAlgorithmListModel::columnCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
override |
Returns the number of columns in the model.
- Parameters
-
| [in] | parent | The parent index. Must be invalid for a flat table model. |
- Returns
- Always 4 (Name, Namespace, Version, Keywords), or 0 if the parent is valid.
◆ data()
| QVariant QmitkAlgorithmListModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role |
|
) |
| const |
|
override |
Returns data for the given model index and role.
For Qt::DisplayRole, returns the algorithm name (column 0), namespace (column 1), version (column 2), or keywords (column 3). For Qt::UserRole, returns the row index.
- Parameters
-
| [in] | index | The model index to query. |
| [in] | role | The data role (e.g., Qt::DisplayRole, Qt::UserRole). |
- Returns
- A QVariant containing the requested data, or an invalid QVariant if the index is invalid.
◆ flags()
| Qt::ItemFlags QmitkAlgorithmListModel::flags |
( |
const QModelIndex & |
index | ) |
const |
|
override |
Returns item flags for the given model index.
- Parameters
-
| [in] | index | The model index to query. |
- Returns
- Default item flags from QAbstractItemModel.
◆ headerData()
| QVariant QmitkAlgorithmListModel::headerData |
( |
int |
section, |
|
|
Qt::Orientation |
orientation, |
|
|
int |
role |
|
) |
| const |
|
override |
Returns header data for the given section, orientation, and role.
For horizontal headers with Qt::DisplayRole, returns "Name", "Namespace", "Version", or "Keywords" for sections 0–3.
- Parameters
-
| [in] | section | The column index. |
| [in] | orientation | The header orientation (only Qt::Horizontal is handled). |
| [in] | role | The data role. |
- Returns
- A QVariant containing the header label, or an invalid QVariant.
◆ rowCount()
| int QmitkAlgorithmListModel::rowCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
override |
Returns the number of rows (algorithms) in the model.
- Parameters
-
| [in] | parent | The parent index. Must be invalid for a flat table model. |
- Returns
- The number of algorithms, or 0 if the parent is valid.
◆ SetAlgorithms()
| void QmitkAlgorithmListModel::SetAlgorithms |
( |
::map::deployment::DLLDirectoryBrowser::DLLInfoListType |
algList | ) |
|
Sets the list of algorithm DLL info objects to be displayed.
Replaces the current model content with the provided list and triggers a full model reset.
- Parameters
-
| [in] | algList | List of MatchPoint DLLInfo smart pointers describing the available algorithms. |
The documentation for this class was generated from the following file: