src/eric7/UI/UserInterface.py

branch
eric7
changeset 10500
40fc136e7002
parent 10482
72d9b5ea39b4
child 10505
5d6bb914036e
equal deleted inserted replaced
10499:71208bcc7d99 10500:40fc136e7002
1085 self.hToolboxDock, 1085 self.hToolboxDock,
1086 Qt.DockWidgetArea.BottomDockWidgetArea, 1086 Qt.DockWidgetArea.BottomDockWidgetArea,
1087 self.hToolbox, 1087 self.hToolbox,
1088 self.tr("Horizontal Toolbox"), 1088 self.tr("Horizontal Toolbox"),
1089 ) 1089 )
1090 self.hToolbox.currentChanged.connect(self.__hToolboxCurrentChanged)
1090 1091
1091 # Create the right toolbox 1092 # Create the right toolbox
1092 self.rToolboxDock = self.__createDockWindow("rToolboxDock") 1093 self.rToolboxDock = self.__createDockWindow("rToolboxDock")
1093 self.rToolbox = EricVerticalToolBox(self.rToolboxDock) 1094 self.rToolbox = EricVerticalToolBox(self.rToolboxDock)
1094 self.__setupDockWindow( 1095 self.__setupDockWindow(
1268 # Create the bottom sidebar 1269 # Create the bottom sidebar
1269 self.bottomSidebar = EricSideBar( 1270 self.bottomSidebar = EricSideBar(
1270 EricSideBarSide.SOUTH, Preferences.getUI("IconBarSize") 1271 EricSideBarSide.SOUTH, Preferences.getUI("IconBarSize")
1271 ) 1272 )
1272 self.bottomSidebar.setIconBarColor(Preferences.getUI("IconBarColor")) 1273 self.bottomSidebar.setIconBarColor(Preferences.getUI("IconBarColor"))
1274 self.bottomSidebar.currentChanged.connect(self.__bottomSidebarCurrentChanged)
1273 1275
1274 # Create the right sidebar 1276 # Create the right sidebar
1275 if Preferences.getUI("CombinedLeftRightSidebar"): 1277 if Preferences.getUI("CombinedLeftRightSidebar"):
1276 # combine left and right sidebar on the left side 1278 # combine left and right sidebar on the left side
1277 self.rightSidebar = None 1279 self.rightSidebar = None
1554 self.hToolboxDock.raise_() 1556 self.hToolboxDock.raise_()
1555 elif self.__layoutType == "Sidebars": 1557 elif self.__layoutType == "Sidebars":
1556 self.bottomSidebar.show() 1558 self.bottomSidebar.show()
1557 self.bottomSidebar.setCurrentWidget(self.logViewer) 1559 self.bottomSidebar.setCurrentWidget(self.logViewer)
1558 self.bottomSidebar.raise_() 1560 self.bottomSidebar.raise_()
1561 else:
1562 if self.__layoutType == "Toolboxes":
1563 self.hToolbox.setTabIcon(
1564 self.hToolbox.indexOf(self.logViewer),
1565 EricPixmapCache.getIcon("logViewerNew"),
1566 )
1567 elif self.__layoutType == "Sidebars":
1568 self.bottomSidebar.setTabIcon(
1569 self.bottomSidebar.indexOf(self.logViewer),
1570 EricPixmapCache.getIcon("sbLogViewerNew96"),
1571 )
1559 1572
1560 def __openOnStartup(self, startupType=None): 1573 def __openOnStartup(self, startupType=None):
1561 """ 1574 """
1562 Private method to open the last file, project or multiproject. 1575 Private method to open the last file, project or multiproject.
1563 1576
5593 Private slot to handle the activation of the Log Viewer. 5606 Private slot to handle the activation of the Log Viewer.
5594 """ 5607 """
5595 if self.__layoutType == "Toolboxes": 5608 if self.__layoutType == "Toolboxes":
5596 self.hToolboxDock.show() 5609 self.hToolboxDock.show()
5597 self.hToolbox.setCurrentWidget(self.logViewer) 5610 self.hToolbox.setCurrentWidget(self.logViewer)
5611 self.hToolbox.setTabIcon(
5612 self.hToolbox.currentIndex(),
5613 EricPixmapCache.getIcon("logViewer"),
5614 )
5598 elif self.__layoutType == "Sidebars": 5615 elif self.__layoutType == "Sidebars":
5599 self.bottomSidebar.show() 5616 self.bottomSidebar.show()
5600 self.bottomSidebar.setCurrentWidget(self.logViewer) 5617 self.bottomSidebar.setCurrentWidget(self.logViewer)
5618 self.bottomSidebar.setTabIcon(
5619 self.bottomSidebar.currentIndex(),
5620 EricPixmapCache.getIcon("sbLogViewer96"),
5621 )
5601 self.logViewer.setFocus(Qt.FocusReason.ActiveWindowFocusReason) 5622 self.logViewer.setFocus(Qt.FocusReason.ActiveWindowFocusReason)
5602 5623
5603 def __activateTaskViewer(self): 5624 def __activateTaskViewer(self):
5604 """ 5625 """
5605 Private slot to handle the activation of the Task Viewer. 5626 Private slot to handle the activation of the Task Viewer.
5678 ) 5699 )
5679 else: 5700 else:
5680 if hasFocus: 5701 if hasFocus:
5681 self.__activateViewmanager() 5702 self.__activateViewmanager()
5682 5703
5704 @pyqtSlot(int)
5705 def __hToolboxCurrentChanged(self, index):
5706 """
5707 Private slot handling a change of the current index of the Horizontal Toolbox.
5708
5709 @param index current index of the horizontal toolbox
5710 @type int
5711 """
5712 if index == self.hToolbox.indexOf(self.logViewer):
5713 self.hToolbox.setTabIcon(index, EricPixmapCache.getIcon("logViewer"))
5714
5683 def __toggleLeftSidebar(self): 5715 def __toggleLeftSidebar(self):
5684 """ 5716 """
5685 Private slot to handle the toggle of the left sidebar window. 5717 Private slot to handle the toggle of the left sidebar window.
5686 """ 5718 """
5687 hasFocus = self.leftSidebar.currentWidget().hasFocus() 5719 hasFocus = self.leftSidebar.currentWidget().hasFocus()
5719 Qt.FocusReason.ActiveWindowFocusReason 5751 Qt.FocusReason.ActiveWindowFocusReason
5720 ) 5752 )
5721 else: 5753 else:
5722 if hasFocus: 5754 if hasFocus:
5723 self.__activateViewmanager() 5755 self.__activateViewmanager()
5756
5757 @pyqtSlot(int)
5758 def __bottomSidebarCurrentChanged(self, index):
5759 """
5760 Private slot handling a change of the current index of the Bottom Sidebar.
5761
5762 @param index current index of the bottom sidebar
5763 @type int
5764 """
5765 if index == self.bottomSidebar.indexOf(self.logViewer):
5766 self.bottomSidebar.setTabIcon(
5767 index, EricPixmapCache.getIcon("sbLogViewer96")
5768 )
5724 5769
5725 def activateCooperationViewer(self): 5770 def activateCooperationViewer(self):
5726 """ 5771 """
5727 Public slot to handle the activation of the cooperation window. 5772 Public slot to handle the activation of the cooperation window.
5728 """ 5773 """

eric ide

mercurial