Developer Documentation
TreeItem Class Reference

Public Member Functions

 TreeItem (int _id, QString _name, DataType _type, TreeItem *_parent)
 
int id ()
 id
 
DataType dataType ()
 dataType
 
bool dataType (DataType _type)
 
int group ()
 group
 
bool isGroup ()
 
bool target ()
 target
 
void target (bool _target)
 
bool source ()
 source
 
void source (bool _source)
 
bool visible ()
 visible
 
void visible (bool _visible)
 
QString name ()
 name
 
void name (QString _name)
 
TreeItemnext ()
 
int level ()
 
 TreeItem (int _id, QString _name, DataType _type, TreeItem *_parent)
 
int id ()
 id
 
DataType dataType ()
 dataType
 
bool dataType (DataType _type)
 
int group ()
 group
 
bool isGroup ()
 
bool visible ()
 visible
 
void visible (bool _visible)
 
QString name ()
 name
 
void name (QString _name)
 
TreeItemnext ()
 
int level ()
 
Tree : Parent nodes
int row () const
 get the row of this item from the parent
 
TreeItemparent ()
 Get the parent item ( 0 if root item )
 
void setParent (TreeItem *_parent)
 Set the parent pointer.
 
int row () const
 get the row of this item from the parent
 
TreeItemparent ()
 Get the parent item ( 0 if rootitem )
 
void setParent (TreeItem *_parent)
 Set the parent pointer.
 
Tree : Children
TreeItemchildExists (int _objectId)
 Check if the element exists in the subtree of this element.
 
void appendChild (TreeItem *child)
 add a child to this node
 
TreeItemchild (int row)
 return a child
 
int childCount () const
 get the number of children
 
void removeChild (TreeItem *_item)
 Remove a child from this object.
 
QList< TreeItem *> getLeafs ()
 get all leafes of the tree below this object ( These will be all visible objects )
 
void deleteSubtree ()
 delete the whole subtree below this item ( The item itself is not touched )
 
TreeItemchildExists (int _objectId)
 Check if the element exists in the subtree of this element.
 
TreeItemchildExists (QString _name)
 Check if the element exists in the subtree of this element.
 
void appendChild (TreeItem *child)
 add a child to this node
 
TreeItemchild (int row)
 return a child
 
int childCount () const
 get the number of children
 
void removeChild (TreeItem *_item)
 Remove a child from this object.
 
QList< TreeItem *> getLeafs ()
 get all leafes of the tree below this object ( These will be all visible objects )
 
void deleteSubtree ()
 delete the whole subtree below this item ( The item itself is not touched )
 

Private Attributes

int id_
 
DataType dataType_
 
bool target_
 
bool source_
 
bool visible_
 
QString name_
 
TreeItemparentItem_
 Parent item or 0 if root node. More...
 
int row_
 Index of this node in parent's childen.
 
QList< TreeItem * > childItems_
 Children of this node.
 

Static Private Attributes

static QMap< int, TreeItem * > kTreeMap_
 Acceleration map.
 

Detailed Description

Definition at line 52 of file TreeItem.hh.

Member Function Documentation

◆ level() [1/2]

int TreeItem::level ( )

level of the current object ( root node has level 0)

◆ level() [2/2]

int TreeItem::level ( )

level of the current object ( root node has level 0)

Definition at line 213 of file TreeItem.cc.

◆ next() [1/2]

TreeItem* TreeItem::next ( )

Get the next item of the tree (Preorder traversal of the tree)

◆ next() [2/2]

TreeItem * TreeItem::next ( )

Get the next item of the tree (Preorder traversal of the tree)

Definition at line 177 of file TreeItem.cc.

Member Data Documentation

◆ parentItem_

TreeItem * TreeItem::parentItem_
private

Parent item or 0 if root node.

Parent item or 0 if rootnode.

Definition at line 114 of file TreeItem.hh.


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