def __init__(self, *args): BlissWidget.__init__(self, *args) self.addProperty('energy-scan', 'string', '') self.addProperty("session", "string", "/session") self.session_hwobj = None # Layout self.energy_scan_widget = EnergyScanParametersWidget(self) _main_vlayout = QVBoxLayout(self) _main_vlayout.addWidget(self.energy_scan_widget) # Qt-Slots self.defineSlot("populate_parameter_widget", ({}))
class Qt4_EnergyScanParametersBrick(BlissWidget): """ Descript. : """ def __init__(self, *args): BlissWidget.__init__(self, *args) self.addProperty('energy-scan', 'string', '') self.addProperty("session", "string", "/session") self.session_hwobj = None # Layout self.energy_scan_widget = EnergyScanParametersWidget(self) _main_vlayout = QtGui.QVBoxLayout(self) _main_vlayout.addWidget(self.energy_scan_widget) # Qt-Slots self.defineSlot("populate_parameter_widget", ({})) def populate_parameter_widget(self, item): """ Descript. : """ self.energy_scan_widget.data_path_widget._base_image_dir = \ self.session_hwobj.get_base_image_directory() self.energy_scan_widget.data_path_widget._base_process_dir = \ self.session_hwobj.get_base_process_directory() # LNLS self.energy_scan_widget.data_path_widget._base_snapshot_dir = \ self.session_hwobj.get_base_snapshot_directory() self.energy_scan_widget.data_path_widget._base_log_dir = \ self.session_hwobj.get_base_log_directory() self.energy_scan_widget.populate_widget(item) def propertyChanged(self, property_name, old_value, new_value): """ Descript. : Overriding BaseComponents.BlissWidget (propertyChanged object) run method. """ if property_name == 'energy-scan': self.energy_scan_widget.set_enegy_scan_hwobj( self.getHardwareObject(new_value)) elif property_name == 'session': self.session_hwobj = self.getHardwareObject(new_value)
class Qt4_EnergyScanParametersBrick(BlissWidget): """ Descript. : """ def __init__(self, *args): BlissWidget.__init__(self, *args) self.addProperty('energy-scan', 'string', '') self.addProperty("session", "string", "/session") self.session_hwobj = None # Layout self.energy_scan_widget = EnergyScanParametersWidget(self) _main_vlayout = QtGui.QVBoxLayout(self) _main_vlayout.addWidget(self.energy_scan_widget) # Qt-Slots self.defineSlot("populate_parameter_widget", ({})) def populate_parameter_widget(self, item): """ Descript. : """ self.energy_scan_widget.data_path_widget._base_image_dir = \ self.session_hwobj.get_base_image_directory() self.energy_scan_widget.data_path_widget._base_process_dir = \ self.session_hwobj.get_base_process_directory() # LNLS self.energy_scan_widget.data_path_widget._base_snapshot_dir = \ self.session_hwobj.get_base_snapshot_directory() self.energy_scan_widget.data_path_widget._base_log_dir = \ self.session_hwobj.get_base_log_directory() self.energy_scan_widget.populate_widget(item) def propertyChanged(self, property_name, old_value, new_value): """ Descript. : Overriding BaseComponents.BlissWidget (propertyChanged object) run method. """ if property_name == 'energy-scan': self.energy_scan_widget.set_enegy_scan_hwobj(self.getHardwareObject(new_value)) elif property_name == 'session': self.session_hwobj = self.getHardwareObject(new_value)