当前位置: 首页>>代码示例>>Python>>正文


Python CreateTaskBase.__init__方法代码示例

本文整理汇总了Python中Qt4_create_task_base.CreateTaskBase.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python CreateTaskBase.__init__方法的具体用法?Python CreateTaskBase.__init__怎么用?Python CreateTaskBase.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Qt4_create_task_base.CreateTaskBase的用法示例。


在下文中一共展示了CreateTaskBase.__init__方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from Qt4_create_task_base import CreateTaskBase [as 别名]
# 或者: from Qt4_create_task_base.CreateTaskBase import __init__ [as 别名]
    def __init__(self, parent = None,name = None, fl = 0):
        """
        Descript. :
        """
 
        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')

        # Layout --------------------------------------------------------------
        self.main_layout = QtGui.QVBoxLayout(self)
        self.main_layout.addWidget(self._periodic_table_widget)
        self.main_layout.addWidget(self._data_path_widget)
        self.main_layout.setContentsMargins(0, 0, 0, 0)
        self.main_layout.setSpacing(6)
        self.main_layout.addStretch(10)

        # SizePolicies --------------------------------------------------------

        # Qt signal/slot connections ------------------------------------------
        self._periodic_table_widget.elementEdgeSelectedSignal.\
             connect(self.acq_parameters_changed)
        self._data_path_widget.pathTemplateChangedSignal.\
             connect(self.acq_parameters_changed)
开发者ID:milanprica,项目名称:mxcube,代码行数:37,代码来源:Qt4_create_energy_scan_widget.py

示例2: __init__

# 需要导入模块: from Qt4_create_task_base import CreateTaskBase [as 别名]
# 或者: from Qt4_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 = uic.loadUi(
            os.path.join(os.path.dirname(__file__), "ui_files/Qt4_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 = QtGui.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(2)
        _main_vlayout.setContentsMargins(0, 0, 0, 0)

        # 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.remove_line_button.clicked.connect(self.remove_line_button_clicked)

        self._data_path_widget.data_path_layout.prefix_ledit.textChanged.connect(self._prefix_ledit_change)
        self._data_path_widget.data_path_layout.run_number_ledit.textChanged.connect(self._run_number_ledit_change)
        self._data_path_widget.pathTemplateChangedSignal.connect(self.handle_path_conflict)

        self._acq_widget.madEnergySelectedSignal.connect(self.mad_energy_selected)
        self._acq_widget.acqParametersChangedSignal.connect(self.handle_path_conflict)

        self._processing_widget.enableProcessingSignal.connect(self._enable_processing_toggled)

        # Other ---------------------------------------------------------------
        for col in range(self._lines_widget.lines_treewidget.columnCount()):
            self._lines_widget.lines_treewidget.resizeColumnToContents(col)
开发者ID:hzb-mx,项目名称:mxcube,代码行数:62,代码来源:Qt4_create_helical_widget.py

示例3: __init__

# 需要导入模块: from Qt4_create_task_base import CreateTaskBase [as 别名]
# 或者: from Qt4_create_task_base.CreateTaskBase import __init__ [as 别名]
    def __init__(self, parent=None,name=None, fl=0):
        """
        Descript. :
        """
 
        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 = QGroupBox('Parameters', self)
        self._adjust_transmission_cbox = QCheckBox(\
             "Adjust transmission", _parameters_gbox)
        self._adjust_transmission_cbox.setChecked(False)
        self._adjust_transmission_cbox.setEnabled(True)
        self._max_transmission_label = QLabel("Maximum transmission:")
        self._max_transmission_ledit = QLineEdit("20", _parameters_gbox)
        self._max_transmission_ledit.setFixedWidth(80)
        self._max_transmission_ledit.setEnabled(False)

        # Layout --------------------------------------------------------------
        _parameters_gbox_hlayout = 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 = 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)
开发者ID:vrey01,项目名称:mxcube,代码行数:61,代码来源:Qt4_create_energy_scan_widget.py

示例4: __init__

# 需要导入模块: from Qt4_create_task_base import CreateTaskBase [as 别名]
# 或者: from Qt4_create_task_base.CreateTaskBase import __init__ [as 别名]
    def __init__(self, parent = None, name = None, fl = 0):
        CreateTaskBase.__init__(self, parent, name, QtCore.Qt.WindowFlags(fl), 'XRF-scan')
 
        if name is not None:
            self.setObjectName(name)

        # Hardware objects ----------------------------------------------------

        # Internal variables --------------------------------------------------
	self.count_time = None

        self.init_models()

        # Graphic elements ----------------------------------------------------
        self._data_path_gbox = QtGui.QGroupBox('Data location', self)
        self._data_path_widget = DataPathWidget(self._data_path_gbox, 
                                               data_model = self._path_template,
                                               layout = 'vertical')

	_parameters_gbox = QtGui.QGroupBox('Parameters', self)
	_count_time_label = QtGui.QLabel("Count time (sec.):", _parameters_gbox)
	self.count_time_ledit = QtGui.QLineEdit("1", _parameters_gbox)
        self.count_time_ledit.setMaximumWidth(75)

        # Layout --------------------------------------------------------------
        self._data_path_gbox_vlayout = QtGui.QVBoxLayout(self)
        self._data_path_gbox_vlayout.addWidget(self._data_path_widget)
        self._data_path_gbox_vlayout.setSpacing(0)
        self._data_path_gbox_vlayout.setContentsMargins(0, 0, 0, 0)
        self._data_path_gbox.setLayout(self._data_path_gbox_vlayout)

        _parameters_gbox_hlayout = QtGui.QHBoxLayout(self)
        _parameters_gbox_hlayout.addWidget(_count_time_label)
        _parameters_gbox_hlayout.addWidget(self.count_time_ledit)
        _parameters_gbox_hlayout.addStretch(0)
        _parameters_gbox_hlayout.setSpacing(2)
        _parameters_gbox_hlayout.setContentsMargins(0, 0, 0, 0)
        _parameters_gbox.setLayout(_parameters_gbox_hlayout)

        _main_vlayout = QtGui.QVBoxLayout(self)
	_main_vlayout.addWidget(self._data_path_gbox)
	_main_vlayout.addWidget(_parameters_gbox)
        _main_vlayout.setSpacing(2)
        _main_vlayout.setContentsMargins(2, 2, 2, 2)
        _main_vlayout.addStretch(0)
        self.setLayout(_main_vlayout)

        # SizePolicies --------------------------------------------------------

        # Qt signal/slot connections ------------------------------------------
        self._data_path_widget.data_path_layout.run_number_ledit.textChanged.\
             connect(self._run_number_ledit_change)
        
        self.connect(self._data_path_widget,
                     QtCore.SIGNAL("pathTemplateChanged"),
                     self.handle_path_conflict)
开发者ID:olofsvensson,项目名称:mxcube,代码行数:58,代码来源:Qt4_create_xrf_scan_widget.py

示例5: __init__

# 需要导入模块: from Qt4_create_task_base import CreateTaskBase [as 别名]
# 或者: from Qt4_create_task_base.CreateTaskBase import __init__ [as 别名]
    def __init__(self, parent=None, name=None, fl=0):
        """
        Descript. :
        """

        CreateTaskBase.__init__(self, parent, name, 
            QtCore.Qt.WindowFlags(fl), "Standart")

        if not name:
            self.setObjectName("create_discrete_widget")
        self.init_models()

        # Hardware objects ----------------------------------------------------

        # Internal variables --------------------------------------------------
        self.previous_energy = 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._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 = QtGui.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(2)
        _main_vlayout.setContentsMargins(0,0,0,0)

        # SizePolicies --------------------------------------------------------
        
        # Qt signal/slot connections ------------------------------------------
        self._acq_widget.acqParametersChangedSignal.\
             connect(self.acq_parameters_changed)
        self._data_path_widget.pathTemplateChangedSignal.\
             connect(self.acq_parameters_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.hide()
开发者ID:milanprica,项目名称:mxcube,代码行数:56,代码来源:Qt4_create_discrete_widget.py

示例6: __init__

# 需要导入模块: from Qt4_create_task_base import CreateTaskBase [as 别名]
# 或者: from Qt4_create_task_base.CreateTaskBase import __init__ [as 别名]
    def __init__(self, parent = None, name = None, fl = 0):
        CreateTaskBase.__init__(self, parent, name, 
            Qt.WindowFlags(fl), 'XRF spectrum')
 
        if name is not None:
            self.setObjectName(name)

        # Hardware objects ----------------------------------------------------

        # Internal variables --------------------------------------------------
        self.count_time = None

        self.init_models()

        # Graphic elements ----------------------------------------------------
        self._data_path_widget = DataPathWidget(self, 
             data_model = self._path_template, layout = 'vertical')

        _parameters_gbox = QGroupBox('Parameters', self)
        _count_time_label = QLabel("Count time (sec.):", _parameters_gbox)
        self.count_time_ledit = QLineEdit("1", _parameters_gbox)
        #self.count_time_ledit.setMaximumWidth(75)
        self.adjust_transmission_cbox = QCheckBox(\
             "Adjust transmission", _parameters_gbox)
        self.adjust_transmission_cbox.setChecked(True)
        

        # Layout --------------------------------------------------------------
        _parameters_gbox_hlayout = 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 = 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)
开发者ID:vrey01,项目名称:mxcube,代码行数:55,代码来源:Qt4_create_xrf_spectrum_widget.py

示例7: __init__

# 需要导入模块: from Qt4_create_task_base import CreateTaskBase [as 别名]
# 或者: from Qt4_create_task_base.CreateTaskBase import __init__ [as 别名]
    def __init__(self, parent = None,name = None, fl = 0):
        """
        Descript. :
        """
 
        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_gbox = QtGui.QGroupBox('Data location', self)
        self._data_path_widget = DataPathWidget(self._data_path_gbox,
                                               data_model = self._path_template,
                                               layout = 'vertical')

        # Layout --------------------------------------------------------------
        self._data_path_gbox_vlayout = QtGui.QVBoxLayout(self)
        self._data_path_gbox_vlayout.addWidget(self._data_path_widget)
        self._data_path_gbox_vlayout.setSpacing(0)
        self._data_path_gbox_vlayout.setContentsMargins(0, 0, 0, 0)
        self._data_path_gbox.setLayout(self._data_path_gbox_vlayout)

        self.main_layout = QtGui.QVBoxLayout(self)
        self.main_layout.addWidget(self._periodic_table_widget)
        self.main_layout.addWidget(self._data_path_gbox)
        self.main_layout.addStretch(0)
        self.main_layout.setSpacing(0)
        self.main_layout.setContentsMargins(0, 0, 0, 0)
        self.setLayout(self.main_layout) 

        # SizePolicies --------------------------------------------------------

        # Qt signal/slot connections ------------------------------------------
        self._data_path_widget.data_path_layout.run_number_ledit.textChanged.\
             connect(self._run_number_ledit_change)

        self.connect(self._data_path_widget,
                     QtCore.SIGNAL("pathTemplateChanged"),
                     self.handle_path_conflict)
开发者ID:olofsvensson,项目名称:mxcube,代码行数:48,代码来源:Qt4_create_energy_scan_widget.py

示例8: __init__

# 需要导入模块: from Qt4_create_task_base import CreateTaskBase [as 别名]
# 或者: from Qt4_create_task_base.CreateTaskBase import __init__ [as 别名]
    def __init__(self, parent = None, name = None, fl = 0):
        CreateTaskBase.__init__(self, parent, name, 
            Qt.WindowFlags(fl), 'XRF spectrum')
 
        if name is not None:
            self.setObjectName(name)

        # Hardware objects ----------------------------------------------------

        # Internal variables --------------------------------------------------
        self.count_time = None

        self.init_models()

        # Graphic elements ----------------------------------------------------
        self._data_path_widget = DataPathWidget(self, 
             data_model = self._path_template, layout = 'vertical')

        self._parameters_widget = loadUi(os.path.join(os.path.dirname(__file__),
                        "ui_files/Qt4_xrf_parameters_widget_layout.ui"))
        
        self.adjust_transmission_cbox = self._parameters_widget.adjust_transmission_cbox
        self.excitation_energy_ledit = self._parameters_widget.excitation_energy_ledit
        self.excitation_energy_ledit.setText("15.00")
        self.count_time_ledit = self._parameters_widget.count_time_ledit
        self.count_time_ledit.setText("10")
        
        # Layout --------------------------------------------------------------
        
        _main_vlayout = QVBoxLayout(self)
        _main_vlayout.addWidget(self._data_path_widget)
        _main_vlayout.addWidget(self._parameters_widget)
        _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)
开发者ID:MartinSavko,项目名称:mxcube,代码行数:45,代码来源:Qt4_create_xrf_spectrum_widget.py

示例9: __init__

# 需要导入模块: from Qt4_create_task_base import CreateTaskBase [as 别名]
# 或者: from Qt4_create_task_base.CreateTaskBase import __init__ [as 别名]
    def __init__(self,parent=None, name=None, fl=0):
        CreateTaskBase.__init__(self, parent, name,
            Qt.WindowFlags(fl), "Still")

        if not name:
            self.setObjectName("create_still_scan_widget")

        # Hardware objects ----------------------------------------------------

        # Internal variables --------------------------------------------------
        self.init_models()

        # Graphic elements ----------------------------------------------------
        self._acq_widget =  AcquisitionStillWidget(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 = 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._processing_widget.enableProcessingSignal.connect(\
             self._run_processing_toggled)
开发者ID:vrey01,项目名称:mxcube,代码行数:43,代码来源:Qt4_create_still_scan_widget.py

示例10: __init__

# 需要导入模块: from Qt4_create_task_base import CreateTaskBase [as 别名]
# 或者: from Qt4_create_task_base.CreateTaskBase import __init__ [as 别名]
    def __init__(self, parent = None,name = None, fl = 0):
        CreateTaskBase.__init__(self, parent, name, QtCore.Qt.WindowFlags(fl), 'Advanced')

        if not name:
            self.setObjectName("create_advanced_Scan_widget")

        # Hardware objects ----------------------------------------------------
        self.__mini_diff_hwobj = None
 
        # Internal variables --------------------------------------------------
        self.init_models()
        self._prev_pos = None
        self._current_pos = None
        self._list_item_map = {}
        self.init_models()

        self.__current_motor_positions = {}
        self.__cell_width = 0
        self.__cell_height = 0
        self.__list_items = {}
        self.__item_counter = 0
        self.__grid_list = []

        self.__canvas = None
        self.__matrix = None
        self.__event_mgr = None
        self.__drawing_object_layer = None
        self.__drawing_mgr = None
        self.__x_pixel_size = 1
        self.__y_pixel_size = 1
        self.__beam_size_x = 0
        self.__beam_size_y = 0
        self.__angle_active = 0

        # Graphic elements ----------------------------------------------------
        self.mesh_widget = uic.loadUi(os.path.join(os.path.dirname(__file__),
                               'ui_files/Qt4_mesh_widget_layout.ui'))

        self._acq_gbox = QtGui.QGroupBox('Acquisition', self)
        self._acq_gbox.setObjectName('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 = QtGui.QGroupBox('Data location', self)
        self._data_path_gbox.setObjectName('data_path_gbox')
        self._data_path_widget = DataPathWidget(self._data_path_gbox,
                                   'create_dc_path_widget',
                                   data_model = self._path_template,
                                   layout = 'vertical')

        # Layout --------------------------------------------------------------
        self._acq_gbox_layout = QtGui.QVBoxLayout(self)
        self._acq_gbox_layout.addWidget(self._acq_widget)
        self._acq_gbox_layout.setSpacing(0)
        self._acq_gbox_layout.setContentsMargins(0,0,0,0)
        self._acq_gbox.setLayout(self._acq_gbox_layout)

        self._data_path_gbox_layout = QtGui.QVBoxLayout(self)
        self._data_path_gbox_layout.addWidget(self._data_path_widget)
        self._data_path_gbox_layout.setSpacing(0)
        self._data_path_gbox_layout.setContentsMargins(0,0,0,0)
        self._data_path_gbox.setLayout(self._data_path_gbox_layout)

        _main_vlayout = QtGui.QVBoxLayout(self) 
        _main_vlayout.addWidget(self.mesh_widget)
        _main_vlayout.addWidget(self._acq_gbox)
        _main_vlayout.addWidget(self._data_path_gbox)
        _main_vlayout.addStretch(0)
        _main_vlayout.setSpacing(2)
        _main_vlayout.setContentsMargins(2, 2, 2, 2)
        self.setLayout(_main_vlayout)

        # SizePolicies --------------------------------------------------------

        # Qt signal/slot connections ------------------------------------------
        self._data_path_widget.data_path_layout.prefix_ledit.textChanged.\
             connect(self._prefix_ledit_change)

        self._data_path_widget.data_path_layout.run_number_ledit.textChanged.\
             connect(self._run_number_ledit_change)

        self.connect(self._data_path_widget,
                     QtCore.SIGNAL("pathTemplateChanged"),
                     self.handle_path_conflict)

        self.mesh_widget.draw_button.clicked.connect(self.draw_button_clicked)
      
        self.mesh_widget.add_button.clicked.connect(self.add_drawing_clicked)

        self.mesh_widget.remove_button.clicked.connect(self.delete_drawing_clicked)

        self.mesh_widget.hor_spacing_ledit.textChanged.\
             connect(self.set_hspace)

        self.mesh_widget.ver_spacing_ledit.textChanged.\
             connect(self.set_vspace)

#.........这里部分代码省略.........
开发者ID:olofsvensson,项目名称:mxcube,代码行数:103,代码来源:Qt4_create_advanced_scan_widget.py

示例11: __init__

# 需要导入模块: from Qt4_create_task_base import CreateTaskBase [as 别名]
# 或者: from Qt4_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 = loadUi(os.path.join(\
            os.path.dirname(__file__), "ui_files/Qt4_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 = 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.enable_widgets(False)
开发者ID:vrey01,项目名称:mxcube,代码行数:73,代码来源:Qt4_create_helical_widget.py

示例12: __init__

# 需要导入模块: from Qt4_create_task_base import CreateTaskBase [as 别名]
# 或者: from Qt4_create_task_base.CreateTaskBase import __init__ [as 别名]
    def __init__(self, parent=None,name=None, fl=0):
        CreateTaskBase.__init__(self, parent, name, 
            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._xray_imaging_parameters_widget = XrayImagingParametersWidget(\
             self, 'xray_imaging_widget',
             xray_imaging_params=self._xray_imaging_parameters)

        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._data_path_widget = DataPathWidget(self, 'create_dc_path_widget', 
             data_model=self._path_template, layout='vertical')

        # Layout --------------------------------------------------------------
        _main_vlayout = QVBoxLayout(self)
        _main_vlayout.addWidget(self._xray_imaging_parameters_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._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)
开发者ID:vrey01,项目名称:mxcube,代码行数:67,代码来源:Qt4_create_xray_imaging_widget.py

示例13: __init__

# 需要导入模块: from Qt4_create_task_base import CreateTaskBase [as 别名]
# 或者: from Qt4_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")
         
        # Hardware objects ----------------------------------------------------

        # Internal variables --------------------------------------------------
        self.init_models()
        self._prev_pos = None
        self._current_pos = None
        self._list_item_map = {}
        self.init_models()

        # Graphic elements ----------------------------------------------------
        self._lines_gbox = QtGui.QGroupBox('Lines', self)
        self._lines_list_widget = QtGui.QListWidget(self._lines_gbox)
        self._lines_list_widget.setFixedWidth(300)
        self._lines_list_widget.setFixedHeight(100)
        self._lines_list_widget.setToolTip(\
             "Select the line(s) to perfrom helical scan on")

        add_button = QtGui.QPushButton("+", self._lines_gbox)
        add_button.setFixedWidth(20)
        add_button.setFixedHeight(20)
        remove_button = QtGui.QPushButton("-", self._lines_gbox)
        remove_button.setFixedWidth(20)
        remove_button.setFixedHeight(20)        

        add_button_tool_tip = "Add a line between two saved positions, " \
                              "CTRL click to select more than one position"
        add_button.setToolTip(add_button_tool_tip)
        remove_button_tool_tip = "Remove selected line(s)"
        remove_button.setToolTip(remove_button_tool_tip)

        self._acq_gbox = QtGui.QGroupBox('Acquisition', self)
        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 = QtGui.QGroupBox('Data location', self)
        self._data_path_widget = \
            DataPathWidget(self._data_path_gbox,
                           'create_dc_path_widget',
                           data_model=self._path_template,
                           layout='vertical')

        self._processing_gbox = QtGui.QGroupBox('Processing', self)
        self._processing_gbox.setObjectName('processing_gbox')
        self._processing_widget = \
            ProcessingWidget(self._processing_gbox,
                             data_model=self._processing_parameters)

        # Layout --------------------------------------------------------------
        _lines_gbox_gridlayout = QtGui.QGridLayout(self)
        _lines_gbox_gridlayout.addWidget(self._lines_list_widget, 0, 0, 2, 1)
        _lines_gbox_gridlayout.addWidget(add_button, 0, 1)
        _lines_gbox_gridlayout.addWidget(remove_button, 1, 1) 
        _lines_gbox_gridlayout.setSpacing(2)
        _lines_gbox_gridlayout.setColumnStretch(2, 10)
        _lines_gbox_gridlayout.setContentsMargins(2, 2, 2, 2)
        self._lines_gbox.setLayout(_lines_gbox_gridlayout)

        _acq_gbox_layout = QtGui.QVBoxLayout(self)
        _acq_gbox_layout.addWidget(self._acq_widget)
        _acq_gbox_layout.setSpacing(0)
        _acq_gbox_layout.setContentsMargins(0,0,0,0)
        self._acq_gbox.setLayout(_acq_gbox_layout)

        _data_path_gbox_layout = QtGui.QVBoxLayout(self)
        _data_path_gbox_layout.addWidget(self._data_path_widget)
        _data_path_gbox_layout.setSpacing(0)
        _data_path_gbox_layout.setContentsMargins(0,0,0,0)
        self._data_path_gbox.setLayout(_data_path_gbox_layout)

        _processing_gbox_layout = QtGui.QVBoxLayout(self)
        _processing_gbox_layout.addWidget(self._processing_widget)
        _processing_gbox_layout.setSpacing(0)
        _processing_gbox_layout.setContentsMargins(0,0,0,0)
        self._processing_gbox.setLayout(_processing_gbox_layout)

        _main_vlayout = QtGui.QVBoxLayout(self)
        _main_vlayout.addWidget(self._lines_gbox)
        _main_vlayout.addWidget(self._acq_gbox)
        _main_vlayout.addWidget(self._data_path_gbox)
        _main_vlayout.addWidget(self._processing_gbox)
        _main_vlayout.addStretch(0)
        _main_vlayout.setSpacing(2)
        _main_vlayout.setContentsMargins(0,0,0,0)
        self.setLayout(_main_vlayout)

        # SizePolicies --------------------------------------------------------

        # Qt signal/slot connections ------------------------------------------
        add_button.clicked.connect(self.add_clicked)

        remove_button.clicked.connect(self.remove_clicked)
#.........这里部分代码省略.........
开发者ID:olofsvensson,项目名称:mxcube,代码行数:103,代码来源:Qt4_create_helical_widget.py

示例14: __init__

# 需要导入模块: from Qt4_create_task_base import CreateTaskBase [as 别名]
# 或者: from Qt4_create_task_base.CreateTaskBase import __init__ [as 别名]
    def __init__(self, parent=None, name=None, fl=0):
        """
        Descript. :
        """

        CreateTaskBase.__init__(self, parent, name, QtCore.Qt.WindowFlags(fl), "Standart")

        if not name:
            self.setObjectName("Qt4_create_discrete_widget")

        # Hardware objects ----------------------------------------------------

        # Internal variables --------------------------------------------------
        self.previous_energy = 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._data_path_gbox = QtGui.QGroupBox('Data location', self)
        self._data_path_gbox.setObjectName('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 = QtGui.QGroupBox('Processing', self)
        self._processing_gbox.setObjectName('processing_gbox')
        self._processing_widget = \
            ProcessingWidget(self._processing_gbox,
                             data_model=self._processing_parameters)
       
        # Layout --------------------------------------------------------------
        self._data_path_gbox_layout = QtGui.QVBoxLayout(self)
        self._data_path_gbox_layout.addWidget(self._data_path_widget)
        self._data_path_gbox_layout.setSpacing(0)
        self._data_path_gbox_layout.setContentsMargins(0, 0, 0, 0)
        self._data_path_gbox.setLayout(self._data_path_gbox_layout)

        self._processing_gbox_layout = QtGui.QVBoxLayout(self)
        self._processing_gbox_layout.addWidget(self._processing_widget)
        self._processing_gbox_layout.setSpacing(0)
        self._processing_gbox_layout.setContentsMargins(0, 0, 0, 0)
        self._processing_gbox.setLayout(self._processing_gbox_layout)

        self.main_layout = QtGui.QVBoxLayout(self)
        self.main_layout.addWidget(self._acq_widget)
        self.main_layout.addWidget(self._data_path_gbox)
        self.main_layout.addWidget(self._processing_gbox)
        self.main_layout.addSpacing(10)
        self.main_layout.setSpacing(0)
        self.main_layout.setContentsMargins(0, 0, 0, 0)
        self.setLayout(self.main_layout)

        # SizePolicies --------------------------------------------------------
        """self._acq_widget.setSizePolicy(QtGui.QSizePolicy.Expanding,
                                       QtGui.QSizePolicy.Fixed)
        self._data_path_gbox.setSizePolicy(QtGui.QSizePolicy.Expanding,
                           QtGui.QSizePolicy.Expanding)
        self._processing_gbox.setSizePolicy(QtGui.QSizePolicy.Expanding,
                           QtGui.QSizePolicy.Expanding)"""
        
        # Qt signal/slot connections ------------------------------------------
        self._processing_gbox.toggled.connect(self._use_processing_toggled)
        self._data_path_widget.data_path_layout.prefix_ledit.textChanged.\
             connect(self._prefix_ledit_change)
        self._data_path_widget.data_path_layout.run_number_ledit.textChanged.\
             connect(self._run_number_ledit_change)

        self.connect(self._acq_widget, QtCore.SIGNAL('mad_energy_selected'),
                     self.mad_energy_selected)

        self.connect(self._acq_widget,
                     QtCore.SIGNAL("pathTemplateChanged"),
                     self.handle_path_conflict)

        self.connect(self._data_path_widget,
                     QtCore.SIGNAL("pathTemplateChanged"),
                     self.handle_path_conflict)
开发者ID:folf,项目名称:mxcube,代码行数:84,代码来源:Qt4_create_discrete_widget.py

示例15: __init__

# 需要导入模块: from Qt4_create_task_base import CreateTaskBase [as 别名]
# 或者: from Qt4_create_task_base.CreateTaskBase import __init__ [as 别名]
    def __init__(self,parent = None,name = None, fl = 0):
        """
        Descript. :
        """

        CreateTaskBase.__init__(self, parent, name, fl, 'Characterisation')

        if not name:
            self.setName("create_char_widget")

        # Hardware objects ----------------------------------------------------

        # Internal variables --------------------------------------------------
        self._current_selected_item = 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_gbox = QtGui.QGroupBox('Data location', self)
        self._data_path_widget = DataPathWidget(
                               self._data_path_gbox,
                               data_model = self._path_template,
                               layout = 'vertical')

        self._vertical_dimension_widget = uic.loadUi(os.path.join(os.path.dirname(__file__),
             'ui_files/Qt4_vertical_crystal_dimension_widget_layout.ui'))
        
        self._char_widget = uic.loadUi(os.path.join(os.path.dirname(__file__),
             'ui_files/Qt4_characterise_simple_widget_vertical_layout.ui')) 

        gbox =  self._char_widget.findChild(QtGui.QGroupBox, "characterisation_gbox")
        p = gbox.palette();
        p.setColor(QtGui.QPalette.Window, QtCore.Qt.red);
        p.setColor(QtGui.QPalette.Highlight, QtCore.Qt.red);
        gbox.setPalette(p);

        # Layout --------------------------------------------------------------
        _data_path_gbox_layout = QtGui.QVBoxLayout(self)
        _data_path_gbox_layout.addWidget(self._data_path_widget)
        _data_path_gbox_layout.setSpacing(0)
        _data_path_gbox_layout.setContentsMargins(0,0,0,0)
        self._data_path_gbox.setLayout(_data_path_gbox_layout)

        _main_vlayout = QtGui.QVBoxLayout(self) 
        _main_vlayout.addWidget(self._acq_widget)
        _main_vlayout.addWidget(self._data_path_gbox)
        _main_vlayout.addWidget(self._char_widget)
        _main_vlayout.addWidget(self._vertical_dimension_widget)
        _main_vlayout.setSpacing(0)
        _main_vlayout.setContentsMargins(0,0,0,0)
        self.setLayout(_main_vlayout)

        # SizePolicies --------------------------------------------------------

        # Qt signal/slot connections ------------------------------------------

        # 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,
                              QtGui.QDoubleValidator(0.0, 1000, 2, self))

        self._char_params_mib.\
            bind_value_update('min_crystal_vdim',
                              self._vertical_dimension_widget.min_vdim_ledit, float,
                              QtGui.QDoubleValidator(0.0, 1000, 2, self))

        self._char_params_mib.\
            bind_value_update('min_crystal_vphi',
                              self._vertical_dimension_widget.min_vphi_ledit, float,
                              QtGui.QDoubleValidator(0.0, 1000, 2, self))

        self._char_params_mib.\
            bind_value_update('max_crystal_vphi',
                              self._vertical_dimension_widget.max_vphi_ledit, float,
                              QtGui.QDoubleValidator(0.0, 1000, 2, self))
        
        self._vertical_dimension_widget.space_group_ledit.addItems(XTAL_SPACEGROUPS)

        self._data_path_widget.data_path_layout.prefix_ledit.textChanged.\
#.........这里部分代码省略.........
开发者ID:folf,项目名称:mxcube,代码行数:103,代码来源:Qt4_create_char_widget.py


注:本文中的Qt4_create_task_base.CreateTaskBase.__init__方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。