def get_state(self): """ Returns an object with the state of the interface """ p = PdAndScConversionScript(self._instrument_name) p.do_pd_convert = self._content.powder_gb.isChecked() p.pd_q_range_low = self._content.q_low_edit.text() p.pd_q_range_width = self._content.q_width_edit.text() p.pd_q_range_high = self._content.q_high_edit.text() p.save_powder_nxs = self._content.save_procnexus_cb.isChecked() p.save_powder_nxs_file = self._content.save_procnexus_edit.text() return p
def __init__(self, parent=None, state=None, settings=None, data_type=None): super(PdAndScConversionWidget, self).__init__(parent, state, settings, data_type=data_type) class PdAndScConversionFrame(QtGui.QFrame, ui.inelastic.ui_dgs_pd_sc_conversion.Ui_PdScConversionFrame): def __init__(self, parent=None): QtGui.QFrame.__init__(self, parent) self.setupUi(self) self._content = PdAndScConversionFrame(self) self._layout.addWidget(self._content) self._instrument_name = settings.instrument_name self.initialize_content() if state is not None: self.set_state(state) else: self.set_state(PdAndScConversionScript(self._instrument_name))