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