Wt 3.1.10
Public Member Functions
Wt::WDoubleSpinBox Class Reference

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

#include <Wt/WDoubleSpinBox>

Inheritance diagram for Wt::WDoubleSpinBox:
Inheritance graph
[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 WDoubleSpinBox instead.

WDoubleSpinBox is an inline widget.

CSS

See WAbstractSpinBox.

See also:
WSpinBox

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

Generated on Sat Dec 24 2011 for the C++ Web Toolkit (Wt) by doxygen 1.7.4