|
RTC Toolkit 6.0.0
|
An input text validator that accepts integer values. More...
Public Member Functions | |
| __init__ (self, parent=None) | |
| Initialise the IntegerValidator object. | |
| validate (self, str input, int pos) | |
| Check that the input string conforms to a valid or plausible integer value. | |
| fixup (self, str input) | |
| Adjusts the input string to the nearest likely valid integer value. | |
| get_minimum (self) | |
| Getter returns the minimum value accepted by the validator. | |
| set_minimum (self, int value) | |
| Setter for the minimum value accepted by the validator. | |
| get_maximum (self) | |
| Getter returns the maximum value accepted by the validator. | |
| set_maximum (self, int value) | |
| Setter for the maximum value accepted by the validator. | |
Static Public Attributes | |
| minimum | |
| maximum | |
Protected Attributes | |
| int | _minimum = 0 |
| int | _maximum = 100 |
An input text validator that accepts integer values.
The validation is performed for conversion to Python int types, which are unbounded. Therefore technically any size integer could be handled.
| gui.integer_edit.IntegerValidator.__init__ | ( | self, | |
| parent = None ) |
Initialise the IntegerValidator object.
| parent | The optional parent Qt object of the new instance. |
| gui.integer_edit.IntegerValidator.fixup | ( | self, | |
| str | input ) |
Adjusts the input string to the nearest likely valid integer value.
| input | The input string to adjust. |
| gui.integer_edit.IntegerValidator.get_maximum | ( | self | ) |
Getter returns the maximum value accepted by the validator.
All values below and including the maximum are accepted as valid.
| gui.integer_edit.IntegerValidator.get_minimum | ( | self | ) |
Getter returns the minimum value accepted by the validator.
All values above and including the minimum are accepted as valid.
| gui.integer_edit.IntegerValidator.set_maximum | ( | self, | |
| int | value ) |
Setter for the maximum value accepted by the validator.
All values below and including the maximum are accepted as valid.
| value | The new maximum value allowed. |
| gui.integer_edit.IntegerValidator.set_minimum | ( | self, | |
| int | value ) |
Setter for the minimum value accepted by the validator.
All values above and including the minimum are accepted as valid.
| value | The new minimum value allowed. |
| gui.integer_edit.IntegerValidator.validate | ( | self, | |
| str | input, | ||
| int | pos ) |
Check that the input string conforms to a valid or plausible integer value.
There is also a bounds check that will check that the value falls between the minimum and maximum (inclusive) set for the validator.
| input | The input string to check. |
| pos | The position of the cursor within the input string. |
|
protected |
|
protected |
|
static |
|
static |