1QDoubleValidator(3qt)                                    QDoubleValidator(3qt)
2
3
4

NAME

6       QDoubleValidator - Range checking of floating-point numbers
7

SYNOPSIS

9       #include <qvalidator.h>
10
11       Inherits QValidator.
12
13   Public Members
14       QDoubleValidator ( QObject * parent, const char * name = 0 )
15       QDoubleValidator ( double bottom, double top, int decimals, QObject *
16           parent, const char * name = 0 )
17       ~QDoubleValidator ()
18       virtual QValidator::State validate ( QString & input, int & ) const
19       virtual void setRange ( double minimum, double maximum, int decimals =
20           0 )
21       void setBottom ( double )
22       void setTop ( double )
23       void setDecimals ( int )
24       double bottom () const
25       double top () const
26       int decimals () const
27
28   Properties
29       double bottom - the validator's minimum acceptable value
30       int decimals - the validator's maximum number of digits after the
31           decimal point
32       double top - the validator's maximum acceptable value
33

DESCRIPTION

35       The QDoubleValidator class provides range checking of floating-point
36       numbers.
37
38       QDoubleValidator provides an upper bound, a lower bound and a limit on
39       the number of digits after the decimal point. It does not provide a
40       fixup() function.
41
42       You can set the acceptable range in one call with setRange(), or with
43       setBottom() and setTop(). Set the number of decimal places with
44       setDecimals(). The validate() function returns the validation state.
45
46       See also QIntValidator, QRegExpValidator, and Miscellaneous Classes.
47

MEMBER FUNCTION DOCUMENTATION

QDoubleValidator::QDoubleValidator ( QObject * parent, const char * name = 0 )

50
51       Constructs a validator object with parent parent, called name, which
52       accepts any double.
53

QDoubleValidator::QDoubleValidator ( double bottom, double top, int decimals,

55       QObject * parent, const char * name = 0 )
56       Constructs a validator object with parent parent, called name. This
57       validator will accept doubles from bottom to top inclusive, with up to
58       decimals digits after the decimal point.
59

QDoubleValidator::~QDoubleValidator ()

61       Destroys the validator, freeing any resources used.
62

double QDoubleValidator::bottom () const

64       Returns the validator's minimum acceptable value. See the "bottom"
65       property for details.
66

int QDoubleValidator::decimals () const

68       Returns the validator's maximum number of digits after the decimal
69       point. See the "decimals" property for details.
70

void QDoubleValidator::setBottom ( double )

72       Sets the validator's minimum acceptable value. See the "bottom"
73       property for details.
74

void QDoubleValidator::setDecimals ( int )

76       Sets the validator's maximum number of digits after the decimal point.
77       See the "decimals" property for details.
78

void QDoubleValidator::setRange ( double minimum, double maximum, int decimals

80       = 0 ) [virtual]
81       Sets the validator to accept doubles from minimum to maximum inclusive,
82       with at most decimals digits after the decimal point.
83

void QDoubleValidator::setTop ( double )

85       Sets the validator's maximum acceptable value. See the "top" property
86       for details.
87

double QDoubleValidator::top () const

89       Returns the validator's maximum acceptable value. See the "top"
90       property for details.
91

QValidator::State QDoubleValidator::validate ( QString & input, int & ) const

93       [virtual]
94       Returns Acceptable if the string input contains a double that is within
95       the valid range and is in the correct format.
96
97       Returns Intermediate if input contains a double that is outside the
98       range or is in the wrong format, e.g. with too many digits after the
99       decimal point or is empty.
100
101       Returns Invalid if the input is not a double.
102
103       Note: If the valid range consists of just positive doubles (e.g. 0.0 -
104       100.0) and input is a negative double then Invalid is returned.
105
106       Reimplemented from QValidator.
107
108   Property Documentation

double bottom

110       This property holds the validator's minimum acceptable value.
111
112       Set this property's value with setBottom() and get this property's
113       value with bottom().
114
115       See also setRange().
116

int decimals

118       This property holds the validator's maximum number of digits after the
119       decimal point.
120
121       Set this property's value with setDecimals() and get this property's
122       value with decimals().
123
124       See also setRange().
125

double top

127       This property holds the validator's maximum acceptable value.
128
129       Set this property's value with setTop() and get this property's value
130       with top().
131
132       See also setRange().
133
134

SEE ALSO

136       http://doc.trolltech.com/qdoublevalidator.html
137       http://www.trolltech.com/faq/tech.html
138
140       Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
141       license file included in the distribution for a complete license
142       statement.
143

AUTHOR

145       Generated automatically from the source code.
146

BUGS

148       If you find a bug in Qt, please report it as described in
149       http://doc.trolltech.com/bughowto.html.  Good bug reports help us to
150       help you. Thank you.
151
152       The definitive Qt documentation is provided in HTML format; it is
153       located at $QTDIR/doc/html and can be read using Qt Assistant or with a
154       web browser. This man page is provided as a convenience for those users
155       who prefer man pages, although this format is not officially supported
156       by Trolltech.
157
158       If you find errors in this manual page, please report them to qt-
159       bugs@trolltech.com.  Please include the name of the manual page
160       (qdoublevalidator.3qt) and the Qt version (3.3.8).
161
162
163
164Trolltech AS                    2 February 2007          QDoubleValidator(3qt)
Impressum