Пример #1
0
 def launchConfiguration(self):
     """ launch the preferencies panel
     """
     widget = ConfigurationWidget()
     widget.exec_()
Пример #2
0
    def createDockElements(self):
        """ Create the dock's elements, initial arrangment:
        - in the left   : the tree tab (data,files,debug) and the attribut dock
        - in the bottom : Exception printer, output, and doc
        - in the right  : the graphical widgets of the selected object
        """
        
        # left dock
        mainTreeDock = QtGui.QDockWidget("", self)

        tab = QtGui.QTabWidget(mainTreeDock)
        self.mainTreeWidget = DataTreeWidget.DataWidget(self)
        tab.addTab( self.mainTreeWidget, "data structure")
        
        self.browserTreeWidget = QtGui.QTreeView()
        self.browserTreeWidget.clicked.connect(self.clickFileTreeView)
        self.browserModel = QtGui.QFileSystemModel()
        self.browserModel.setRootPath(QtCore.QDir.currentPath())
        self.browserTreeWidget.setModel(self.browserModel)
        tab.addTab(self.browserTreeWidget,"browser")
        
        self.debugWidget = DebugTreeWidget.DebugWidget(msLogger , self )
        tab.addTab(self.debugWidget, "debug")

        mainTreeDock.setWidget(tab)
        self.viewMenu.addAction(mainTreeDock.toggleViewAction())
        self.addDockWidget(QtCore.Qt.LeftDockWidgetArea, mainTreeDock)
        mainTreeDock.setMinimumSize(350,mainTreeDock.height())
        
        # bottom dock
        outDock1   = QtGui.QDockWidget("Readers", self)
        #tab = QtGui.QTabWidget(mainTreeDock)
        self.outStream = QtGui.QTextEdit()
        self.scriptWidget.setStdOut(self.outStream)
        #tab.addTab(self.outStream,"out streams")
        outDock1.setWidget(self.outStream)
        outDock1.resize(350,200)
        self.viewMenu.addAction(outDock1.toggleViewAction())
        self.addDockWidget(QtCore.Qt.BottomDockWidgetArea, outDock1)

        outDock2   = QtGui.QDockWidget("Doc", self)
        #docTab  = QtGui.QTabWidget()
        self.webView = msDoxygenHtmlView(self)
        
        try:
	    with open(self.config["DOC_INSTALL_PREFIX"]+"/html/index.html"):
                 self.webView.load(self.config["DOC_INSTALL_PREFIX"]+"/html/index.html#overview")    
        except IOError:
            QtGui.QMessageBox.information(self, "Documentation",
                    "The documentation is not iniliazed, please check the 'Documentation' panel of the next window and click 'run doxygen'.")
	    widget = ConfigurationWidget()
            widget.exec_()
            self.webView.load(self.config["DOC_INSTALL_PREFIX"]+"/html/index.html#overview")   
 
        #docTab.addTab(self.webView,"contextual")
        #tab.addTab(docTab,"documentation")
        outDock2.setWidget(self.webView)
        self.viewMenu.addAction(outDock2.toggleViewAction())
        self.addDockWidget(QtCore.Qt.BottomDockWidgetArea, outDock2)
        
        # right doc        
        dockGUIobjects = QtGui.QDockWidget("Graphical interface", self)
        self.msWidgetsContainer = WidgetsContainer.WidgetsContainer(self)
        dockGUIobjects.setWidget(self.msWidgetsContainer)
        self.addDockWidget(QtCore.Qt.RightDockWidgetArea, dockGUIobjects)
        self.viewMenu.addAction(dockGUIobjects.toggleViewAction())