Go to the documentation of this file.
82 std::string
label()
const {
return _label; }
87 void setLabel(
const std::string & newLabel ) { _label = newLabel; }
92 std::string
iconName()
const {
return _iconName; }
102 void setIconName(
const std::string & newIconName ) { _iconName = newIconName; }
128 void setStatus(
int newStatus ) { _status = newStatus; }
138 int index()
const {
return _index; }
148 void setData(
void * newData ) { _data = newData; }
153 void *
data()
const {
return _data; }
209 std::string _iconName;
std::string label() const
Return this item's label.
void setData(void *newData)
Set the opaque data pointer for application use.
void setIndex(int index)
Set this item's index.
YItemCollection::iterator YItemIterator
Mutable iterator over YItemCollection.
std::vector< YItem * > YItemCollection
Collection of pointers to YItem.
int index() const
Return the index of this item (as set with setIndex() ).
virtual YItemIterator childrenBegin()
Return an iterator that points to the first child item of this item.
bool selected() const
Return 'true' if this item is currently selected.
std::string iconName() const
Return this item's icon name.
bool hasIconName() const
Return 'true' if this item has an icon name.
void setIconName(const std::string &newIconName)
Set this item's icon name.
virtual YItem * parent() const
Returns this item's parent item or 0 if it is a toplevel item.
void * data() const
Return the opaque data pointer.
virtual bool hasChildren() const
Return 'true' if this item has any child items.
YItem(const std::string &label, bool selected=false)
Constructor with just the label and optionally the selected state.
int status() const
Return the status of this item.
void setSelected(bool sel=true)
Select or unselect this item.
void setLabel(const std::string &newLabel)
Set this item's label.
virtual YItemIterator childrenEnd()
Return an iterator that points after the last child item of this item.
YItem(const std::string &label, const std::string &iconName, bool selected=false)
Constructor with label and icon name and optionally the selected state.
void setStatus(int newStatus)
Set the status of this item.
virtual ~YItem()
Destructor.
YItemCollection::const_iterator YItemConstIterator
Const iterator over YItemCollection.
Simple item class for SelectionBox, ComboBox, MultiSelectionBox etc.