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


Python TaurusWidget.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from taurus.qt.qtgui.container import TaurusWidget [as 别名]
# 或者: from taurus.qt.qtgui.container.TaurusWidget import __init__ [as 别名]
    def __init__(self, parent=None, selectables=None, buttonsPos=None, designMode=None):
        TaurusWidget.__init__(self, parent)
        if selectables is None:
            selectables = [taurus.core.taurusbasetypes.TaurusElementType.Attribute, taurus.core.taurusbasetypes.TaurusElementType.Member,
                           taurus.core.taurusbasetypes.TaurusElementType.Device]
        self._selectables = selectables

        # tree
        self._deviceTree = TaurusDbTreeWidget(
            perspective=taurus.core.taurusbasetypes.TaurusElementType.Device)
        self._deviceTree.getQModel().setSelectables(self._selectables)
        self._deviceTree.setUseParentModel(True)

        # toolbar
        self._toolbar = Qt.QToolBar("TangoSelector toolbar")
        self._toolbar.setIconSize(Qt.QSize(16, 16))
        self._toolbar.setFloatable(False)
        self._addSelectedAction = self._toolbar.addAction(
            Qt.QIcon.fromTheme("list-add"), "Add selected", self.onAddSelected)

        # defines the layout
        self.setButtonsPos(buttonsPos)

        self._deviceTree.recheckTaurusParent()  # NOT WORKING????
        # @todo: This is Workaround because UseSetParentModel is giving trouble again!
        self.modelChanged.connect(self._deviceTree.setModel)
开发者ID:cmft,项目名称:taurus,代码行数:28,代码来源:taurusmodelchooser.py

示例2: __init__

# 需要导入模块: from taurus.qt.qtgui.container import TaurusWidget [as 别名]
# 或者: from taurus.qt.qtgui.container.TaurusWidget import __init__ [as 别名]
    def __init__(self, parent=None, designMode=False):
        TaurusWidget.__init__(self, parent, designMode=designMode)

        self.loadUi(filename="reflectionseditor.ui")

        self._ui.ApplyButton.clicked.connect(self.apply)
        self._ui.ClearButton.clicked.connect(self.clear)
开发者ID:rhomspuron,项目名称:sardana,代码行数:9,代码来源:reflectionseditor.py

示例3: __init__

# 需要导入模块: from taurus.qt.qtgui.container import TaurusWidget [as 别名]
# 或者: from taurus.qt.qtgui.container.TaurusWidget import __init__ [as 别名]
    def __init__(self, parent=None, designMode=False):
        TaurusWidget.__init__(self, parent=parent, designMode=designMode)

        self._xAttr = None
        self._yAttr = None

        self._arrayEditor = ArrayEditor()
        self.fromFileBT = Qt.QPushButton('Read From File')
        self.toFileBT = Qt.QPushButton('Write To File')
        self.fromAttrBT = Qt.QPushButton('Read From Device')
        self.toAttrBT = Qt.QPushButton('Write To Device')

        self.fromAttrBT.setEnabled(False)
        self.toAttrBT.setEnabled(False)

        layout = Qt.QGridLayout(self)
        layout.addWidget(self._arrayEditor, 0, 0, 1, 4)
        layout.addWidget(self.fromFileBT, 1, 0)
        layout.addWidget(self.toFileBT, 1, 1)
        layout.addWidget(self.fromAttrBT, 1, 2)
        layout.addWidget(self.toAttrBT, 1, 3)

        self.fromFileBT.clicked[()].connect(self.onFromFile)
        self.toFileBT.clicked[()].connect(self.onToFile)
        self.fromAttrBT.clicked[()].connect(self.onFromAttr)
        self.toAttrBT.clicked[()].connect(self.onToAttr)
开发者ID:cmft,项目名称:taurus,代码行数:28,代码来源:taurusarrayedit.py

示例4: __init__

# 需要导入模块: from taurus.qt.qtgui.container import TaurusWidget [as 别名]
# 或者: from taurus.qt.qtgui.container.TaurusWidget import __init__ [as 别名]
    def __init__(self, parent=None, designMode=False):
        TaurusWidget.__init__(self, parent, designMode=designMode)

        self.loadUi(filename="computeu.ui")

        self.connect(self._ui.ComputeButton, Qt.SIGNAL(
            "clicked()"), self.compute_u)
开发者ID:cmft,项目名称:sardana,代码行数:9,代码来源:computeu.py

示例5: __init__

# 需要导入模块: from taurus.qt.qtgui.container import TaurusWidget [as 别名]
# 或者: from taurus.qt.qtgui.container.TaurusWidget import __init__ [as 别名]
    def __init__(self, parent=None, designMode=False):
        TaurusWidget.__init__(self, parent, designMode)

        self.setLayout(Qt.QVBoxLayout())

        self._splitter = Qt.QSplitter()
        self._splitter.setOrientation(Qt.Qt.Vertical)
        self.layout().addWidget(self._splitter)

        self._frame = TaurusWidget(self)
        self._frame.setLayout(Qt.QGridLayout())

        self._scrollArea = TaurusScrollArea(self)
        self._scrollArea.setWidget(self._frame)
        self._scrollArea.setWidgetResizable(True)
        self._splitter.addWidget(self._scrollArea)

        self._outputTE = Qt.QTextEdit()
        self._outputTE.setReadOnly(True)
        self._splitter.addWidget(self._outputTE)
        #self._splitter.moveSplitter(self._splitter.getRange(0)[-1], 0)

        self._cmdWidgets = []
        self._paramWidgets = []
        self._viewFilters = []
        self._defaultParameters = []
        self._sortKey = lambda x: x.cmd_name

        self._operatorViewFilter = lambda x: x.disp_level == PyTango.DispLevel.OPERATOR

        # self.setLayout(Qt.QGridLayout())
        self.modelChanged.connect(self._updateCommandWidgets)
开发者ID:cmft,项目名称:taurus,代码行数:34,代码来源:taurusform.py

示例6: __init__

# 需要导入模块: from taurus.qt.qtgui.container import TaurusWidget [as 别名]
# 或者: from taurus.qt.qtgui.container.TaurusWidget import __init__ [as 别名]
    def __init__(self, parent=None, designMode=False):
        TaurusWidget.__init__(self, parent, designMode=designMode)

        self.loadUi(filename="hklscan.ui")

        self._ui.hklStartScanButton.clicked.connect(self.start_hklscan)
        self._ui.hklStopScanButton.clicked.connect(self.stop_hklscan)
        self._ui.hklDisplayAnglesButton.clicked.connect(self.display_angles)
        self._ui.MacroServerConnectionButton.clicked.connect(
            self.open_macroserver_connection_panel)

        # Create a global SharedDataManager
        Qt.qApp.SDM = SharedDataManager(self)
开发者ID:rhomspuron,项目名称:sardana,代码行数:15,代码来源:hklscan.py

示例7: __init__

# 需要导入模块: from taurus.qt.qtgui.container import TaurusWidget [as 别名]
# 或者: from taurus.qt.qtgui.container.TaurusWidget import __init__ [as 别名]
    def __init__(self, parent=None, designMode=False):
        TaurusWidget.__init__(self, parent, designMode=designMode)

        self.loadUi(filename="ubmatrix.ui")

        self._ui.UpdateButton.clicked.connect(self.update_values)
        self._ui.ComputeUButton.clicked.connect(self.compute_ub)
        self._ui.ReflectionsListButton.clicked.connect(
            self.reflections_list_window)
        self._ui.EditReflectionsButton.clicked.connect(
            self.edit_reflections_window)
        self._ui.AffineButton.clicked.connect(self.affine)
        self._ui.AddCrystalButton.clicked.connect(self.add_select_crystal)
开发者ID:rhomspuron,项目名称:sardana,代码行数:15,代码来源:ubmatrix.py

示例8: __init__

# 需要导入模块: from taurus.qt.qtgui.container import TaurusWidget [as 别名]
# 或者: from taurus.qt.qtgui.container.TaurusWidget import __init__ [as 别名]
    def __init__(self, parent=None, designMode=False):
        TaurusWidget.__init__(self, parent, designMode)
        self.loadUi()
        self.door = None
        self.door_state_listener = None
        self.macro_name = ''
        self.macro_args = []
        self.macro_id = None
        self.running_macro = None

        self.ui.progress.setValue(0)

        self.ui.button.setCheckable(True)
        self.ui.button.clicked.connect(self._onButtonClicked)
开发者ID:rhomspuron,项目名称:sardana,代码行数:16,代码来源:macrobutton.py

示例9: __init__

# 需要导入模块: from taurus.qt.qtgui.container import TaurusWidget [as 别名]
# 或者: from taurus.qt.qtgui.container.TaurusWidget import __init__ [as 别名]
    def __init__(self, *args, **kwargs):
        TaurusWidget.__init__(self, *args)

        fileModel = kwargs.get("fileModel", None)
        if fileModel is None:
            fileModel = HDF5Widget.FileModel()
        self.__fileModel = fileModel

        self.treeWidget = HDF5Widget.HDF5Widget(self.__fileModel)
        self.treeWidget.setSizePolicy(Qt.QSizePolicy(Qt.QSizePolicy.Expanding, Qt.QSizePolicy.Expanding))
        #        self.infoWidget = HDF5Info.HDF5InfoWidget()
        self.__previewStack = Qt.QStackedWidget()
        self.__currentPreview = None

        # layout
        self.__splitter = Qt.QSplitter()
        self.__splitter.setOrientation(Qt.Qt.Vertical)
        self.__splitter.addWidget(self.treeWidget)
        #        self.__splitter.addWidget(self.infoWidget)
        self.__splitter.addWidget(self.__previewStack)
        self.setLayout(Qt.QVBoxLayout())
        self.layout().addWidget(self.__splitter)

        # Actions
        self.setContextMenuPolicy(Qt.Qt.ActionsContextMenu)
        self.openFileAction = Qt.QAction(Qt.QIcon.fromTheme("document-open"), "Open Data File...", self)
        self.togglePreviewAction = Qt.QAction(Qt.QIcon("actions:view.svg"), "Show/Hide preview", self)
        self.togglePreviewAction.setCheckable(True)
        self.togglePreviewAction.setChecked(True)
        self.addActions([self.openFileAction, self.togglePreviewAction])

        # Toolbar
        self._toolbar = Qt.QToolBar("NeXus browser toolbar")
        self._toolbar.setIconSize(Qt.QSize(16, 16))
        self._toolbar.setFloatable(False)
        self._toolbar.addActions([self.openFileAction, self.togglePreviewAction])
        self.layout().setMenuBar(self._toolbar)

        # connections
        self.__fileModel.sigFileAppended.connect(self.treeWidget.fileAppended)
        self.treeWidget.sigHDF5WidgetSignal.connect(self.onHDF5WidgetSignal)
        self.openFileAction.triggered[()].connect(self.openFile)
        self.togglePreviewAction.toggled.connect(self.__previewStack.setVisible)

        # configuration
        self.registerConfigProperty(
            self.togglePreviewAction.isChecked, self.togglePreviewAction.setChecked, "showPreview"
        )
开发者ID:cpascual,项目名称:taurus,代码行数:50,代码来源:taurusnexuswidget.py

示例10: __init__

# 需要导入模块: from taurus.qt.qtgui.container import TaurusWidget [as 别名]
# 或者: from taurus.qt.qtgui.container.TaurusWidget import __init__ [as 别名]
    def __init__(self, parent=None, designMode=False):
        TaurusWidget.__init__(self, parent, designMode=designMode)

        self.loadUi(filename="selectsignal.ui")

        self.signalComboBox = SignalComboBox(self)
        self.signalComboBox.setGeometry(QtCore.QRect(70, 50, 161, 27))
        self.signalComboBox.setObjectName("SignalcomboBox")

        self.connect(self.signalComboBox, Qt.SIGNAL(
            "currentIndexChanged(QString)"), self.onSignalChanged)

        self.doorName = None
        self.door_device = None
        
        registerExtensions()
开发者ID:cmft,项目名称:sardana,代码行数:18,代码来源:selectsignal.py

示例11: __init__

# 需要导入模块: from taurus.qt.qtgui.container import TaurusWidget [as 别名]
# 或者: from taurus.qt.qtgui.container.TaurusWidget import __init__ [as 别名]
    def __init__(self, parent=None, designMode=False):
        TaurusWidget.__init__(self, parent, designMode)
        self.loadUi()

        self.ioreg_dev = None

        self.alias_label = TaurusLabel()
        self.alias_label.setBgRole('state')
        self.value_label = PoolIORegisterReadWidget()
        self.button_value_dict = {}

        policy = self.value_label.sizePolicy()
        policy.setHorizontalPolicy(Qt.QSizePolicy.Expanding)
        self.value_label.setSizePolicy(policy)

        self.ui.lo_state_read.addWidget(self.alias_label)
        self.ui.lo_state_read.addWidget(self.value_label)
开发者ID:rhomspuron,项目名称:sardana,代码行数:19,代码来源:poolioregister.py

示例12: __init__

# 需要导入模块: from taurus.qt.qtgui.container import TaurusWidget [as 别名]
# 或者: from taurus.qt.qtgui.container.TaurusWidget import __init__ [as 别名]
    def __init__(self, parent=None, designMode=False,
                 readWClass=None, writeWClass=None,
                 enterEditTriggers=None, exitEditTriggers=None):

        TaurusWidget.__init__(self, parent=parent, designMode=designMode)

        self.setFocusPolicy(Qt.Qt.StrongFocus)
        self.setLayout(Qt.QStackedLayout())
        self.readWidget = None
        self.writeWidget = None

        # Use parameters from constructor args or defaults from class
        self.readWClass = readWClass or self.readWClass
        self.writeWClass = writeWClass or self.writeWClass
        self.enterEditTriggers = enterEditTriggers or self.enterEditTriggers
        self.exitEditTriggers = exitEditTriggers or self.exitEditTriggers

        # classify the triggers
        sc, et, sig = self._classifyTriggers(self.enterEditTriggers)
        self.enterEditShortCuts = sc
        self.enterEditEventTypes = et
        self.enterEditSignals = sig
        sc, et, sig = self._classifyTriggers(self.exitEditTriggers)
        self.exitEditShortCuts = sc
        self.exitEditEventTypes = et
        self.exitEditSignals = sig

        # Actions for entering and exiting the edit
        self.enterEditAction = Qt.QAction("Start Editing", self)
        self.enterEditAction.setShortcuts(self.enterEditShortCuts)
        self.enterEditAction.setShortcutContext(
            Qt.Qt.WidgetWithChildrenShortcut)
        self.addAction(self.enterEditAction)
        self.exitEditAction = Qt.QAction("Abort Editing", self)
        self.exitEditAction.setShortcuts(self.exitEditShortCuts)
        self.exitEditAction.setShortcutContext(
            Qt.Qt.WidgetWithChildrenShortcut)
        self.addAction(self.exitEditAction)
        self.enterEditAction.triggered[()].connect(self._onEnterEditActionTriggered)
        self.exitEditAction.triggered[()].connect(self._onExitEditActionTriggered)

        # add read and write widgets
        if self.readWClass is not None:
            self.setReadWidget(self.readWClass())
        if self.writeWClass is not None:
            self.setWriteWidget(self.writeWClass())
开发者ID:cmft,项目名称:taurus,代码行数:48,代码来源:abstractswitcher.py

示例13: __init__

# 需要导入模块: from taurus.qt.qtgui.container import TaurusWidget [as 别名]
# 或者: from taurus.qt.qtgui.container.TaurusWidget import __init__ [as 别名]
 def __init__(self, parent=None, designMode=False):
     TaurusWidget.__init__(self, parent=parent, designMode=designMode)
     self.setLayout(Qt.QVBoxLayout())
     self.tree = QConfigEditorModel()
     self.treeview = Qt.QTreeView()
     self.tree.setHorizontalHeaderLabels(
         ['Configuration key', 'type', 'value'])
     self.layout().addWidget(self.treeview)
     self._toolbar = Qt.QToolBar("QConfigViewer Main toolBar")
     self._toolbar.addAction(Qt.QIcon.fromTheme(
         "document-open"), "Open File", self.loadFile)
     self._toolbar.addAction(Qt.QIcon.fromTheme(
         "document-save"), "Save File", self.saveFile)
     self._toolbar.addAction(Qt.QIcon.fromTheme(
         "edit-undo"), "Reload from file", self.restoreOriginal)
     self.layout().setMenuBar(self._toolbar)
     self.setWindowTitle('TaurusConfigEditor')
     self.tree.showError.connect(self._showError)
开发者ID:cmft,项目名称:taurus,代码行数:20,代码来源:taurusconfigeditor.py

示例14: __init__

# 需要导入模块: from taurus.qt.qtgui.container import TaurusWidget [as 别名]
# 或者: from taurus.qt.qtgui.container.TaurusWidget import __init__ [as 别名]
 def __init__(self, parent=None, name=None, designMode=False):
     try:
         self.__name = name.__name__
     except:
         self.__name = "LinacPlcWidget"
     # super(LinacPlcWidget, self).__init__(parent, designMode=designMode)
     TaurusWidget.__init__(self, parent, designMode)
     try:
         self.debug("[%s]__init__()" % (self.__name))
         basePath = os.path.dirname(__file__)
         if len(basePath) == 0:
             basePath = '.'
         self.loadUi(filename="LinacPlcWidget.ui",
                     path=basePath+"/ui")
     except Exception as e:
         self.warning("[%s]__init__(): Widget exception! %s"
                      % (self.__name, e))
         traceback.print_exc()
         self.traceback()
开发者ID:srgblnch,项目名称:LinacGUI,代码行数:21,代码来源:linacplcwidget.py

示例15: __init__

# 需要导入模块: from taurus.qt.qtgui.container import TaurusWidget [as 别名]
# 或者: from taurus.qt.qtgui.container.TaurusWidget import __init__ [as 别名]
    def __init__(self, parent=None, designMode=False):
        TaurusWidget.__init__(self, parent, designMode=designMode)

        self.loadUi(filename="diffractometeralignment.ui")

        self.selectsignal = SelectSignal()

        self._ui.AlignmentStopButton.clicked.connect(self.stop_movements)
        self._ui.AlignmentStoreReflectionButton.clicked.connect(
            self.store_reflection)

        self._ui.MacroServerConnectionButton.clicked.connect(
            self.open_macroserver_connection_panel)

        self._ui.SelectSignalButton.clicked.connect(
            self.open_selectsignal_panel)

        # Create a global SharedDataManager
        Qt.qApp.SDM = SharedDataManager(self)
开发者ID:rhomspuron,项目名称:sardana,代码行数:21,代码来源:diffractometeralignment.py


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