1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
|
'\" t
.TH QDoubleValidator 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*-
.\" Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
.\" license file included in the distribution for a complete license
.\" statement.
.\"
.ad l
.nh
.SH NAME
QDoubleValidator \- Range checking of floating-point numbers
.SH SYNOPSIS
\fC#include <ntqvalidator.h>\fR
.PP
Inherits QValidator.
.PP
.SS "Public Members"
.in +1c
.ti -1c
.BI "\fBQDoubleValidator\fR ( QObject * parent, const char * name = 0 )"
.br
.ti -1c
.BI "\fBQDoubleValidator\fR ( double bottom, double top, int decimals, QObject * parent, const char * name = 0 )"
.br
.ti -1c
.BI "\fB~QDoubleValidator\fR ()"
.br
.ti -1c
.BI "virtual QValidator::State \fBvalidate\fR ( QString & input, int & ) const"
.br
.ti -1c
.BI "virtual void \fBsetRange\fR ( double minimum, double maximum, int decimals = 0 )"
.br
.ti -1c
.BI "void \fBsetBottom\fR ( double )"
.br
.ti -1c
.BI "void \fBsetTop\fR ( double )"
.br
.ti -1c
.BI "void \fBsetDecimals\fR ( int )"
.br
.ti -1c
.BI "double \fBbottom\fR () const"
.br
.ti -1c
.BI "double \fBtop\fR () const"
.br
.ti -1c
.BI "int \fBdecimals\fR () const"
.br
.in -1c
.SS "Properties"
.in +1c
.ti -1c
.BI "double \fBbottom\fR - the validator's minimum acceptable value"
.br
.ti -1c
.BI "int \fBdecimals\fR - the validator's maximum number of digits after the decimal point"
.br
.ti -1c
.BI "double \fBtop\fR - the validator's maximum acceptable value"
.br
.in -1c
.SH DESCRIPTION
The QDoubleValidator class provides range checking of floating-point numbers.
.PP
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.
.PP
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.
.PP
See also QIntValidator, QRegExpValidator, and Miscellaneous Classes.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "QDoubleValidator::QDoubleValidator ( QObject * parent, const char * name = 0 )"
Constructs a validator object with parent \fIparent\fR, called \fIname\fR, which accepts any double.
.SH "QDoubleValidator::QDoubleValidator ( double bottom, double top, int decimals, QObject * parent, const char * name = 0 )"
Constructs a validator object with parent \fIparent\fR, called \fIname\fR. This validator will accept doubles from \fIbottom\fR to \fItop\fR inclusive, with up to \fIdecimals\fR digits after the decimal point.
.SH "QDoubleValidator::~QDoubleValidator ()"
Destroys the validator, freeing any resources used.
.SH "double QDoubleValidator::bottom () const"
Returns the validator's minimum acceptable value. See the "bottom" property for details.
.SH "int QDoubleValidator::decimals () const"
Returns the validator's maximum number of digits after the decimal point. See the "decimals" property for details.
.SH "void QDoubleValidator::setBottom ( double )"
Sets the validator's minimum acceptable value. See the "bottom" property for details.
.SH "void QDoubleValidator::setDecimals ( int )"
Sets the validator's maximum number of digits after the decimal point. See the "decimals" property for details.
.SH "void QDoubleValidator::setRange ( double minimum, double maximum, int decimals = 0 )\fC [virtual]\fR"
Sets the validator to accept doubles from \fIminimum\fR to \fImaximum\fR inclusive, with at most \fIdecimals\fR digits after the decimal point.
.SH "void QDoubleValidator::setTop ( double )"
Sets the validator's maximum acceptable value. See the "top" property for details.
.SH "double QDoubleValidator::top () const"
Returns the validator's maximum acceptable value. See the "top" property for details.
.SH "QValidator::State QDoubleValidator::validate ( QString & input, int & ) const\fC [virtual]\fR"
Returns Acceptable if the string \fIinput\fR contains a double that is within the valid range and is in the correct format.
.PP
Returns Intermediate if \fIinput\fR contains a double that is outside the range or is in the wrong format, e.g. with too many digits after the decimal point or is empty.
.PP
Returns Invalid if the \fIinput\fR is not a double.
.PP
Note: If the valid range consists of just positive doubles (e.g. 0.0 - 100.0) and \fIinput\fR is a negative double then Invalid is returned.
.PP
Reimplemented from QValidator.
.SS "Property Documentation"
.SH "double bottom"
This property holds the validator's minimum acceptable value.
.PP
Set this property's value with setBottom() and get this property's value with bottom().
.PP
See also setRange().
.SH "int decimals"
This property holds the validator's maximum number of digits after the decimal point.
.PP
Set this property's value with setDecimals() and get this property's value with decimals().
.PP
See also setRange().
.SH "double top"
This property holds the validator's maximum acceptable value.
.PP
Set this property's value with setTop() and get this property's value with top().
.PP
See also setRange().
.SH "SEE ALSO"
.BR http://doc.trolltech.com/qdoublevalidator.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. See the
license file included in the distribution for a complete license
statement.
.SH AUTHOR
Generated automatically from the source code.
.SH BUGS
If you find a bug in Qt, please report it as described in
.BR http://doc.trolltech.com/bughowto.html .
Good bug reports help us to help you. Thank you.
.P
The definitive TQt documentation is provided in HTML format; it is
located at $QTDIR/doc/html and can be read using TQt Assistant or with
a web browser. This man page is provided as a convenience for those
users who prefer man pages, although this format is not officially
supported by Trolltech.
.P
If you find errors in this manual page, please report them to
.BR qt-bugs@trolltech.com .
Please include the name of the manual page (tqdoublevalidator.3qt) and the Qt
version (3.3.8).
|