Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
QmitkDataStorageDefaultListModel Class Reference

The 'QmitkDataStorageDefaultListModel' is a basic list model, derived from the 'QmitkAbstractDataStorageModel'. It provides functions to accept a data storage and a node predicate in order to customize the model data nodes. Furthermore it overrides the functions of 'QAbstractItemModel' to create a simple qt list model. This model can be used in conjunction with a 'QmitkDataStorageSelectionConnector'. More...

#include <QmitkDataStorageDefaultListModel.h>

Inheritance diagram for QmitkDataStorageDefaultListModel:
Collaboration diagram for QmitkDataStorageDefaultListModel:

Public Member Functions

 QmitkDataStorageDefaultListModel (QObject *parent)
 
void DataStorageChanged () override
 
void NodePredicateChanged () override
 
void NodeAdded (const mitk::DataNode *node) override
 
void NodeChanged (const mitk::DataNode *node) override
 
void NodeRemoved (const mitk::DataNode *node) 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
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 
- Public Member Functions inherited from QmitkAbstractDataStorageModel
 ~QmitkAbstractDataStorageModel () override
 
void SetDataStorage (mitk::DataStorage *dataStorage)
 
mitk::DataStorage::Pointer GetDataStorage () const
 
void SetNodePredicate (const mitk::NodePredicateBase *nodePredicate)
 
const mitk::NodePredicateBaseGetNodePredicate () const
 

Protected Member Functions

virtual void UpdateModelData ()
 
- Protected Member Functions inherited from QmitkAbstractDataStorageModel
 QmitkAbstractDataStorageModel (QObject *parent=nullptr)
 
 QmitkAbstractDataStorageModel (mitk::DataStorage *dataStorage, QObject *parent=nullptr)
 

Protected Attributes

std::vector< mitk::DataNode::Pointerm_DataNodes
 
- Protected Attributes inherited from QmitkAbstractDataStorageModel
mitk::WeakPointer< mitk::DataStoragem_DataStorage
 
mitk::NodePredicateBase::ConstPointer m_NodePredicate
 

Detailed Description

The 'QmitkDataStorageDefaultListModel' is a basic list model, derived from the 'QmitkAbstractDataStorageModel'. It provides functions to accept a data storage and a node predicate in order to customize the model data nodes. Furthermore it overrides the functions of 'QAbstractItemModel' to create a simple qt list model. This model can be used in conjunction with a 'QmitkDataStorageSelectionConnector'.

Definition at line 27 of file QmitkDataStorageDefaultListModel.h.

Constructor & Destructor Documentation

◆ QmitkDataStorageDefaultListModel()

QmitkDataStorageDefaultListModel::QmitkDataStorageDefaultListModel ( QObject *  parent)

Member Function Documentation

◆ columnCount()

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

◆ data()

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

◆ DataStorageChanged()

void QmitkDataStorageDefaultListModel::DataStorageChanged ( )
overridevirtual

◆ flags()

Qt::ItemFlags QmitkDataStorageDefaultListModel::flags ( const QModelIndex &  index) const
override

◆ headerData()

QVariant QmitkDataStorageDefaultListModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const
override

◆ index()

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

◆ NodeAdded()

void QmitkDataStorageDefaultListModel::NodeAdded ( const mitk::DataNode node)
overridevirtual

◆ NodeChanged()

void QmitkDataStorageDefaultListModel::NodeChanged ( const mitk::DataNode node)
overridevirtual

◆ NodePredicateChanged()

void QmitkDataStorageDefaultListModel::NodePredicateChanged ( )
overridevirtual

◆ NodeRemoved()

void QmitkDataStorageDefaultListModel::NodeRemoved ( const mitk::DataNode node)
overridevirtual

◆ parent()

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

◆ rowCount()

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

◆ UpdateModelData()

virtual void QmitkDataStorageDefaultListModel::UpdateModelData ( )
protectedvirtual

Reimplemented in QmitkDataStorageHistoryModel.

Member Data Documentation

◆ m_DataNodes

std::vector<mitk::DataNode::Pointer> QmitkDataStorageDefaultListModel::m_DataNodes
protected

Definition at line 74 of file QmitkDataStorageDefaultListModel.h.


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