#include <YTree.h>
Public Member Functions | |
YTreeItem (YTree *parent, const YCPValue &id, const YCPString &text, const YCPString &iconName, bool open=false) | |
YTreeItem (YTreeItem *parent, const YCPValue &id, const YCPString &text, const YCPString &iconName, bool open=false) | |
YTreeItem (YTree *parent, const YCPString &text, const YCPString &iconName, void *data, bool open=false) | |
YTreeItem (YTreeItem *parent, const YCPString &text, const YCPString &iconName, void *data, bool open=false) | |
virtual | ~YTreeItem () |
YTreeItem * | parent () const |
YTree * | tree () const |
const YCPString & | getText () const |
const YCPValue & | getId () const |
const YTreeItemList & | itemList () const |
bool | isOpenByDefault () const |
YTreeItem * | findItemWithId (const YCPValue &id) |
YTreeItem * | findItemWithText (const YCPString &text) |
void | setOpen (bool open) |
bool | isOpen () const |
void * | data () const |
void | setData (void *data) |
YCPString | iconName () const |
void | setIconName (const YCPString &icon) |
Protected Attributes | |
YCPValue | _id |
void * | _data |
YCPString | _text |
YCPString | _iconName |
YTree * | _parentTree |
YTreeItem * | _parentItem |
bool | _openByDefault |
bool | _open |
YTreeItemList | _items |
Friends | |
class | YTree |
|
Regular constructor for root level items. |
|
Regular constructor for items in deeper tree levels. |
|
Special constructor for root items that take an opaque data pointer for application use: This kind of root item can be used to reference to external objects that are connected with this tree item. Use YTreeItem::data() to retrieve this pointer. Casting will be necessary to make any use of it. |
|
Special constructor for deeper level items that take an opaque data pointer for application use: This kind of root item can be used to reference to external objects that are connected with this tree item. Use YTreeItem::data() to retrieve this pointer. Casting will be necessary to make any use of it. |
|
Destructor. |
|
Returns the opaque data pointer for applicaton use. |
|
Recursively search for an item with a given ID. Returns 0 if not found. |
|
Recursively search for an item with a given text. Returns 0 if not found. |
|
|
|
|
|
Returns the name of this item's icon or an empty string if it doesn't have one. |
|
Returns this item's "open" flag. |
|
|
|
|
|
|
|
Set the opaque data pointer. The application may choose to store internal data here. Watch for dangling pointers! |
|
Sets this item's icon name. |
|
Set this item's "open" flag. The UI has to take care to set this each time the user opens or closes a branch. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|