File: qdoublevalidator.html

package info (click to toggle)
python-qt4 4.0.1-5
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 18,632 kB
  • ctags: 2,639
  • sloc: python: 29,409; sh: 5,646; cpp: 3,168; xml: 149; makefile: 109
file content (23 lines) | stat: -rw-r--r-- 6,708 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QDoubleValidator Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QDoubleValidator Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QDoubleValidator class provides range checking of floating-point numbers. <a href="#details">More...</a></p>
<p>Inherits <a href="qvalidator.html">QValidator</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qdoublevalidator.html#QDoubleValidator">__init__</a></b> (<i>self</i>, QObject&#160;<i>parent</i>)</li><li><div class="fn" /><b><a href="qdoublevalidator.html#QDoubleValidator-2">__init__</a></b> (<i>self</i>, float&#160;<i>bottom</i>, float&#160;<i>top</i>, int&#160;<i>decimals</i>, QObject&#160;<i>parent</i>)</li><li><div class="fn" />float <b><a href="qdoublevalidator.html#bottom">bottom</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qdoublevalidator.html#decimals">decimals</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qdoublevalidator.html#setBottom">setBottom</a></b> (<i>self</i>, float)</li><li><div class="fn" /><b><a href="qdoublevalidator.html#setDecimals">setDecimals</a></b> (<i>self</i>, int)</li><li><div class="fn" /><b><a href="qdoublevalidator.html#setRange">setRange</a></b> (<i>self</i>, float&#160;<i>bottom</i>, float&#160;<i>top</i>, int&#160;<i>decimals</i>&#160;=&#160;0)</li><li><div class="fn" /><b><a href="qdoublevalidator.html#setTop">setTop</a></b> (<i>self</i>, float)</li><li><div class="fn" />float <b><a href="qdoublevalidator.html#top">top</a></b> (<i>self</i>)</li><li><div class="fn" />(QValidator.State, int) <b><a href="qdoublevalidator.html#validate">validate</a></b> (<i>self</i>, QString, int)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QDoubleValidator class provides range checking of floating-point numbers.</p>
<p>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 <a href="qvalidator.html#fixup">fixup</a>() function.</p>
<p>You can set the acceptable range in one call with <a href="qdoublevalidator.html#setRange">setRange</a>(), or with <a href="qdoublevalidator.html#bottom-prop">setBottom</a>() and <a href="qdoublevalidator.html#top-prop">setTop</a>(). Set the number of decimal places with <a href="qdoublevalidator.html#decimals-prop">setDecimals</a>(). The <a href="qdoublevalidator.html#validate">validate</a>() function returns the validation state.</p>
<p>See also <a href="qintvalidator.html">QIntValidator</a> and <a href="qregexpvalidator.html">QRegExpValidator</a>.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QDoubleValidator" />QDoubleValidator.__init__ (<i>self</i>, <a href="qobject.html">QObject</a>&#160;<i>parent</i>)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a validator object with a <i>parent</i> object that accepts any double.</p>
<h3 class="fn"><a name="QDoubleValidator-2" />QDoubleValidator.__init__ (<i>self</i>, float&#160;<i>bottom</i>, float&#160;<i>top</i>, int&#160;<i>decimals</i>, <a href="qobject.html">QObject</a>&#160;<i>parent</i>)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a validator object with a <i>parent</i> object. This validator will accept doubles from <i>bottom</i> to <i>top</i> inclusive, with up to <i>decimals</i> digits after the decimal point.</p>
<h3 class="fn"><a name="bottom" />float QDoubleValidator.bottom (<i>self</i>)</h3><h3 class="fn"><a name="decimals" />int QDoubleValidator.decimals (<i>self</i>)</h3><h3 class="fn"><a name="setBottom" />QDoubleValidator.setBottom (<i>self</i>, float)</h3><h3 class="fn"><a name="setDecimals" />QDoubleValidator.setDecimals (<i>self</i>, int)</h3><h3 class="fn"><a name="setRange" />QDoubleValidator.setRange (<i>self</i>, float&#160;<i>bottom</i>, float&#160;<i>top</i>, int&#160;<i>decimals</i>&#160;=&#160;0)</h3><p>Sets the validator to accept doubles from <i>minimum</i> to <i>maximum</i> inclusive, with at most <i>decimals</i> digits after the decimal point.</p>
<h3 class="fn"><a name="setTop" />QDoubleValidator.setTop (<i>self</i>, float)</h3><h3 class="fn"><a name="top" />float QDoubleValidator.top (<i>self</i>)</h3><h3 class="fn"><a name="validate" />(<a href="qvalidator.html#State-enum">QValidator.State</a>, int) QDoubleValidator.validate (<i>self</i>, <a href="qstring.html">QString</a>, int)</h3><p>Returns <a href="qvalidator.html#State-enum">Acceptable</a> if the string <i>input</i> contains a double that is within the valid range and is in the correct format.</p>
<p>Returns <a href="qvalidator.html#State-enum">Intermediate</a> if <i>input</i> 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.</p>
<p>Returns <a href="qvalidator.html#State-enum">Invalid</a> if the <i>input</i> is not a double.</p>
<p>Note: If the valid range consists of just positive doubles (e.g. 0.0 to 100.0) and <i>input</i> is a negative double then <a href="qvalidator.html#State-enum">Invalid</a> is returned.</p>
<p>By default, the <i>pos</i> parameter is not used by this validator.</p>
<p>Reimplemented from <a href="qvalidator.html#validate">QValidator</a>.</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td width="25%">PyQt&#160;4.0.1 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.trolltech.com">Trolltech&#160;AS</a> 2006</td><td align="right" width="25%">Qt&#160;4.1.4</td></tr></table></div></address></body></html>