Helpviewer/History/HistoryMenu.py

branch
Py2 comp.
changeset 2525
8b507a9a2d40
parent 2403
e3d7a861547c
child 3057
10516539f238
equal deleted inserted replaced
2523:139f182b72f6 2525:8b507a9a2d40
5 5
6 """ 6 """
7 Module implementing the history menu. 7 Module implementing the history menu.
8 """ 8 """
9 9
10 from __future__ import unicode_literals # __IGNORE_WARNING__
11
10 import sys 12 import sys
11 13
12 from PyQt4.QtCore import pyqtSignal, Qt, QMimeData, QUrl, QModelIndex 14 from PyQt4.QtCore import pyqtSignal, Qt, QMimeData, QUrl, QModelIndex
13 from PyQt4.QtGui import QAbstractProxyModel, QSortFilterProxyModel, QMenu 15 from PyQt4.QtGui import QAbstractProxyModel, QSortFilterProxyModel, QMenu
14 16
33 Constructor 35 Constructor
34 36
35 @param sourceModel reference to the source model (QAbstractItemModel) 37 @param sourceModel reference to the source model (QAbstractItemModel)
36 @param parent reference to the parent object (QObject) 38 @param parent reference to the parent object (QObject)
37 """ 39 """
38 super().__init__(parent) 40 super(HistoryMenuModel, self).__init__(parent)
39 41
40 self.__treeModel = sourceModel 42 self.__treeModel = sourceModel
41 43
42 self.setSourceModel(sourceModel) 44 self.setSourceModel(sourceModel)
43 45
207 Constructor 209 Constructor
208 210
209 @param sourceModel reference to the source model (QAbstractItemModel) 211 @param sourceModel reference to the source model (QAbstractItemModel)
210 @param parent reference to the parent object (QObject) 212 @param parent reference to the parent object (QObject)
211 """ 213 """
212 super().__init__(parent) 214 super(HistoryMostVisitedMenuModel, self).__init__(parent)
213 215
214 self.setDynamicSortFilter(True) 216 self.setDynamicSortFilter(True)
215 self.setSourceModel(sourceModel) 217 self.setSourceModel(sourceModel)
216 218
217 def lessThan(self, left, right): 219 def lessThan(self, left, right):

eric ide

mercurial