libyui
|
#include <YTreeItem.h>
Public Member Functions | |
YTreeItem (const string &label, bool isOpen=false) | |
YTreeItem (const string &label, const string &iconName, bool isOpen=false) | |
YTreeItem (YTreeItem *parent, const string &label, bool isOpen=false) | |
YTreeItem (YTreeItem *parent, const string &label, const string &iconName, bool isOpen=false) | |
virtual | ~YTreeItem () |
virtual bool | hasChildren () const |
virtual YItemIterator | childrenBegin () |
virtual YItemConstIterator | childrenBegin () const |
virtual YItemIterator | childrenEnd () |
virtual YItemConstIterator | childrenEnd () const |
virtual void | addChild (YItem *item_disown) |
virtual void | deleteChildren () |
bool | isOpen () const |
void | setOpen (bool open) |
virtual YTreeItem * | parent () const |
Item class for tree items.
This class implements children management.
YTreeItem::YTreeItem | ( | const string & | label, |
bool | isOpen = false |
||
) |
Constructors for toplevel items.
YTreeItem::YTreeItem | ( | YTreeItem * | parent, |
const string & | label, | ||
bool | isOpen = false |
||
) |
Constructors for items that have a parent item.
They will automatically register this item with the parent item. The parent assumes ownership of this item and will delete it in its (the parent's) destructor.
YTreeItem::~YTreeItem | ( | ) | [virtual] |
Destructor.
This will delete all children.
void YTreeItem::addChild | ( | YItem * | item_disown | ) | [virtual] |
Add a child item to this item.
Note that the constructors that accept a parent pointer will automatically add themselves to their parent, so applications will normally not have to call this function.
virtual YItemIterator YTreeItem::childrenBegin | ( | ) | [inline, virtual] |
virtual YItemIterator YTreeItem::childrenEnd | ( | ) | [inline, virtual] |
void YTreeItem::deleteChildren | ( | ) | [virtual] |
Delete all child items.
virtual bool YTreeItem::hasChildren | ( | ) | const [inline, virtual] |
bool YTreeItem::isOpen | ( | ) | const |
Return 'true' if this tree item should be displayed open (with its children visible) by default.
Notice that this will always return 'false' for tree items without children.
virtual YTreeItem* YTreeItem::parent | ( | ) | const [inline, virtual] |
void YTreeItem::setOpen | ( | bool | open | ) |
Change the 'isOpen' flag.