Wt
3.3.0
|
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. |
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::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.