#include <YDescribedItem.h>
Public Member Functions | |
YDescribedItem (const std::string &label, const std::string &description="", bool selected=false) | |
YDescribedItem (const std::string &label, const std::string &description, const std::string &iconName, bool selected=false) | |
virtual | ~YDescribedItem () |
std::string | description () const |
void | setDescription (const std::string &desc) |
bool | enabled () const |
void | setEnabled (bool value) |
![]() | |
YItem (const std::string &label, bool selected=false) | |
YItem (const std::string &label, const std::string &iconName, bool selected=false) | |
virtual | ~YItem () |
virtual const char * | itemClass () const |
std::string | label () const |
void | setLabel (const std::string &newLabel) |
std::string | iconName () const |
bool | hasIconName () const |
void | setIconName (const std::string &newIconName) |
bool | selected () const |
void | setSelected (bool sel=true) |
int | status () const |
void | setStatus (int newStatus) |
void | setIndex (int index) |
int | index () const |
void | setData (void *newData) |
void * | data () const |
virtual bool | hasChildren () const |
virtual YItemIterator | childrenBegin () |
virtual YItemConstIterator | childrenBegin () const |
virtual YItemIterator | childrenEnd () |
virtual YItemConstIterator | childrenEnd () const |
virtual YItem * | parent () const |
virtual std::string | debugLabel () const |
std::string | limitLength (const std::string &text, int limit) const |
Item class that has a (possibly multi-line) description text in addition to the normal label.
|
inline |
Constructor with the label, the description and optionally the selected state.
|
inline |
Constructor with the label, the description, the icon name and optionally the selected state.
|
inlinevirtual |
Destructor.
|
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.
|
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.
|
inline |
Set this item's description text.
|
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).