libyui
3.9.3
|
Item class that has a (possibly multi-line) description text in addition to the normal label. More...
#include <YDescribedItem.h>
Public Member Functions | |
YDescribedItem (const std::string &label, const std::string &description="", bool selected=false) | |
Constructor with the label, the description and optionally the selected state. | |
YDescribedItem (const std::string &label, const std::string &description, const std::string &iconName, bool selected=false) | |
Constructor with the label, the description, the icon name and optionally the selected state. | |
virtual | ~YDescribedItem () |
Destructor. | |
std::string | description () const |
Return this item's description text. More... | |
void | setDescription (const std::string &desc) |
Set this item's description text. | |
bool | enabled () const |
Return 'true' if this item is enabled (which is the default). More... | |
void | setEnabled (bool value) |
Set this item to enabled or disabled. More... | |
![]() | |
YItem (const std::string &label, bool selected=false) | |
Constructor with just the label and optionally the selected state. | |
YItem (const std::string &label, const std::string &iconName, bool selected=false) | |
Constructor with label and icon name and optionally the selected state. | |
virtual | ~YItem () |
Destructor. | |
std::string | label () const |
Return this item's label. More... | |
void | setLabel (const std::string &newLabel) |
Set this item's label. | |
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. | |
bool | selected () const |
Return 'true' if this item is currently selected. | |
void | setSelected (bool sel=true) |
Select or unselect this item. More... | |
int | status () const |
Return the status of this item. More... | |
void | setStatus (int newStatus) |
Set the status of this item. More... | |
void | setIndex (int index) |
Set this item's index. | |
int | index () const |
Return the index of this item (as set with setIndex() ). | |
void | setData (void *newData) |
Set the opaque data pointer for application use. More... | |
void * | data () const |
Return the opaque data pointer. | |
virtual bool | hasChildren () const |
Return 'true' if this item has any child items. | |
virtual YItemIterator | childrenBegin () |
Return an iterator that points to the first child item of this item. More... | |
virtual YItemConstIterator | childrenBegin () const |
virtual YItemIterator | childrenEnd () |
Return an iterator that points after the last child item of this item. More... | |
virtual YItemConstIterator | childrenEnd () const |
virtual YItem * | parent () const |
Returns this item's parent item or 0 if it is a toplevel item. More... | |
Item class that has a (possibly multi-line) description text in addition to the normal label.
Definition at line 35 of file YDescribedItem.h.
|
inline |
Return this item's description text.
This is the (typically longer) subtext that the user sees in a dialog, so this will usually be a translated text.
Definition at line 74 of file YDescribedItem.h.
|
inline |
Return 'true' if this item is enabled (which is the default).
Items are only ever disabled if the application explicitly sets them to disabled.
Definition at line 85 of file YDescribedItem.h.
|
inline |
Set this item to enabled or disabled.
Notice that this only stores that status internally. To have any effect on an associated widget, use the widget's method to enable or disable an item (which will usually call this method internally at some point).
Definition at line 94 of file YDescribedItem.h.