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() );
void add(const YProperty &prop)
Add a property to this property set.
virtual ~YProgressBar()
Destructor.
virtual void setLabel(const std::string &label)
Set the label (the caption above the progress bar).
virtual void setValue(int newValue)
Set the current progress value ( <= maxValue() ).
A set of properties to check names and types against.
bool isEmpty() const
Returns 'true' if this property set does not contain anything.
std::string stringVal() const
Methods to get the value of this property.
YPropertyType type() const
Returns the type of this property value.
int value() const
Return the current progress value.
Class for widget properties.
virtual YPropertyValue getProperty(const std::string &propertyName)
Get a property.
YProgressBar(YWidget *parent, const std::string &label, int maxValue=100)
Constructor.
virtual bool setProperty(const std::string &propertyName, const YPropertyValue &val)
Set a property.
void check(const std::string &propertyName) const
Check if a property 'propertyName' exists in this property set.
int maxValue() const
Return the maximum progress value.
Transport class for the value of simple properties.
virtual const YPropertySet & propertySet()
Return this class's property set.
std::string label()
Get the label (the caption above the progress bar).