25 #include "YTreeItem.h"
40 const string & iconName,
42 :
YItem( label, iconName )
63 const string & iconName,
65 :
YItem( label, iconName )
82 _children.push_back( child );
YItemCollection::iterator YItemIterator
Mutable iterator over YItemCollection.
Simple item class for SelectionBox, ComboBox, MultiSelectionBox etc.
Item class for tree items.
virtual void deleteChildren()
Delete all child items.
virtual ~YTreeItem()
Destructor.
void setOpen(bool open)
Change the 'isOpen' flag.
virtual bool hasChildren() const
Return 'true' if this item has any child items.
virtual YTreeItem * parent() const
Returns this item's parent item or 0 if it is a toplevel item.
virtual YItemIterator childrenBegin()
Return an iterator that points to the first child item of this item.
virtual YItemIterator childrenEnd()
Return an iterator that points after the last child item of this item.
virtual void addChild(YItem *item_disown)
Add a child item to this item.
bool isOpen() const
Return 'true' if this tree item should be displayed open (with its children visible) by default.
YTreeItem(const std::string &label, bool isOpen=false)
Constructors for toplevel items.