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