예제 #1
0
    def __init__(self, parent=None, designMode=False):
        TaurusMainWindow.__init__(self, parent, designMode=designMode)
        self.loadUi()

        # setting up the device Tree.
        #@todo: This should be done in the ui file when the TaurusDatabaseTree Designer plugin is available
        import taurus.qt.qtgui.tree
        TaurusDbTreeWidget = taurus.qt.qtgui.tree.TaurusDbTreeWidget

        self.deviceTree = TaurusDbTreeWidget(
            perspective=TaurusElementType.Device)
        self.deviceTree.getQModel().setSelectables([TaurusElementType.Member
                                                    ])  # TODO: Tango-centric
        # self.deviceTree.insertFilter(filterNonExported)
        self.setCentralWidget(self.deviceTree)

        # register subwidgets for configuration purposes
        # self.registerConfigDelegate(self.taurusAttrForm)
        # self.registerConfigDelegate(self.deviceTree)
        self.registerConfigDelegate(self._ui.taurusCommandsForm)

        self.loadSettings()
        self.createActions()

        # self.addToolBar(self.basicTaurusToolbar())

        self.deviceTree.currentItemChanged.connect(self.onItemSelectionChanged)

        self.updatePerspectivesMenu()
        if not designMode:
            self.splashScreen().finish(self)
예제 #2
0
    def __init__(self, parent=None, designMode=False):
        TaurusMainWindow.__init__(self, parent, designMode=designMode)
        self.loadUi()

        # setting up the device Tree.
        #@todo: This should be done in the ui file when the TaurusDatabaseTree Designer plugin is available
        import taurus.qt.qtgui.tree
        TaurusDbTreeWidget = taurus.qt.qtgui.tree.TaurusDbTreeWidget

        self.deviceTree = TaurusDbTreeWidget(
            perspective=TaurusElementType.Device)
        self.deviceTree.getQModel().setSelectables([TaurusElementType.Member
                                                    ])  # TODO: Tango-centric
        # self.deviceTree.insertFilter(filterNonExported)
        self.setCentralWidget(self.deviceTree)

        # needed because of a limitation in when using the useParentModel
        # property from designer and taurus parents are not the same as Qt
        # Parents
        self._ui.taurusAttrForm.recheckTaurusParent()
        self._ui.taurusCommandsForm.recheckTaurusParent()

        # Add StateLed to statusBar
        #        self.devStateLed = TaurusLed()
        #        self.statusbar.addPermanentWidget(self.devStateLed)
        #        self.devStateLed.setModel('/state')
        #        self.devStateLed.setUseParentModel(True)

        # register subwidgets for configuration purposes
        # self.registerConfigDelegate(self.taurusAttrForm)
        # self.registerConfigDelegate(self.deviceTree)
        self.registerConfigDelegate(self._ui.taurusCommandsForm)

        self.loadSettings()
        self.createActions()

        # self.addToolBar(self.basicTaurusToolbar())

        self.connect(self.deviceTree, Qt.SIGNAL("currentItemChanged"),
                     self.onItemSelectionChanged)

        self.updatePerspectivesMenu()
        if not designMode:
            self.splashScreen().finish(self)
예제 #3
0
    def __init__(self, parent=None, designMode=False):
        TaurusMainWindow.__init__(self, parent, designMode=designMode)
        self.loadUi()

        # setting up the device Tree.
        #@todo: This should be done in the ui file when the TaurusDatabaseTree Designer plugin is available
        import taurus.qt.qtgui.tree
        TaurusDbTreeWidget = taurus.qt.qtgui.tree.TaurusDbTreeWidget

        self.deviceTree = TaurusDbTreeWidget(
            perspective=TaurusElementType.Device)
        self.deviceTree.getQModel().setSelectables(
            [TaurusElementType.Member])  # TODO: Tango-centric
        # self.deviceTree.insertFilter(filterNonExported)
        self.setCentralWidget(self.deviceTree)

        # needed because of a limitation in when using the useParentModel
        # property from designer and taurus parents are not the same as Qt
        # Parents
        self._ui.taurusAttrForm.recheckTaurusParent()
        self._ui.taurusCommandsForm.recheckTaurusParent()

        # Add StateLed to statusBar
#        self.devStateLed = TaurusLed()
#        self.statusbar.addPermanentWidget(self.devStateLed)
#        self.devStateLed.setModel('/state')
#        self.devStateLed.setUseParentModel(True)

        # register subwidgets for configuration purposes
        # self.registerConfigDelegate(self.taurusAttrForm)
        # self.registerConfigDelegate(self.deviceTree)
        self.registerConfigDelegate(self._ui.taurusCommandsForm)

        self.loadSettings()
        self.createActions()

        # self.addToolBar(self.basicTaurusToolbar())

        self.deviceTree.currentItemChanged.connect(self.onItemSelectionChanged)

        self.updatePerspectivesMenu()
        if not designMode:
            self.splashScreen().finish(self)
예제 #4
0
파일: common.py 프로젝트: cmft/sardana
 def __init__(self, parent=None, designMode=False):
     TaurusMainWindow.__init__(self, parent, designMode)
     self.statusBar().showMessage("")
     self.setModelInConfig(True)
     self._doorName = ""
     self.registerConfigProperty("doorName", "setDoorName", "doorName")
     self._customMacroEditorPaths = ""
     self.registerConfigProperty("customMacroEditorPaths", "setCustomMacroEditorPaths", "customMacroEditorPaths")
     self._qDoor = None
     self.setWindowIcon(getIcon(":/apps/preferences-system-session.svg"))
     toolBar = self.basicTaurusToolbar()
     toolBar.setIconSize(Qt.QSize(24, 24))
     self.configureAction = self.createConfigureAction()
     toolBar.addAction(self.configureAction)
     self.taurusMenu.addAction(self.configureAction)
     self.customMacroEditorsPathsAction = self.createCustomMacroEditorPathsAction()
     self.taurusMenu.addAction(self.customMacroEditorsPathsAction)
     self.addToolBar(toolBar)
     self.initComponents()
     self.splashScreen().finish(self)
     self.connect(self, Qt.SIGNAL("doorChanged"), self.onDoorChanged)
예제 #5
0
 def __init__(self, parent=None, designMode=False):
     TaurusMainWindow.__init__(self, parent, designMode)
     self.statusBar().showMessage("")
     self.setModelInConfig(True)
     self._doorName = ""
     self.registerConfigProperty("doorName", "setDoorName", "doorName")
     self._customMacroEditorPaths = ""
     self.registerConfigProperty(
         "customMacroEditorPaths", "setCustomMacroEditorPaths", "customMacroEditorPaths")
     self._qDoor = None
     self.setWindowIcon(getIcon(":/apps/preferences-system-session.svg"))
     toolBar = self.basicTaurusToolbar()
     toolBar.setIconSize(Qt.QSize(24, 24))
     self.configureAction = self.createConfigureAction()
     toolBar.addAction(self.configureAction)
     self.taurusMenu.addAction(self.configureAction)
     self.customMacroEditorsPathsAction = self.createCustomMacroEditorPathsAction()
     self.taurusMenu.addAction(self.customMacroEditorsPathsAction)
     self.addToolBar(toolBar)
     self.initComponents()
     self.splashScreen().finish(self)
     self.doorChanged.connect(self.onDoorChanged)
예제 #6
0
 def __init__(self, parent=None):
     TaurusMainWindow.__init__(self, parent)
     contextToolBar = ContextToolBar()
     contextToolBar.setDefaultContextID(85)
     contextToolBar.setSorter(cmp)
     self.addToolBar(contextToolBar)
예제 #7
0
 def __init__(self, parent=None):
     TaurusMainWindow.__init__(self, parent)
     contextToolBar = ContextToolBar()
     contextToolBar.setDefaultContextID(85)
     contextToolBar.setSorter(cmp)
     self.addToolBar(contextToolBar)