28 """ |
28 """ |
29 Class implementing the AdBlock subscription. |
29 Class implementing the AdBlock subscription. |
30 |
30 |
31 @signal changed() emitted after the subscription has changed |
31 @signal changed() emitted after the subscription has changed |
32 @signal rulesChanged() emitted after the subscription's rules have changed |
32 @signal rulesChanged() emitted after the subscription's rules have changed |
|
33 @signal enabledChanged(bool) emitted after the enabled state was changed |
33 """ |
34 """ |
34 changed = pyqtSignal() |
35 changed = pyqtSignal() |
35 rulesChanged = pyqtSignal() |
36 rulesChanged = pyqtSignal() |
|
37 enabledChanged = pyqtSignal(bool) |
36 |
38 |
37 def __init__(self, url, custom, parent=None, default=False): |
39 def __init__(self, url, custom, parent=None, default=False): |
38 """ |
40 """ |
39 Constructor |
41 Constructor |
40 |
42 |
97 self.__requiresLocation, self.__requiresTitle) |
99 self.__requiresLocation, self.__requiresTitle) |
98 |
100 |
99 lastUpdateByteArray = url.encodedQueryItemValue("lastUpdate") |
101 lastUpdateByteArray = url.encodedQueryItemValue("lastUpdate") |
100 lastUpdateString = QUrl.fromPercentEncoding(lastUpdateByteArray) |
102 lastUpdateString = QUrl.fromPercentEncoding(lastUpdateByteArray) |
101 self.__lastUpdate = QDateTime.fromString(lastUpdateString, Qt.ISODate) |
103 self.__lastUpdate = QDateTime.fromString(lastUpdateString, Qt.ISODate) |
102 ## if lastUpdateString: |
|
103 ## self.__lastUpdate = QDateTime.fromString(lastUpdateString, Qt.ISODate) |
|
104 ## else: |
|
105 ## self.__lastUpdate = QDateTime.currentDateTime() |
|
106 |
104 |
107 self.__loadRules() |
105 self.__loadRules() |
108 |
106 |
109 def url(self): |
107 def url(self): |
110 """ |
108 """ |