Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
#include <QmitkDataStorageTreeModel.h>
Public Member Functions | |
TreeItem (mitk::DataNode *_DataNode, TreeItem *_Parent=0) | |
virtual | ~TreeItem () |
int | IndexOfChild (const TreeItem *item) const |
TreeItem * | GetChild (int index) const |
TreeItem * | Find (const mitk::DataNode *_DataNode) const |
int | GetChildCount () const |
int | GetIndex () const |
TreeItem * | GetParent () const |
mitk::DataNode::Pointer | GetDataNode () const |
std::vector< TreeItem * > | GetChildren () const |
void | AddChild (TreeItem *item) |
void | RemoveChild (TreeItem *item) |
void | InsertChild (TreeItem *item, int index=-1) |
void | SetParent (TreeItem *_Parent) |
Sets the parent on the treeitem. More... | |
void | Delete () |
Protected Attributes | |
TreeItem * | m_Parent |
std::vector< TreeItem * > | m_Children |
mitk::DataNode::Pointer | m_DataNode |
Helper class to represent a tree structure of DataNodes
Definition at line 140 of file QmitkDataStorageTreeModel.h.
QmitkDataStorageTreeModel::TreeItem::TreeItem | ( | mitk::DataNode * | _DataNode, |
TreeItem * | _Parent = 0 |
||
) |
Constructs a new TreeItem with the given DataNode (must not be 0)
Definition at line 868 of file QmitkDataStorageTreeModel.cpp.
References AddChild(), and m_Parent.
|
virtual |
Removes itself as child from its parent-> Does not delete its children
Definition at line 875 of file QmitkDataStorageTreeModel.cpp.
void QmitkDataStorageTreeModel::TreeItem::AddChild | ( | TreeItem * | item | ) |
add another item as a child of this (only if not already in that list)
Definition at line 920 of file QmitkDataStorageTreeModel.cpp.
Referenced by SetParent(), and TreeItem().
void QmitkDataStorageTreeModel::TreeItem::Delete | ( | ) |
Deletes the whole tree branch
Definition at line 881 of file QmitkDataStorageTreeModel.cpp.
Referenced by QmitkDataStorageTreeModel::SetDataStorage(), and QmitkDataStorageTreeModel::~QmitkDataStorageTreeModel().
QmitkDataStorageTreeModel::TreeItem * QmitkDataStorageTreeModel::TreeItem::Find | ( | const mitk::DataNode * | _DataNode | ) | const |
Find the TreeItem containing a special tree node (recursive tree function)
Definition at line 889 of file QmitkDataStorageTreeModel.cpp.
References Find().
Referenced by QmitkDataStorageTreeModel::AddNode(), Find(), QmitkDataStorageTreeModel::GetIndex(), and QmitkDataStorageTreeModel::SetNodeModified().
QmitkDataStorageTreeModel::TreeItem * QmitkDataStorageTreeModel::TreeItem::GetChild | ( | int | index | ) | const |
Definition at line 915 of file QmitkDataStorageTreeModel.cpp.
Referenced by QmitkDataStorageTreeModel::index(), QmitkDataStorageTreeModel::TreeToNodeSet(), and QmitkDataStorageTreeModel::TreeToVector().
int QmitkDataStorageTreeModel::TreeItem::GetChildCount | ( | ) | const |
Get the amount of children
Definition at line 935 of file QmitkDataStorageTreeModel.cpp.
Referenced by QmitkDataStorageTreeModel::dropMimeData(), QmitkDataStorageTreeModel::rowCount(), QmitkDataStorageTreeModel::TreeToNodeSet(), and QmitkDataStorageTreeModel::TreeToVector().
std::vector< QmitkDataStorageTreeModel::TreeItem * > QmitkDataStorageTreeModel::TreeItem::GetChildren | ( | ) | const |
Get all children as vector
Definition at line 978 of file QmitkDataStorageTreeModel.cpp.
mitk::DataNode::Pointer QmitkDataStorageTreeModel::TreeItem::GetDataNode | ( | ) | const |
Return the DataNode associated with this node
Definition at line 953 of file QmitkDataStorageTreeModel.cpp.
Referenced by QmitkDataStorageTreeModel::data(), QmitkDataStorageTreeModel::dropMimeData(), QmitkDataStorageTreeModel::flags(), QmitkDataStorageTreeModel::GetNode(), QmitkDataStorageTreeModel::headerData(), QmitkDataStorageTreeModel::mimeDataFromModelIndexList(), QmitkDataStorageTreeModel::setData(), and QmitkDataStorageTreeModel::TreeToNodeSet().
int QmitkDataStorageTreeModel::TreeItem::GetIndex | ( | ) | const |
Definition at line 940 of file QmitkDataStorageTreeModel.cpp.
Referenced by QmitkDataStorageTreeModel::dropMimeData(), QmitkDataStorageTreeModel::IndexFromTreeItem(), QmitkDataStorageTreeModel::parent(), and QmitkDataStorageTreeModel::SetNodeModified().
QmitkDataStorageTreeModel::TreeItem * QmitkDataStorageTreeModel::TreeItem::GetParent | ( | ) | const |
Definition at line 948 of file QmitkDataStorageTreeModel.cpp.
Referenced by QmitkDataStorageTreeModel::dropMimeData(), InsertChild(), QmitkDataStorageTreeModel::parent(), and QmitkDataStorageTreeModel::SetNodeModified().
int QmitkDataStorageTreeModel::TreeItem::IndexOfChild | ( | const TreeItem * | item | ) | const |
Find the index of an item
Definition at line 909 of file QmitkDataStorageTreeModel.cpp.
void QmitkDataStorageTreeModel::TreeItem::InsertChild | ( | TreeItem * | 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 958 of file QmitkDataStorageTreeModel.cpp.
References GetParent(), and SetParent().
Referenced by QmitkDataStorageTreeModel::dropMimeData().
void QmitkDataStorageTreeModel::TreeItem::RemoveChild | ( | TreeItem * | item | ) |
remove another item as child from this
Definition at line 925 of file QmitkDataStorageTreeModel.cpp.
References SetParent().
Referenced by QmitkDataStorageTreeModel::dropMimeData().
void QmitkDataStorageTreeModel::TreeItem::SetParent | ( | TreeItem * | _Parent | ) |
Sets the parent on the treeitem.
Definition at line 983 of file QmitkDataStorageTreeModel.cpp.
References AddChild().
Referenced by InsertChild(), and RemoveChild().
|
protected |
Definition at line 207 of file QmitkDataStorageTreeModel.h.
|
protected |
Definition at line 208 of file QmitkDataStorageTreeModel.h.
|
protected |
Definition at line 206 of file QmitkDataStorageTreeModel.h.
Referenced by TreeItem().