Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
The 'QmitkDataStorageSimpleTreeModel' is a basic tree 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'. This model is a "light" version of the classic QmitkDataStorgageTreeModel. The differences between both are the following: More...
#include <QmitkDataStorageSimpleTreeModel.h>
Public Member Functions | |
QmitkDataStorageSimpleTreeModel (QObject *parent) | |
~QmitkDataStorageSimpleTreeModel () override | |
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 |
bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override |
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override |
Qt::ItemFlags | flags (const QModelIndex &index) const override |
![]() | |
~QmitkAbstractDataStorageModel () override | |
void | SetDataStorage (mitk::DataStorage *dataStorage) |
mitk::DataStorage * | GetDataStorage () const |
void | SetNodePredicate (const mitk::NodePredicateBase *nodePredicate) |
const mitk::NodePredicateBase * | GetNodePredicate () const |
Protected Types | |
using | TreeItem = QmitkDataStorageTreeModelInternalItem |
Additional Inherited Members | |
![]() | |
QmitkAbstractDataStorageModel (QObject *parent=nullptr) | |
QmitkAbstractDataStorageModel (mitk::DataStorage *dataStorage, QObject *parent=nullptr) | |
![]() | |
mitk::WeakPointer< mitk::DataStorage > | m_DataStorage |
mitk::NodePredicateBase::ConstPointer | m_NodePredicate |
The 'QmitkDataStorageSimpleTreeModel' is a basic tree 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'. This model is a "light" version of the classic QmitkDataStorgageTreeModel. The differences between both are the following:
Definition at line 36 of file QmitkDataStorageSimpleTreeModel.h.
Definition at line 81 of file QmitkDataStorageSimpleTreeModel.h.
QmitkDataStorageSimpleTreeModel::QmitkDataStorageSimpleTreeModel | ( | QObject * | parent | ) |
Definition at line 21 of file QmitkDataStorageSimpleTreeModel.cpp.
|
override |
Definition at line 27 of file QmitkDataStorageSimpleTreeModel.cpp.
References QmitkDataStorageTreeModelInternalItem::Delete(), and mitk::DataNode::New().
|
override |
Definition at line 178 of file QmitkDataStorageSimpleTreeModel.cpp.
|
override |
Definition at line 183 of file QmitkDataStorageSimpleTreeModel.cpp.
References QmitkNodeDescriptorManager::GetDescriptor(), QmitkNodeDescriptor::GetIcon(), QmitkNodeDescriptorManager::GetInstance(), mitk::DataNode::GetName(), QmitkDataNodeRawPointerRole, and QmitkDataNodeRole.
|
overridevirtual |
Implements QmitkAbstractDataStorageModel.
Definition at line 40 of file QmitkDataStorageSimpleTreeModel.cpp.
References QmitkDataStorageTreeModelInternalItem::Delete().
|
override |
Definition at line 263 of file QmitkDataStorageSimpleTreeModel.cpp.
References QmitkDataStorageTreeModelInternalItem::Find(), QmitkDataStorageTreeModelInternalItem::GetChildren(), QmitkDataStorageTreeModelInternalItem::GetIndex(), mitk::DataNode::GetIntProperty(), index(), QmitkDataStorageTreeModelInternalItem::InsertChild(), mitk::WeakPointer< T >::IsExpired(), mitk::WeakPointer< T >::Lock(), QmitkAbstractDataStorageModel::m_DataStorage, QmitkAbstractDataStorageModel::m_NodePredicate, and NodeAdded().
|
override |
Definition at line 255 of file QmitkDataStorageSimpleTreeModel.cpp.
References QmitkDataStorageTreeModelInternalItem::GetDataNode().
|
override |
Definition at line 115 of file QmitkDataStorageSimpleTreeModel.cpp.
References QmitkDataStorageTreeModelInternalItem::GetChild().
Referenced by flags(), NodeChanged(), and parent().
|
overridevirtual |
Implements QmitkAbstractDataStorageModel.
Definition at line 61 of file QmitkDataStorageSimpleTreeModel.cpp.
References QmitkDataStorageTreeModelInternalItem::Find(), mitk::WeakPointer< T >::IsExpired(), mitk::WeakPointer< T >::Lock(), and QmitkAbstractDataStorageModel::m_DataStorage.
Referenced by flags().
|
overridevirtual |
Implements QmitkAbstractDataStorageModel.
Definition at line 70 of file QmitkDataStorageSimpleTreeModel.cpp.
References QmitkDataStorageTreeModelInternalItem::Find(), QmitkDataStorageTreeModelInternalItem::GetIndex(), QmitkDataStorageTreeModelInternalItem::GetParent(), and index().
|
overridevirtual |
Implements QmitkAbstractDataStorageModel.
Definition at line 53 of file QmitkDataStorageSimpleTreeModel.cpp.
|
overridevirtual |
Implements QmitkAbstractDataStorageModel.
Definition at line 86 of file QmitkDataStorageSimpleTreeModel.cpp.
References QmitkDataStorageTreeModelInternalItem::Find(), QmitkDataStorageTreeModelInternalItem::GetChildren(), QmitkDataStorageTreeModelInternalItem::GetIndex(), and QmitkDataStorageTreeModelInternalItem::GetParent().
|
override |
Definition at line 134 of file QmitkDataStorageSimpleTreeModel.cpp.
References QmitkDataStorageTreeModelInternalItem::GetIndex(), QmitkDataStorageTreeModelInternalItem::GetParent(), and index().
|
override |
Definition at line 169 of file QmitkDataStorageSimpleTreeModel.cpp.
References QmitkDataStorageTreeModelInternalItem::GetChildCount().
|
override |
Definition at line 223 of file QmitkDataStorageSimpleTreeModel.cpp.
References mitk::DataNode::SetName(), and mitk::DataNode::SetVisibility().