8 """ |
8 """ |
9 |
9 |
10 from __future__ import unicode_literals # __IGNORE_WARNING__ |
10 from __future__ import unicode_literals # __IGNORE_WARNING__ |
11 |
11 |
12 from PyQt4.QtCore import Qt |
12 from PyQt4.QtCore import Qt |
13 from PyQt4.QtGui import QAbstractItemView, QFont, QTreeWidgetItem, QInputDialog, \ |
13 from PyQt4.QtGui import QAbstractItemView, QFont, QTreeWidgetItem, \ |
14 QLineEdit, QMenu, QApplication, QColor |
14 QInputDialog, QLineEdit, QMenu, QApplication, QColor |
15 |
15 |
16 from E5Gui.E5TreeWidget import E5TreeWidget |
16 from E5Gui.E5TreeWidget import E5TreeWidget |
17 |
17 |
18 |
18 |
19 class AdBlockTreeWidget(E5TreeWidget): |
19 class AdBlockTreeWidget(E5TreeWidget): |
23 def __init__(self, subscription, parent=None): |
23 def __init__(self, subscription, parent=None): |
24 """ |
24 """ |
25 Constructor |
25 Constructor |
26 |
26 |
27 @param subscription reference to the subscription (AdBlockSubscription) |
27 @param subscription reference to the subscription (AdBlockSubscription) |
28 @param parenbt reference to the parent widget (QWidget) |
28 @param parent reference to the parent widget (QWidget) |
29 """ |
29 """ |
30 super(AdBlockTreeWidget, self).__init__(parent) |
30 super(AdBlockTreeWidget, self).__init__(parent) |
31 |
31 |
32 self.__subscription = subscription |
32 self.__subscription = subscription |
33 self.__topItem = None |
33 self.__topItem = None |
219 """ |
219 """ |
220 self.refresh() |
220 self.refresh() |
221 |
221 |
222 self.__itemChangingBlock = True |
222 self.__itemChangingBlock = True |
223 self.__topItem.setText(0, |
223 self.__topItem.setText(0, |
224 self.trUtf8("{0} (recently updated)").format(self.__subscription.title())) |
224 self.trUtf8("{0} (recently updated)").format( |
|
225 self.__subscription.title())) |
225 self.__itemChangingBlock = False |
226 self.__itemChangingBlock = False |
226 |
227 |
227 def __adjustItemFeatures(self, itm, rule): |
228 def __adjustItemFeatures(self, itm, rule): |
228 """ |
229 """ |
229 Private method to adjust an item. |
230 Private method to adjust an item. |