An input control for fixed point numbers. More...
#include <Wt/WDoubleSpinBox>

Public Member Functions | |
| WDoubleSpinBox (WContainerWidget *parent=0) | |
| Creates a spin-box. | |
| void | setMinimum (double minimum) |
| Sets the minimum value. | |
| double | minimum () const |
| Returns the minimum value. | |
| void | setMaximum (double maximum) |
| Sets the maximum value. | |
| double | maximum () const |
| Returns the maximum value. | |
| void | setRange (double minimum, double maximum) |
| Sets the range. | |
| void | setSingleStep (double step) |
| Sets the step value. | |
| double | singleStep () const |
| Returns the step value. | |
| void | setDecimals (int precision) |
| Sets the precision. | |
| int | decimals () const |
| Returns the precision. | |
| void | setValue (double value) |
| Sets the value. | |
| double | value () const |
| Returns the value. | |
| Signal< double > & | valueChanged () |
| A signal that indicates when the value has changed. | |
| virtual void | refresh () |
| Refresh the widget. | |
Protected Member Functions | |
| virtual void | render (WFlags< RenderFlag > flags) |
| Renders the widget. | |
An input control for fixed point numbers.
The spin box provides a control for entering a fixed point number. It consists of a line edit, and buttons which allow to increase or decrease the value. If you rather need input of an integer number number, use WSpinBox instead.
WDoubleSpinBox is an inline widget.
| Wt::WDoubleSpinBox::WDoubleSpinBox | ( | WContainerWidget * | parent = 0 | ) |
Creates a spin-box.
The range is (0.0 - 99.99), the step size 1.0, and the spin box has a precision of 2 decimals.
The initial value is 0.0.
| int Wt::WDoubleSpinBox::decimals | ( | ) | const [virtual] |
| double Wt::WDoubleSpinBox::maximum | ( | ) | const |
Returns the maximum value.
| double Wt::WDoubleSpinBox::minimum | ( | ) | const |
Returns the minimum value.
| void Wt::WDoubleSpinBox::refresh | ( | ) | [virtual] |
Refresh the widget.
The refresh method is invoked when the locale is changed using WApplication::setLocale() or when the user hit the refresh button.
The widget must actualize its contents in response.
Reimplemented from Wt::WAbstractSpinBox.
| void Wt::WDoubleSpinBox::render | ( | WFlags< RenderFlag > | flags | ) | [protected, virtual] |
Renders the widget.
This function renders the widget (or an update for the widget), after this has been scheduled using scheduleRender().
The default implementation will render the widget by serializing changes to JavaScript and HTML. You may want to reimplement this widget if you have been postponing some of the layout / rendering implementation until the latest moment possible. In that case you should make sure you call the base implementation however.
Reimplemented from Wt::WAbstractSpinBox.
| void Wt::WDoubleSpinBox::setDecimals | ( | int | precision | ) |
Sets the precision.
This sets the number of digits after the decimal point shown
The default precision is 2.
| void Wt::WDoubleSpinBox::setMaximum | ( | double | maximum | ) |
Sets the maximum value.
The default value is 99.99.
| void Wt::WDoubleSpinBox::setMinimum | ( | double | minimum | ) |
Sets the minimum value.
The default value is 0.0.
| void Wt::WDoubleSpinBox::setRange | ( | double | minimum, |
| double | maximum | ||
| ) |
Sets the range.
| void Wt::WDoubleSpinBox::setSingleStep | ( | double | step | ) |
Sets the step value.
The default value is 1.0.
| void Wt::WDoubleSpinBox::setValue | ( | double | value | ) |
| double Wt::WDoubleSpinBox::singleStep | ( | ) | const |
Returns the step value.
| Signal<double>& Wt::WDoubleSpinBox::valueChanged | ( | ) |
A signal that indicates when the value has changed.
This signal is emitted when setValue() is called.
1.7.6.1