YTreeItem Class Reference

#include <YTree.h>

List of all members.

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 ()
YTreeItemparent () const
YTreetree () const
const YCPStringgetText () const
const YCPValuegetId () const
const YTreeItemListitemList () const
bool isOpenByDefault () const
YTreeItemfindItemWithId (const YCPValue &id)
YTreeItemfindItemWithText (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


Constructor & Destructor Documentation

YTreeItem::YTreeItem ( YTree parent,
const YCPValue id,
const YCPString text,
const YCPString iconName,
bool  open = false 
)

Regular constructor for root level items.

YTreeItem::YTreeItem ( YTreeItem parent,
const YCPValue id,
const YCPString text,
const YCPString iconName,
bool  open = false 
)

Regular constructor for items in deeper tree levels.

YTreeItem::YTreeItem ( YTree parent,
const YCPString text,
const YCPString iconName,
void *  data,
bool  open = false 
)

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.

YTreeItem::YTreeItem ( YTreeItem parent,
const YCPString text,
const YCPString iconName,
void *  data,
bool  open = false 
)

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.

YTreeItem::~YTreeItem (  )  [virtual]

Destructor.


Member Function Documentation

YTreeItem* YTreeItem::parent (  )  const [inline]

YTree* YTreeItem::tree (  )  const [inline]

const YCPString& YTreeItem::getText (  )  const [inline]

const YCPValue& YTreeItem::getId (  )  const [inline]

const YTreeItemList& YTreeItem::itemList (  )  const [inline]

bool YTreeItem::isOpenByDefault (  )  const [inline]

YTreeItem * YTreeItem::findItemWithId ( const YCPValue id  ) 

Recursively search for an item with a given ID. Returns 0 if not found.

YTreeItem * YTreeItem::findItemWithText ( const YCPString text  ) 

Recursively search for an item with a given text. Returns 0 if not found.

void YTreeItem::setOpen ( bool  open  )  [inline]

Set this item's "open" flag. The UI has to take care to set this each time the user opens or closes a branch.

bool YTreeItem::isOpen (  )  const [inline]

Returns this item's "open" flag.

void* YTreeItem::data (  )  const [inline]

Returns the opaque data pointer for applicaton use.

void YTreeItem::setData ( void *  data  )  [inline]

Set the opaque data pointer. The application may choose to store internal data here. Watch for dangling pointers!

YCPString YTreeItem::iconName (  )  const

Returns the name of this item's icon or an empty string if it doesn't have one.

void YTreeItem::setIconName ( const YCPString icon  )  [inline]

Sets this item's icon name.


Friends And Related Function Documentation

friend class YTree [friend]


Member Data Documentation

YCPValue YTreeItem::_id [protected]

void* YTreeItem::_data [protected]

YCPString YTreeItem::_text [protected]

YCPString YTreeItem::_iconName [protected]

YTree* YTreeItem::_parentTree [protected]

YTreeItem* YTreeItem::_parentItem [protected]

bool YTreeItem::_openByDefault [protected]

bool YTreeItem::_open [protected]

YTreeItemList YTreeItem::_items [protected]


The documentation for this class was generated from the following files:
Generated on Tue Nov 6 01:20:24 2007 for yast2-core by  doxygen 1.5.0