• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python container.TaurusWidget类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: __init__

    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,代码行数:32,代码来源:taurusform.py


示例2: __init__

    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,代码行数:26,代码来源:taurusmodelchooser.py


示例3: setModel

    def setModel(self, model):
        '''
        reimplemented from :class:`TaurusWidget`. A door device name is 
        expected as the model
        '''
        TaurusWidget.setModel(self, model)
        if self.door is not None:
            self.disconnect(self.door, Qt.SIGNAL('macroStatusUpdated'), self._statusUpdated)
            self.disconnect(self.door, Qt.SIGNAL('resultUpdated'), self._resultUpdated)

            # disable management of Door Tango States
            self.door.getAttribute('State').removeListener(self.door_state_listener)
            self.disconnect(self.door_state_listener, Qt.SIGNAL('doorStateChanged'), self._doorStateChanged)
            self.door_state_listener = None

        try: self.door = taurus.Device(model)
        except: return

        self.connect(self.door, Qt.SIGNAL('macroStatusUpdated'), self._statusUpdated)
        self.connect(self.door, Qt.SIGNAL('resultUpdated'), self._resultUpdated)

        # Manage Door Tango States
        self.door_state_listener = DoorStateListener()
        self.connect(self.door_state_listener, Qt.SIGNAL('doorStateChanged'), self._doorStateChanged)
        self.door.getAttribute('State').addListener(self.door_state_listener)
开发者ID:cmft,项目名称:sardana,代码行数:25,代码来源:macrobutton.py


示例4: __init__

    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,代码行数:26,代码来源:taurusarrayedit.py


示例5: __init__

    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,代码行数:7,代码来源:computeu.py


示例6: setModel

 def setModel(self, model):
     oldModelObj = self.getModelObj()
     if oldModelObj is not None:
         self.disconnect(oldModelObj, Qt.SIGNAL("macrosUpdated"), self.macroComboBox.onMacrosUpdated)
     TaurusWidget.setModel(self, model)
     newModelObj = self.getModelObj()
     self.connect(newModelObj, Qt.SIGNAL("macrosUpdated"), self.macroComboBox.onMacrosUpdated)
开发者ID:cmft,项目名称:sardana,代码行数:7,代码来源:macroexecutor.py


示例7: __init__

    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,代码行数:7,代码来源:reflectionseditor.py


示例8: setModel

 def setModel(self, model):
     oldModelObj = self.getModelObj()
     if oldModelObj is not None:
         oldModelObj.macrosUpdated.disconnect(
             self.macroComboBox.onMacrosUpdated)
     TaurusWidget.setModel(self, model)
     newModelObj = self.getModelObj()
     newModelObj.macrosUpdated.connect(self.macroComboBox.onMacrosUpdated)
开发者ID:rhomspuron,项目名称:sardana,代码行数:8,代码来源:sequenceeditor.py


示例9: setModel

 def setModel(self, model):
     '''This implementation propagates the model to the read and write widgets.
     You may reimplement it to do things like passing different models to each.
     '''
     if self.readWidget is not None:
         self.readWidget.setModel(model)
     if self.writeWidget is not None:
         self.writeWidget.setModel(model)
     TaurusWidget.setModel(self, model)
开发者ID:cmft,项目名称:taurus,代码行数:9,代码来源:abstractswitcher.py


示例10: setModel

 def setModel(self, model):
     oldModelObj = self.getModelObj()
     if oldModelObj is not None:
         # TODO: check if macrosUpdated signal exists
         oldModelObj.macrosUpdated.disconnect(
             self.macroComboBox.onMacrosUpdated)
     TaurusWidget.setModel(self, model)
     newModelObj = self.getModelObj()
     newModelObj.macrosUpdated.connect(
         self.macroComboBox.onMacrosUpdated)
开发者ID:rhomspuron,项目名称:sardana,代码行数:10,代码来源:macroexecutor.py


示例11: applyConfig

    def applyConfig(self, configdict, **kwargs):
        """extending :meth:`TaurusBaseWidget.applyConfig` to restore the splitter config

        :param configdict: (dict)

        .. seealso:: :meth:`TaurusBaseWidget.applyConfig`, :meth:`createConfig`
        """
        # first do the basic stuff...
        TaurusWidget.applyConfig(self, configdict, **kwargs)
        # restore the splitter config
        self._splitter.restoreState(
            Qt.QByteArray(configdict['splitter/state']))
开发者ID:cmft,项目名称:taurus,代码行数:12,代码来源:taurusform.py


示例12: __init__

    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,代码行数:13,代码来源:hklscan.py


示例13: __init__

    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,代码行数:13,代码来源:ubmatrix.py


示例14: __init__

    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,代码行数:14,代码来源:macrobutton.py


示例15: __init__

    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,代码行数:48,代码来源:taurusnexuswidget.py


示例16: getQtDesignerPluginInfo

 def getQtDesignerPluginInfo(cls):
     ret = TaurusWidget.getQtDesignerPluginInfo()
     ret['module'] = 'magnetsnapshot'
     ret['group'] = 'Taurus Linac Snapshot'
     ret['container'] = ':/designer/frame.png'
     ret['container'] = False
     return ret
开发者ID:srgblnch,项目名称:LinacGUI,代码行数:7,代码来源:magnetsnapshot.py


示例17: getQtDesignerPluginInfo

 def getQtDesignerPluginInfo(cls):
     ret = TaurusWidget.getQtDesignerPluginInfo()
     ret['module'] = 'hklscan'
     ret['group'] = 'Taurus Containers'
     ret['container'] = ':/designer/frame.png'
     ret['container'] = True
     return ret
开发者ID:rhomspuron,项目名称:sardana,代码行数:7,代码来源:hklscan.py


示例18: __init__

    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,代码行数:16,代码来源:selectsignal.py


示例19: loadConfigFile

 def loadConfigFile(self, ifile=None):
     self.info('In TaurusDevicePanel.loadConfigFile(%s)' % ifile)
     if isinstance(ifile, file) or isinstance(ifile, str) and not ifile.endswith('.py'):
         TaurusWidget.loadConfigFile(self, ifile)
     else:
         from imp import load_source
         config_file = load_source('config_file', ifile)
         af, cf, im = [getattr(config_file, x, None) for x in (
             'AttributeFilters', 'CommandFilters', 'IconMap')]
         if af is not None:
             self.setAttributeFilters(af)
         if cf is not None:
             self.setCommandFilters(cf)
         if im is not None:
             self.setIconMap(im)
     self.debug('AttributeFilters are:\n%s' % self.getAttributeFilters())
开发者ID:cmft,项目名称:taurus,代码行数:16,代码来源:taurusdevicepanel.py


示例20: getQtDesignerPluginInfo

 def getQtDesignerPluginInfo(cls):
     ret = TaurusWidget.getQtDesignerPluginInfo()
     ret['module'] = 'taurus.qt.qtgui.panel'
     ret['icon'] = "designer:listview.png"
     ret['container'] = False
     ret['group'] = 'Taurus Views'
     return ret
开发者ID:cmft,项目名称:taurus,代码行数:7,代码来源:taurusmodelchooser.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python tautils.data_to_string函数代码示例发布时间:2022-05-27
下一篇:
Python application.TaurusApplication类代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap