9 |
9 |
10 from PyQt6.QtCore import pyqtSlot, pyqtSignal, Qt, QPoint |
10 from PyQt6.QtCore import pyqtSlot, pyqtSignal, Qt, QPoint |
11 from PyQt6.QtGui import QGuiApplication, QClipboard |
11 from PyQt6.QtGui import QGuiApplication, QClipboard |
12 from PyQt6.QtWidgets import QListWidget, QAbstractItemView, QMenu |
12 from PyQt6.QtWidgets import QListWidget, QAbstractItemView, QMenu |
13 |
13 |
14 import UI.PixmapCache |
14 from eric7.EricGui import EricPixmapCache |
15 |
15 |
16 |
16 |
17 class OpenPagesWidget(QListWidget): |
17 class OpenPagesWidget(QListWidget): |
18 """ |
18 """ |
19 Class implementing a widget showing the list of open pages. |
19 Class implementing a widget showing the list of open pages. |
58 """ |
58 """ |
59 Private method to initialize the context menu. |
59 Private method to initialize the context menu. |
60 """ |
60 """ |
61 self.__menu = QMenu(self) |
61 self.__menu = QMenu(self) |
62 self.__menu.addAction( |
62 self.__menu.addAction( |
63 UI.PixmapCache.getIcon("tabClose"), |
63 EricPixmapCache.getIcon("tabClose"), |
64 self.tr("Close"), |
64 self.tr("Close"), |
65 self.__contextMenuClose, |
65 self.__contextMenuClose, |
66 ) |
66 ) |
67 self.closeOthersMenuAct = self.__menu.addAction( |
67 self.closeOthersMenuAct = self.__menu.addAction( |
68 UI.PixmapCache.getIcon("tabCloseOther"), |
68 EricPixmapCache.getIcon("tabCloseOther"), |
69 self.tr("Close Others"), |
69 self.tr("Close Others"), |
70 self.__contextMenuCloseOthers, |
70 self.__contextMenuCloseOthers, |
71 ) |
71 ) |
72 self.__menu.addAction(self.tr("Close All"), self.__contextMenuCloseAll) |
72 self.__menu.addAction(self.tr("Close All"), self.__contextMenuCloseAll) |
73 self.__menu.addSeparator() |
73 self.__menu.addSeparator() |