本文整理汇总了Python中gui.widgets.create_task_base.CreateTaskBase.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python CreateTaskBase.__init__方法的具体用法?Python CreateTaskBase.__init__怎么用?Python CreateTaskBase.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gui.widgets.create_task_base.CreateTaskBase
的用法示例。
在下文中一共展示了CreateTaskBase.__init__方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from gui.widgets.create_task_base import CreateTaskBase [as 别名]
# 或者: from gui.widgets.create_task_base.CreateTaskBase import __init__ [as 别名]
def __init__(self, parent=None, name=None, fl=0):
CreateTaskBase.__init__(
self, parent, name, QtImport.Qt.WindowFlags(fl), "Standard"
)
if not name:
self.setObjectName("create_discrete_widget")
# Hardware objects ----------------------------------------------------
# Internal variables --------------------------------------------------
self.init_models()
# Graphic elements ----------------------------------------------------
self._acq_widget = AcquisitionWidget(
self,
"acquisition_widget",
layout="vertical",
acq_params=self._acquisition_parameters,
path_template=self._path_template,
)
self._data_path_widget = DataPathWidget(
self,
"create_dc_path_widget",
data_model=self._path_template,
layout="vertical",
)
self._processing_widget = ProcessingWidget(
self, data_model=self._processing_parameters
)
# Layout --------------------------------------------------------------
_main_vlayout = QtImport.QVBoxLayout(self)
_main_vlayout.addWidget(self._acq_widget)
_main_vlayout.addWidget(self._data_path_widget)
_main_vlayout.addWidget(self._processing_widget)
_main_vlayout.addStretch(0)
_main_vlayout.setSpacing(6)
_main_vlayout.setContentsMargins(2, 2, 2, 2)
# SizePolicies --------------------------------------------------------
# Qt signal/slot connections ------------------------------------------
self._acq_widget.acqParametersChangedSignal.connect(self.acq_parameters_changed)
self._data_path_widget.pathTemplateChangedSignal.connect(
self.path_template_changed
)
self._acq_widget.madEnergySelectedSignal.connect(self.mad_energy_selected)
self._processing_widget.enableProcessingSignal.connect(
self._run_processing_toggled
)
# Other ---------------------------------------------------------------
self._processing_widget.processing_widget.run_processing_parallel_cbox.setChecked(
api.beamline_setup._get_run_processing_parallel()
)
示例2: __init__
# 需要导入模块: from gui.widgets.create_task_base import CreateTaskBase [as 别名]
# 或者: from gui.widgets.create_task_base.CreateTaskBase import __init__ [as 别名]
def __init__(self, parent=None, name=None, fl=0):
CreateTaskBase.__init__(
self, parent, name, QtImport.Qt.WindowFlags(fl), "XRF spectrum"
)
if name is not None:
self.setObjectName(name)
# Hardware objects ----------------------------------------------------
# Internal variables --------------------------------------------------
self.count_time = None
self.xrf_spectrum_model = None
self.init_models()
# Graphic elements ----------------------------------------------------
self._data_path_widget = DataPathWidget(
self, data_model=self._path_template, layout="vertical"
)
_parameters_gbox = QtImport.QGroupBox("Parameters", self)
_count_time_label = QtImport.QLabel("Count time (sec.):", _parameters_gbox)
self.count_time_ledit = QtImport.QLineEdit("1", _parameters_gbox)
# self.count_time_ledit.setMaximumWidth(75)
self.adjust_transmission_cbox = QtImport.QCheckBox(
"Adjust transmission", _parameters_gbox
)
self.adjust_transmission_cbox.setChecked(True)
# Layout --------------------------------------------------------------
_parameters_gbox_hlayout = QtImport.QHBoxLayout(_parameters_gbox)
_parameters_gbox_hlayout.addWidget(_count_time_label)
_parameters_gbox_hlayout.addWidget(self.count_time_ledit)
_parameters_gbox_hlayout.addWidget(self.adjust_transmission_cbox)
_parameters_gbox_hlayout.addStretch(0)
_parameters_gbox_hlayout.setSpacing(2)
_parameters_gbox_hlayout.setContentsMargins(0, 0, 0, 0)
_main_vlayout = QtImport.QVBoxLayout(self)
_main_vlayout.addWidget(self._data_path_widget)
_main_vlayout.addWidget(_parameters_gbox)
_main_vlayout.setSpacing(6)
_main_vlayout.setContentsMargins(2, 2, 2, 2)
_main_vlayout.addStretch(0)
# SizePolicies --------------------------------------------------------
# Qt signal/slot connections ------------------------------------------
self._data_path_widget.pathTemplateChangedSignal.connect(
self.path_template_changed
)
self.adjust_transmission_cbox.stateChanged.connect(
self.adjust_transmission_state_changed
)
# Other ---------------------------------------------------------------
self._data_path_widget.data_path_layout.compression_cbox.setVisible(False)
示例3: __init__
# 需要导入模块: from gui.widgets.create_task_base import CreateTaskBase [as 别名]
# 或者: from gui.widgets.create_task_base.CreateTaskBase import __init__ [as 别名]
def __init__(self, parent=None, name=None, fl=0):
CreateTaskBase.__init__(
self, parent, name, QtImport.Qt.WindowFlags(fl), "GphlWorkflow"
)
if not name:
self.setObjectName("create_gphl_workflow_widget")
# Hardware objects ----------------------------------------------------
# Internal variables --------------------------------------------------
self.current_prefix = None
self.init_models()
示例4: __init__
# 需要导入模块: from gui.widgets.create_task_base import CreateTaskBase [as 别名]
# 或者: from gui.widgets.create_task_base.CreateTaskBase import __init__ [as 别名]
def __init__(self, parent=None, name=None, fl=0):
CreateTaskBase.__init__(
self, parent, name, QtImport.Qt.WindowFlags(fl), "XrayImaging"
)
if not name:
self.setObjectName("create_xray_imaging_widget")
# Hardware objects ----------------------------------------------------
# Internal variables --------------------------------------------------
self._xray_imaging_parameters = None
self._processing_parameters = None
self.init_models()
# Graphic elements ----------------------------------------------------
self._acq_widget = AcquisitionWidget(
self,
"acquisition_widget",
layout="vertical",
acq_params=self._acquisition_parameters,
path_template=self._path_template,
)
self._acq_widget.grid_mode = False
self._xray_imaging_parameters_widget = XrayImagingParametersWidget(
self,
"xray_imaging_widget",
xray_imaging_params=self._xray_imaging_parameters,
)
self._data_path_widget = DataPathWidget(
self,
"create_dc_path_widget",
data_model=self._path_template,
layout="vertical",
)
# Layout --------------------------------------------------------------
_main_vlayout = QtImport.QVBoxLayout(self)
_main_vlayout.addWidget(self._acq_widget)
_main_vlayout.addWidget(self._xray_imaging_parameters_widget)
_main_vlayout.addWidget(self._data_path_widget)
_main_vlayout.addStretch(0)
_main_vlayout.setSpacing(6)
_main_vlayout.setContentsMargins(2, 2, 2, 2)
# SizePolicies --------------------------------------------------------
# Qt signal/slot connections ------------------------------------------
self._acq_widget.acqParametersChangedSignal.connect(self.acq_parameters_changed)
self._data_path_widget.pathTemplateChangedSignal.connect(
self.path_template_changed
)
# Other ---------------------------------------------------------------
self._acq_widget.use_osc_start(False)
self._acq_widget.use_kappa(False)
self._acq_widget.acq_widget_layout.max_osc_range_cbx.setVisible(False)
self._acq_widget.acq_widget_layout.first_image_label.setVisible(False)
self._acq_widget.acq_widget_layout.first_image_ledit.setVisible(False)
self._acq_widget.acq_widget_layout.detector_roi_mode_label.setVisible(False)
self._acq_widget.acq_widget_layout.detector_roi_mode_combo.setVisible(False)
self._acq_widget.acq_widget_layout.energies_combo.setVisible(False)
self._acq_widget.acq_widget_layout.mad_cbox.setVisible(False)
self._acq_widget.acq_widget_layout.energy_label.setVisible(False)
self._acq_widget.acq_widget_layout.energy_ledit.setVisible(False)
self._acq_widget.acq_widget_layout.transmission_label.setVisible(False)
self._acq_widget.acq_widget_layout.transmission_ledit.setVisible(False)
self._acq_widget.acq_widget_layout.resolution_label.setVisible(False)
self._acq_widget.acq_widget_layout.resolution_ledit.setVisible(False)
self._acq_widget.acq_widget_layout.kappa_label.setVisible(False)
self._acq_widget.acq_widget_layout.kappa_ledit.setVisible(False)
self._acq_widget.acq_widget_layout.kappa_phi_label.setVisible(False)
self._acq_widget.acq_widget_layout.kappa_phi_ledit.setVisible(False)
self._acq_widget.acq_widget_layout.shutterless_cbx.setVisible(False)
self.distance_listwidget = self._xray_imaging_parameters_widget._parameters_widget.detector_distance_listwidget
api.detector_distance.connect(
"positionChanged",
self._xray_imaging_parameters_widget.set_detector_distance,
)
示例5: __init__
# 需要导入模块: from gui.widgets.create_task_base import CreateTaskBase [as 别名]
# 或者: from gui.widgets.create_task_base.CreateTaskBase import __init__ [as 别名]
def __init__(self, parent=None, name=None, fl=0):
CreateTaskBase.__init__(self, parent, name, fl, "Characterisation")
self.setObjectName("create_char_widget")
# Hardware objects ----------------------------------------------------
# Internal variables --------------------------------------------------
self._vertical_dimension_widget = None
self._current_selected_item = None
self._char = None
self._char_params = None
self.init_models()
self._char_params_mib = DataModelInputBinder(self._char_params)
# Graphic elements ----------------------------------------------------
self._acq_widget = AcquisitionWidgetSimple(
self,
acq_params=self._acquisition_parameters,
path_template=self._path_template,
)
self._data_path_widget = DataPathWidget(
self, data_model=self._path_template, layout="vertical"
)
self._vertical_dimension_widget = QtImport.load_ui_file(
"vertical_crystal_dimension_widget_layout.ui"
)
self._char_widget = QtImport.load_ui_file(
"characterise_simple_widget_vertical_layout.ui"
)
# Layout --------------------------------------------------------------
_main_vlayout = QtImport.QVBoxLayout(self)
_main_vlayout.addWidget(self._acq_widget)
_main_vlayout.addWidget(self._data_path_widget)
_main_vlayout.addWidget(self._char_widget)
_main_vlayout.addWidget(self._vertical_dimension_widget)
_main_vlayout.setContentsMargins(2, 2, 2, 2)
_main_vlayout.setSpacing(6)
_main_vlayout.addStretch(0)
# SizePolicies --------------------------------------------------------
# Qt signal/slot connections ------------------------------------------
self._data_path_widget.pathTemplateChangedSignal.connect(
self.path_template_changed
)
self._acq_widget.acqParametersChangedSignal.connect(self.acq_parameters_changed)
self._vertical_dimension_widget.space_group_ledit.activated.connect(
self._space_group_change
)
# self.connect(induced_burn_cbx, QtCore.SIGNAL("toggled(bool)"),
# self.use_induced_burn)
self._char_widget.characterisation_gbox.toggled.connect(
self.characterisation_gbox_toggled
)
self._char_widget.wait_result_cbx.toggled.connect(self.wait_results_cbx_toggled)
self._char_widget.execute_plan_cbx.toggled.connect(
self.run_diffraction_plan_cbx_toggled
)
# Other ---------------------------------------------------------------
self._char_params_mib.bind_value_update(
"opt_sad", self._char_widget.optimised_sad_cbx, bool, None
)
self._char_params_mib.bind_value_update(
"account_rad_damage", self._char_widget.account_rad_dmg_cbx, bool, None
)
# self._char_params_mib.bind_value_update('determine_rad_params',
# induced_burn_cbx,
# bool, None)
self._char_params_mib.bind_value_update(
"strategy_complexity", self._char_widget.start_comp_cbox, int, None
)
self._char_params_mib.bind_value_update(
"max_crystal_vdim",
self._vertical_dimension_widget.max_vdim_ledit,
float,
QtImport.QDoubleValidator(0.0, 1000, 2, self),
)
self._char_params_mib.bind_value_update(
"min_crystal_vdim",
self._vertical_dimension_widget.min_vdim_ledit,
float,
QtImport.QDoubleValidator(0.0, 1000, 2, self),
)
self._char_params_mib.bind_value_update(
"min_crystal_vphi",
#.........这里部分代码省略.........
示例6: __init__
# 需要导入模块: from gui.widgets.create_task_base import CreateTaskBase [as 别名]
# 或者: from gui.widgets.create_task_base.CreateTaskBase import __init__ [as 别名]
def __init__(self, parent=None, name=None, fl=0):
CreateTaskBase.__init__(self, parent, name, fl, "Helical")
if not name:
self.setObjectName("create_helical_widget")
self.init_models()
# Hardware objects ----------------------------------------------------
# Internal variables --------------------------------------------------
self._lines_map = {}
# Graphic elements ----------------------------------------------------
self._lines_widget = QtImport.load_ui_file("helical_line_widget_layout.ui")
self._acq_widget = AcquisitionWidget(
self,
"acquisition_widget",
layout="vertical",
acq_params=self._acquisition_parameters,
path_template=self._path_template,
)
self._data_path_widget = DataPathWidget(
self,
"create_dc_path_widget",
data_model=self._path_template,
layout="vertical",
)
self._processing_widget = ProcessingWidget(
self, data_model=self._processing_parameters
)
# Layout --------------------------------------------------------------
_main_vlayout = QtImport.QVBoxLayout(self)
_main_vlayout.addWidget(self._lines_widget)
_main_vlayout.addWidget(self._acq_widget)
_main_vlayout.addWidget(self._data_path_widget)
_main_vlayout.addWidget(self._processing_widget)
_main_vlayout.addStretch(0)
_main_vlayout.setSpacing(6)
_main_vlayout.setContentsMargins(2, 2, 2, 2)
# SizePolicies --------------------------------------------------------
# Qt signal/slot connections ------------------------------------------
self._lines_widget.lines_treewidget.itemSelectionChanged.connect(
self.lines_treewidget_selection_changed
)
self._lines_widget.create_line_button.clicked.connect(
self.create_line_button_clicked
)
self._lines_widget.create_auto_line_button.clicked.connect(
self.create_auto_line_button_clicked
)
self._lines_widget.remove_line_button.clicked.connect(
self.remove_line_button_clicked
)
self._lines_widget.overlay_cbox.stateChanged.connect(self.overlay_toggled)
self._lines_widget.overlay_slider.valueChanged.connect(
self.overlay_alpha_changed
)
self._lines_widget.swap_points_button.clicked.connect(self.swap_points_clicked)
self._acq_widget.acqParametersChangedSignal.connect(self.acq_parameters_changed)
self._acq_widget.madEnergySelectedSignal.connect(self.mad_energy_selected)
self._data_path_widget.pathTemplateChangedSignal.connect(
self.path_template_changed
)
self._processing_widget.enableProcessingSignal.connect(
self._run_processing_toggled
)
# Other ---------------------------------------------------------------
for col in range(self._lines_widget.lines_treewidget.columnCount()):
self._lines_widget.lines_treewidget.resizeColumnToContents(col)
# self._processing_widget.processing_widget.\
# run_processing_parallel_cbox.setChecked(False)
self._processing_widget.processing_widget.run_processing_parallel_cbox.setChecked(
api.beamline_setup._get_run_processing_parallel()
)
self.enable_widgets(False)
示例7: __init__
# 需要导入模块: from gui.widgets.create_task_base import CreateTaskBase [as 别名]
# 或者: from gui.widgets.create_task_base.CreateTaskBase import __init__ [as 别名]
def __init__(self, parent=None, name=None, fl=0):
CreateTaskBase.__init__(
self, parent, name, QtImport.Qt.WindowFlags(fl), "Advanced"
)
if not name:
self.setObjectName("create_advanced_widget")
# Hardware objects ----------------------------------------------------
# Internal variables --------------------------------------------------
self._advanced_methods = None
self._grid_map = {}
self.spacing = [0, 0]
self.dc_selected = False
self.init_models()
# Graphic elements ----------------------------------------------------
self._advanced_methods_widget = QtImport.load_ui_file(
"advanced_methods_layout.ui"
)
self._acq_widget = AcquisitionWidget(
self,
"acquisition_widget",
layout="vertical",
acq_params=self._acquisition_parameters,
path_template=self._path_template,
)
self._acq_widget.grid_mode = True
self._data_path_widget = DataPathWidget(
self,
"create_dc_path_widget",
data_model=self._path_template,
layout="vertical",
)
# Layout --------------------------------------------------------------
_main_vlayout = QtImport.QVBoxLayout(self)
_main_vlayout.addWidget(self._advanced_methods_widget)
_main_vlayout.addWidget(self._acq_widget)
_main_vlayout.addWidget(self._data_path_widget)
_main_vlayout.addStretch(0)
_main_vlayout.setSpacing(6)
_main_vlayout.setContentsMargins(2, 2, 2, 2)
# SizePolicies --------------------------------------------------------
# Qt signal/slot connections ------------------------------------------
self._acq_widget.acqParametersChangedSignal.connect(self.acq_parameters_changed)
self._acq_widget.madEnergySelectedSignal.connect(self.mad_energy_selected)
self._acq_widget.acq_widget_layout.osc_range_ledit.textEdited.connect(
self.grid_osc_range_ledit_changed
)
self._acq_widget.acq_widget_layout.osc_total_range_ledit.textEdited.connect(
self.grid_osc_total_range_ledit_changed
)
self._data_path_widget.pathTemplateChangedSignal.connect(
self.path_template_changed
)
self._advanced_methods_widget.grid_treewidget.itemSelectionChanged.connect(
self.grid_treewidget_item_selection_changed
)
self._advanced_methods_widget.draw_grid_button.clicked.connect(
self.draw_grid_button_clicked
)
self._advanced_methods_widget.remove_grid_button.clicked.connect(
self.remove_grid_button_clicked
)
self._advanced_methods_widget.hor_spacing_ledit.textEdited.connect(
self.hor_spacing_changed
)
self._advanced_methods_widget.ver_spacing_ledit.textEdited.connect(
self.ver_spacing_changed
)
self._advanced_methods_widget.move_right_button.clicked.connect(
lambda: self.move_grid("right")
)
self._advanced_methods_widget.move_left_button.clicked.connect(
lambda: self.move_grid("left")
)
self._advanced_methods_widget.move_up_button.clicked.connect(
lambda: self.move_grid("up")
)
self._advanced_methods_widget.move_down_button.clicked.connect(
lambda: self.move_grid("down")
)
self._advanced_methods_widget.overlay_cbox.toggled.connect(self.overlay_toggled)
self._advanced_methods_widget.overlay_slider.valueChanged.connect(
self.overlay_alpha_changed
)
self._advanced_methods_widget.overlay_color_button.clicked.connect(
self.overlay_change_color
)
#.........这里部分代码省略.........
示例8: __init__
# 需要导入模块: from gui.widgets.create_task_base import CreateTaskBase [as 别名]
# 或者: from gui.widgets.create_task_base.CreateTaskBase import __init__ [as 别名]
def __init__(self, parent=None, name=None, fl=0):
CreateTaskBase.__init__(self, parent, name, fl, "Energy scan")
if not name:
self.setObjectName("create_energy_scan_widget")
# Hardware objects ----------------------------------------------------
# Internal variables --------------------------------------------------
self.init_models()
# Graphic elements ----------------------------------------------------
self._periodic_table_widget = PeriodicTableWidget(self)
self._data_path_widget = DataPathWidget(
self, data_model=self._path_template, layout="vertical"
)
_parameters_gbox = QtImport.QGroupBox("Parameters", self)
self._adjust_transmission_cbox = QtImport.QCheckBox(
"Adjust transmission", _parameters_gbox
)
self._adjust_transmission_cbox.setChecked(False)
self._adjust_transmission_cbox.setEnabled(True)
self._max_transmission_label = QtImport.QLabel("Maximum transmission:")
self._max_transmission_ledit = QtImport.QLineEdit("20", _parameters_gbox)
self._max_transmission_ledit.setFixedWidth(80)
self._max_transmission_ledit.setEnabled(False)
# Layout --------------------------------------------------------------
_parameters_gbox_hlayout = QtImport.QGridLayout(_parameters_gbox)
_parameters_gbox_hlayout.addWidget(self._adjust_transmission_cbox, 0, 0)
_parameters_gbox_hlayout.addWidget(self._max_transmission_label, 1, 0)
_parameters_gbox_hlayout.addWidget(self._max_transmission_ledit, 1, 1)
_parameters_gbox_hlayout.setColumnStretch(2, 1)
_parameters_gbox_hlayout.setSpacing(2)
_main_vlayout = QtImport.QVBoxLayout(self)
_main_vlayout.addWidget(self._periodic_table_widget)
_main_vlayout.addWidget(self._data_path_widget)
_main_vlayout.addWidget(_parameters_gbox)
_main_vlayout.setContentsMargins(2, 2, 2, 2)
_main_vlayout.setSpacing(6)
_main_vlayout.addStretch(10)
# SizePolicies --------------------------------------------------------
# Qt signal/slot connections ------------------------------------------
# self._periodic_table_widget.elementEdgeSelectedSignal.connect(\
# self.acq_parameters_changed)
self._data_path_widget.pathTemplateChangedSignal.connect(
self.path_template_changed
)
self._adjust_transmission_cbox.stateChanged.connect(
self.adjust_transmission_state_changed
)
self._max_transmission_ledit.textEdited.connect(
self.max_transmission_value_changed
)
self._data_path_widget.data_path_layout.compression_cbox.setVisible(False)
try:
self._periodic_table_widget.set_elements(api.energyscan.getElements())
max_transmission_value = api.energyscan.get_max_transmission_value()
self._adjust_transmission_cbox.setEnabled(True)
self._adjust_transmission_cbox.setChecked(True)
api.energyscan.adjust_transmission(True)
if max_transmission_value:
self._max_transmission_ledit.setText("%.2f" % max_transmission_value)
except BaseException:
pass