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

void* YTreeItem::data  )  const [inline]
 

Returns the opaque data pointer for applicaton use.

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.

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

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

YCPString YTreeItem::iconName  )  const
 

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

bool YTreeItem::isOpen  )  const [inline]
 

Returns this item's "open" flag.

bool YTreeItem::isOpenByDefault  )  const [inline]
 

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

YTreeItem* YTreeItem::parent  )  const [inline]
 

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

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

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

Sets this item's icon name.

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.

YTree* YTreeItem::tree  )  const [inline]
 


Friends And Related Function Documentation

friend class YTree [friend]
 


Member Data Documentation

void* YTreeItem::_data [protected]
 

YCPString YTreeItem::_iconName [protected]
 

YCPValue YTreeItem::_id [protected]
 

YTreeItemList YTreeItem::_items [protected]
 

bool YTreeItem::_open [protected]
 

bool YTreeItem::_openByDefault [protected]
 

YTreeItem* YTreeItem::_parentItem [protected]
 

YTree* YTreeItem::_parentTree [protected]
 

YCPString YTreeItem::_text [protected]
 


The documentation for this class was generated from the following files:
Generated on Fri Jun 16 18:07:47 2006 for yast2-core by  doxygen 1.4.6