Medical Imaging Interaction Toolkit  2024.06.00
Medical Imaging Interaction Toolkit
QmitkDataStorageHistoryModel Class Reference

Internal DataStorage model to represent the history of node selections. More...

#include <QmitkDataStorageHistoryModel.h>

Inheritance diagram for QmitkDataStorageHistoryModel:
Collaboration diagram for QmitkDataStorageHistoryModel:

Public Member Functions

 QmitkDataStorageHistoryModel (QObject *parent)
 
- Public Member Functions inherited from QmitkDataStorageDefaultListModel
 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
 

Static Public Member Functions

static void AddNodeToHistory (mitk::DataNode *node)
 
static void ResetHistory ()
 

Protected Member Functions

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

Additional Inherited Members

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

Detailed Description

Internal DataStorage model to represent the history of node selections.

The model will present all nodes in the history under the following conditions

  • the nodes are sorted by selection time (lifo -> last is first)
  • node must be in the storage
  • node must be valid
  • node will only be in the history once.

Definition at line 31 of file QmitkDataStorageHistoryModel.h.

Constructor & Destructor Documentation

◆ QmitkDataStorageHistoryModel()

QmitkDataStorageHistoryModel::QmitkDataStorageHistoryModel ( QObject *  parent)

Member Function Documentation

◆ AddNodeToHistory()

static void QmitkDataStorageHistoryModel::AddNodeToHistory ( mitk::DataNode node)
static

Adds the passed node to the history. If the node is already in the history, old instances will be removed. If the passed node is nullptr, it will be ignored.

◆ ResetHistory()

static void QmitkDataStorageHistoryModel::ResetHistory ( )
static

◆ UpdateModelData()

void QmitkDataStorageHistoryModel::UpdateModelData ( )
overrideprotectedvirtual

Reimplemented from QmitkDataStorageDefaultListModel.


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