A subclass of QValidator which accepts all 32-bit decimal or hexadecimal integers. More...
Public Member Functions | |
| QtlIntValidator (QObject *parent=0, quint32 minimum=0, int maximum=0xFFFFFFFFL) | |
| Constructor. More... | |
| virtual void | fixup (QString &input) const Q_DECL_OVERRIDE |
| Reimplemented from QValidator::fixup(). More... | |
| quint32 | maximum () const |
| Get the maximum acceptable value. More... | |
| quint32 | minimum () const |
| Get the minimum acceptable value. More... | |
| void | setMaximum (quint32 maximum) |
| Set the maximum acceptable value. More... | |
| void | setMinimum (quint32 minimum) |
| Set the minimum acceptable value. More... | |
| void | setRange (quint32 minimum, quint32 maximum) |
| Set the minimum and maximum acceptable values. More... | |
| virtual State | validate (QString &input, int &pos) const Q_DECL_OVERRIDE |
| Reimplemented from QValidator::validate(). More... | |
Private Attributes | |
| quint32 | _maximum |
| Maximum acceptable value. More... | |
| quint32 | _minimum |
| Minimum acceptable value. More... | |
Static Private Attributes | |
| static const QRegExp | _decRegExp |
| A regular expression matching all decimal strings. More... | |
| static const QRegExp | _hexaRegExp |
| A regular expression matching all hexadecimal strings. More... | |
A subclass of QValidator which accepts all 32-bit decimal or hexadecimal integers.
Hexadecimal values are entered with a 0x prefix.
|
inlineexplicit |
Constructor.
| [in] | parent | Optional parent object. |
| [in] | minimum | Minimum acceptable value. |
| [in] | maximum | Maximum acceptable value. |
|
inline |
Get the minimum acceptable value.
|
inline |
Set the minimum acceptable value.
| [in] | minimum | The minimum acceptable value. |
|
inline |
Get the maximum acceptable value.
|
inline |
Set the maximum acceptable value.
| [in] | maximum | The maximum acceptable value. |
|
inline |
Set the minimum and maximum acceptable values.
| [in] | minimum | The minimum acceptable value. |
| [in] | maximum | The maximum acceptable value. |
|
inlinevirtual |
Reimplemented from QValidator::fixup().
| [in,out] | input | Input string. |
|
virtual |
Reimplemented from QValidator::validate().
| [in,out] | input | Input string. |
| [in,out] | pos | Cursor position. |
|
staticprivate |
A regular expression matching all hexadecimal strings.
|
staticprivate |
A regular expression matching all decimal strings.
|
private |
Minimum acceptable value.
|
private |
Maximum acceptable value.