Helpviewer/AdBlock/AdBlockTreeWidget.py

branch
Py2 comp.
changeset 2525
8b507a9a2d40
parent 2403
e3d7a861547c
child 3057
10516539f238
equal deleted inserted replaced
2523:139f182b72f6 2525:8b507a9a2d40
4 # 4 #
5 5
6 """ 6 """
7 Module implementing a tree widget for the AdBlock configuration dialog. 7 Module implementing a tree widget for the AdBlock configuration dialog.
8 """ 8 """
9
10 from __future__ import unicode_literals # __IGNORE_WARNING__
9 11
10 from PyQt4.QtCore import Qt 12 from PyQt4.QtCore import Qt
11 from PyQt4.QtGui import QAbstractItemView, QFont, QTreeWidgetItem, QInputDialog, \ 13 from PyQt4.QtGui import QAbstractItemView, QFont, QTreeWidgetItem, QInputDialog, \
12 QLineEdit, QMenu, QApplication, QColor 14 QLineEdit, QMenu, QApplication, QColor
13 15
23 Constructor 25 Constructor
24 26
25 @param subscription reference to the subscription (AdBlockSubscription) 27 @param subscription reference to the subscription (AdBlockSubscription)
26 @param parenbt reference to the parent widget (QWidget) 28 @param parenbt reference to the parent widget (QWidget)
27 """ 29 """
28 super().__init__(parent) 30 super(AdBlockTreeWidget, self).__init__(parent)
29 31
30 self.__subscription = subscription 32 self.__subscription = subscription
31 self.__topItem = None 33 self.__topItem = None
32 self.__ruleToBeSelected = "" 34 self.__ruleToBeSelected = ""
33 self.__itemChangingBlock = False 35 self.__itemChangingBlock = False
264 evt.modifiers() & Qt.ControlModifier: 266 evt.modifiers() & Qt.ControlModifier:
265 self.__copyFilter() 267 self.__copyFilter()
266 elif evt.key() == Qt.Key_Delete: 268 elif evt.key() == Qt.Key_Delete:
267 self.removeRule() 269 self.removeRule()
268 else: 270 else:
269 super().keyPressEvent(evt) 271 super(AdBlockTreeWidget, self).keyPressEvent(evt)

eric ide

mercurial