libyui
 
Loading...
Searching...
No Matches
YDescribedItem Class Reference

#include <YDescribedItem.h>

Inheritance diagram for YDescribedItem:
Collaboration diagram for YDescribedItem:

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)
 
- Public Member Functions inherited from YItem
 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 YItemparent () const
 
virtual std::string debugLabel () const
 
std::string limitLength (const std::string &text, int limit) const
 

Detailed Description

Item class that has a (possibly multi-line) description text in addition to the normal label.

Constructor & Destructor Documentation

◆ YDescribedItem() [1/2]

YDescribedItem::YDescribedItem ( const std::string & label,
const std::string & description = "",
bool selected = false )
inline

Constructor with the label, the description and optionally the selected state.

◆ YDescribedItem() [2/2]

YDescribedItem::YDescribedItem ( const std::string & label,
const std::string & description,
const std::string & iconName,
bool selected = false )
inline

Constructor with the label, the description, the icon name and optionally the selected state.

◆ ~YDescribedItem()

virtual YDescribedItem::~YDescribedItem ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ description()

std::string YDescribedItem::description ( ) const
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.

◆ enabled()

bool YDescribedItem::enabled ( ) const
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.

◆ setDescription()

void YDescribedItem::setDescription ( const std::string & desc)
inline

Set this item's description text.

◆ setEnabled()

void YDescribedItem::setEnabled ( bool value)
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).


The documentation for this class was generated from the following file: