Developer Documentation
TreeItem Class Reference

Public Member Functions

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

Static Private Attributes

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

Detailed Description

Definition at line 52 of file TreeItem.hh.

Constructor & Destructor Documentation

◆ TreeItem()

TreeItem::TreeItem ( int  _id,
const QString &  _name,
DataType  _type,
TreeItem _parent 
)

Definition at line 48 of file TreeItem.cc.

◆ ~TreeItem()

TreeItem::~TreeItem ( )

Definition at line 63 of file TreeItem.cc.

Member Function Documentation

◆ appendChild()

void TreeItem::appendChild ( TreeItem child)

add a child to this node

Definition at line 248 of file TreeItem.cc.

◆ child()

TreeItem * TreeItem::child ( int  row)

return a child

Definition at line 257 of file TreeItem.cc.

◆ childCount()

int TreeItem::childCount ( ) const

get the number of children

Definition at line 264 of file TreeItem.cc.

◆ childExists() [1/2]

TreeItem * TreeItem::childExists ( int  _objectId)

Check if the element exists in the subtree of this element.

Definition at line 271 of file TreeItem.cc.

◆ childExists() [2/2]

TreeItem * TreeItem::childExists ( QString  _name)

Check if the element exists in the subtree of this element.

Definition at line 249 of file TreeItem.cc.

◆ dataType() [1/2]

DataType TreeItem::dataType ( )

dataType

Definition at line 94 of file TreeItem.cc.

◆ dataType() [2/2]

bool TreeItem::dataType ( DataType  _type)

Definition at line 84 of file TreeItem.cc.

◆ deleteSubtree()

void TreeItem::deleteSubtree ( )

delete the whole subtree below this item ( The item itself is not touched )

Definition at line 343 of file TreeItem.cc.

◆ getLeafs()

QList< TreeItem * > TreeItem::getLeafs ( )

get all leafes of the tree below this object ( These will be all visible objects )

Definition at line 326 of file TreeItem.cc.

◆ group()

int TreeItem::group ( )

group

Definition at line 100 of file TreeItem.cc.

◆ id()

int TreeItem::id ( )

id

Definition at line 78 of file TreeItem.cc.

◆ isGroup()

bool TreeItem::isGroup ( )

Definition at line 119 of file TreeItem.cc.

◆ level() [1/2]

int TreeItem::level ( )

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

Definition at line 213 of file TreeItem.cc.

◆ level() [2/2]

int TreeItem::level ( )

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

◆ name() [1/2]

QString TreeItem::name ( void  )

name

Definition at line 163 of file TreeItem.cc.

◆ name() [2/2]

void TreeItem::name ( const QString &  _name)

Definition at line 169 of file TreeItem.cc.

◆ next() [1/2]

TreeItem * TreeItem::next ( )

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

Definition at line 177 of file TreeItem.cc.

◆ next() [2/2]

TreeItem * TreeItem::next ( )

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

◆ parent()

TreeItem * TreeItem::parent ( )

Get the parent item ( 0 if root item )

Definition at line 235 of file TreeItem.cc.

◆ removeChild()

void TreeItem::removeChild ( TreeItem _item)

Remove a child from this object.

Definition at line 308 of file TreeItem.cc.

◆ row()

int TreeItem::row ( ) const

get the row of this item from the parent

Definition at line 228 of file TreeItem.cc.

◆ setParent()

void TreeItem::setParent ( TreeItem _parent)

Set the parent pointer.

Definition at line 242 of file TreeItem.cc.

◆ source() [1/2]

bool TreeItem::source ( )

source

Definition at line 139 of file TreeItem.cc.

◆ source() [2/2]

void TreeItem::source ( bool  _source)

Definition at line 145 of file TreeItem.cc.

◆ target() [1/2]

bool TreeItem::target ( )

target

Definition at line 127 of file TreeItem.cc.

◆ target() [2/2]

void TreeItem::target ( bool  _target)

Definition at line 133 of file TreeItem.cc.

◆ visible() [1/2]

bool TreeItem::visible ( )

visible

Definition at line 151 of file TreeItem.cc.

◆ visible() [2/2]

void TreeItem::visible ( bool  _visible)

Definition at line 157 of file TreeItem.cc.

Member Data Documentation

◆ childItems_

QList< TreeItem * > TreeItem::childItems_
private

Children of this node.

Definition at line 120 of file TreeItem.hh.

◆ dataType_

DataType TreeItem::dataType_
private

Definition at line 75 of file TreeItem.hh.

◆ id_

int TreeItem::id_
private

Definition at line 74 of file TreeItem.hh.

◆ kTreeMap_

QMap< int, TreeItem * > TreeItem::kTreeMap_
staticprivate

Acceleration map.

Definition at line 123 of file TreeItem.hh.

◆ name_

QString TreeItem::name_
private

Definition at line 99 of file TreeItem.hh.

◆ 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.

◆ row_

int TreeItem::row_
private

Index of this node in parent's childen.

Definition at line 117 of file TreeItem.hh.

◆ source_

bool TreeItem::source_
private

Definition at line 97 of file TreeItem.hh.

◆ target_

bool TreeItem::target_
private

Definition at line 96 of file TreeItem.hh.

◆ visible_

bool TreeItem::visible_
private

Definition at line 98 of file TreeItem.hh.


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