PintValidator
¶

-
class
PintValidator
[source]¶ Bases:
PyQt4.QtGui.QValidator
A QValidator for pint Quantities
-
bottom
¶ Return type: Quantity
orNone
Returns: minimum accepted or None if it is not enforced
-
setBottom
(bottom)[source]¶ Set minimum limit
Parameters: bottom ( Quantity
orNone
) – minimum acceptable value or None if it is not to be enforced
-
setTop
(top)[source]¶ Set maximum limit
Parameters: top ( Quantity
orNone
) – maximum acceptable value or None if it is not to be enforced
-
setUnits
(units)[source]¶ Set implicit units. They will be assumed when the text does not explicit the unit. They will also be used for dimensionality coherence checks.
Parameters: units ( Unit
orNone
) – . The implicit unit. If None, implicit dimension is “dimensionless” and no dimensionality checks will be performed (other than those inherent to range enforcement)
-
top
¶ Return type: Quantity
orNone
Returns: maximum accepted or None if it is not enforced
-
units
¶ Return type: Unit
orNone
Returns: base units or None if it should not be enforced
-
validate
(input, pos)¶ Reimplemented from
QValidator
to validate if the input string is a representation of a quantity within the set bottom and top limits
-