7 Module implementing a tool button for the download manager. |
7 Module implementing a tool button for the download manager. |
8 """ |
8 """ |
9 |
9 |
10 from PyQt6.QtCore import pyqtSlot, Qt |
10 from PyQt6.QtCore import pyqtSlot, Qt |
11 |
11 |
12 from EricWidgets.EricToolButton import EricToolButton |
12 from eric7.EricWidgets.EricToolButton import EricToolButton |
13 |
13 |
14 import UI.PixmapCache |
14 from eric7.EricGui import EricPixmapCache |
15 |
15 |
16 from WebBrowser.WebBrowserWindow import WebBrowserWindow |
16 from eric7.WebBrowser.WebBrowserWindow import WebBrowserWindow |
17 |
17 |
18 |
18 |
19 class DownloadManagerButton(EricToolButton): |
19 class DownloadManagerButton(EricToolButton): |
20 """ |
20 """ |
21 Class implementing a tool button for the download manager. |
21 Class implementing a tool button for the download manager. |
31 super().__init__(parent) |
31 super().__init__(parent) |
32 |
32 |
33 self.__manager = WebBrowserWindow.downloadManager() |
33 self.__manager = WebBrowserWindow.downloadManager() |
34 |
34 |
35 self.setObjectName("navigation_download_manager_button") |
35 self.setObjectName("navigation_download_manager_button") |
36 self.setIcon(UI.PixmapCache.getIcon("downloads")) |
36 self.setIcon(EricPixmapCache.getIcon("downloads")) |
37 self.setToolTip(self.tr("Open Download Manager")) |
37 self.setToolTip(self.tr("Open Download Manager")) |
38 self.setToolButtonStyle(Qt.ToolButtonStyle.ToolButtonIconOnly) |
38 self.setToolButtonStyle(Qt.ToolButtonStyle.ToolButtonIconOnly) |
39 self.setFocusPolicy(Qt.FocusPolicy.NoFocus) |
39 self.setFocusPolicy(Qt.FocusPolicy.NoFocus) |
40 self.setAutoRaise(True) |
40 self.setAutoRaise(True) |
41 |
41 |