610 if self.templateViewer is not None: |
610 if self.templateViewer is not None: |
611 ericApp().registerObject("TemplateViewer", self.templateViewer) |
611 ericApp().registerObject("TemplateViewer", self.templateViewer) |
612 ericApp().registerObject("Shell", self.shell) |
612 ericApp().registerObject("Shell", self.shell) |
613 ericApp().registerObject("PluginManager", self.pluginManager) |
613 ericApp().registerObject("PluginManager", self.pluginManager) |
614 ericApp().registerObject("ToolbarManager", self.toolbarManager) |
614 ericApp().registerObject("ToolbarManager", self.toolbarManager) |
615 if self.cooperation is not None: |
|
616 ericApp().registerObject("Cooperation", self.cooperation) |
|
617 if self.symbolsViewer is not None: |
615 if self.symbolsViewer is not None: |
618 ericApp().registerObject("Symbols", self.symbolsViewer) |
616 ericApp().registerObject("Symbols", self.symbolsViewer) |
619 if self.numbersViewer is not None: |
617 if self.numbersViewer is not None: |
620 ericApp().registerObject("Numbers", self.numbersViewer) |
618 ericApp().registerObject("Numbers", self.numbersViewer) |
621 if self.codeDocumentationViewer is not None: |
619 if self.codeDocumentationViewer is not None: |
894 self.condaWidget = CondaPackagesWidget(self.condaInterface) |
892 self.condaWidget = CondaPackagesWidget(self.condaInterface) |
895 else: |
893 else: |
896 logging.getLogger(__name__).debug("Conda Package Manager disabled") |
894 logging.getLogger(__name__).debug("Conda Package Manager disabled") |
897 self.condaWidget = None |
895 self.condaWidget = None |
898 |
896 |
899 if Preferences.getUI("ShowCooperation"): |
|
900 # Create the chat part of the user interface |
|
901 logging.getLogger(__name__).debug("Creating Chat Widget...") |
|
902 from eric7.Cooperation.ChatWidget import ChatWidget # noqa: I-101 |
|
903 |
|
904 self.cooperation = ChatWidget(self) |
|
905 else: |
|
906 logging.getLogger(__name__).debug("Chat Widget disabled") |
|
907 self.cooperation = None |
|
908 |
|
909 if Preferences.getUI("ShowMicroPython"): |
897 if Preferences.getUI("ShowMicroPython"): |
910 # Create the MicroPython part of the user interface |
898 # Create the MicroPython part of the user interface |
911 logging.getLogger(__name__).debug("Creating MicroPython Widget...") |
899 logging.getLogger(__name__).debug("Creating MicroPython Widget...") |
912 from eric7.MicroPython.MicroPythonWidget import ( # noqa: I-101 |
900 from eric7.MicroPython.MicroPythonWidget import ( # noqa: I-101 |
913 MicroPythonWidget, |
901 MicroPythonWidget, |
1199 if self.condaWidget: |
1187 if self.condaWidget: |
1200 self.rToolbox.addItem( |
1188 self.rToolbox.addItem( |
1201 self.condaWidget, EricPixmapCache.getIcon("miniconda"), self.tr("Conda") |
1189 self.condaWidget, EricPixmapCache.getIcon("miniconda"), self.tr("Conda") |
1202 ) |
1190 ) |
1203 |
1191 |
1204 if self.cooperation: |
|
1205 self.rToolbox.addItem( |
|
1206 self.cooperation, |
|
1207 EricPixmapCache.getIcon("cooperation"), |
|
1208 self.tr("Cooperation"), |
|
1209 ) |
|
1210 |
|
1211 if self.microPythonWidget: |
1192 if self.microPythonWidget: |
1212 self.rToolbox.addItem( |
1193 self.rToolbox.addItem( |
1213 self.microPythonWidget, |
1194 self.microPythonWidget, |
1214 EricPixmapCache.getIcon("micropython"), |
1195 EricPixmapCache.getIcon("micropython"), |
1215 self.tr("MicroPython"), |
1196 self.tr("MicroPython"), |
1392 if self.condaWidget: |
1373 if self.condaWidget: |
1393 sidebar.addTab( |
1374 sidebar.addTab( |
1394 self.condaWidget, |
1375 self.condaWidget, |
1395 EricPixmapCache.getIcon("sbMiniconda96"), |
1376 EricPixmapCache.getIcon("sbMiniconda96"), |
1396 self.tr("Conda"), |
1377 self.tr("Conda"), |
1397 ) |
|
1398 |
|
1399 if self.cooperation: |
|
1400 sidebar.addTab( |
|
1401 self.cooperation, |
|
1402 EricPixmapCache.getIcon("sbCooperation96"), |
|
1403 self.tr("Cooperation"), |
|
1404 ) |
1378 ) |
1405 |
1379 |
1406 if self.microPythonWidget: |
1380 if self.microPythonWidget: |
1407 sidebar.addTab( |
1381 sidebar.addTab( |
1408 self.microPythonWidget, |
1382 self.microPythonWidget, |
2311 self.bsbAct.triggered.connect(self.__toggleBottomSidebar) |
2285 self.bsbAct.triggered.connect(self.__toggleBottomSidebar) |
2312 self.actions.append(self.bsbAct) |
2286 self.actions.append(self.bsbAct) |
2313 else: |
2287 else: |
2314 self.bsbAct = None |
2288 self.bsbAct = None |
2315 |
2289 |
2316 if self.cooperation is not None: |
|
2317 self.cooperationViewerActivateAct = EricAction( |
|
2318 self.tr("Cooperation-Viewer"), |
|
2319 self.tr("Co&operation-Viewer"), |
|
2320 QKeySequence(self.tr("Alt+Shift+O")), |
|
2321 0, |
|
2322 self, |
|
2323 "cooperation_viewer_activate", |
|
2324 ) |
|
2325 self.cooperationViewerActivateAct.setStatusTip( |
|
2326 self.tr("Switch the input focus to the Cooperation-Viewer window.") |
|
2327 ) |
|
2328 self.cooperationViewerActivateAct.setWhatsThis( |
|
2329 self.tr( |
|
2330 """<b>Activate Cooperation-Viewer</b>""" |
|
2331 """<p>This switches the input focus to the""" |
|
2332 """ Cooperation-Viewer window.</p>""" |
|
2333 ) |
|
2334 ) |
|
2335 self.cooperationViewerActivateAct.triggered.connect( |
|
2336 self.activateCooperationViewer |
|
2337 ) |
|
2338 self.actions.append(self.cooperationViewerActivateAct) |
|
2339 self.addAction(self.cooperationViewerActivateAct) |
|
2340 |
|
2341 if self.symbolsViewer is not None: |
2290 if self.symbolsViewer is not None: |
2342 self.symbolsViewerActivateAct = EricAction( |
2291 self.symbolsViewerActivateAct = EricAction( |
2343 self.tr("Symbols-Viewer"), |
2292 self.tr("Symbols-Viewer"), |
2344 self.tr("S&ymbols-Viewer"), |
2293 self.tr("S&ymbols-Viewer"), |
2345 QKeySequence(self.tr("Alt+Shift+Y")), |
2294 QKeySequence(self.tr("Alt+Shift+Y")), |
3971 self.__menus["subwindow"].addAction(self.virtualenvManagerActivateAct) |
3920 self.__menus["subwindow"].addAction(self.virtualenvManagerActivateAct) |
3972 if self.pipWidget is not None: |
3921 if self.pipWidget is not None: |
3973 self.__menus["subwindow"].addAction(self.pipWidgetActivateAct) |
3922 self.__menus["subwindow"].addAction(self.pipWidgetActivateAct) |
3974 if self.condaWidget is not None: |
3923 if self.condaWidget is not None: |
3975 self.__menus["subwindow"].addAction(self.condaWidgetActivateAct) |
3924 self.__menus["subwindow"].addAction(self.condaWidgetActivateAct) |
3976 if self.cooperation is not None: |
|
3977 self.__menus["subwindow"].addAction(self.cooperationViewerActivateAct) |
|
3978 if self.microPythonWidget is not None: |
3925 if self.microPythonWidget is not None: |
3979 self.__menus["subwindow"].addAction(self.microPythonWidgetActivateAct) |
3926 self.__menus["subwindow"].addAction(self.microPythonWidgetActivateAct) |
3980 |
3927 |
3981 # bottom side |
3928 # bottom side |
3982 self.__menus["subwindow"].addSection(self.tr("Bottom Side")) |
3929 self.__menus["subwindow"].addSection(self.tr("Bottom Side")) |
5784 """ |
5731 """ |
5785 if index == self.bottomSidebar.indexOf(self.logViewer): |
5732 if index == self.bottomSidebar.indexOf(self.logViewer): |
5786 self.bottomSidebar.setTabIcon( |
5733 self.bottomSidebar.setTabIcon( |
5787 index, EricPixmapCache.getIcon("sbLogViewer96") |
5734 index, EricPixmapCache.getIcon("sbLogViewer96") |
5788 ) |
5735 ) |
5789 |
|
5790 def activateCooperationViewer(self): |
|
5791 """ |
|
5792 Public slot to handle the activation of the cooperation window. |
|
5793 """ |
|
5794 if self.cooperation is not None: |
|
5795 if self.__layoutType == "Toolboxes": |
|
5796 self.rToolboxDock.show() |
|
5797 self.rToolbox.setCurrentWidget(self.cooperation) |
|
5798 elif self.__layoutType == "Sidebars": |
|
5799 self.activateLeftRightSidebarWidget(self.cooperation) |
|
5800 self.cooperation.setFocus(Qt.FocusReason.ActiveWindowFocusReason) |
|
5801 |
5736 |
5802 def __activateSymbolsViewer(self): |
5737 def __activateSymbolsViewer(self): |
5803 """ |
5738 """ |
5804 Private slot to handle the activation of the Symbols Viewer. |
5739 Private slot to handle the activation of the Symbols Viewer. |
5805 """ |
5740 """ |