Overview | Package | Class | Tree | Deprecated | Index | Help
Qt Jambi Home |
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.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`, 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<A>, QSignalEmitter.Signal2<A,B>, QSignalEmitter.Signal3<A,B,C>, QSignalEmitter.Signal4<A,B,C,D>, QSignalEmitter.Signal5<A,B,C,D,E>, QSignalEmitter.Signal6<A,B,C,D,E,F>, QSignalEmitter.Signal7<A,B,C,D,E,F,G>, QSignalEmitter.Signal8<A,B,C,D,E,F,G,H>, QSignalEmitter.Signal9<A,B,C,D,E,F,G,H,I>`

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()` Returns the validator's minimum acceptable value.
`int` | `decimals()` Returns the validator's maximum number of digits after the decimal point.
`static QDoubleValidator` | `fromNativePointer(QNativePointer nativePointer)` This function returns the QDoubleValidator instance pointed to by nativePointer
`QDoubleValidator.Notation` | `notation()` Returns the notation of how a string can describe a number.
`void` | `setBottom(double arg__1)` Sets the validator's minimum acceptable value to `arg__1`.
`void` | `setDecimals(int arg__1)` Sets the validator's maximum number of digits after the decimal point to `arg__1`.
`void` | `setNotation(QDoubleValidator.Notation arg__1)` Sets the notation of how a string can describe a number to `arg__1`.
`void` | `setRange(double bottom, double top)` Equivalent to `setRange`(`bottom`, `top`, 0).
`void` | `setRange(double bottom, double top, int decimals)` Sets the validator to accept doubles from `bottom` to `top` inclusive, with at most `decimals` digits after the decimal point.
`void` | `setTop(double arg__1)` Sets the validator's maximum acceptable value to `arg__1`.
`double` | `top()` Returns the validator's maximum acceptable value.
`QValidator.State` | `validate(QValidator.QValidationData arg__1)` Equivalent to validate(`arg__1`, ).

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

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

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

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

Methods inherited from class java.lang.Object
`clone, equals, getClass, hashCode, notify, notifyAll, toString, 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()

  Returns the validator's minimum acceptable value.

  See Also:
    `setBottom`, `setRange`

### decimals

    public final int decimals()

  Returns the validator's maximum number of digits after the decimal point.

  See Also:
    `setDecimals`, `setRange`

### notation

    public final QDoubleValidator.Notation notation()

  Returns the notation of how a string can describe a number.

  See Also:
    `setNotation`, Notation

### setBottom

    public final void setBottom(double arg__1)

  Sets the validator's minimum acceptable value to `arg__1`.

  See Also:
    `bottom`, `setRange`

### setDecimals

    public final void setDecimals(int arg__1)

  Sets the validator's maximum number of digits after the decimal point to `arg__1`.

  See Also:
    `decimals`, `setRange`

### setNotation

    public final void setNotation(QDoubleValidator.Notation arg__1)

  Sets the notation of how a string can describe a number to `arg__1`.

  See Also:
    `notation`, Notation

### setTop

    public final void setTop(double arg__1)

  Sets the validator's maximum acceptable value to `arg__1`.

  See Also:
    `top`, `setRange`

### top

    public final double top()

  Returns the validator's maximum acceptable value.

  See Also:
    `setTop`, `setRange`

### setRange

    public final void setRange(double bottom,
                               double top)

  Equivalent to `setRange`(`bottom`, `top`, 0).

### setRange

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

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

### validate

    public QValidator.State validate(QValidator.QValidationData arg__1)

  Equivalent to validate(`arg__1`, ).

  Specified by:
    `validate` in class `QValidator`

### fromNativePointer

    public static QDoubleValidator fromNativePointer(QNativePointer nativePointer)

  This function returns the QDoubleValidator instance pointed to by nativePointer

  Parameters:
    `nativePointer` - the QNativePointer of which object should be returned.

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