Creates and display a UnitInputDialog and return new units. Return None if the user cancelled.
(units)
| 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 | |
| 1160 | class InitializerHelper(QtCore.QObject): |
no test coverage detected