Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkAlgorithmListModel Class Reference

Qt table model representing a list of MatchPoint registration algorithm DLL handles. More...

#include <QmitkAlgorithmListModel.h>

Public Member Functions

 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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ QmitkAlgorithmListModel()

QmitkAlgorithmListModel::QmitkAlgorithmListModel ( QObject *  parent = nullptr)

Constructs the algorithm list model.

Parameters
[in]parentOptional parent QObject for Qt memory management.

◆ ~QmitkAlgorithmListModel()

QmitkAlgorithmListModel::~QmitkAlgorithmListModel ( )
inlineoverride

Destructor.

Definition at line 53 of file QmitkAlgorithmListModel.h.

Member Function Documentation

◆ columnCount()

int QmitkAlgorithmListModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
override

Returns the number of columns in the model.

Parameters
[in]parentThe 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]indexThe model index to query.
[in]roleThe 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]indexThe 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]sectionThe column index.
[in]orientationThe header orientation (only Qt::Horizontal is handled).
[in]roleThe 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]parentThe 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]algListList of MatchPoint DLLInfo smart pointers describing the available algorithms.

The documentation for this class was generated from the following file: