26 #define YUILogComponent "ui"
29 #include "YUISymbols.h"
30 #include "YProgressBar.h"
40 , maxValue( maxValue )
61 YUI_CHECK_NEW( priv );
88 return priv->maxValue;
103 if ( newValue > priv->maxValue )
104 newValue = priv->maxValue;
106 priv->value = newValue;
121 propSet.
add(
YProperty( YUIProperty_Value, YIntegerProperty ) );
122 propSet.
add(
YProperty( YUIProperty_Label, YStringProperty ) );
135 if ( propertyName == YUIProperty_Value )
setValue( val.integerVal() );
virtual ~YProgressBar()
Destructor.
std::string label()
Get the label (the caption above the progress bar).
int value() const
Return the current progress value.
int maxValue() const
Return the maximum progress value.
virtual void setValue(int newValue)
Set the current progress value ( <= maxValue() ).
virtual void setLabel(const std::string &label)
Set the label (the caption above the progress bar).
virtual const YPropertySet & propertySet()
Return this class's property set.
virtual bool setProperty(const std::string &propertyName, const YPropertyValue &val)
Set a property.
virtual YPropertyValue getProperty(const std::string &propertyName)
Get a property.
YProgressBar(YWidget *parent, const std::string &label, int maxValue=100)
Constructor.
A set of properties to check names and types against.
void check(const std::string &propertyName) const
Check if a property 'propertyName' exists in this property set.
bool isEmpty() const
Returns 'true' if this property set does not contain anything.
void add(const YProperty &prop)
Add a property to this property set.
Transport class for the value of simple properties.
std::string stringVal() const
Methods to get the value of this property.
YPropertyType type() const
Returns the type of this property value.
Class for widget properties.