52 #include "TreeItemObjectSelection.hh"
81 return ( dataType_ & _type);
106 return (
parent()->
id() );
111 bool TreeItemObjectSelection::isGroup() {
158 while ( parentPointer ) {
161 if ( parentPointer->
childCount() > ( thisPointer->
row() + 1) ) {
166 thisPointer = parentPointer;
185 while ( current->
parent() != 0 ) {
187 current = current->
parent();
242 if ( id_ == _objectId )
260 if (
name() == _name )
278 QList<TreeItemObjectSelection*>::iterator i;
287 std::cerr <<
"TreeItemObjectSelection: Illegal remove request" << std::endl;
298 QList< TreeItemObjectSelection* > items;
306 items.push_back(
this);
void removeChild(TreeItemObjectSelection *_item)
Remove a child from this object.
TreeItemObjectSelection * next()
TreeItemObjectSelection * childExists(int _objectId)
Check if the element exists in the subtree of this element.
int row() const
get the row of this item from the parent
void deleteSubtree()
delete the whole subtree below this item ( The item itself is not touched )
const DataType DATA_ALL(UINT_MAX)
Identifier for all available objects.
void setParent(TreeItemObjectSelection *_parent)
Set the parent pointer.
int childCount() const
get the number of children
QList< TreeItemObjectSelection * > getLeafs()
get all leafes of the tree below this object ( These will be all visible objects ) ...
TreeItemObjectSelection * child(int row)
return a child
DataType dataType()
dataType
const DataType DATA_GROUP(1)
Items used for Grouping.
TreeItemObjectSelection * parent()
Get the parent item ( 0 if rootitem )
TreeItemObjectSelection * parentItem_
Parent item or 0 if rootnode.
QList< TreeItemObjectSelection * > childItems_
Children of this node.
void appendChild(TreeItemObjectSelection *child)
add a child to this node