Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
#include <QmitkDataStorageTreeModelInternalItem.h>
Protected Attributes | |
QmitkDataStorageTreeModelInternalItem * | m_Parent |
std::vector< QmitkDataStorageTreeModelInternalItem * > | m_Children |
mitk::WeakPointer< mitk::DataNode > | m_DataNode |
Helper class to represent a tree structure of DataNodes
Definition at line 26 of file QmitkDataStorageTreeModelInternalItem.h.
QmitkDataStorageTreeModelInternalItem::QmitkDataStorageTreeModelInternalItem | ( | mitk::DataNode * | _DataNode, |
QmitkDataStorageTreeModelInternalItem * | _Parent = nullptr |
||
) |
Constructs a new QmitkDataStorageTreeModelInternalItem with the given DataNode (must not be 0)
Definition at line 20 of file QmitkDataStorageTreeModelInternalItem.cpp.
References AddChild(), and m_Parent.
|
virtual |
Removes itself as child from its parent-> Does not delete its children
Definition at line 27 of file QmitkDataStorageTreeModelInternalItem.cpp.
References m_Parent, and RemoveChild().
void QmitkDataStorageTreeModelInternalItem::AddChild | ( | QmitkDataStorageTreeModelInternalItem * | item | ) |
add another item as a child of this (only if not already in that list)
Definition at line 72 of file QmitkDataStorageTreeModelInternalItem.cpp.
References InsertChild().
Referenced by QmitkDataStorageTreeModelInternalItem(), SetParent(), and QmitkDataStorageTreeModel::SetPlaceNewNodesOnTop().
void QmitkDataStorageTreeModelInternalItem::Delete | ( | ) |
Deletes the whole tree branch
Definition at line 33 of file QmitkDataStorageTreeModelInternalItem.cpp.
References m_Children.
Referenced by QmitkDataStorageSimpleTreeModel::DataStorageChanged(), QmitkRenderWindowDataStorageTreeModel::GetCurrentRenderer(), QmitkDataStorageTreeModel::SetDataStorage(), QmitkDataStorageSimpleTreeModel::~QmitkDataStorageSimpleTreeModel(), and QmitkDataStorageTreeModel::~QmitkDataStorageTreeModel().
QmitkDataStorageTreeModelInternalItem * QmitkDataStorageTreeModelInternalItem::Find | ( | const mitk::DataNode * | _DataNode | ) | const |
Find the QmitkDataStorageTreeModelInternalItem containing a special tree node (recursive tree function)
Definition at line 41 of file QmitkDataStorageTreeModelInternalItem.cpp.
References Find(), m_Children, and m_DataNode.
Referenced by QmitkDataStorageTreeModel::AddNode(), Find(), QmitkDataStorageSimpleTreeModel::flags(), QmitkRenderWindowDataStorageTreeModel::GetCurrentRenderer(), QmitkDataStorageTreeModel::GetIndex(), QmitkDataStorageSimpleTreeModel::NodeAdded(), QmitkRenderWindowDataStorageTreeModel::NodeChanged(), QmitkDataStorageSimpleTreeModel::NodeChanged(), QmitkDataStorageSimpleTreeModel::NodeRemoved(), QmitkDataStorageTreeModel::SetDataStorageDeleted(), QmitkDataStorageTreeModel::SetNodeModified(), and QmitkDataStorageTreeModel::SetPlaceNewNodesOnTop().
QmitkDataStorageTreeModelInternalItem * QmitkDataStorageTreeModelInternalItem::GetChild | ( | int | index | ) | const |
Definition at line 67 of file QmitkDataStorageTreeModelInternalItem.cpp.
References m_Children.
Referenced by QmitkRenderWindowDataStorageTreeModel::GetCurrentRenderer(), QmitkDataStorageSimpleTreeModel::index(), QmitkDataStorageTreeModel::index(), QmitkDataStorageTreeModel::TreeToNodeSet(), and QmitkDataStorageTreeModel::TreeToVector().
int QmitkDataStorageTreeModelInternalItem::GetChildCount | ( | ) | const |
Get the amount of children
Definition at line 87 of file QmitkDataStorageTreeModelInternalItem.cpp.
References m_Children.
Referenced by QmitkRenderWindowDataStorageTreeModel::columnCount(), QmitkDataStorageTreeModel::dropMimeData(), QmitkRenderWindowDataStorageTreeModel::GetCurrentRenderer(), QmitkDataStorageSimpleTreeModel::rowCount(), QmitkDataStorageTreeModel::rowCount(), QmitkDataStorageTreeModel::SetPlaceNewNodesOnTop(), QmitkDataStorageTreeModel::TreeToNodeSet(), and QmitkDataStorageTreeModel::TreeToVector().
std::vector< QmitkDataStorageTreeModelInternalItem * > QmitkDataStorageTreeModelInternalItem::GetChildren | ( | ) | const |
Get all children as vector
Definition at line 130 of file QmitkDataStorageTreeModelInternalItem.cpp.
References m_Children.
Referenced by QmitkDataStorageSimpleTreeModel::flags(), QmitkDataStorageSimpleTreeModel::NodeRemoved(), QmitkDataStorageTreeModel::SetDataStorageDeleted(), and QmitkDataStorageTreeModel::SetPlaceNewNodesOnTop().
mitk::DataNode::Pointer QmitkDataStorageTreeModelInternalItem::GetDataNode | ( | ) | const |
Return the DataNode associated with this node
Definition at line 105 of file QmitkDataStorageTreeModelInternalItem.cpp.
References mitk::WeakPointer< T >::Lock(), and m_DataNode.
Referenced by QmitkDataStorageTreeModel::data(), QmitkDataStorageTreeModel::dropMimeData(), QmitkDataStorageTreeModel::GetNode(), QmitkDataStorageSimpleTreeModel::headerData(), QmitkDataStorageTreeModel::headerData(), QmitkDataStorageTreeModel::mimeDataFromModelIndexList(), QmitkDataStorageTreeModel::setData(), and QmitkDataStorageTreeModel::TreeToNodeSet().
int QmitkDataStorageTreeModelInternalItem::GetIndex | ( | ) | const |
Definition at line 92 of file QmitkDataStorageTreeModelInternalItem.cpp.
References IndexOfChild(), and m_Parent.
Referenced by QmitkDataStorageTreeModel::dropMimeData(), QmitkDataStorageSimpleTreeModel::flags(), QmitkRenderWindowDataStorageTreeModel::GetCurrentRenderer(), QmitkDataStorageTreeModel::IndexFromTreeItem(), QmitkDataStorageSimpleTreeModel::NodeChanged(), QmitkDataStorageSimpleTreeModel::NodeRemoved(), QmitkDataStorageSimpleTreeModel::parent(), QmitkDataStorageTreeModel::parent(), QmitkDataStorageTreeModel::SetDataStorageDeleted(), QmitkDataStorageTreeModel::SetNodeModified(), and QmitkDataStorageTreeModel::SetPlaceNewNodesOnTop().
QmitkDataStorageTreeModelInternalItem * QmitkDataStorageTreeModelInternalItem::GetParent | ( | ) | const |
Definition at line 100 of file QmitkDataStorageTreeModelInternalItem.cpp.
References m_Parent.
Referenced by QmitkDataStorageTreeModel::dropMimeData(), QmitkRenderWindowDataStorageTreeModel::GetCurrentRenderer(), InsertChild(), QmitkRenderWindowDataStorageTreeModel::NodeChanged(), QmitkDataStorageSimpleTreeModel::NodeChanged(), QmitkDataStorageSimpleTreeModel::NodeRemoved(), QmitkDataStorageSimpleTreeModel::parent(), QmitkDataStorageTreeModel::parent(), QmitkDataStorageTreeModel::SetNodeModified(), and QmitkDataStorageTreeModel::SetPlaceNewNodesOnTop().
int QmitkDataStorageTreeModelInternalItem::IndexOfChild | ( | const QmitkDataStorageTreeModelInternalItem * | item | ) | const |
Find the index of an item
Definition at line 61 of file QmitkDataStorageTreeModelInternalItem.cpp.
References m_Children.
Referenced by GetIndex().
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
Definition at line 110 of file QmitkDataStorageTreeModelInternalItem.cpp.
References GetParent(), m_Children, and SetParent().
Referenced by AddChild(), QmitkDataStorageTreeModel::dropMimeData(), QmitkDataStorageSimpleTreeModel::flags(), and QmitkDataStorageTreeModel::SetDataStorageDeleted().
void QmitkDataStorageTreeModelInternalItem::RemoveChild | ( | QmitkDataStorageTreeModelInternalItem * | item | ) |
remove another item as child from this
Definition at line 77 of file QmitkDataStorageTreeModelInternalItem.cpp.
References m_Children, and SetParent().
Referenced by QmitkDataStorageTreeModel::dropMimeData(), and ~QmitkDataStorageTreeModelInternalItem().
void QmitkDataStorageTreeModelInternalItem::SetParent | ( | QmitkDataStorageTreeModelInternalItem * | _Parent | ) |
Sets the parent on the QmitkDataStorageTreeModelInternalItem.
Definition at line 135 of file QmitkDataStorageTreeModelInternalItem.cpp.
References AddChild(), and m_Parent.
Referenced by InsertChild(), and RemoveChild().
|
protected |
Definition at line 93 of file QmitkDataStorageTreeModelInternalItem.h.
Referenced by Delete(), Find(), GetChild(), GetChildCount(), GetChildren(), IndexOfChild(), InsertChild(), and RemoveChild().
|
protected |
Definition at line 94 of file QmitkDataStorageTreeModelInternalItem.h.
Referenced by Find(), and GetDataNode().
|
protected |
Definition at line 92 of file QmitkDataStorageTreeModelInternalItem.h.
Referenced by GetIndex(), GetParent(), QmitkDataStorageTreeModelInternalItem(), SetParent(), and ~QmitkDataStorageTreeModelInternalItem().