Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.trolltech.qt.gui
Class QDoubleValidator

    java.lang.Object
      com.trolltech.qt.internal.QSignalEmitterInternal
          com.trolltech.qt.QSignalEmitter
              com.trolltech.qt.QtJambiObject
                  com.trolltech.qt.core.QObject
                      com.trolltech.qt.gui.QValidator
                          com.trolltech.qt.gui.QDoubleValidator

All Implemented Interfaces:
  QtJambiInterface

    public class QDoubleValidator

extends QValidator

The QDoubleValidator class provides range checking of floating-point numbers. QDoubleValidator provides an upper bound, a lower bound, and a limit on the number of digits after the decimal point. It does not provide a `fixup()` function.

You can set the acceptable range in one call with `setRange()`, or with `setBottom()` and `setTop()`. Set the number of decimal places with `setDecimals()`. The validate() function returns the validation state.

QDoubleValidator uses its `locale()` to interpret the number. For example, in the German locale, "1,234" will be accepted as the fractional number 1.234. In Arabic locales, QDoubleValidator will accept Arabic digits.

In addition, QDoubleValidator is always guaranteed to accept a number formatted according to the "C" locale. QDoubleValidator will not accept numbers with thousand-seperators.

See also:
  `QIntValidator`, `QRegExpValidator`, and Line Edits Example.

Nested Class Summary
`static class` | `QDoubleValidator.Notation` This enum defines the allowed notations for entering a double.

Nested classes/interfaces inherited from class com.trolltech.qt.gui.QValidator
`QValidator.QValidationData, QValidator.State`

Nested classes/interfaces inherited from class com.trolltech.qt.QSignalEmitter
`QSignalEmitter.AbstractSignal, QSignalEmitter.Signal0, QSignalEmitter.Signal1, QSignalEmitter.Signal2, QSignalEmitter.Signal3, QSignalEmitter.Signal4, QSignalEmitter.Signal5, QSignalEmitter.Signal6, QSignalEmitter.Signal7, QSignalEmitter.Signal8, QSignalEmitter.Signal9`

Nested classes/interfaces inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
`com.trolltech.qt.internal.QSignalEmitterInternal.AbstractSignalInternal`

Field Summary

Fields inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
`currentSender`

Constructor Summary
`QDoubleValidator(double bottom, double top, int decimals, QObject parent)` Constructs a validator object with a `parent` object.
`QDoubleValidator(QObject parent)` Constructs a validator object with a `parent` object that accepts any double.

Method Summary
`double` | `bottom()` This property holds the validator's minimum acceptable value.
`int` | `decimals()` This property holds the validator's maximum number of digits after the decimal point.
`QDoubleValidator.Notation` | `notation()` This property holds the notation of how a string can describe a number.
`void` | `setBottom(double arg__1)` This property holds the validator's minimum acceptable value.
`void` | `setDecimals(int arg__1)` This property holds the validator's maximum number of digits after the decimal point.
`void` | `setNotation(QDoubleValidator.Notation arg__1)` This property holds the notation of how a string can describe a number.
`void` | `setRange(double bottom, double top)` Sets the validator to accept doubles from `minimum` to `maximum` inclusive, with at most `decimals` digits after the decimal point.
`void` | `setRange(double bottom, double top, int decimals)` Sets the validator to accept doubles from `minimum` to `maximum` inclusive, with at most `decimals` digits after the decimal point.
`void` | `setTop(double arg__1)` This property holds the validator's maximum acceptable value.
`double` | `top()` This property holds the validator's maximum acceptable value.

Methods inherited from class com.trolltech.qt.gui.QValidator
`fixup, locale, setLocale, validate`

Methods inherited from class com.trolltech.qt.core.QObject
`childEvent, children, connectSlotsByName, customEvent, disposeLater, dumpObjectInfo, dumpObjectTree, dynamicPropertyNames, event, eventFilter, findChild, findChild, findChild, findChildren, findChildren, findChildren, findChildren, indexOfProperty, installEventFilter, isWidgetType, killTimer, moveToThread, objectName, parent, properties, property, removeEventFilter, setObjectName, setParent, setProperty, startTimer, timerEvent, toString, userProperty`

Methods inherited from class com.trolltech.qt.QtJambiObject
`dispose, disposed, equals, finalize, reassignNativeResources, tr, tr, tr`

Methods inherited from class com.trolltech.qt.QSignalEmitter
`blockSignals, disconnect, disconnect, signalsBlocked, signalSender, thread`

Methods inherited from class com.trolltech.qt.internal.QSignalEmitterInternal
`__qt_signalInitialization`

Methods inherited from class java.lang.Object
`clone, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface com.trolltech.qt.QtJambiInterface
`disableGarbageCollection, nativeId, nativePointer, reenableGarbageCollection, setJavaOwnership`

Constructor Detail

### QDoubleValidator

    public QDoubleValidator(QObject parent)

  Constructs a validator object with a `parent` object that accepts any double.

### QDoubleValidator

    public QDoubleValidator(double bottom,
                            double top,
                            int decimals,
                            QObject parent)

  Constructs a validator object with a `parent` object. This validator will accept doubles from `bottom` to `top` inclusive, with up to `decimals` digits after the decimal point.

Method Detail

### bottom

    public final double bottom()

  This property holds the validator's minimum acceptable value. By default, this property contains a value of -infinity.

See also:
  `setRange()`.

### decimals

    public final int decimals()

  This property holds the validator's maximum number of digits after the decimal point. By default, this property contains a value of 1000.

See also:
  `setRange()`.

### notation

    public final QDoubleValidator.Notation notation()

  This property holds the notation of how a string can describe a number. By default, this property is set to `ScientificNotation` .

See also:
  `Notation` .

### setBottom

    public final void setBottom(double arg__1)

  This property holds the validator's minimum acceptable value. By default, this property contains a value of -infinity.

See also:
  `setRange()`.

### setDecimals

    public final void setDecimals(int arg__1)

  This property holds the validator's maximum number of digits after the decimal point. By default, this property contains a value of 1000.

See also:
  `setRange()`.

### setNotation

    public final void setNotation(QDoubleValidator.Notation arg__1)

  This property holds the notation of how a string can describe a number. By default, this property is set to `ScientificNotation` .

See also:
  `Notation` .

### setTop

    public final void setTop(double arg__1)

  This property holds the validator's maximum acceptable value. By default, this property contains a value of infinity.

See also:
  `setRange()`.

### top

    public final double top()

  This property holds the validator's maximum acceptable value. By default, this property contains a value of infinity.

See also:
  `setRange()`.

### setRange

    public final void setRange(double bottom,
                               double top)

  Sets the validator to accept doubles from `minimum` to `maximum` inclusive, with at most `decimals` digits after the decimal point.

### setRange

    public void setRange(double bottom,
                         double top,
                         int decimals)

  Sets the validator to accept doubles from `minimum` to `maximum` inclusive, with at most `decimals` digits after the decimal point.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD