13 #ifndef QmitkDataStorageDefaultListModel_h
14 #define QmitkDataStorageDefaultListModel_h
76 QModelIndex
index(
int row,
int column,
const QModelIndex &parent = QModelIndex())
const override;
83 QModelIndex
parent(
const QModelIndex &child)
const override;
90 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
97 int columnCount(
const QModelIndex &parent = QModelIndex())
const override;
109 QVariant
data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const override;
118 QVariant
headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const override;
125 Qt::ItemFlags
flags(
const QModelIndex &index)
const override;
Abstract base class extending QAbstractItemModel for DataStorage-backed models.
A flat list model that exposes DataStorage nodes matching an optional predicate.
void NodeRemoved(const mitk::DataNode *node) override
Called when a node is removed from the data storage.
QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
Returns header data for the given section and orientation.
void DataStorageChanged() override
Called when the data storage has changed. Rebuilds the model data.
QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Returns data for the given index and role.
QmitkDataStorageDefaultListModel(QObject *parent)
Constructs the model.
QModelIndex parent(const QModelIndex &child) const override
Returns the parent index. Always returns an invalid index (flat model).
QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
Returns the model index for the given row and column.
void NodeAdded(const mitk::DataNode *node) override
Called when a node is added to the data storage.
int rowCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of rows (nodes) in the model.
int columnCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of columns. Always returns 1.
Qt::ItemFlags flags(const QModelIndex &index) const override
Returns the item flags for the given index.
void NodePredicateChanged() override
Called when the node predicate has changed. Rebuilds the model data.
std::vector< mitk::DataNode::Pointer > m_DataNodes
void NodeChanged(const mitk::DataNode *node) override
Called when a node in the data storage has changed.
virtual void UpdateModelData()
Central node class of the MITK data tree, associating a data object with properties and mappers.