16 |
16 |
17 a { color: #BA6D36; } |
17 a { color: #BA6D36; } |
18 |
18 |
19 </style> |
19 </style> |
20 </head> |
20 </head> |
21 <body><a NAME="top" ID="top"></a> |
21 <body> |
|
22 <a NAME="top" ID="top"></a> |
22 <h1>eric6.WebBrowser.AdBlock.AdBlockSubscription</h1> |
23 <h1>eric6.WebBrowser.AdBlock.AdBlockSubscription</h1> |
|
24 |
23 <p> |
25 <p> |
24 Module implementing the AdBlock subscription class. |
26 Module implementing the AdBlock subscription class. |
25 </p> |
27 </p> |
26 <h3>Global Attributes</h3> |
28 <h3>Global Attributes</h3> |
|
29 |
27 <table> |
30 <table> |
28 <tr><td>None</td></tr> |
31 <tr><td>None</td></tr> |
29 </table> |
32 </table> |
30 <h3>Classes</h3> |
33 <h3>Classes</h3> |
|
34 |
31 <table> |
35 <table> |
|
36 |
32 <tr> |
37 <tr> |
33 <td><a href="#AdBlockSubscription">AdBlockSubscription</a></td> |
38 <td><a href="#AdBlockSubscription">AdBlockSubscription</a></td> |
34 <td>Class implementing the AdBlock subscription.</td> |
39 <td>Class implementing the AdBlock subscription.</td> |
35 </tr> |
40 </tr> |
36 </table> |
41 </table> |
37 <h3>Functions</h3> |
42 <h3>Functions</h3> |
|
43 |
38 <table> |
44 <table> |
39 <tr><td>None</td></tr> |
45 <tr><td>None</td></tr> |
40 </table> |
46 </table> |
41 <hr /><hr /> |
47 <hr /> |
|
48 <hr /> |
42 <a NAME="AdBlockSubscription" ID="AdBlockSubscription"></a> |
49 <a NAME="AdBlockSubscription" ID="AdBlockSubscription"></a> |
43 <h2>AdBlockSubscription</h2> |
50 <h2>AdBlockSubscription</h2> |
|
51 |
44 <p> |
52 <p> |
45 Class implementing the AdBlock subscription. |
53 Class implementing the AdBlock subscription. |
46 </p><h3>Signals</h3> |
54 </p> |
47 <dl> |
55 <h3>Signals</h3> |
|
56 <dl> |
|
57 |
48 <dt>changed()</dt> |
58 <dt>changed()</dt> |
49 <dd> |
59 <dd> |
50 emitted after the subscription has changed |
60 emitted after the subscription has changed |
51 </dd><dt>enabledChanged(bool)</dt> |
61 </dd> |
|
62 <dt>enabledChanged(bool)</dt> |
52 <dd> |
63 <dd> |
53 emitted after the enabled state was changed |
64 emitted after the enabled state was changed |
54 </dd><dt>rulesChanged()</dt> |
65 </dd> |
|
66 <dt>rulesChanged()</dt> |
55 <dd> |
67 <dd> |
56 emitted after the subscription's rules have changed |
68 emitted after the subscription's rules have changed |
57 </dd><dt>rulesEnabledChanged()</dt> |
69 </dd> |
|
70 <dt>rulesEnabledChanged()</dt> |
58 <dd> |
71 <dd> |
59 emitted after a rule enabled state was |
72 emitted after a rule enabled state was |
60 changed |
73 changed |
61 </dd> |
74 </dd> |
62 </dl> |
75 </dl> |
63 <h3>Derived from</h3> |
76 <h3>Derived from</h3> |
64 QObject |
77 QObject |
65 <h3>Class Attributes</h3> |
78 <h3>Class Attributes</h3> |
|
79 |
66 <table> |
80 <table> |
67 <tr><td>None</td></tr> |
81 <tr><td>None</td></tr> |
68 </table> |
82 </table> |
69 <h3>Class Methods</h3> |
83 <h3>Class Methods</h3> |
|
84 |
70 <table> |
85 <table> |
71 <tr><td>None</td></tr> |
86 <tr><td>None</td></tr> |
72 </table> |
87 </table> |
73 <h3>Methods</h3> |
88 <h3>Methods</h3> |
|
89 |
74 <table> |
90 <table> |
|
91 |
75 <tr> |
92 <tr> |
76 <td><a href="#AdBlockSubscription.__init__">AdBlockSubscription</a></td> |
93 <td><a href="#AdBlockSubscription.__init__">AdBlockSubscription</a></td> |
77 <td>Constructor</td> |
94 <td>Constructor</td> |
78 </tr><tr> |
95 </tr> |
|
96 <tr> |
79 <td><a href="#AdBlockSubscription.__loadRules">__loadRules</a></td> |
97 <td><a href="#AdBlockSubscription.__loadRules">__loadRules</a></td> |
80 <td>Private method to load the rules of the subscription.</td> |
98 <td>Private method to load the rules of the subscription.</td> |
81 </tr><tr> |
99 </tr> |
|
100 <tr> |
82 <td><a href="#AdBlockSubscription.__parseUrl">__parseUrl</a></td> |
101 <td><a href="#AdBlockSubscription.__parseUrl">__parseUrl</a></td> |
83 <td>Private method to parse the AdBlock URL for the subscription.</td> |
102 <td>Private method to parse the AdBlock URL for the subscription.</td> |
84 </tr><tr> |
103 </tr> |
|
104 <tr> |
85 <td><a href="#AdBlockSubscription.__rulesDownloaded">__rulesDownloaded</a></td> |
105 <td><a href="#AdBlockSubscription.__rulesDownloaded">__rulesDownloaded</a></td> |
86 <td>Private slot to deal with the downloaded rules.</td> |
106 <td>Private slot to deal with the downloaded rules.</td> |
87 </tr><tr> |
107 </tr> |
|
108 <tr> |
88 <td><a href="#AdBlockSubscription.__validateCheckSum">__validateCheckSum</a></td> |
109 <td><a href="#AdBlockSubscription.__validateCheckSum">__validateCheckSum</a></td> |
89 <td>Private method to check the subscription file's checksum.</td> |
110 <td>Private method to check the subscription file's checksum.</td> |
90 </tr><tr> |
111 </tr> |
|
112 <tr> |
91 <td><a href="#AdBlockSubscription.addRule">addRule</a></td> |
113 <td><a href="#AdBlockSubscription.addRule">addRule</a></td> |
92 <td>Public method to add a rule.</td> |
114 <td>Public method to add a rule.</td> |
93 </tr><tr> |
115 </tr> |
|
116 <tr> |
94 <td><a href="#AdBlockSubscription.allRules">allRules</a></td> |
117 <td><a href="#AdBlockSubscription.allRules">allRules</a></td> |
95 <td>Public method to get the list of rules.</td> |
118 <td>Public method to get the list of rules.</td> |
96 </tr><tr> |
119 </tr> |
|
120 <tr> |
97 <td><a href="#AdBlockSubscription.canBeRemoved">canBeRemoved</a></td> |
121 <td><a href="#AdBlockSubscription.canBeRemoved">canBeRemoved</a></td> |
98 <td>Public method to check, if the subscription can be removed.</td> |
122 <td>Public method to check, if the subscription can be removed.</td> |
99 </tr><tr> |
123 </tr> |
|
124 <tr> |
100 <td><a href="#AdBlockSubscription.canEditRules">canEditRules</a></td> |
125 <td><a href="#AdBlockSubscription.canEditRules">canEditRules</a></td> |
101 <td>Public method to check, if rules can be edited.</td> |
126 <td>Public method to check, if rules can be edited.</td> |
102 </tr><tr> |
127 </tr> |
|
128 <tr> |
103 <td><a href="#AdBlockSubscription.checkForUpdate">checkForUpdate</a></td> |
129 <td><a href="#AdBlockSubscription.checkForUpdate">checkForUpdate</a></td> |
104 <td>Public method to check for an update.</td> |
130 <td>Public method to check for an update.</td> |
105 </tr><tr> |
131 </tr> |
|
132 <tr> |
106 <td><a href="#AdBlockSubscription.isEnabled">isEnabled</a></td> |
133 <td><a href="#AdBlockSubscription.isEnabled">isEnabled</a></td> |
107 <td>Public method to check, if the subscription is enabled.</td> |
134 <td>Public method to check, if the subscription is enabled.</td> |
108 </tr><tr> |
135 </tr> |
|
136 <tr> |
109 <td><a href="#AdBlockSubscription.lastUpdate">lastUpdate</a></td> |
137 <td><a href="#AdBlockSubscription.lastUpdate">lastUpdate</a></td> |
110 <td>Public method to get the date and time of the last update.</td> |
138 <td>Public method to get the date and time of the last update.</td> |
111 </tr><tr> |
139 </tr> |
|
140 <tr> |
112 <td><a href="#AdBlockSubscription.location">location</a></td> |
141 <td><a href="#AdBlockSubscription.location">location</a></td> |
113 <td>Public method to get the subscription location.</td> |
142 <td>Public method to get the subscription location.</td> |
114 </tr><tr> |
143 </tr> |
|
144 <tr> |
115 <td><a href="#AdBlockSubscription.removeRule">removeRule</a></td> |
145 <td><a href="#AdBlockSubscription.removeRule">removeRule</a></td> |
116 <td>Public method to remove a rule given the offset.</td> |
146 <td>Public method to remove a rule given the offset.</td> |
117 </tr><tr> |
147 </tr> |
|
148 <tr> |
118 <td><a href="#AdBlockSubscription.replaceRule">replaceRule</a></td> |
149 <td><a href="#AdBlockSubscription.replaceRule">replaceRule</a></td> |
119 <td>Public method to replace a rule given the offset.</td> |
150 <td>Public method to replace a rule given the offset.</td> |
120 </tr><tr> |
151 </tr> |
|
152 <tr> |
121 <td><a href="#AdBlockSubscription.requiresLocation">requiresLocation</a></td> |
153 <td><a href="#AdBlockSubscription.requiresLocation">requiresLocation</a></td> |
122 <td>Public method to get the location of a required subscription.</td> |
154 <td>Public method to get the location of a required subscription.</td> |
123 </tr><tr> |
155 </tr> |
|
156 <tr> |
124 <td><a href="#AdBlockSubscription.rule">rule</a></td> |
157 <td><a href="#AdBlockSubscription.rule">rule</a></td> |
125 <td>Public method to get a specific rule.</td> |
158 <td>Public method to get a specific rule.</td> |
126 </tr><tr> |
159 </tr> |
|
160 <tr> |
127 <td><a href="#AdBlockSubscription.rulesFileName">rulesFileName</a></td> |
161 <td><a href="#AdBlockSubscription.rulesFileName">rulesFileName</a></td> |
128 <td>Public method to get the name of the rules file.</td> |
162 <td>Public method to get the name of the rules file.</td> |
129 </tr><tr> |
163 </tr> |
|
164 <tr> |
130 <td><a href="#AdBlockSubscription.saveRules">saveRules</a></td> |
165 <td><a href="#AdBlockSubscription.saveRules">saveRules</a></td> |
131 <td>Public method to save the subscription rules.</td> |
166 <td>Public method to save the subscription rules.</td> |
132 </tr><tr> |
167 </tr> |
|
168 <tr> |
133 <td><a href="#AdBlockSubscription.setEnabled">setEnabled</a></td> |
169 <td><a href="#AdBlockSubscription.setEnabled">setEnabled</a></td> |
134 <td>Public method to set the enabled status.</td> |
170 <td>Public method to set the enabled status.</td> |
135 </tr><tr> |
171 </tr> |
|
172 <tr> |
136 <td><a href="#AdBlockSubscription.setLocation">setLocation</a></td> |
173 <td><a href="#AdBlockSubscription.setLocation">setLocation</a></td> |
137 <td>Public method to set the subscription location.</td> |
174 <td>Public method to set the subscription location.</td> |
138 </tr><tr> |
175 </tr> |
|
176 <tr> |
139 <td><a href="#AdBlockSubscription.setRuleEnabled">setRuleEnabled</a></td> |
177 <td><a href="#AdBlockSubscription.setRuleEnabled">setRuleEnabled</a></td> |
140 <td>Public method to enable a specific rule.</td> |
178 <td>Public method to enable a specific rule.</td> |
141 </tr><tr> |
179 </tr> |
|
180 <tr> |
142 <td><a href="#AdBlockSubscription.setTitle">setTitle</a></td> |
181 <td><a href="#AdBlockSubscription.setTitle">setTitle</a></td> |
143 <td>Public method to set the subscription title.</td> |
182 <td>Public method to set the subscription title.</td> |
144 </tr><tr> |
183 </tr> |
|
184 <tr> |
145 <td><a href="#AdBlockSubscription.title">title</a></td> |
185 <td><a href="#AdBlockSubscription.title">title</a></td> |
146 <td>Public method to get the subscription title.</td> |
186 <td>Public method to get the subscription title.</td> |
147 </tr><tr> |
187 </tr> |
|
188 <tr> |
148 <td><a href="#AdBlockSubscription.updateNow">updateNow</a></td> |
189 <td><a href="#AdBlockSubscription.updateNow">updateNow</a></td> |
149 <td>Public method to update the subscription immediately.</td> |
190 <td>Public method to update the subscription immediately.</td> |
150 </tr><tr> |
191 </tr> |
|
192 <tr> |
151 <td><a href="#AdBlockSubscription.url">url</a></td> |
193 <td><a href="#AdBlockSubscription.url">url</a></td> |
152 <td>Public method to generate the URL for this subscription.</td> |
194 <td>Public method to generate the URL for this subscription.</td> |
153 </tr> |
195 </tr> |
154 </table> |
196 </table> |
155 <h3>Static Methods</h3> |
197 <h3>Static Methods</h3> |
|
198 |
156 <table> |
199 <table> |
157 <tr><td>None</td></tr> |
200 <tr><td>None</td></tr> |
158 </table> |
201 </table> |
|
202 |
159 <a NAME="AdBlockSubscription.__init__" ID="AdBlockSubscription.__init__"></a> |
203 <a NAME="AdBlockSubscription.__init__" ID="AdBlockSubscription.__init__"></a> |
160 <h4>AdBlockSubscription (Constructor)</h4> |
204 <h4>AdBlockSubscription (Constructor)</h4> |
161 <b>AdBlockSubscription</b>(<i>url, custom, parent=None, default=False</i>) |
205 <b>AdBlockSubscription</b>(<i>url, custom, parent=None, default=False</i>) |
|
206 |
162 <p> |
207 <p> |
163 Constructor |
208 Constructor |
164 </p><dl> |
209 </p> |
|
210 <dl> |
|
211 |
165 <dt><i>url</i></dt> |
212 <dt><i>url</i></dt> |
166 <dd> |
213 <dd> |
167 AdBlock URL for the subscription (QUrl) |
214 AdBlock URL for the subscription (QUrl) |
168 </dd><dt><i>custom</i></dt> |
215 </dd> |
|
216 <dt><i>custom</i></dt> |
169 <dd> |
217 <dd> |
170 flag indicating a custom subscription (boolean) |
218 flag indicating a custom subscription (boolean) |
171 </dd><dt><i>parent</i></dt> |
219 </dd> |
|
220 <dt><i>parent</i></dt> |
172 <dd> |
221 <dd> |
173 reference to the parent object (QObject) |
222 reference to the parent object (QObject) |
174 </dd><dt><i>default</i></dt> |
223 </dd> |
|
224 <dt><i>default</i></dt> |
175 <dd> |
225 <dd> |
176 flag indicating a default subscription (boolean) |
226 flag indicating a default subscription (boolean) |
177 </dd> |
227 </dd> |
178 </dl><a NAME="AdBlockSubscription.__loadRules" ID="AdBlockSubscription.__loadRules"></a> |
228 </dl> |
|
229 <a NAME="AdBlockSubscription.__loadRules" ID="AdBlockSubscription.__loadRules"></a> |
179 <h4>AdBlockSubscription.__loadRules</h4> |
230 <h4>AdBlockSubscription.__loadRules</h4> |
180 <b>__loadRules</b>(<i></i>) |
231 <b>__loadRules</b>(<i></i>) |
|
232 |
181 <p> |
233 <p> |
182 Private method to load the rules of the subscription. |
234 Private method to load the rules of the subscription. |
183 </p><a NAME="AdBlockSubscription.__parseUrl" ID="AdBlockSubscription.__parseUrl"></a> |
235 </p> |
|
236 <a NAME="AdBlockSubscription.__parseUrl" ID="AdBlockSubscription.__parseUrl"></a> |
184 <h4>AdBlockSubscription.__parseUrl</h4> |
237 <h4>AdBlockSubscription.__parseUrl</h4> |
185 <b>__parseUrl</b>(<i>url</i>) |
238 <b>__parseUrl</b>(<i>url</i>) |
|
239 |
186 <p> |
240 <p> |
187 Private method to parse the AdBlock URL for the subscription. |
241 Private method to parse the AdBlock URL for the subscription. |
188 </p><dl> |
242 </p> |
|
243 <dl> |
|
244 |
189 <dt><i>url</i> (QUrl)</dt> |
245 <dt><i>url</i> (QUrl)</dt> |
190 <dd> |
246 <dd> |
191 AdBlock URL for the subscription |
247 AdBlock URL for the subscription |
192 </dd> |
248 </dd> |
193 </dl><a NAME="AdBlockSubscription.__rulesDownloaded" ID="AdBlockSubscription.__rulesDownloaded"></a> |
249 </dl> |
|
250 <a NAME="AdBlockSubscription.__rulesDownloaded" ID="AdBlockSubscription.__rulesDownloaded"></a> |
194 <h4>AdBlockSubscription.__rulesDownloaded</h4> |
251 <h4>AdBlockSubscription.__rulesDownloaded</h4> |
195 <b>__rulesDownloaded</b>(<i>reply</i>) |
252 <b>__rulesDownloaded</b>(<i>reply</i>) |
|
253 |
196 <p> |
254 <p> |
197 Private slot to deal with the downloaded rules. |
255 Private slot to deal with the downloaded rules. |
198 </p><dl> |
256 </p> |
|
257 <dl> |
|
258 |
199 <dt><i>reply</i> (QNetworkReply)</dt> |
259 <dt><i>reply</i> (QNetworkReply)</dt> |
200 <dd> |
260 <dd> |
201 reference to the network reply |
261 reference to the network reply |
202 </dd> |
262 </dd> |
203 </dl><a NAME="AdBlockSubscription.__validateCheckSum" ID="AdBlockSubscription.__validateCheckSum"></a> |
263 </dl> |
|
264 <a NAME="AdBlockSubscription.__validateCheckSum" ID="AdBlockSubscription.__validateCheckSum"></a> |
204 <h4>AdBlockSubscription.__validateCheckSum</h4> |
265 <h4>AdBlockSubscription.__validateCheckSum</h4> |
205 <b>__validateCheckSum</b>(<i>fileName</i>) |
266 <b>__validateCheckSum</b>(<i>fileName</i>) |
|
267 |
206 <p> |
268 <p> |
207 Private method to check the subscription file's checksum. |
269 Private method to check the subscription file's checksum. |
208 </p><dl> |
270 </p> |
|
271 <dl> |
|
272 |
209 <dt><i>fileName</i> (str)</dt> |
273 <dt><i>fileName</i> (str)</dt> |
210 <dd> |
274 <dd> |
211 name of the file containing the subscription |
275 name of the file containing the subscription |
212 </dd> |
276 </dd> |
213 </dl><dl> |
277 </dl> |
|
278 <dl> |
214 <dt>Returns:</dt> |
279 <dt>Returns:</dt> |
215 <dd> |
280 <dd> |
216 flag indicating a valid file. A file is considered |
281 flag indicating a valid file. A file is considered |
217 valid, if the checksum is OK, the file does not contain a |
282 valid, if the checksum is OK, the file does not contain a |
218 checksum (i.e. cannot be checked) or we are using the limited |
283 checksum (i.e. cannot be checked) or we are using the limited |
219 EasyList (because we fiddled with the original). |
284 EasyList (because we fiddled with the original). |
220 </dd> |
285 </dd> |
221 </dl><dl> |
286 </dl> |
|
287 <dl> |
222 <dt>Return Type:</dt> |
288 <dt>Return Type:</dt> |
223 <dd> |
289 <dd> |
224 bool |
290 bool |
225 </dd> |
291 </dd> |
226 </dl><a NAME="AdBlockSubscription.addRule" ID="AdBlockSubscription.addRule"></a> |
292 </dl> |
|
293 <a NAME="AdBlockSubscription.addRule" ID="AdBlockSubscription.addRule"></a> |
227 <h4>AdBlockSubscription.addRule</h4> |
294 <h4>AdBlockSubscription.addRule</h4> |
228 <b>addRule</b>(<i>rule</i>) |
295 <b>addRule</b>(<i>rule</i>) |
|
296 |
229 <p> |
297 <p> |
230 Public method to add a rule. |
298 Public method to add a rule. |
231 </p><dl> |
299 </p> |
|
300 <dl> |
|
301 |
232 <dt><i>rule</i> (AdBlockRule)</dt> |
302 <dt><i>rule</i> (AdBlockRule)</dt> |
233 <dd> |
303 <dd> |
234 reference to the rule to add |
304 reference to the rule to add |
235 </dd> |
305 </dd> |
236 </dl><dl> |
306 </dl> |
|
307 <dl> |
237 <dt>Returns:</dt> |
308 <dt>Returns:</dt> |
238 <dd> |
309 <dd> |
239 offset of the rule |
310 offset of the rule |
240 </dd> |
311 </dd> |
241 </dl><dl> |
312 </dl> |
|
313 <dl> |
242 <dt>Return Type:</dt> |
314 <dt>Return Type:</dt> |
243 <dd> |
315 <dd> |
244 int |
316 int |
245 </dd> |
317 </dd> |
246 </dl><a NAME="AdBlockSubscription.allRules" ID="AdBlockSubscription.allRules"></a> |
318 </dl> |
|
319 <a NAME="AdBlockSubscription.allRules" ID="AdBlockSubscription.allRules"></a> |
247 <h4>AdBlockSubscription.allRules</h4> |
320 <h4>AdBlockSubscription.allRules</h4> |
248 <b>allRules</b>(<i></i>) |
321 <b>allRules</b>(<i></i>) |
|
322 |
249 <p> |
323 <p> |
250 Public method to get the list of rules. |
324 Public method to get the list of rules. |
251 </p><dl> |
325 </p> |
|
326 <dl> |
252 <dt>Returns:</dt> |
327 <dt>Returns:</dt> |
253 <dd> |
328 <dd> |
254 list of rules |
329 list of rules |
255 </dd> |
330 </dd> |
256 </dl><dl> |
331 </dl> |
|
332 <dl> |
257 <dt>Return Type:</dt> |
333 <dt>Return Type:</dt> |
258 <dd> |
334 <dd> |
259 list of AdBlockRule |
335 list of AdBlockRule |
260 </dd> |
336 </dd> |
261 </dl><a NAME="AdBlockSubscription.canBeRemoved" ID="AdBlockSubscription.canBeRemoved"></a> |
337 </dl> |
|
338 <a NAME="AdBlockSubscription.canBeRemoved" ID="AdBlockSubscription.canBeRemoved"></a> |
262 <h4>AdBlockSubscription.canBeRemoved</h4> |
339 <h4>AdBlockSubscription.canBeRemoved</h4> |
263 <b>canBeRemoved</b>(<i></i>) |
340 <b>canBeRemoved</b>(<i></i>) |
|
341 |
264 <p> |
342 <p> |
265 Public method to check, if the subscription can be removed. |
343 Public method to check, if the subscription can be removed. |
266 </p><dl> |
344 </p> |
|
345 <dl> |
267 <dt>Returns:</dt> |
346 <dt>Returns:</dt> |
268 <dd> |
347 <dd> |
269 flag indicating removal is allowed |
348 flag indicating removal is allowed |
270 </dd> |
349 </dd> |
271 </dl><dl> |
350 </dl> |
|
351 <dl> |
272 <dt>Return Type:</dt> |
352 <dt>Return Type:</dt> |
273 <dd> |
353 <dd> |
274 bool |
354 bool |
275 </dd> |
355 </dd> |
276 </dl><a NAME="AdBlockSubscription.canEditRules" ID="AdBlockSubscription.canEditRules"></a> |
356 </dl> |
|
357 <a NAME="AdBlockSubscription.canEditRules" ID="AdBlockSubscription.canEditRules"></a> |
277 <h4>AdBlockSubscription.canEditRules</h4> |
358 <h4>AdBlockSubscription.canEditRules</h4> |
278 <b>canEditRules</b>(<i></i>) |
359 <b>canEditRules</b>(<i></i>) |
|
360 |
279 <p> |
361 <p> |
280 Public method to check, if rules can be edited. |
362 Public method to check, if rules can be edited. |
281 </p><dl> |
363 </p> |
|
364 <dl> |
282 <dt>Returns:</dt> |
365 <dt>Returns:</dt> |
283 <dd> |
366 <dd> |
284 flag indicating rules may be edited |
367 flag indicating rules may be edited |
285 </dd> |
368 </dd> |
286 </dl><dl> |
369 </dl> |
|
370 <dl> |
287 <dt>Return Type:</dt> |
371 <dt>Return Type:</dt> |
288 <dd> |
372 <dd> |
289 bool |
373 bool |
290 </dd> |
374 </dd> |
291 </dl><a NAME="AdBlockSubscription.checkForUpdate" ID="AdBlockSubscription.checkForUpdate"></a> |
375 </dl> |
|
376 <a NAME="AdBlockSubscription.checkForUpdate" ID="AdBlockSubscription.checkForUpdate"></a> |
292 <h4>AdBlockSubscription.checkForUpdate</h4> |
377 <h4>AdBlockSubscription.checkForUpdate</h4> |
293 <b>checkForUpdate</b>(<i></i>) |
378 <b>checkForUpdate</b>(<i></i>) |
|
379 |
294 <p> |
380 <p> |
295 Public method to check for an update. |
381 Public method to check for an update. |
296 </p><a NAME="AdBlockSubscription.isEnabled" ID="AdBlockSubscription.isEnabled"></a> |
382 </p> |
|
383 <a NAME="AdBlockSubscription.isEnabled" ID="AdBlockSubscription.isEnabled"></a> |
297 <h4>AdBlockSubscription.isEnabled</h4> |
384 <h4>AdBlockSubscription.isEnabled</h4> |
298 <b>isEnabled</b>(<i></i>) |
385 <b>isEnabled</b>(<i></i>) |
|
386 |
299 <p> |
387 <p> |
300 Public method to check, if the subscription is enabled. |
388 Public method to check, if the subscription is enabled. |
301 </p><dl> |
389 </p> |
|
390 <dl> |
302 <dt>Returns:</dt> |
391 <dt>Returns:</dt> |
303 <dd> |
392 <dd> |
304 flag indicating the enabled status |
393 flag indicating the enabled status |
305 </dd> |
394 </dd> |
306 </dl><dl> |
395 </dl> |
|
396 <dl> |
307 <dt>Return Type:</dt> |
397 <dt>Return Type:</dt> |
308 <dd> |
398 <dd> |
309 bool |
399 bool |
310 </dd> |
400 </dd> |
311 </dl><a NAME="AdBlockSubscription.lastUpdate" ID="AdBlockSubscription.lastUpdate"></a> |
401 </dl> |
|
402 <a NAME="AdBlockSubscription.lastUpdate" ID="AdBlockSubscription.lastUpdate"></a> |
312 <h4>AdBlockSubscription.lastUpdate</h4> |
403 <h4>AdBlockSubscription.lastUpdate</h4> |
313 <b>lastUpdate</b>(<i></i>) |
404 <b>lastUpdate</b>(<i></i>) |
|
405 |
314 <p> |
406 <p> |
315 Public method to get the date and time of the last update. |
407 Public method to get the date and time of the last update. |
316 </p><dl> |
408 </p> |
|
409 <dl> |
317 <dt>Returns:</dt> |
410 <dt>Returns:</dt> |
318 <dd> |
411 <dd> |
319 date and time of the last update |
412 date and time of the last update |
320 </dd> |
413 </dd> |
321 </dl><dl> |
414 </dl> |
|
415 <dl> |
322 <dt>Return Type:</dt> |
416 <dt>Return Type:</dt> |
323 <dd> |
417 <dd> |
324 QDateTime |
418 QDateTime |
325 </dd> |
419 </dd> |
326 </dl><a NAME="AdBlockSubscription.location" ID="AdBlockSubscription.location"></a> |
420 </dl> |
|
421 <a NAME="AdBlockSubscription.location" ID="AdBlockSubscription.location"></a> |
327 <h4>AdBlockSubscription.location</h4> |
422 <h4>AdBlockSubscription.location</h4> |
328 <b>location</b>(<i></i>) |
423 <b>location</b>(<i></i>) |
|
424 |
329 <p> |
425 <p> |
330 Public method to get the subscription location. |
426 Public method to get the subscription location. |
331 </p><dl> |
427 </p> |
|
428 <dl> |
332 <dt>Returns:</dt> |
429 <dt>Returns:</dt> |
333 <dd> |
430 <dd> |
334 URL of the subscription location |
431 URL of the subscription location |
335 </dd> |
432 </dd> |
336 </dl><dl> |
433 </dl> |
|
434 <dl> |
337 <dt>Return Type:</dt> |
435 <dt>Return Type:</dt> |
338 <dd> |
436 <dd> |
339 QUrl |
437 QUrl |
340 </dd> |
438 </dd> |
341 </dl><a NAME="AdBlockSubscription.removeRule" ID="AdBlockSubscription.removeRule"></a> |
439 </dl> |
|
440 <a NAME="AdBlockSubscription.removeRule" ID="AdBlockSubscription.removeRule"></a> |
342 <h4>AdBlockSubscription.removeRule</h4> |
441 <h4>AdBlockSubscription.removeRule</h4> |
343 <b>removeRule</b>(<i>offset</i>) |
442 <b>removeRule</b>(<i>offset</i>) |
|
443 |
344 <p> |
444 <p> |
345 Public method to remove a rule given the offset. |
445 Public method to remove a rule given the offset. |
346 </p><dl> |
446 </p> |
|
447 <dl> |
|
448 |
347 <dt><i>offset</i> (int)</dt> |
449 <dt><i>offset</i> (int)</dt> |
348 <dd> |
450 <dd> |
349 offset of the rule to remove |
451 offset of the rule to remove |
350 </dd> |
452 </dd> |
351 </dl><a NAME="AdBlockSubscription.replaceRule" ID="AdBlockSubscription.replaceRule"></a> |
453 </dl> |
|
454 <a NAME="AdBlockSubscription.replaceRule" ID="AdBlockSubscription.replaceRule"></a> |
352 <h4>AdBlockSubscription.replaceRule</h4> |
455 <h4>AdBlockSubscription.replaceRule</h4> |
353 <b>replaceRule</b>(<i>rule, offset</i>) |
456 <b>replaceRule</b>(<i>rule, offset</i>) |
|
457 |
354 <p> |
458 <p> |
355 Public method to replace a rule given the offset. |
459 Public method to replace a rule given the offset. |
356 </p><dl> |
460 </p> |
|
461 <dl> |
|
462 |
357 <dt><i>rule</i> (AdBlockRule)</dt> |
463 <dt><i>rule</i> (AdBlockRule)</dt> |
358 <dd> |
464 <dd> |
359 reference to the rule to set |
465 reference to the rule to set |
360 </dd><dt><i>offset</i> (int)</dt> |
466 </dd> |
|
467 <dt><i>offset</i> (int)</dt> |
361 <dd> |
468 <dd> |
362 offset of the rule to remove |
469 offset of the rule to remove |
363 </dd> |
470 </dd> |
364 </dl><dl> |
471 </dl> |
|
472 <dl> |
365 <dt>Returns:</dt> |
473 <dt>Returns:</dt> |
366 <dd> |
474 <dd> |
367 requested rule |
475 requested rule |
368 </dd> |
476 </dd> |
369 </dl><dl> |
477 </dl> |
|
478 <dl> |
370 <dt>Return Type:</dt> |
479 <dt>Return Type:</dt> |
371 <dd> |
480 <dd> |
372 AdBlockRule |
481 AdBlockRule |
373 </dd> |
482 </dd> |
374 </dl><a NAME="AdBlockSubscription.requiresLocation" ID="AdBlockSubscription.requiresLocation"></a> |
483 </dl> |
|
484 <a NAME="AdBlockSubscription.requiresLocation" ID="AdBlockSubscription.requiresLocation"></a> |
375 <h4>AdBlockSubscription.requiresLocation</h4> |
485 <h4>AdBlockSubscription.requiresLocation</h4> |
376 <b>requiresLocation</b>(<i></i>) |
486 <b>requiresLocation</b>(<i></i>) |
|
487 |
377 <p> |
488 <p> |
378 Public method to get the location of a required subscription. |
489 Public method to get the location of a required subscription. |
379 </p><dl> |
490 </p> |
|
491 <dl> |
380 <dt>Returns:</dt> |
492 <dt>Returns:</dt> |
381 <dd> |
493 <dd> |
382 location of a required subscription |
494 location of a required subscription |
383 </dd> |
495 </dd> |
384 </dl><dl> |
496 </dl> |
|
497 <dl> |
385 <dt>Return Type:</dt> |
498 <dt>Return Type:</dt> |
386 <dd> |
499 <dd> |
387 str |
500 str |
388 </dd> |
501 </dd> |
389 </dl><a NAME="AdBlockSubscription.rule" ID="AdBlockSubscription.rule"></a> |
502 </dl> |
|
503 <a NAME="AdBlockSubscription.rule" ID="AdBlockSubscription.rule"></a> |
390 <h4>AdBlockSubscription.rule</h4> |
504 <h4>AdBlockSubscription.rule</h4> |
391 <b>rule</b>(<i>offset</i>) |
505 <b>rule</b>(<i>offset</i>) |
|
506 |
392 <p> |
507 <p> |
393 Public method to get a specific rule. |
508 Public method to get a specific rule. |
394 </p><dl> |
509 </p> |
|
510 <dl> |
|
511 |
395 <dt><i>offset</i> (int)</dt> |
512 <dt><i>offset</i> (int)</dt> |
396 <dd> |
513 <dd> |
397 offset of the rule |
514 offset of the rule |
398 </dd> |
515 </dd> |
399 </dl><dl> |
516 </dl> |
|
517 <dl> |
400 <dt>Returns:</dt> |
518 <dt>Returns:</dt> |
401 <dd> |
519 <dd> |
402 requested rule |
520 requested rule |
403 </dd> |
521 </dd> |
404 </dl><dl> |
522 </dl> |
|
523 <dl> |
405 <dt>Return Type:</dt> |
524 <dt>Return Type:</dt> |
406 <dd> |
525 <dd> |
407 AdBlockRule |
526 AdBlockRule |
408 </dd> |
527 </dd> |
409 </dl><a NAME="AdBlockSubscription.rulesFileName" ID="AdBlockSubscription.rulesFileName"></a> |
528 </dl> |
|
529 <a NAME="AdBlockSubscription.rulesFileName" ID="AdBlockSubscription.rulesFileName"></a> |
410 <h4>AdBlockSubscription.rulesFileName</h4> |
530 <h4>AdBlockSubscription.rulesFileName</h4> |
411 <b>rulesFileName</b>(<i></i>) |
531 <b>rulesFileName</b>(<i></i>) |
|
532 |
412 <p> |
533 <p> |
413 Public method to get the name of the rules file. |
534 Public method to get the name of the rules file. |
414 </p><dl> |
535 </p> |
|
536 <dl> |
415 <dt>Returns:</dt> |
537 <dt>Returns:</dt> |
416 <dd> |
538 <dd> |
417 name of the rules file |
539 name of the rules file |
418 </dd> |
540 </dd> |
419 </dl><dl> |
541 </dl> |
|
542 <dl> |
420 <dt>Return Type:</dt> |
543 <dt>Return Type:</dt> |
421 <dd> |
544 <dd> |
422 str |
545 str |
423 </dd> |
546 </dd> |
424 </dl><a NAME="AdBlockSubscription.saveRules" ID="AdBlockSubscription.saveRules"></a> |
547 </dl> |
|
548 <a NAME="AdBlockSubscription.saveRules" ID="AdBlockSubscription.saveRules"></a> |
425 <h4>AdBlockSubscription.saveRules</h4> |
549 <h4>AdBlockSubscription.saveRules</h4> |
426 <b>saveRules</b>(<i></i>) |
550 <b>saveRules</b>(<i></i>) |
|
551 |
427 <p> |
552 <p> |
428 Public method to save the subscription rules. |
553 Public method to save the subscription rules. |
429 </p><a NAME="AdBlockSubscription.setEnabled" ID="AdBlockSubscription.setEnabled"></a> |
554 </p> |
|
555 <a NAME="AdBlockSubscription.setEnabled" ID="AdBlockSubscription.setEnabled"></a> |
430 <h4>AdBlockSubscription.setEnabled</h4> |
556 <h4>AdBlockSubscription.setEnabled</h4> |
431 <b>setEnabled</b>(<i>enabled</i>) |
557 <b>setEnabled</b>(<i>enabled</i>) |
|
558 |
432 <p> |
559 <p> |
433 Public method to set the enabled status. |
560 Public method to set the enabled status. |
434 </p><dl> |
561 </p> |
|
562 <dl> |
|
563 |
435 <dt><i>enabled</i> (bool)</dt> |
564 <dt><i>enabled</i> (bool)</dt> |
436 <dd> |
565 <dd> |
437 flag indicating the enabled status |
566 flag indicating the enabled status |
438 </dd> |
567 </dd> |
439 </dl><a NAME="AdBlockSubscription.setLocation" ID="AdBlockSubscription.setLocation"></a> |
568 </dl> |
|
569 <a NAME="AdBlockSubscription.setLocation" ID="AdBlockSubscription.setLocation"></a> |
440 <h4>AdBlockSubscription.setLocation</h4> |
570 <h4>AdBlockSubscription.setLocation</h4> |
441 <b>setLocation</b>(<i>url</i>) |
571 <b>setLocation</b>(<i>url</i>) |
|
572 |
442 <p> |
573 <p> |
443 Public method to set the subscription location. |
574 Public method to set the subscription location. |
444 </p><dl> |
575 </p> |
|
576 <dl> |
|
577 |
445 <dt><i>url</i> (QUrl)</dt> |
578 <dt><i>url</i> (QUrl)</dt> |
446 <dd> |
579 <dd> |
447 URL of the subscription location |
580 URL of the subscription location |
448 </dd> |
581 </dd> |
449 </dl><a NAME="AdBlockSubscription.setRuleEnabled" ID="AdBlockSubscription.setRuleEnabled"></a> |
582 </dl> |
|
583 <a NAME="AdBlockSubscription.setRuleEnabled" ID="AdBlockSubscription.setRuleEnabled"></a> |
450 <h4>AdBlockSubscription.setRuleEnabled</h4> |
584 <h4>AdBlockSubscription.setRuleEnabled</h4> |
451 <b>setRuleEnabled</b>(<i>offset, enabled</i>) |
585 <b>setRuleEnabled</b>(<i>offset, enabled</i>) |
|
586 |
452 <p> |
587 <p> |
453 Public method to enable a specific rule. |
588 Public method to enable a specific rule. |
454 </p><dl> |
589 </p> |
|
590 <dl> |
|
591 |
455 <dt><i>offset</i> (int)</dt> |
592 <dt><i>offset</i> (int)</dt> |
456 <dd> |
593 <dd> |
457 offset of the rule |
594 offset of the rule |
458 </dd><dt><i>enabled</i> (bool)</dt> |
595 </dd> |
|
596 <dt><i>enabled</i> (bool)</dt> |
459 <dd> |
597 <dd> |
460 new enabled state |
598 new enabled state |
461 </dd> |
599 </dd> |
462 </dl><dl> |
600 </dl> |
|
601 <dl> |
463 <dt>Returns:</dt> |
602 <dt>Returns:</dt> |
464 <dd> |
603 <dd> |
465 reference to the changed rule |
604 reference to the changed rule |
466 </dd> |
605 </dd> |
467 </dl><dl> |
606 </dl> |
|
607 <dl> |
468 <dt>Return Type:</dt> |
608 <dt>Return Type:</dt> |
469 <dd> |
609 <dd> |
470 AdBlockRule |
610 AdBlockRule |
471 </dd> |
611 </dd> |
472 </dl><a NAME="AdBlockSubscription.setTitle" ID="AdBlockSubscription.setTitle"></a> |
612 </dl> |
|
613 <a NAME="AdBlockSubscription.setTitle" ID="AdBlockSubscription.setTitle"></a> |
473 <h4>AdBlockSubscription.setTitle</h4> |
614 <h4>AdBlockSubscription.setTitle</h4> |
474 <b>setTitle</b>(<i>title</i>) |
615 <b>setTitle</b>(<i>title</i>) |
|
616 |
475 <p> |
617 <p> |
476 Public method to set the subscription title. |
618 Public method to set the subscription title. |
477 </p><dl> |
619 </p> |
|
620 <dl> |
|
621 |
478 <dt><i>title</i> (str)</dt> |
622 <dt><i>title</i> (str)</dt> |
479 <dd> |
623 <dd> |
480 subscription title |
624 subscription title |
481 </dd> |
625 </dd> |
482 </dl><a NAME="AdBlockSubscription.title" ID="AdBlockSubscription.title"></a> |
626 </dl> |
|
627 <a NAME="AdBlockSubscription.title" ID="AdBlockSubscription.title"></a> |
483 <h4>AdBlockSubscription.title</h4> |
628 <h4>AdBlockSubscription.title</h4> |
484 <b>title</b>(<i></i>) |
629 <b>title</b>(<i></i>) |
|
630 |
485 <p> |
631 <p> |
486 Public method to get the subscription title. |
632 Public method to get the subscription title. |
487 </p><dl> |
633 </p> |
|
634 <dl> |
488 <dt>Returns:</dt> |
635 <dt>Returns:</dt> |
489 <dd> |
636 <dd> |
490 subscription title |
637 subscription title |
491 </dd> |
638 </dd> |
492 </dl><dl> |
639 </dl> |
|
640 <dl> |
493 <dt>Return Type:</dt> |
641 <dt>Return Type:</dt> |
494 <dd> |
642 <dd> |
495 string |
643 string |
496 </dd> |
644 </dd> |
497 </dl><a NAME="AdBlockSubscription.updateNow" ID="AdBlockSubscription.updateNow"></a> |
645 </dl> |
|
646 <a NAME="AdBlockSubscription.updateNow" ID="AdBlockSubscription.updateNow"></a> |
498 <h4>AdBlockSubscription.updateNow</h4> |
647 <h4>AdBlockSubscription.updateNow</h4> |
499 <b>updateNow</b>(<i></i>) |
648 <b>updateNow</b>(<i></i>) |
|
649 |
500 <p> |
650 <p> |
501 Public method to update the subscription immediately. |
651 Public method to update the subscription immediately. |
502 </p><a NAME="AdBlockSubscription.url" ID="AdBlockSubscription.url"></a> |
652 </p> |
|
653 <a NAME="AdBlockSubscription.url" ID="AdBlockSubscription.url"></a> |
503 <h4>AdBlockSubscription.url</h4> |
654 <h4>AdBlockSubscription.url</h4> |
504 <b>url</b>(<i></i>) |
655 <b>url</b>(<i></i>) |
|
656 |
505 <p> |
657 <p> |
506 Public method to generate the URL for this subscription. |
658 Public method to generate the URL for this subscription. |
507 </p><dl> |
659 </p> |
|
660 <dl> |
508 <dt>Returns:</dt> |
661 <dt>Returns:</dt> |
509 <dd> |
662 <dd> |
510 AdBlock URL for the subscription |
663 AdBlock URL for the subscription |
511 </dd> |
664 </dd> |
512 </dl><dl> |
665 </dl> |
|
666 <dl> |
513 <dt>Return Type:</dt> |
667 <dt>Return Type:</dt> |
514 <dd> |
668 <dd> |
515 QUrl |
669 QUrl |
516 </dd> |
670 </dd> |
517 </dl> |
671 </dl> |