本文整理汇总了Python中create_task_base.CreateTaskBase.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python CreateTaskBase.__init__方法的具体用法?Python CreateTaskBase.__init__怎么用?Python CreateTaskBase.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类create_task_base.CreateTaskBase
的用法示例。
在下文中一共展示了CreateTaskBase.__init__方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from create_task_base import CreateTaskBase [as 别名]
# 或者: from create_task_base.CreateTaskBase import __init__ [as 别名]
def __init__(self, parent=None, name=None, fl=0):
CreateTaskBase.__init__(self, parent, name, fl, 'Discrete')
if not name:
self.setName("create_discrete_widget")
self.previous_energy = None
self.init_models()
#
# Layout
#
v_layout = qt.QVBoxLayout(self, 2, 5, "v_layout")
self._acq_gbox = qt.QVGroupBox('Acquisition', self, 'acq_gbox')
self._acq_widget = \
AcquisitionWidget(self._acq_gbox,
"acquisition_widget",
layout='vertical',
acq_params=self._acquisition_parameters,
path_template=self._path_template)
self._data_path_gbox = qt.QVGroupBox('Data location',
self, 'data_path_gbox')
self._data_path_widget = \
DataPathWidget(self._data_path_gbox,
'create_dc_path_widget',
data_model=self._path_template,
layout=DataPathWidgetVerticalLayout)
self._processing_gbox = qt.QVGroupBox('Processing', self,
'processing_gbox')
self._processing_widget = \
ProcessingWidget(self._processing_gbox,
data_model=self._processing_parameters)
v_layout.addWidget(self._acq_gbox)
v_layout.addWidget(self._data_path_gbox)
v_layout.addWidget(self._processing_gbox)
v_layout.addStretch()
dp_layout = self._data_path_widget.data_path_widget_layout
self.connect(self._acq_widget, qt.PYSIGNAL('mad_energy_selected'),
self.mad_energy_selected)
self.connect(dp_layout.prefix_ledit,
qt.SIGNAL("textChanged(const QString &)"),
self._prefix_ledit_change)
self.connect(dp_layout.run_number_ledit,
qt.SIGNAL("textChanged(const QString &)"),
self._run_number_ledit_change)
self.connect(self._acq_widget,
qt.PYSIGNAL("path_template_changed"),
self.handle_path_conflict)
self.connect(self._data_path_widget,
qt.PYSIGNAL("path_template_changed"),
self.handle_path_conflict)
示例2: __init__
# 需要导入模块: from create_task_base import CreateTaskBase [as 别名]
# 或者: from create_task_base.CreateTaskBase import __init__ [as 别名]
def __init__(self, parent=None, name=None, fl=0):
CreateTaskBase.__init__(self, parent, name, fl, "XRF-spectrum")
self.count_time = None
# Data attributes
self.init_models()
xrfspectrum_model = queue_model_objects.XRFSpectrum()
self.xrfspectrum_mib = DataModelInputBinder(xrfspectrum_model)
# Layout
v_layout = qt.QVBoxLayout(self, 2, 6, "main_v_layout")
self._data_path_gbox = qt.QVGroupBox("Data location", self, "data_path_gbox")
self._data_path_widget = DataPathWidget(
self._data_path_gbox, data_model=self._path_template, layout="vertical"
)
parameters_hor_gbox = qt.QHGroupBox("Parameters", self)
self.count_time_label = qt.QLabel("Count time", parameters_hor_gbox)
self.count_time_label.setFixedWidth(83)
self.count_time_ledit = qt.QLineEdit(
"1.0", parameters_hor_gbox, "count_time_ledit"
)
self.count_time_ledit.setFixedWidth(50)
self.xrfspectrum_mib.bind_value_update(
"count_time", self.count_time_ledit, float
) # ,
spacer = qt.QWidget(parameters_hor_gbox)
spacer.setSizePolicy(qt.QSizePolicy.Expanding, qt.QSizePolicy.Fixed)
v_layout.addWidget(self._data_path_gbox)
v_layout.addWidget(parameters_hor_gbox)
v_layout.addStretch()
self.connect(
self._data_path_widget.data_path_widget_layout.child("run_number_ledit"),
qt.SIGNAL("textChanged(const QString &)"),
self._run_number_ledit_change,
)
self.connect(
self._data_path_widget.data_path_widget_layout.child("prefix_ledit"),
qt.SIGNAL("textChanged(const QString &)"),
self._prefix_ledit_change,
)
self.connect(
self._data_path_widget,
qt.PYSIGNAL("path_template_changed"),
self.handle_path_conflict,
)
示例3: __init__
# 需要导入模块: from create_task_base import CreateTaskBase [as 别名]
# 或者: from create_task_base.CreateTaskBase import __init__ [as 别名]
def __init__(self, parent=None, name=None, fl=0):
CreateTaskBase.__init__(self, parent, name, fl, "Workflow")
# Data attributes
self.workflow_hwobj = None
self.workflows = {}
self.init_models()
# Layout
v_layout = qt.QVBoxLayout(self, 2, 5, "main_v_layout")
self._workflow_type_gbox = qt.QVGroupBox(
"Workflow type", self, "workflow_rtype"
)
self._workflow_cbox = qt.QComboBox(self._workflow_type_gbox)
self._data_path_gbox = qt.QVGroupBox("Data location", self, "data_path_gbox")
self._data_path_widget = DataPathWidget(
self._data_path_gbox, data_model=self._path_template, layout="vertical"
)
self._data_path_widget.data_path_widget_layout.child("file_name_label").setText(
""
)
self._data_path_widget.data_path_widget_layout.child(
"file_name_value_label"
).hide()
# self._grid_widget = MxLookupScanBrick.MxLookupScanBrick(self, 'grid_widget')
v_layout.addWidget(self._workflow_type_gbox)
v_layout.addWidget(self._data_path_gbox)
# v_layout.addWidget(self._grid_widget)
v_layout.addStretch()
self.connect(
self._data_path_widget.data_path_widget_layout.child("prefix_ledit"),
qt.SIGNAL("textChanged(const QString &)"),
self._prefix_ledit_change,
)
self.connect(
self._data_path_widget.data_path_widget_layout.child("run_number_ledit"),
qt.SIGNAL("textChanged(const QString &)"),
self._run_number_ledit_change,
)
self.connect(
self._data_path_widget,
qt.PYSIGNAL("path_template_changed"),
self.handle_path_conflict,
)
示例4: __init__
# 需要导入模块: from create_task_base import CreateTaskBase [as 别名]
# 或者: from create_task_base.CreateTaskBase import __init__ [as 别名]
def __init__(self, parent=None, name=None, fl=0):
CreateTaskBase.__init__(self, parent, name, fl, "Energy-scan")
# Data attributes
self.init_models()
# Layout
v_layout = qt.QVBoxLayout(self, 2, 5, "main_v_layout")
h_box = qt.QHGroupBox("Available elements", self)
self.periodic_table = PeriodicTableBrick(h_box)
font = self.periodic_table.font()
font.setPointSize(8)
self.periodic_table.setFont(font)
h_box.setMaximumWidth(470)
h_box.setMaximumHeight(310)
self._data_path_gbox = qt.QVGroupBox("Data location", self, "data_path_gbox")
self._data_path_widget = DataPathWidget(
self._data_path_gbox, data_model=self._path_template, layout="vertical"
)
v_layout.addWidget(h_box)
v_layout.addWidget(self._data_path_gbox)
v_layout.addStretch()
self.connect(
self._data_path_widget.data_path_widget_layout.child("prefix_ledit"),
qt.SIGNAL("textChanged(const QString &)"),
self._prefix_ledit_change,
)
self.connect(
self._data_path_widget.data_path_widget_layout.child("run_number_ledit"),
qt.SIGNAL("textChanged(const QString &)"),
self._run_number_ledit_change,
)
self.connect(
self._data_path_widget,
qt.PYSIGNAL("path_template_changed"),
self.handle_path_conflict,
)
qt.QObject.connect(
self.periodic_table, qt.PYSIGNAL("edgeSelected"), self.element_clicked
)
示例5: __init__
# 需要导入模块: from create_task_base import CreateTaskBase [as 别名]
# 或者: from create_task_base.CreateTaskBase import __init__ [as 别名]
def __init__(self, parent = None, name = None, fl = 0):
CreateTaskBase.__init__(self, parent, name, fl, 'Workflow')
# Data attributes
self.workflow_hwobj = None
self.workflows = {}
self.init_models()
#Layout
v_layout = qt.QVBoxLayout(self, 2, 5, "main_v_layout")
self._workflow_type_gbox = qt.QVGroupBox('Workflow type', self,
'workflow_rtype')
self._workflow_cbox = qt.QComboBox(self._workflow_type_gbox)
self._data_path_gbox = qt.QVGroupBox('Data location', self,
'data_path_gbox')
self._data_path_widget = DataPathWidget(self._data_path_gbox,
data_model = self._path_template,
layout = DataPathWidgetVerticalLayout)
self._data_path_widget.data_path_widget_layout.file_name_label.setText('')
self._data_path_widget.data_path_widget_layout.file_name_value_label.hide()
self._grid_widget = MxLookupScanBrick.\
MxLookupScanBrick(self, 'grid_widget')
v_layout.addWidget(self._workflow_type_gbox)
v_layout.addWidget(self._data_path_gbox)
v_layout.addWidget(self._grid_widget)
v_layout.addStretch()
self.connect(self._data_path_widget.data_path_widget_layout.prefix_ledit,
qt.SIGNAL("textChanged(const QString &)"),
self._prefix_ledit_change)
self.connect(self._data_path_widget.data_path_widget_layout.run_number_ledit,
qt.SIGNAL("textChanged(const QString &)"),
self._run_number_ledit_change)
self.connect(self._data_path_widget,
qt.PYSIGNAL("path_template_changed"),
self.handle_path_conflict)
示例6: __init__
# 需要导入模块: from create_task_base import CreateTaskBase [as 别名]
# 或者: from create_task_base.CreateTaskBase import __init__ [as 别名]
def __init__(self, parent = None, name = None, fl = 0):
CreateTaskBase.__init__(self, parent, name, fl, 'Energy-scan')
# Data attributes
self.init_models()
#Layout
v_layout = qt.QVBoxLayout(self, 2, 5, "main_v_layout")
h_box = qt.QHGroupBox('Available elements', self)
self.periodic_table = PeriodicTableBrick(h_box)
font = self.periodic_table.font()
font.setPointSize(8)
self.periodic_table.setFont(font)
h_box.setMaximumWidth(454)
h_box.setMaximumHeight(300)
self._data_path_gbox = qt.QVGroupBox('Data location', self, 'data_path_gbox')
self._data_path_widget = DataPathWidget(self._data_path_gbox,
data_model = self._path_template,
layout = DataPathWidgetVerticalLayout)
v_layout.addWidget(h_box)
v_layout.addWidget(self._data_path_gbox)
v_layout.addStretch()
self.connect(self._data_path_widget.data_path_widget_layout.prefix_ledit,
qt.SIGNAL("textChanged(const QString &)"),
self._prefix_ledit_change)
self.connect(self._data_path_widget.data_path_widget_layout.run_number_ledit,
qt.SIGNAL("textChanged(const QString &)"),
self._run_number_ledit_change)
self.connect(self._data_path_widget,
qt.PYSIGNAL("path_template_changed"),
self.handle_path_conflict)
示例7: __init__
# 需要导入模块: from create_task_base import CreateTaskBase [as 别名]
# 或者: from create_task_base.CreateTaskBase import __init__ [as 别名]
def __init__(self, parent=None, name=None, fl=0):
CreateTaskBase.__init__(self, parent, name, fl, "Characterisation")
if not name:
self.setName("create_char_widget")
#
# Data attributes
#
self._current_selected_item = None
self.init_models()
self._char_params_mib = DataModelInputBinder(self._char_params)
#
# Layout
#
v_layout = qt.QVBoxLayout(self, 2, 6, "v_layout")
self._acq_widget = AcquisitionWidgetSimple(
self,
acq_params=self._acquisition_parameters,
path_template=self._path_template,
)
# self._acq_widget.setFixedHeight(170)
current_dir = os.path.dirname(__file__)
ui_file = "ui_files/vertical_crystal_dimension_widget_layout.ui"
widget = qtui.QWidgetFactory.create(os.path.join(current_dir, ui_file))
widget.reparent(self, qt.QPoint(0, 0))
self._vertical_dimension_widget = widget
ui_file = "ui_files/characterise_simple_widget_vertical_layout.ui"
widget = qtui.QWidgetFactory.create(os.path.join(current_dir, ui_file))
widget.reparent(self, qt.QPoint(0, 0))
self._char_widget = widget
self._data_path_gbox = qt.QVGroupBox("Data location", self, "data_path_gbox")
self._data_path_widget = DataPathWidget(
self._data_path_gbox, data_model=self._path_template, layout="vertical"
)
v_layout.addWidget(self._acq_widget)
v_layout.addWidget(self._data_path_gbox)
v_layout.addWidget(self._char_widget)
v_layout.addWidget(self._vertical_dimension_widget)
v_layout.addStretch(100)
#
# Logic
#
optimised_sad_cbx = self._char_widget.child("optimised_sad_cbx")
account_rad_dmg_cbx = self._char_widget.child("account_rad_dmg_cbx")
start_comp_cbox = self._char_widget.child("start_comp_cbox")
# induced_burn_cbx = self._char_widget.child('induced_burn_cbx')
max_vdim_ledit = self._vertical_dimension_widget.child("max_vdim_ledit")
min_vdim_ledit = self._vertical_dimension_widget.child("min_vdim_ledit")
min_vphi_ledit = self._vertical_dimension_widget.child("min_vphi_ledit")
max_vphi_ledit = self._vertical_dimension_widget.child("max_vphi_ledit")
space_group_ledit = self._vertical_dimension_widget.child("space_group_ledit")
self._char_params_mib.bind_value_update(
"opt_sad", optimised_sad_cbx, bool, None
)
self._char_params_mib.bind_value_update(
"account_rad_damage", 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", start_comp_cbox, int, None
)
self._char_params_mib.bind_value_update(
"max_crystal_vdim",
max_vdim_ledit,
float,
qt.QDoubleValidator(0.0, 1000, 2, self),
)
self._char_params_mib.bind_value_update(
"min_crystal_vdim",
min_vdim_ledit,
float,
qt.QDoubleValidator(0.0, 1000, 2, self),
)
self._char_params_mib.bind_value_update(
"min_crystal_vphi",
min_vphi_ledit,
float,
#.........这里部分代码省略.........
示例8: __init__
# 需要导入模块: from create_task_base import CreateTaskBase [as 别名]
# 或者: from 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.setName("create_helical_widget")
#
# Data attributes
#
self.init_models()
self._prev_pos = None
self._current_pos = None
self._list_item_map = {}
self.init_models()
#
# Layout
#
v_layout = qt.QVBoxLayout(self, 2, 5, "v_layout")
self._lines_gbox = qt.QGroupBox('Lines', self, "lines_gbox")
self._lines_gbox.setColumnLayout(0, qt.Qt.Vertical)
self._lines_gbox.layout().setSpacing(6)
self._lines_gbox.layout().setMargin(11)
lines_gbox_layout = qt.QHBoxLayout(self._lines_gbox.layout())
lines_gbox_layout.setAlignment(qt.Qt.AlignTop)
self._list_box = qt.QListBox(self._lines_gbox, "helical_page")
self._list_box.setSelectionMode(qt.QListBox.Extended)
self._list_box.setFixedWidth(200)
self._list_box.setFixedHeight(75)
list_box_tool_tip = "Select the line(s) to perfrom helical scan on"
qt.QToolTip.add(self._list_box, list_box_tool_tip)
lines_gbox_layout.addWidget(self._list_box)
button_layout = qt.QVBoxLayout(None, 0, 6, "button_layout")
button_layout.setSpacing(5)
add_button = qt.QPushButton("+", self._lines_gbox, "add_button")
add_button.setFixedWidth(20)
add_button.setFixedHeight(20)
remove_button = qt.QPushButton("-", self._lines_gbox, "add_button")
remove_button.setFixedWidth(20)
remove_button.setFixedHeight(20)
button_layout.addWidget(add_button)
button_layout.addWidget(remove_button)
lines_gbox_layout.addLayout(button_layout)
add_button_tool_tip = "Add a line between two saved positions, " \
"CTRL click to select more than one position"
qt.QToolTip.add(add_button, add_button_tool_tip)
remove_button_tool_tip = "Remove selected line(s)"
qt.QToolTip.add(remove_button, remove_button_tool_tip)
self._acq_gbox = qt.QVGroupBox('Acquisition', self, 'acq_gbox')
self._acq_widget = \
AcquisitionWidget(self._acq_gbox,
"acquisition_widget", layout='vertical',
acq_params=self._acquisition_parameters,
path_template=self._path_template)
self._acq_widget.disable_inverse_beam(True)
self._data_path_gbox = qt.QVGroupBox('Data location', self,
'data_path_gbox')
self._data_path_widget = \
DataPathWidget(self._data_path_gbox,
data_model = self._path_template,
layout = 'vertical')
self._processing_gbox = qt.QVGroupBox('Processing', self,
'processing_gbox')
self._processing_widget = \
ProcessingWidget(self._processing_gbox,
data_model = self._processing_parameters)
v_layout.addWidget(self._lines_gbox)
v_layout.addWidget(self._acq_gbox)
v_layout.addWidget(self._data_path_gbox)
v_layout.addWidget(self._processing_gbox)
qt.QObject.connect(add_button, qt.SIGNAL("clicked()"),
self.add_clicked)
qt.QObject.connect(remove_button, qt.SIGNAL("clicked()"),
self.remove_clicked)
qt.QObject.connect(self._list_box, qt.SIGNAL("selectionChanged()"),
self.list_box_selection_changed)
prefix_ledit = self._data_path_widget.\
data_path_widget_layout.child('prefix_ledit')
run_number_ledit = self._data_path_widget.\
data_path_widget_layout.child('run_number_ledit')
self.connect(prefix_ledit,
qt.SIGNAL("textChanged(const QString &)"),
self._prefix_ledit_change)
#.........这里部分代码省略.........
示例9: __init__
# 需要导入模块: from create_task_base import CreateTaskBase [as 别名]
# 或者: from create_task_base.CreateTaskBase import __init__ [as 别名]
def __init__(self, parent=None, name=None, fl=0):
CreateTaskBase.__init__(self, parent, name, fl, "Standard")
if not name:
self.setName("create_discrete_widget")
self.previous_energy = None
self.init_models()
#
# Layout
#
v_layout = qt.QVBoxLayout(self, 2, 5, "v_layout")
self._acq_gbox = qt.QVGroupBox("Acquisition", self, "acq_gbox")
self._acq_widget = AcquisitionWidget(
self._acq_gbox,
"acquisition_widget",
layout="vertical",
acq_params=self._acquisition_parameters,
path_template=self._path_template,
)
self._data_path_gbox = qt.QVGroupBox("Data location", self, "data_path_gbox")
self._data_path_widget = DataPathWidget(
self._data_path_gbox,
"create_dc_path_widget",
data_model=self._path_template,
layout="vertical",
)
self._processing_gbox = qt.QVGroupBox("Processing", self, "processing_gbox")
self._processing_widget = ProcessingWidget(
self._processing_gbox, data_model=self._processing_parameters
)
v_layout.addWidget(self._acq_gbox)
v_layout.addWidget(self._data_path_gbox)
v_layout.addWidget(self._processing_gbox)
v_layout.addStretch()
dp_layout = self._data_path_widget.data_path_widget_layout
self.connect(
self._acq_widget,
qt.PYSIGNAL("mad_energy_selected"),
self.mad_energy_selected,
)
self.connect(
dp_layout.child("prefix_ledit"),
qt.SIGNAL("textChanged(const QString &)"),
self._prefix_ledit_change,
)
self.connect(
dp_layout.child("run_number_ledit"),
qt.SIGNAL("textChanged(const QString &)"),
self._run_number_ledit_change,
)
self.connect(
self._acq_widget,
qt.PYSIGNAL("path_template_changed"),
self.handle_path_conflict,
)
self.connect(
self._data_path_widget,
qt.PYSIGNAL("path_template_changed"),
self.handle_path_conflict,
)
示例10: __init__
# 需要导入模块: from create_task_base import CreateTaskBase [as 别名]
# 或者: from create_task_base.CreateTaskBase import __init__ [as 别名]
def __init__(self,parent = None,name = None, fl = 0):
CreateTaskBase.__init__(self, parent, name, fl, 'Characterisation')
if not name:
self.setName("create_char_widget")
#
# Data attributes
#
self._current_selected_item = None
self.init_models()
self._char_params_mib = DataModelInputBinder(self._char_params)
#
# Layout
#
v_layout = qt.QVBoxLayout(self, 2, 6, "v_layout")
self._acq_widget = \
AcquisitionWidgetSimple(self, acq_params = self._acquisition_parameters,
path_template = self._path_template)
current_dir = os.path.dirname(__file__)
ui_file = 'ui_files/vertical_crystal_dimension_widget_layout.ui'
widget = qtui.QWidgetFactory.\
create(os.path.join(current_dir, ui_file))
widget.reparent(self, qt.QPoint(0,0))
self._vertical_dimension_widget = widget
ui_file = 'ui_files/characterise_simple_widget_vertical_layout.ui'
widget = qtui.QWidgetFactory.\
create(os.path.join(current_dir, ui_file))
widget.reparent(self, qt.QPoint(0,0))
self._char_widget = widget
self._data_path_gbox = \
qt.QVGroupBox('Data location', self, 'data_path_gbox')
self._data_path_widget = \
DataPathWidget(self._data_path_gbox,
data_model = self._path_template,
layout = DataPathWidgetVerticalLayout)
v_layout.addWidget(self._acq_widget)
v_layout.addWidget(self._char_widget)
v_layout.addWidget(self._vertical_dimension_widget)
v_layout.addWidget(self._data_path_gbox)
v_layout.addStretch(10)
#
# Logic
#
optimised_sad_cbx = self._char_widget.\
child('optimised_sad_cbx')
account_rad_dmg_cbx = self._char_widget.\
child('account_rad_dmg_cbx')
start_comp_cbox = self._char_widget.child('start_comp_cbox')
induced_burn_cbx = self._char_widget.child('induced_burn_cbx')
max_vdim_ledit = self._vertical_dimension_widget.\
child('max_vdim_ledit')
min_vdim_ledit = self._vertical_dimension_widget.\
child('min_vdim_ledit')
min_vphi_ledit = self._vertical_dimension_widget.\
child('min_vphi_ledit')
max_vphi_ledit = self._vertical_dimension_widget.\
child('max_vphi_ledit')
space_group_ledit = self._vertical_dimension_widget.\
child('space_group_ledit')
self._char_params_mib.bind_value_update('opt_sad',
optimised_sad_cbx,
bool, None)
self._char_params_mib.bind_value_update('account_rad_damage',
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',
start_comp_cbox,
int, None)
self._char_params_mib.\
bind_value_update('max_crystal_vdim',
max_vdim_ledit, float,
qt.QDoubleValidator(0.0, 1000, 2, self))
self._char_params_mib.\
bind_value_update('min_crystal_vdim',
min_vdim_ledit, float,
qt.QDoubleValidator(0.0, 1000, 2, self))
#.........这里部分代码省略.........