39 |
39 |
40 def __init__(self, parent=None, manager=None): |
40 def __init__(self, parent=None, manager=None): |
41 """ |
41 """ |
42 Constructor |
42 Constructor |
43 |
43 |
44 @param parent reference to the parent widget (QWidget |
44 @param parent reference to the parent widget |
45 @param manager reference to the history manager object (HistoryManager) |
45 @type QWidget |
|
46 @param manager reference to the history manager object |
|
47 @type HistoryManager |
46 """ |
48 """ |
47 super().__init__(parent) |
49 super().__init__(parent) |
48 self.setupUi(self) |
50 self.setupUi(self) |
49 self.setWindowFlags(Qt.WindowType.Window) |
51 self.setWindowFlags(Qt.WindowType.Window) |
50 |
52 |
85 |
87 |
86 def __customContextMenuRequested(self, pos): |
88 def __customContextMenuRequested(self, pos): |
87 """ |
89 """ |
88 Private slot to handle the context menu request for the bookmarks tree. |
90 Private slot to handle the context menu request for the bookmarks tree. |
89 |
91 |
90 @param pos position the context menu was requested (QPoint) |
92 @param pos position the context menu was requested |
|
93 @type QPoint |
91 """ |
94 """ |
92 menu = QMenu() |
95 menu = QMenu() |
93 idx = self.historyTree.indexAt(pos) |
96 idx = self.historyTree.indexAt(pos) |
94 idx = idx.sibling(idx.row(), 0) |
97 idx = idx.sibling(idx.row(), 0) |
95 if ( |
98 if ( |
118 @pyqtSlot(QModelIndex) |
121 @pyqtSlot(QModelIndex) |
119 def __activated(self, idx): |
122 def __activated(self, idx): |
120 """ |
123 """ |
121 Private slot to handle the activation of an entry. |
124 Private slot to handle the activation of an entry. |
122 |
125 |
123 @param idx reference to the entry index (QModelIndex) |
126 @param idx reference to the entry index |
|
127 @type QModelIndex |
124 """ |
128 """ |
125 if QApplication.keyboardModifiers() & Qt.KeyboardModifier.ControlModifier: |
129 if QApplication.keyboardModifiers() & Qt.KeyboardModifier.ControlModifier: |
126 self.__openHistoryInNewTab() |
130 self.__openHistoryInNewTab() |
127 elif QApplication.keyboardModifiers() & Qt.KeyboardModifier.ShiftModifier: |
131 elif QApplication.keyboardModifiers() & Qt.KeyboardModifier.ShiftModifier: |
128 self.__openHistoryInNewWindow() |
132 self.__openHistoryInNewWindow() |