<tdalign="right"valign="center"><imgsrc="logo32.png"align="right"width="64"height="32"border="0"></td></tr></table><h1align=center>TQValidator Class Reference</h1>
<p>The TQValidator class provides validation of input text.
<p>Inherited by <ahref="qintvalidator.html">TQIntValidator</a>, <ahref="qdoublevalidator.html">TQDoubleValidator</a>, and <ahref="tqregexpvalidator.html">TQRegExpValidator</a>.
<ahref="qdoublevalidator.html">TQDoubleValidator</a>, provide basic numeric-range checking, and <ahref="tqregexpvalidator.html">TQRegExpValidator</a> provides general checking using a custom <ahref="tqregexp.html#regular-expression">regular expression</a>.
is <em>clearly</em> invalid. <ahref="#State-enum">Intermediate</a> is less obvious: the
concept of validity is slippery when the string is incomplete
(still being edited). TQValidator defines <ahref="#State-enum">Intermediate</a> as the
property of a string that is neither clearly invalid nor
acceptable as a final result. <ahref="#State-enum">Acceptable</a> means that the string
is acceptable as a final result. One might say that any string
that is a plausible intermediate state during entry of an <ahref="#State-enum">Acceptable</a> string is <ahref="#State-enum">Intermediate</a>.
<p> Here are some examples:
<p><ul>
<p><li> For a line edit that accepts integers from 0 to 999 inclusive,
42 and 123 are <ahref="#State-enum">Acceptable</a>, the empty string and 1114 are <ahref="#State-enum">Intermediate</a> and asdf is <ahref="#State-enum">Invalid</a>.
<p><li> For an editable combobox that accepts URLs, any well-formed URL
is <ahref="#State-enum">Acceptable</a>, "http://www.trolltech.com/," is <ahref="#State-enum">Intermediate</a>
(it might be a cut and paste operation that accidentally took in a
comma at the end), the empty string is <ahref="#State-enum">Intermediate</a> (the user
might select and delete all of the text in preparation for entering
a new URL), and "http:///./" is <ahref="#State-enum">Invalid</a>.
<p><li> For a spin box that accepts lengths, "11cm" and "1in" are <ahref="#State-enum">Acceptable</a>, "11" and the empty string are <ahref="#State-enum">Intermediate</a> and
"http://www.trolltech.com" and "hour" are <ahref="#State-enum">Invalid</a>.
<p></ul>
<p><ahref="#fixup">fixup</a>() is provided for validators that can repair some user
<p>Reimplemented in <ahref="qintvalidator.html#validate">TQIntValidator</a>, <ahref="qdoublevalidator.html#validate">TQDoubleValidator</a>, and <ahref="tqregexpvalidator.html#validate">TQRegExpValidator</a>.