754 # Create previewer |
754 # Create previewer |
755 logging.debug("Creating Previewer...") |
755 logging.debug("Creating Previewer...") |
756 from .Previewer import Previewer |
756 from .Previewer import Previewer |
757 self.__previewer = Previewer(self.viewmanager, splitter) |
757 self.__previewer = Previewer(self.viewmanager, splitter) |
758 splitter.addWidget(self.__previewer) |
758 splitter.addWidget(self.__previewer) |
|
759 |
|
760 # Create AST viewer |
|
761 logging.debug("Creating Python AST Viewer") |
|
762 from .PythonAstViewer import PythonAstViewer |
|
763 self.__astViewer = PythonAstViewer(self.viewmanager, splitter) |
|
764 splitter.addWidget(self.__astViewer) |
759 |
765 |
760 # Create layout with toolbox windows embedded in dock windows |
766 # Create layout with toolbox windows embedded in dock windows |
761 if self.__layoutType == "Toolboxes": |
767 if self.__layoutType == "Toolboxes": |
762 logging.debug("Creating toolboxes...") |
768 logging.debug("Creating toolboxes...") |
763 self.__createToolboxesLayout(debugServer) |
769 self.__createToolboxesLayout(debugServer) |
2870 if self.codeDocumentationViewer is not None: |
2876 if self.codeDocumentationViewer is not None: |
2871 self.__menus["subwindow"].addAction( |
2877 self.__menus["subwindow"].addAction( |
2872 self.tr("Code Documentation Viewer"), |
2878 self.tr("Code Documentation Viewer"), |
2873 self.activateCodeDocumentationViewer) |
2879 self.activateCodeDocumentationViewer) |
2874 self.__menus["subwindow"].addAction(self.debugViewerActivateAct) |
2880 self.__menus["subwindow"].addAction(self.debugViewerActivateAct) |
|
2881 if self.pipWidget is not None: |
|
2882 self.__menus["subwindow"].addAction( |
|
2883 self.tr("PyPI"), |
|
2884 self.__activatePipWidget) |
|
2885 if self.condaWidget is not None: |
|
2886 self.__menus["subwindow"].addAction( |
|
2887 self.tr("Conda"), |
|
2888 self.__activateCondaWidget) |
2875 if self.cooperation is not None: |
2889 if self.cooperation is not None: |
2876 self.__menus["subwindow"].addAction( |
2890 self.__menus["subwindow"].addAction( |
2877 self.cooperationViewerActivateAct) |
2891 self.cooperationViewerActivateAct) |
2878 if self.irc is not None: |
2892 if self.irc is not None: |
2879 self.__menus["subwindow"].addAction(self.ircActivateAct) |
2893 self.__menus["subwindow"].addAction(self.ircActivateAct) |
4447 self.codeDocumentationViewer.show() |
4461 self.codeDocumentationViewer.show() |
4448 if switchFocus: |
4462 if switchFocus: |
4449 self.codeDocumentationViewer.setFocus( |
4463 self.codeDocumentationViewer.setFocus( |
4450 Qt.ActiveWindowFocusReason) |
4464 Qt.ActiveWindowFocusReason) |
4451 |
4465 |
|
4466 def __activatePipWidget(self): |
|
4467 """ |
|
4468 Private slot to handle the activation of the PyPI manager widget. |
|
4469 """ |
|
4470 if self.pipWidget is not None: |
|
4471 if self.__layoutType == "Toolboxes": |
|
4472 self.rToolboxDock.show() |
|
4473 self.rToolbox.setCurrentWidget(self.pipWidget) |
|
4474 elif self.__layoutType == "Sidebars": |
|
4475 self.rightSidebar.show() |
|
4476 self.rightSidebar.setCurrentWidget(self.pipWidget) |
|
4477 else: |
|
4478 self.pipWidget.show() |
|
4479 self.pipWidget.setFocus(Qt.ActiveWindowFocusReason) |
|
4480 |
|
4481 def __activateCondaWidget(self): |
|
4482 """ |
|
4483 Private slot to handle the activation of the Conda manager widget. |
|
4484 """ |
|
4485 if self.condaWidget is not None: |
|
4486 if self.__layoutType == "Toolboxes": |
|
4487 self.rToolboxDock.show() |
|
4488 self.rToolbox.setCurrentWidget(self.condaWidget) |
|
4489 elif self.__layoutType == "Sidebars": |
|
4490 self.rightSidebar.show() |
|
4491 self.rightSidebar.setCurrentWidget(self.condaWidget) |
|
4492 else: |
|
4493 self.condaWidget.show() |
|
4494 self.condaWidget.setFocus(Qt.ActiveWindowFocusReason) |
|
4495 |
4452 def __toggleWindow(self, w): |
4496 def __toggleWindow(self, w): |
4453 """ |
4497 """ |
4454 Private method to toggle a workspace editor window. |
4498 Private method to toggle a workspace editor window. |
4455 |
4499 |
4456 @param w reference to the workspace editor window |
4500 @param w reference to the workspace editor window |