8355:8a7677a63c8d | 8356:68ec9c3d4de5 |
---|---|
14 pyqtSignal, Qt, QMimeData, QUrl, QModelIndex, QSortFilterProxyModel, | 14 pyqtSignal, Qt, QMimeData, QUrl, QModelIndex, QSortFilterProxyModel, |
15 QAbstractProxyModel | 15 QAbstractProxyModel |
16 ) | 16 ) |
17 from PyQt6.QtWidgets import QMenu | 17 from PyQt6.QtWidgets import QMenu |
18 | 18 |
19 from E5Gui.E5ModelMenu import E5ModelMenu | 19 from E5Gui.EricModelMenu import EricModelMenu |
20 from E5Gui import E5MessageBox | 20 from E5Gui import EricMessageBox |
21 | 21 |
22 from .HistoryModel import HistoryModel | 22 from .HistoryModel import HistoryModel |
23 | 23 |
24 import UI.PixmapCache | 24 import UI.PixmapCache |
25 | 25 |
268 return dateTime_R < dateTime_L | 268 return dateTime_R < dateTime_L |
269 | 269 |
270 return frequency_R < frequency_L | 270 return frequency_R < frequency_L |
271 | 271 |
272 | 272 |
273 class HistoryMenu(E5ModelMenu): | 273 class HistoryMenu(EricModelMenu): |
274 """ | 274 """ |
275 Class implementing the history menu. | 275 Class implementing the history menu. |
276 | 276 |
277 @signal openUrl(QUrl, str) emitted to open a URL in the current tab | 277 @signal openUrl(QUrl, str) emitted to open a URL in the current tab |
278 @signal newTab(QUrl, str) emitted to open a URL in a new tab | 278 @signal newTab(QUrl, str) emitted to open a URL in a new tab |
294 | 294 |
295 @param parent reference to the parent widget (QWidget) | 295 @param parent reference to the parent widget (QWidget) |
296 @param tabWidget reference to the tab widget managing the browser | 296 @param tabWidget reference to the tab widget managing the browser |
297 tabs (HelpTabWidget | 297 tabs (HelpTabWidget |
298 """ | 298 """ |
299 E5ModelMenu.__init__(self, parent) | 299 EricModelMenu.__init__(self, parent) |
300 | 300 |
301 self.__tabWidget = tabWidget | 301 self.__tabWidget = tabWidget |
302 self.__mw = parent | 302 self.__mw = parent |
303 | 303 |
304 self.__historyManager = None | 304 self.__historyManager = None |
414 | 414 |
415 def __clearHistoryDialog(self): | 415 def __clearHistoryDialog(self): |
416 """ | 416 """ |
417 Private slot to clear the history. | 417 Private slot to clear the history. |
418 """ | 418 """ |
419 if self.__historyManager is not None and E5MessageBox.yesNo( | 419 if self.__historyManager is not None and EricMessageBox.yesNo( |
420 self, | 420 self, |
421 self.tr("Clear History"), | 421 self.tr("Clear History"), |
422 self.tr("""Do you want to clear the history?""")): | 422 self.tr("""Do you want to clear the history?""")): |
423 self.__historyManager.clear() | 423 self.__historyManager.clear() |
424 self.__tabWidget.clearClosedTabsList() | 424 self.__tabWidget.clearClosedTabsList() |
461 @param avail flag indicating the availability of closed tabs (boolean) | 461 @param avail flag indicating the availability of closed tabs (boolean) |
462 """ | 462 """ |
463 self.__closedTabsMenu.setEnabled(avail) | 463 self.__closedTabsMenu.setEnabled(avail) |
464 | 464 |
465 | 465 |
466 class HistoryMostVisitedMenu(E5ModelMenu): | 466 class HistoryMostVisitedMenu(EricModelMenu): |
467 """ | 467 """ |
468 Class implementing the most visited history menu. | 468 Class implementing the most visited history menu. |
469 | 469 |
470 @signal openUrl(QUrl, str) emitted to open a URL in the current tab | 470 @signal openUrl(QUrl, str) emitted to open a URL in the current tab |
471 @signal newTab(QUrl, str) emitted to open a URL in a new tab | 471 @signal newTab(QUrl, str) emitted to open a URL in a new tab |
486 Constructor | 486 Constructor |
487 | 487 |
488 @param count maximum number of entries to be shown (integer) | 488 @param count maximum number of entries to be shown (integer) |
489 @param parent reference to the parent widget (QWidget) | 489 @param parent reference to the parent widget (QWidget) |
490 """ | 490 """ |
491 E5ModelMenu.__init__(self, parent) | 491 EricModelMenu.__init__(self, parent) |
492 | 492 |
493 self.__historyMenuModel = None | 493 self.__historyMenuModel = None |
494 | 494 |
495 self.setMaxRows(count + 1) | 495 self.setMaxRows(count + 1) |
496 | 496 |