|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.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
public class QDoubleValidator
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.
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 |
---|
public QDoubleValidator(QObject parent)
public QDoubleValidator(double bottom, double top, int decimals, QObject parent)
Method Detail |
---|
public final double bottom()
setRange()
.
public final int decimals()
setRange()
.
public final QDoubleValidator.Notation notation()
ScientificNotation
. Notation
.
public final void setBottom(double arg__1)
setRange()
.
public final void setDecimals(int arg__1)
setRange()
.
public final void setNotation(QDoubleValidator.Notation arg__1)
ScientificNotation
. Notation
.
public final void setTop(double arg__1)
setRange()
.
public final double top()
setRange()
.
public final void setRange(double bottom, double top)
public void setRange(double bottom, double top, int decimals)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |