A spin box. More...
#include <Wt/WSpinBox>
Public Member Functions | |
WSpinBox (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 | setValue (double value) |
Sets the value. | |
double | value () const |
Returns the value. | |
Signal< double > & | valueChanged () |
A signal that indicates when the value has changed. |
A spin box.
The spin box provides a control for entering a number. It consists of a line edit, and buttons which allow to increase or decrease the value.
WSpinBox is an inline widget.
Using HTML4, the widget is implemented using a <input type="text"> The element can be styled using the Wt-spinbox
style. It may be styled through the current theme, or you can override the style using internal or external CSS as appropriate.
Wt::WSpinBox::WSpinBox | ( | WContainerWidget * | parent = 0 ) |
Creates a spin-box.
The range is (0-99) and the step size 1.
double Wt::WSpinBox::maximum | ( | ) | const |
Returns the maximum value.
double Wt::WSpinBox::minimum | ( | ) | const |
Returns the minimum value.
void Wt::WSpinBox::setMaximum | ( | double | maximum ) |
Sets the maximum value.
The default value is 99.
void Wt::WSpinBox::setMinimum | ( | double | minimum ) |
Sets the minimum value.
The default value is 0.
void Wt::WSpinBox::setRange | ( | double | minimum, |
double | maximum | ||
) |
Sets the range.
void Wt::WSpinBox::setSingleStep | ( | double | step ) |
Sets the step value.
The default value is 1.
void Wt::WSpinBox::setValue | ( | double | value ) |
Signal<double>& Wt::WSpinBox::valueChanged | ( | ) |
A signal that indicates when the value has changed.
This signal is emitted when setValue() is called.