Medical Imaging Interaction Toolkit  2023.04.00
Medical Imaging Interaction Toolkit
QmitkDataStorageTreeModelInternalItem Class Reference

#include <QmitkDataStorageTreeModelInternalItem.h>

Collaboration diagram for QmitkDataStorageTreeModelInternalItem:

Public Member Functions

 QmitkDataStorageTreeModelInternalItem (mitk::DataNode *_DataNode, QmitkDataStorageTreeModelInternalItem *_Parent=nullptr)
 
virtual ~QmitkDataStorageTreeModelInternalItem ()
 
int IndexOfChild (const QmitkDataStorageTreeModelInternalItem *item) const
 
QmitkDataStorageTreeModelInternalItemGetChild (int index) const
 
QmitkDataStorageTreeModelInternalItemFind (const mitk::DataNode *_DataNode) const
 
int GetChildCount () const
 
int GetIndex () const
 
QmitkDataStorageTreeModelInternalItemGetParent () const
 
mitk::DataNode::Pointer GetDataNode () const
 
std::vector< QmitkDataStorageTreeModelInternalItem * > GetChildren () const
 
void AddChild (QmitkDataStorageTreeModelInternalItem *item)
 
void RemoveChild (QmitkDataStorageTreeModelInternalItem *item)
 
void InsertChild (QmitkDataStorageTreeModelInternalItem *item, int index=-1)
 
void SetParent (QmitkDataStorageTreeModelInternalItem *_Parent)
 Sets the parent on the QmitkDataStorageTreeModelInternalItem. More...
 
void Delete ()
 

Protected Attributes

QmitkDataStorageTreeModelInternalItemm_Parent
 
std::vector< QmitkDataStorageTreeModelInternalItem * > m_Children
 
mitk::WeakPointer< mitk::DataNodem_DataNode
 

Detailed Description

Helper class to represent a tree structure of DataNodes

Definition at line 26 of file QmitkDataStorageTreeModelInternalItem.h.

Constructor & Destructor Documentation

◆ QmitkDataStorageTreeModelInternalItem()

QmitkDataStorageTreeModelInternalItem::QmitkDataStorageTreeModelInternalItem ( mitk::DataNode _DataNode,
QmitkDataStorageTreeModelInternalItem _Parent = nullptr 
)

Constructs a new QmitkDataStorageTreeModelInternalItem with the given DataNode (must not be 0)

◆ ~QmitkDataStorageTreeModelInternalItem()

virtual QmitkDataStorageTreeModelInternalItem::~QmitkDataStorageTreeModelInternalItem ( )
virtual

Removes itself as child from its parent-> Does not delete its children

See also
Delete()

Member Function Documentation

◆ AddChild()

void QmitkDataStorageTreeModelInternalItem::AddChild ( QmitkDataStorageTreeModelInternalItem item)

add another item as a child of this (only if not already in that list)

◆ Delete()

void QmitkDataStorageTreeModelInternalItem::Delete ( )

Deletes the whole tree branch

◆ Find()

QmitkDataStorageTreeModelInternalItem* QmitkDataStorageTreeModelInternalItem::Find ( const mitk::DataNode _DataNode) const

Find the QmitkDataStorageTreeModelInternalItem containing a special tree node (recursive tree function)

◆ GetChild()

QmitkDataStorageTreeModelInternalItem* QmitkDataStorageTreeModelInternalItem::GetChild ( int  index) const
Returns
The child at pos index or 0 if it not exists

◆ GetChildCount()

int QmitkDataStorageTreeModelInternalItem::GetChildCount ( ) const

Get the amount of children

◆ GetChildren()

std::vector<QmitkDataStorageTreeModelInternalItem *> QmitkDataStorageTreeModelInternalItem::GetChildren ( ) const

Get all children as vector

◆ GetDataNode()

mitk::DataNode::Pointer QmitkDataStorageTreeModelInternalItem::GetDataNode ( ) const

Return the DataNode associated with this node

◆ GetIndex()

int QmitkDataStorageTreeModelInternalItem::GetIndex ( ) const
Returns
the index of this node in its parent list

◆ GetParent()

QmitkDataStorageTreeModelInternalItem* QmitkDataStorageTreeModelInternalItem::GetParent ( ) const
Returns
the parent of this tree item

◆ IndexOfChild()

int QmitkDataStorageTreeModelInternalItem::IndexOfChild ( const QmitkDataStorageTreeModelInternalItem item) const

Find the index of an item

◆ InsertChild()

void QmitkDataStorageTreeModelInternalItem::InsertChild ( QmitkDataStorageTreeModelInternalItem item,
int  index = -1 
)

inserts a child at the given position. if pos is not in range the element is added at the end

◆ RemoveChild()

void QmitkDataStorageTreeModelInternalItem::RemoveChild ( QmitkDataStorageTreeModelInternalItem item)

remove another item as child from this

◆ SetParent()

void QmitkDataStorageTreeModelInternalItem::SetParent ( QmitkDataStorageTreeModelInternalItem _Parent)

Sets the parent on the QmitkDataStorageTreeModelInternalItem.

Member Data Documentation

◆ m_Children

std::vector<QmitkDataStorageTreeModelInternalItem *> QmitkDataStorageTreeModelInternalItem::m_Children
protected

Definition at line 93 of file QmitkDataStorageTreeModelInternalItem.h.

◆ m_DataNode

mitk::WeakPointer<mitk::DataNode> QmitkDataStorageTreeModelInternalItem::m_DataNode
protected

Definition at line 94 of file QmitkDataStorageTreeModelInternalItem.h.

◆ m_Parent

QmitkDataStorageTreeModelInternalItem* QmitkDataStorageTreeModelInternalItem::m_Parent
protected

Definition at line 92 of file QmitkDataStorageTreeModelInternalItem.h.


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