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 |