Own includes.
More...
#include <QmitkDataStorageTableModel.h>
Own includes.
Toolkit includes. Forward declarations.
A table model for a set of DataNodes defined by a predicate.
Definition at line 36 of file QmitkDataStorageTableModel.h.
◆ QmitkDataStorageTableModel()
◆ ~QmitkDataStorageTableModel()
QmitkDataStorageTableModel::~QmitkDataStorageTableModel |
( |
| ) |
|
|
override |
Standard dtor. Delete predicate, disconnect from DataStorage.
◆ AddNode()
virtual void QmitkDataStorageTableModel::AddNode |
( |
const mitk::DataNode * |
node | ) |
|
|
virtual |
Adds a node to this model. There are two constraints for nodes in this model:
- If a predicate is set (not null) the node will be checked against it.
- The node has to have a data object (no one wants to see empty nodes). Also adds event listeners to the node.
◆ columnCount()
int QmitkDataStorageTableModel::columnCount |
( |
const QModelIndex & |
parent | ) |
const |
|
override |
Overridden from QAbstractTableModel. Returns the number of features (columns) to display.
◆ data()
QVariant QmitkDataStorageTableModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role |
|
) |
| const |
|
override |
Overridden from QAbstractTableModel. Returns the data at index for given role.
◆ flags()
Qt::ItemFlags QmitkDataStorageTableModel::flags |
( |
const QModelIndex & |
index | ) |
const |
|
override |
Overridden from QAbstractTableModel. Returns what can be done with an item.
◆ GetDataStorage()
◆ GetNode()
Get node at a specific model index. Another way to implement this, is by introducing a new role like "DateTreeNode" and capture that in the data function.
◆ GetNodeSet()
virtual std::vector<mitk::DataNode *> QmitkDataStorageTableModel::GetNodeSet |
( |
| ) |
const |
|
virtual |
Returns a copy of the node-vector that is shown by this model
◆ GetPredicate()
◆ headerData()
QVariant QmitkDataStorageTableModel::headerData |
( |
int |
section, |
|
|
Qt::Orientation |
orientation, |
|
|
int |
role |
|
) |
| const |
|
override |
Overridden from QAbstractTableModel. Returns the header data at section for given orientation and role.
◆ PropertyModified()
virtual void QmitkDataStorageTableModel::PropertyModified |
( |
const itk::Object * |
caller, |
|
|
const itk::EventObject & |
event |
|
) |
| |
|
virtual |
Called when a single property was changed. The function searches through the list of nodes in this model for the changed property. If the property was found a dataChanged signal is emitted forcing all observing views to request the data again.
◆ RemoveNode()
virtual void QmitkDataStorageTableModel::RemoveNode |
( |
const mitk::DataNode * |
node | ) |
|
|
virtual |
Removes a node from this model. Also removes any event listener from the node.
◆ Reset()
virtual void QmitkDataStorageTableModel::Reset |
( |
| ) |
|
|
protectedvirtual |
Called when DataStorage or Predicate changed. Resets whole model and reads all nodes in again.
◆ rowCount()
int QmitkDataStorageTableModel::rowCount |
( |
const QModelIndex & |
parent | ) |
const |
|
override |
Overridden from QAbstractTableModel. Returns the node count.
◆ setData()
bool QmitkDataStorageTableModel::setData |
( |
const QModelIndex & |
index, |
|
|
const QVariant & |
value, |
|
|
int |
role |
|
) |
| |
|
override |
Overridden from QAbstractTableModel. Sets data at index for given role.
◆ SetDataStorage()
◆ SetPredicate()
◆ sort()
void QmitkDataStorageTableModel::sort |
( |
int |
column, |
|
|
Qt::SortOrder |
order = Qt::AscendingOrder |
|
) |
| |
|
override |
Reimplemented sort function from QAbstractTableModel to enable sorting on the table.
◆ m_BlockEvents
bool QmitkDataStorageTableModel::m_BlockEvents |
|
protected |
◆ m_DataStorage
Pointer to the DataStorage from which the nodes are selected (remember: in BlueBerry there might be more than one DataStorage). Store it in a weak pointer. This is a GUI class which should not hold a strong reference to any non-GUI Object.
Definition at line 195 of file QmitkDataStorageTableModel.h.
◆ m_NamePropertyModifiedObserverTags
std::map<mitk::BaseProperty *, unsigned long> QmitkDataStorageTableModel::m_NamePropertyModifiedObserverTags |
|
protected |
◆ m_NodeSet
◆ m_Predicate
Holds the predicate that defines this SubSet of Nodes. If m_Predicate is nullptr all Nodes will be selected.
Definition at line 200 of file QmitkDataStorageTableModel.h.
◆ m_SortDescending
bool QmitkDataStorageTableModel::m_SortDescending |
|
protected |
◆ m_VisiblePropertyModifiedObserverTags
std::map<mitk::BaseProperty *, unsigned long> QmitkDataStorageTableModel::m_VisiblePropertyModifiedObserverTags |
|
protected |
The documentation for this class was generated from the following file: