Wt: Wt::WDoubleSpinBox Class Reference

Wt 3.3.0

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Hierarchy
- Class Members

Public Member Functions
Wt::WDoubleSpinBox Class Reference

An input control for fixed point numbers. More...

`#include <Wt/WDoubleSpinBox>`

Inheritance diagram for Wt::WDoubleSpinBox:
[legend]

List of all members.

## 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.

## Detailed Description

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.

See also:
  WSpinBox

Note:
  A spinbox configures a validator for validating the input. Therefore you cannot set a validator yourself.

## Constructor & Destructor Documentation

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.

## Member Function Documentation

int Wt::WDoubleSpinBox::decimals | ( |  | ) | const`[virtual]`

Returns the precision.

See also:
  setDecimals()

Implements Wt::WAbstractSpinBox.

double Wt::WDoubleSpinBox::maximum | ( |  | ) | const

Returns the maximum value.

See also:
  setMaximum()

double Wt::WDoubleSpinBox::minimum | ( |  | ) | const

Returns the minimum value.

See also:
  setMinimum()

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.

See also:
  setMinimum(), setMaximum()

void Wt::WDoubleSpinBox::setSingleStep | ( | double | step | ) |

Sets the step value.

The default value is 1.0.

void Wt::WDoubleSpinBox::setValue | ( | double | value | ) |

Sets the value.

`value` must be a value between minimum() and maximum().

The default value is 0

double Wt::WDoubleSpinBox::singleStep | ( |  | ) | const

Returns the step value.

See also:
  setSingleStep()

Signal<double>& Wt::WDoubleSpinBox::valueChanged | ( |  | ) |

A signal that indicates when the value has changed.

This signal is emitted when setValue() is called.

See also:
  setValue()

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator