libyui
3.0.10
|
#include <YLabel.h>
Public Member Functions | |
YLabel (YWidget *parent, const std::string &text, bool isHeading=false, bool isOutputField=false) | |
virtual | ~YLabel () |
virtual const char * | widgetClass () const |
std::string | text () const |
std::string | value () const |
std::string | label () const |
virtual void | setText (const std::string &newText) |
void | setValue (const std::string &newValue) |
void | setLabel (const std::string &newLabel) |
bool | isHeading () const |
bool | isOutputField () const |
bool | useBoldFont () const |
virtual void | setUseBoldFont (bool bold=true) |
virtual bool | setProperty (const std::string &propertyName, const YPropertyValue &val) |
virtual YPropertyValue | getProperty (const std::string &propertyName) |
virtual const YPropertySet & | propertySet () |
virtual std::string | debugLabel () const |
Implementation of the Label, Heading and OutputField widgets
YLabel::YLabel | ( | YWidget * | parent, |
const std::string & | text, | ||
bool | isHeading = false , |
||
bool | isOutputField = false |
||
) |
Constructor.
'isHeading' indicates if this should be displayed as a Heading widget, i.e. with a bold and/or larger font. This cannot be changed after creating the widget.
'isOutputField' indicates if this should be displayed as an OutputField widget, i.e. similar to an InputField the user can't change. This cannot be changed after creating the widget.
YLabel::~YLabel | ( | ) | [virtual] |
std::string YLabel::debugLabel | ( | ) | const [virtual] |
YPropertyValue YLabel::getProperty | ( | const std::string & | propertyName | ) | [virtual] |
bool YLabel::isHeading | ( | ) | const |
bool YLabel::isOutputField | ( | ) | const |
const YPropertySet & YLabel::propertySet | ( | ) | [virtual] |
bool YLabel::setProperty | ( | const std::string & | propertyName, |
const YPropertyValue & | val | ||
) | [virtual] |
Set a property. Reimplemented from YWidget.
This method may throw exceptions, for example
This function returns 'true' if the value was successfully set and 'false' if that value requires special handling (not in error cases: those are covered by exceptions).
Reimplemented from YWidget.
Definition at line 133 of file YLabel.cc.
void YLabel::setText | ( | const std::string & | newText | ) | [virtual] |
void YLabel::setUseBoldFont | ( | bool | bold = true | ) | [virtual] |
void YLabel::setValue | ( | const std::string & | newValue | ) | [inline] |
std::string YLabel::text | ( | ) | const |
bool YLabel::useBoldFont | ( | ) | const |
std::string YLabel::value | ( | ) | const [inline] |
const char * YLabel::widgetClass | ( | ) | const [virtual] |