FloatEdit module

valid_float_string(string)[source]
Parameters

string

class FloatEdit(unit='', *args, **kwargs)[source]

Bases: PySide2.QtWidgets.QLineEdit

A Line Edit Widget optimized to input float

setValue(value)[source]

Allow to set the containt of the Widget with a float

Parameters
  • self – A FloatEdit object

  • value – A float value to set the Text

value()[source]

Return the content of the Widget as a float

Parameters

self – A FloatEdit object

staticMetaObject = <PySide2.QtCore.QMetaObject object>
class FloatValidator[source]

Bases: PySide2.QtGui.QDoubleValidator

DoubleValidator with fixup method to correct the input

validate(string, position)[source]
Parameters
  • string

  • position

fixup_txt(text, gui_unit, val_unit)[source]

When the input text is wrong, fixup is called to correct it in the field

Parameters
  • self – A FloatValidator object

  • text – The text to correct

  • gui_unit – Current gui unit system

  • val_unit – Unit used by the FloatEdit

staticMetaObject = <PySide2.QtCore.QMetaObject object>