libyui
|
#include <YTreeItem.h>
Public Member Functions | |
YTreeItem (const std::string &label, bool isOpen=false) | |
YTreeItem (const std::string &label, const std::string &iconName, bool isOpen=false) | |
YTreeItem (YTreeItem *parent, const std::string &label, bool isOpen=false) | |
YTreeItem (YTreeItem *parent, const std::string &label, const std::string &iconName, bool isOpen=false) | |
virtual | ~YTreeItem () |
virtual const char * | itemClass () const |
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=true) |
void | setClosed () |
virtual YTreeItem * | parent () const |
![]() | |
YItem (const std::string &label, bool selected=false) | |
YItem (const std::string &label, const std::string &iconName, bool selected=false) | |
virtual | ~YItem () |
std::string | label () const |
void | setLabel (const std::string &newLabel) |
std::string | iconName () const |
bool | hasIconName () const |
void | setIconName (const std::string &newIconName) |
bool | selected () const |
void | setSelected (bool sel=true) |
int | status () const |
void | setStatus (int newStatus) |
void | setIndex (int index) |
int | index () const |
void | setData (void *newData) |
void * | data () const |
virtual std::string | debugLabel () const |
std::string | limitLength (const std::string &text, int limit) const |
Item class for tree items.
This class implements children management.
YTreeItem::YTreeItem | ( | const std::string & | label, |
bool | isOpen = false ) |
Constructors for toplevel items.
YTreeItem::YTreeItem | ( | YTreeItem * | parent, |
const std::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.
|
virtual |
Destructor.
This will delete all children.
|
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.
|
inlinevirtual |
|
inlinevirtual |
Reimplemented from YItem.
|
inlinevirtual |
|
inlinevirtual |
Reimplemented from YItem.
|
virtual |
Delete all child items.
|
inlinevirtual |
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.
|
inlinevirtual |
Returns a descriptive name of this widget class for logging, debugging etc.
Reimplemented from YItem.
Reimplemented in YTableItem.
|
inlinevirtual |
void YTreeItem::setOpen | ( | bool | open = true | ) |
Change the 'isOpen' flag.