MCPcopy Create free account
hub / github.com/NSLS2/PyXRF / DoubleValidatorRelaxed

Class DoubleValidatorRelaxed

pyxrf/gui_module/useful_widgets.py:452–463  ·  view source on GitHub ↗

DoubleValidatorRelaxed is similar to `IntValidatorRelaxed`, but works with values of `double` type.

Source from the content-addressed store, hash-verified

450
451
452class DoubleValidatorRelaxed(DoubleValidatorStrict):
453 """
454 DoubleValidatorRelaxed is similar to `IntValidatorRelaxed`, but works with
455 values of `double` type.
456 """
457
458 def validate(self, *args, **kwargs):
459 result = super().validate(*args, **kwargs)
460 # Replace QDoubleValidator.Invalid with QIntValidator.Intermediate
461 if result[0] == QDoubleValidator.Invalid:
462 result = (QDoubleValidator.Intermediate, result[1], result[2])
463 return result
464
465
466class RangeManager(QWidget):

Callers 4

__init__Method · 0.85
set_value_typeMethod · 0.85

Calls

no outgoing calls

Tested by 2