<class name="QIntValidator" doc="/** <p>The <a href="QIntValidator.html#QIntValidator(com.trolltech.qt.core.QObject)"><tt>QIntValidator</tt></a> class provides a validator that ensures a string contains a valid integer within a specified range.</p> <p>Example of use:</p> <pre> QValidator *validator = new QIntValidator(100, 999, this); QLineEdit *edit = new QLineEdit(this); <span class="comment"> // the edit lineedit will only accept integers between 100 and 999</span> edit-&gt;setValidator(validator);</pre> <p>Below we present some examples of validators. In practice they would normally be associated with a widget as in the example above.</p> <pre> QString str; int pos = 0; QIntValidator v(100, 999, this); str = &quot;1&quot;; v.validate(str, pos); <span class="comment">// returns Intermediate</span> str = &quot;12&quot;; v.validate(str, pos); <span class="comment">// returns Intermediate</span> str = &quot;123&quot;; v.validate(str, pos); <span class="comment">// returns Acceptable</span> str = &quot;678&quot;; v.validate(str, pos); <span class="comment">// returns Acceptable</span> str = &quot;1234&quot;; v.validate(str, pos); <span class="comment">// returns Invalid</span> str = &quot;-123&quot;; v.validate(str, pos); <span class="comment">// returns Invalid</span> str = &quot;abc&quot;; v.validate(str, pos); <span class="comment">// returns Invalid</span> str = &quot;12cm&quot;; v.validate(str, pos); <span class="comment">// returns Invalid</span></pre> <p>The minimum and maximum values are set in one call with <a href="QIntValidator.html#setRange(int, int)"><tt>setRange</tt></a>, or individually with <a href="QIntValidator.html#setBottom(int)"><tt>setBottom</tt></a> and <a href="QIntValidator.html#setTop(int)"><tt>setTop</tt></a>.</p> <p><a href="QIntValidator.html#QIntValidator(com.trolltech.qt.core.QObject)"><tt>QIntValidator</tt></a> uses its <a href="QValidator.html#locale()"><tt>locale</tt></a> to interpret the number. For example, in Arabic locales, <a href="QIntValidator.html#QIntValidator(com.trolltech.qt.core.QObject)"><tt>QIntValidator</tt></a> will accept Arabic digits. In addition, <a href="QIntValidator.html#QIntValidator(com.trolltech.qt.core.QObject)"><tt>QIntValidator</tt></a> is always guaranteed to accept a number formatted according to the &quot;C&quot; locale.</p> @see <a href="QDoubleValidator.html"><tt>QDoubleValidator</tt></a> @see <a href="QRegExpValidator.html"><tt>QRegExpValidator</tt></a> @see <a href="%2E%2E/qtjambi-lineedits.html">Line Edits Example</tt></a> */"> <method name="public QIntValidator(int bottom, int top, com.trolltech.qt.core.QObject parent)" doc="/** <p>Constructs a validator with a <tt>parent</tt>, that accepts integers from <tt>bottom</tt> to <tt>top</tt> inclusive.</p> */"/> <method name="public QIntValidator(com.trolltech.qt.core.QObject parent)" doc="/** <p>Constructs a validator with a <tt>parent</tt> object that accepts all integers.</p> */"/> <method name="public final int bottom()" doc="/** <p>Returns the validator's lowest acceptable value.</p> @see <a href="QIntValidator.html#setBottom(int)"><tt>setBottom</tt></a> @see <a href="QIntValidator.html#setRange(int, int)"><tt>setRange</tt></a> */"/> <method name="public final void setBottom(int arg__1)" doc="/** <p>Sets the validator's lowest acceptable value to <tt>arg__1</tt>.</p> @see <a href="QIntValidator.html#bottom()"><tt>bottom</tt></a> @see <a href="QIntValidator.html#setRange(int, int)"><tt>setRange</tt></a> */"/> <method name="public final void setTop(int arg__1)" doc="/** <p>Sets the validator's highest acceptable value to <tt>arg__1</tt>.</p> @see <a href="QIntValidator.html#top()"><tt>top</tt></a> @see <a href="QIntValidator.html#setRange(int, int)"><tt>setRange</tt></a> */"/> <method name="public final int top()" doc="/** <p>Returns the validator's highest acceptable value.</p> @see <a href="QIntValidator.html#setTop(int)"><tt>setTop</tt></a> @see <a href="QIntValidator.html#setRange(int, int)"><tt>setRange</tt></a> */"/> <method name="public void setRange(int bottom, int top)" doc="/** <p>Sets the range of the validator to only accept integers between <tt>bottom</tt> and <tt>top</tt> inclusive.</p> */"/> <method name="public com.trolltech.qt.gui.QValidator.State validate(com.trolltech.qt.gui.QValidator.QValidationData arg__1)" doc="/** <p>Equivalent to <a href="QIntValidator.html#validate(com.trolltech.qt.gui.QValidator.QValidationData)">validate</tt></a>(<tt>arg__1</tt>, ). */"/> </class>