5 |
5 |
6 """ |
6 """ |
7 Module implementing a dialog to manage bookmarks. |
7 Module implementing a dialog to manage bookmarks. |
8 """ |
8 """ |
9 |
9 |
10 from PyQt6.QtCore import QModelIndex, Qt, QUrl, pyqtSignal |
10 from PyQt6.QtCore import QModelIndex, Qt, QUrl, pyqtSignal, pyqtSlot |
11 from PyQt6.QtGui import QCursor, QFontMetrics |
11 from PyQt6.QtGui import QCursor, QFontMetrics |
12 from PyQt6.QtWidgets import QApplication, QDialog, QInputDialog, QLineEdit, QMenu |
12 from PyQt6.QtWidgets import QApplication, QDialog, QInputDialog, QLineEdit, QMenu |
13 |
13 |
14 from eric7.EricCore.EricTreeSortFilterProxyModel import EricTreeSortFilterProxyModel |
14 from eric7.EricCore.EricTreeSortFilterProxyModel import EricTreeSortFilterProxyModel |
15 from eric7.WebBrowser.WebBrowserWindow import WebBrowserWindow |
15 from eric7.WebBrowser.WebBrowserWindow import WebBrowserWindow |
178 if idx.isValid() and node.type() == BookmarkNode.Folder: |
178 if idx.isValid() and node.type() == BookmarkNode.Folder: |
179 menu.addSeparator() |
179 menu.addSeparator() |
180 menu.addAction(self.tr("New &Folder..."), self.__newFolder) |
180 menu.addAction(self.tr("New &Folder..."), self.__newFolder) |
181 menu.exec(QCursor.pos()) |
181 menu.exec(QCursor.pos()) |
182 |
182 |
|
183 @pyqtSlot(QModelIndex) |
183 def __activated(self, idx): |
184 def __activated(self, idx): |
184 """ |
185 """ |
185 Private slot to handle the activation of an entry. |
186 Private slot to handle the activation of an entry. |
186 |
187 |
187 @param idx reference to the entry index (QModelIndex) |
188 @param idx reference to the entry index (QModelIndex) |