def get_state(self): """ Returns an object with the state of the interface """ m = DataSets() #Peak Selection if self._summary.data_peak_discrete_switch.isChecked(): m.DataPeakSelectionType = 'discrete' if self._summary.data_peak_broad_switch.isChecked(): m.DataPeakSelectionType = 'broad' if self._summary.data_peak_narrow_switch.isChecked(): m.DataPeakSelectionType = 'narrow' #Peak from/to pixels m.DataPeakPixels[0] = str(self._summary.data_peak_from_pixel.text()) m.DataPeakPixels[1] = str(self._summary.data_peak_to_pixel.text()) #Discrete selection string m.DataPeakDiscreteSelection = self._summary.data_peak_nbr_selection_value.text() #Background flag m.DataBackgroundFlag = self._summary.data_background_switch.isChecked() #Background from/to pixels roi1_from = str(self._summary.data_background_from_pixel1.text()) roi1_to = str(self._summary.data_background_to_pixel1.text()) roi2_from = str(self._summary.data_background_from_pixel2.text()) roi2_to = str(self._summary.data_background_to_pixel2.text()) m.DataBackgroundRoi = [roi1_from, roi1_to, roi2_from, roi2_to] #from TOF and to TOF from_tof = str(self._summary.data_from_tof.text()) to_tof = str(self._summary.data_to_tof.text()) m.DataTofRange = [from_tof, to_tof] return m