def __init__(self, parent=None, state=None, settings=None, data_type=None): """ Initialization """ super(FilterSetupWidget, self).__init__(parent, state, settings, data_type=data_type) #print "[FilterSetupWidget.Init]: settings is of type %s. data type is of type %s. # DBx237. " % (type(settings), type(data_type)) class FilterSetFrame(QtGui.QFrame, ui.diffraction.ui_diffraction_filter_setup.Ui_Frame): """ Define class linked to UI Frame """ def __init__(self, parent=None): QtGui.QFrame.__init__(self, parent) self.setupUi(self) self._content = FilterSetFrame(self) self._layout.addWidget(self._content) self._instrument_name = settings.instrument_name self._facility_name = settings.facility_name self.initialize_content() if state is not None: self.set_state(state) else: self.set_state(FilterSetupScript(self._instrument_name)) return
def __init__(self, parent=None, state=None, settings=None, data_type=None): """ Initialization """ super(FilterSetupWidget, self).__init__(parent, state, settings, data_type=data_type) #print "[FilterSetupWidget.Init]: settings is of type %s. data type is of type %s. # DBx237. " % (type(settings), type(data_type)) class FilterSetFrame(QFrame): """ Define class linked to UI Frame """ def __init__(self, parent=None): QFrame.__init__(self, parent) self.ui = load_ui( __file__, '../../../ui/diffraction/diffraction_filter_setup.ui', baseinstance=self) self._content = FilterSetFrame(self) self._layout.addWidget(self._content) self._instrument_name = settings.instrument_name self._facility_name = settings.facility_name self.initialize_content() if state is not None: self.set_state(state) else: self.set_state(FilterSetupScript(self._instrument_name)) self.fig = None # handle to the pop-out for sample log figure
def get_state(self): """ Returns a FilterSetupScript with the state of Filter_Setup_Interface Set up all the class parameters in FilterSetupScrpt with values in the content """ s = FilterSetupScript(self._instrument_name) # Title s.titleofsplitters = self._content.title_edit.text() # General s.starttime = self._content.starttime_edit.text() s.stoptime = self._content.stoptime_edit.text() # Filter by time s.filterbytime = self._content.timefilter_checkBox.isChecked() # s.numbertimeinterval = self._content.numtimeinterval_edit.text() s.lengthtimeinterval = self._content.timintervallength_edit.text() s.unitoftime = self._content.timeunit_combo.currentText() # Filter by log value s.filterbylogvalue = self._content.logvaluefilter_checkBox.isChecked() s.logname = self._content.logname_edit.text() s.minimumlogvalue = self._content.logminvalue_edit.text() s.maximumlogvalue = self._content.logmaxvalue_edit.text() s.logvalueinterval = self._content.logintervalvalue_edit.text() # if self._content.usesize_radiob.isChecked(): # s.numlogvalueinterval = "" # s.logvalueinterval = self._content.logintervalvalue_edit.text() # elif self._content.usenumstep_radiob.isChecked(): # s.numlogvalueinterval = self._content.numloginterval_edit.text() # s.logvalueinterval = "" s.timetolerance = self._content.timetol_edit.text() s.logboundary = self._content.logbound_combo.currentText() s.logvaluetolerance = self._content.logtol_edit.text() # s.logvaluetimesections = self._content.logvaluesection_edit.text() s.filterlogvaluebychangingdirection = self._content.valuechange_combo.currentText() return s
def get_state(self): """ Returns a FilterSetupScript with the state of Filter_Setup_Interface Set up all the class parameters in FilterSetupScrpt with values in the content """ s = FilterSetupScript(self._instrument_name) # Title s.titleofsplitters = self._content.title_edit.text() # General s.starttime = self._content.starttime_edit.text() s.stoptime = self._content.stoptime_edit.text() # Filter by time s.filterbytime = self._content.timefilter_checkBox.isChecked() # s.numbertimeinterval = self._content.numtimeinterval_edit.text() s.lengthtimeinterval = self._content.timintervallength_edit.text() s.unitoftime = self._content.timeunit_combo.currentText() # Filter by log value s.filterbylogvalue = self._content.logvaluefilter_checkBox.isChecked() s.logname = self._content.logname_edit.text() s.minimumlogvalue = self._content.logminvalue_edit.text() s.maximumlogvalue = self._content.logmaxvalue_edit.text() s.logvalueinterval = self._content.logintervalvalue_edit.text() # if self._content.usesize_radiob.isChecked(): # s.numlogvalueinterval = "" # s.logvalueinterval = self._content.logintervalvalue_edit.text() # elif self._content.usenumstep_radiob.isChecked(): # s.numlogvalueinterval = self._content.numloginterval_edit.text() # s.logvalueinterval = "" s.timetolerance = self._content.timetol_edit.text() s.logboundary = self._content.logbound_combo.currentText() s.logvaluetolerance = self._content.logtol_edit.text() # s.logvaluetimesections = self._content.logvaluesection_edit.text() s.filterlogvaluebychangingdirection = self._content.valuechange_combo.currentText() return s