13 #ifndef QmitkDataStorageTreeModelInternalItem_h
14 #define QmitkDataStorageTreeModelInternalItem_h
101 std::vector<QmitkDataStorageTreeModelInternalItem *>
GetChildren()
const;
138 std::vector<QmitkDataStorageTreeModelInternalItem *>
m_Children;
Helper class representing a node in a tree structure of DataNodes.
QmitkDataStorageTreeModelInternalItem * Find(const mitk::DataNode *_DataNode) const
Recursively searches for the item holding the given DataNode.
int GetChildCount() const
Returns the number of child items.
QmitkDataStorageTreeModelInternalItem(mitk::DataNode *_DataNode, QmitkDataStorageTreeModelInternalItem *_Parent=nullptr)
Constructs a tree item for the given DataNode.
void Delete()
Recursively deletes this item and all its children.
std::vector< QmitkDataStorageTreeModelInternalItem * > m_Children
QmitkDataStorageTreeModelInternalItem * m_Parent
int IndexOfChild(const QmitkDataStorageTreeModelInternalItem *item) const
Returns the index of the given child item.
mitk::WeakPointer< mitk::DataNode > m_DataNode
void AddChild(QmitkDataStorageTreeModelInternalItem *item)
Adds the given item as a child (if not already present).
std::vector< QmitkDataStorageTreeModelInternalItem * > GetChildren() const
Returns all child items as a vector.
void SetParent(QmitkDataStorageTreeModelInternalItem *_Parent)
Sets the parent of this item.
QmitkDataStorageTreeModelInternalItem * GetParent() const
Returns the parent item.
void RemoveChild(QmitkDataStorageTreeModelInternalItem *item)
Removes the given item from this item's child list.
virtual ~QmitkDataStorageTreeModelInternalItem()
Destructor. Removes this item from its parent's child list.
mitk::DataNode::Pointer GetDataNode() const
Returns the DataNode associated with this tree item.
QmitkDataStorageTreeModelInternalItem * GetChild(int index) const
Returns the child item at the given index.
int GetIndex() const
Returns the index of this item within its parent's child list.
void InsertChild(QmitkDataStorageTreeModelInternalItem *item, int index=-1)
Inserts a child item at the given position.
Central node class of the MITK data tree, associating a data object with properties and mappers.