Medical Imaging Interaction Toolkit  2025.12.02
Medical Imaging Interaction Toolkit
QmitkFlatLabelInstanceProxyModel Class Reference

A proxy model that flattens a hierarchical content of a QmitkMultiLabelTreeModel instance into a simple list. More...

#include <QmitkFlatLabelInstanceProxyModel.h>

Inheritance diagram for QmitkFlatLabelInstanceProxyModel:
Collaboration diagram for QmitkFlatLabelInstanceProxyModel:

Public Slots

void RebuildMapping ()
 Rebuilds the internal mapping from source indices to flat indices. More...
 

Public Member Functions

 QmitkFlatLabelInstanceProxyModel (QObject *parent=nullptr)
 
QModelIndex mapToSource (const QModelIndex &proxyIndex) const override
 
QModelIndex mapFromSource (const QModelIndex &sourceIndex) const override
 
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const override
 
QModelIndex parent (const QModelIndex &child) const override
 
int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
int columnCount (const QModelIndex &parent=QModelIndex()) const override
 
QVariant data (const QModelIndex &index, int role=Qt::DisplayRole) const override
 
void setSourceModel (QAbstractItemModel *sourceModel) override
 

Detailed Description

A proxy model that flattens a hierarchical content of a QmitkMultiLabelTreeModel instance into a simple list.

It only includes items that have a non-empty QmitkMultiLabelTreeModel::ItemModelRole::LabelInstanceDataRole. So everything in the model tree that counts as an label instance representation.

Definition at line 27 of file QmitkFlatLabelInstanceProxyModel.h.

Constructor & Destructor Documentation

◆ QmitkFlatLabelInstanceProxyModel()

QmitkFlatLabelInstanceProxyModel::QmitkFlatLabelInstanceProxyModel ( QObject *  parent = nullptr)
explicit

Member Function Documentation

◆ columnCount()

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

◆ data()

QVariant QmitkFlatLabelInstanceProxyModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
override

◆ index()

QModelIndex QmitkFlatLabelInstanceProxyModel::index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const
override

◆ mapFromSource()

QModelIndex QmitkFlatLabelInstanceProxyModel::mapFromSource ( const QModelIndex &  sourceIndex) const
override

◆ mapToSource()

QModelIndex QmitkFlatLabelInstanceProxyModel::mapToSource ( const QModelIndex &  proxyIndex) const
override

◆ parent()

QModelIndex QmitkFlatLabelInstanceProxyModel::parent ( const QModelIndex &  child) const
override

◆ RebuildMapping

void QmitkFlatLabelInstanceProxyModel::RebuildMapping ( )
slot

Rebuilds the internal mapping from source indices to flat indices.

◆ rowCount()

int QmitkFlatLabelInstanceProxyModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
override

◆ setSourceModel()

void QmitkFlatLabelInstanceProxyModel::setSourceModel ( QAbstractItemModel *  sourceModel)
override

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