PintValidator
- class PintValidator[source]
A QValidator for pint Quantities
Import from
taurus.qt.qtgui.util
as:from taurus.qt.qtgui.util import PintValidator
- property bottom
minimum accepted or None if it is not enforced :rtype: Quantity or None
- Type:
return
- setBottom(bottom)[source]
Set minimum limit
- Parameters:
bottom (Quantity or None) – minimum acceptable value or None if it is not to be enforced
- setTop(top)[source]
Set maximum limit
- Parameters:
top (Quantity or None) – 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 (pint.Unit or None) – The implicit unit. If None, implicit dimension is “unitless” and no dimensionality checks will be performed (other than those inherent to range enforcement)
- property top
maximum accepted or None if it is not enforced :rtype: Quantity or None
- Type:
return
- property units
base units or None if it should not be enforced :rtype: pint.Unit or None
- Type:
return