MCPcopy Create free account
hub / github.com/LabPy/lantz / get_units

Method get_units

lantz/ui/widgets.py:1148–1157  ·  view source on GitHub ↗

Creates and display a UnitInputDialog and return new units. Return None if the user cancelled.

(units)

Source from the content-addressed store, hash-verified

1146
1147 @staticmethod
1148 def get_units(units):
1149 """Creates and display a UnitInputDialog and return new units.
1150
1151 Return None if the user cancelled.
1152
1153 """
1154 dialog = UnitInputDialog(Q_(1, units.units))
1155 if dialog.exec_():
1156 return dialog.destination_units.text()
1157 return None
1158
1159
1160class InitializerHelper(QtCore.QObject):

Callers 1

request_new_unitsFunction · 0.45

Calls 1

UnitInputDialogClass · 0.85

Tested by

no test coverage detected