Documentation/Source/eric4.Helpviewer.AdBlock.AdBlockSubscription.html

changeset 3
0d9daebf5b8c
equal deleted inserted replaced
2:bc6196164237 3:0d9daebf5b8c
1 <?xml version="1.0" encoding="utf-8"?>
2 <!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN'
3 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
4 <html><head>
5 <title>eric4.Helpviewer.AdBlock.AdBlockSubscription</title>
6 <style>
7 body {
8 background:white;
9 margin: 0em 1em 10em 1em;
10 color: black;
11 }
12
13 h1 { color: white; background: #4FA4FF; }
14 h2 { color: white; background: #4FA4FF; }
15 h3 { color: white; background: #00557F; }
16 h4 { color: white; background: #00557F; }
17
18 a { color: #AA5500; }
19
20 </style>
21 </head>
22 <body><a NAME="top" ID="top"></a>
23 <h1>eric4.Helpviewer.AdBlock.AdBlockSubscription</h1>
24 <p>
25 Module implementing the AdBlock subscription class.
26 </p>
27 <h3>Global Attributes</h3>
28 <table>
29 <tr><td>None</td></tr>
30 </table>
31 <h3>Classes</h3>
32 <table>
33 <tr>
34 <td><a href="#AdBlockSubscription">AdBlockSubscription</a></td>
35 <td>Class implementing the AdBlock subscription.</td>
36 </tr>
37 </table>
38 <h3>Functions</h3>
39 <table>
40 <tr><td>None</td></tr>
41 </table>
42 <hr /><hr />
43 <a NAME="AdBlockSubscription" ID="AdBlockSubscription"></a>
44 <h2>AdBlockSubscription</h2>
45 <p>
46 Class implementing the AdBlock subscription.
47 </p><h4>Signals</h4>
48 <dl>
49 <dt>changed()</dt>
50 <dd>
51 emitted after the subscription has changed
52 </dd><dt>rulesChanged()</dt>
53 <dd>
54 emitted after the subscription's rules have changed
55 </dd>
56 </dl>
57 <h3>Derived from</h3>
58 QObject
59 <h3>Class Attributes</h3>
60 <table>
61 <tr><td>None</td></tr>
62 </table>
63 <h3>Methods</h3>
64 <table>
65 <tr>
66 <td><a href="#AdBlockSubscription.__init__">AdBlockSubscription</a></td>
67 <td>Constructor</td>
68 </tr><tr>
69 <td><a href="#AdBlockSubscription.__loadRules">__loadRules</a></td>
70 <td>Private method to load the rules of the subscription.</td>
71 </tr><tr>
72 <td><a href="#AdBlockSubscription.__parseUrl">__parseUrl</a></td>
73 <td>Private method to parse the AdBlock URL for the subscription.</td>
74 </tr><tr>
75 <td><a href="#AdBlockSubscription.__populateCache">__populateCache</a></td>
76 <td>Private method to populate the various rule caches.</td>
77 </tr><tr>
78 <td><a href="#AdBlockSubscription.__rulesDownloaded">__rulesDownloaded</a></td>
79 <td>Private slot to deal with the downloaded rules.</td>
80 </tr><tr>
81 <td><a href="#AdBlockSubscription.addRule">addRule</a></td>
82 <td>Public method to add a rule.</td>
83 </tr><tr>
84 <td><a href="#AdBlockSubscription.allRules">allRules</a></td>
85 <td>Public method to get the list of rules.</td>
86 </tr><tr>
87 <td><a href="#AdBlockSubscription.allow">allow</a></td>
88 <td>Public method to check, if the given URL is allowed.</td>
89 </tr><tr>
90 <td><a href="#AdBlockSubscription.block">block</a></td>
91 <td>Public method to check, if the given URL should be blocked.</td>
92 </tr><tr>
93 <td><a href="#AdBlockSubscription.isEnabled">isEnabled</a></td>
94 <td>Public method to check, if the subscription is enabled.</td>
95 </tr><tr>
96 <td><a href="#AdBlockSubscription.lastUpdate">lastUpdate</a></td>
97 <td>Public method to get the date and time of the last update.</td>
98 </tr><tr>
99 <td><a href="#AdBlockSubscription.location">location</a></td>
100 <td>Public method to get the subscription location.</td>
101 </tr><tr>
102 <td><a href="#AdBlockSubscription.pageRules">pageRules</a></td>
103 <td>Public method to get the page rules of the subscription.</td>
104 </tr><tr>
105 <td><a href="#AdBlockSubscription.removeRule">removeRule</a></td>
106 <td>Public method to remove a rule given the offset.</td>
107 </tr><tr>
108 <td><a href="#AdBlockSubscription.replaceRule">replaceRule</a></td>
109 <td>Public method to replace a rule given the offset.</td>
110 </tr><tr>
111 <td><a href="#AdBlockSubscription.rulesFileName">rulesFileName</a></td>
112 <td>Public method to get the name of the rules file.</td>
113 </tr><tr>
114 <td><a href="#AdBlockSubscription.saveRules">saveRules</a></td>
115 <td>Public method to save the subscription rules.</td>
116 </tr><tr>
117 <td><a href="#AdBlockSubscription.setEnabled">setEnabled</a></td>
118 <td>Public method to set the enabled status.</td>
119 </tr><tr>
120 <td><a href="#AdBlockSubscription.setLocation">setLocation</a></td>
121 <td>Public method to set the subscription location.</td>
122 </tr><tr>
123 <td><a href="#AdBlockSubscription.setTitle">setTitle</a></td>
124 <td>Public method to set the subscription title.</td>
125 </tr><tr>
126 <td><a href="#AdBlockSubscription.title">title</a></td>
127 <td>Public method to get the subscription title.</td>
128 </tr><tr>
129 <td><a href="#AdBlockSubscription.updateNow">updateNow</a></td>
130 <td>Public method to update the subscription immediately.</td>
131 </tr><tr>
132 <td><a href="#AdBlockSubscription.url">url</a></td>
133 <td>Public method to generate the url for this subscription.</td>
134 </tr>
135 </table>
136 <a NAME="AdBlockSubscription.__init__" ID="AdBlockSubscription.__init__"></a>
137 <h4>AdBlockSubscription (Constructor)</h4>
138 <b>AdBlockSubscription</b>(<i>url, parent = None</i>)
139 <p>
140 Constructor
141 </p><dl>
142 <dt><i>url</i></dt>
143 <dd>
144 AdBlock URL for the subscription (QUrl)
145 </dd><dt><i>parent</i></dt>
146 <dd>
147 reference to the parent object (QObject)
148 </dd>
149 </dl><a NAME="AdBlockSubscription.__loadRules" ID="AdBlockSubscription.__loadRules"></a>
150 <h4>AdBlockSubscription.__loadRules</h4>
151 <b>__loadRules</b>(<i></i>)
152 <p>
153 Private method to load the rules of the subscription.
154 </p><a NAME="AdBlockSubscription.__parseUrl" ID="AdBlockSubscription.__parseUrl"></a>
155 <h4>AdBlockSubscription.__parseUrl</h4>
156 <b>__parseUrl</b>(<i>url</i>)
157 <p>
158 Private method to parse the AdBlock URL for the subscription.
159 </p><dl>
160 <dt><i>url</i></dt>
161 <dd>
162 AdBlock URL for the subscription (QUrl)
163 </dd>
164 </dl><a NAME="AdBlockSubscription.__populateCache" ID="AdBlockSubscription.__populateCache"></a>
165 <h4>AdBlockSubscription.__populateCache</h4>
166 <b>__populateCache</b>(<i></i>)
167 <p>
168 Private method to populate the various rule caches.
169 </p><a NAME="AdBlockSubscription.__rulesDownloaded" ID="AdBlockSubscription.__rulesDownloaded"></a>
170 <h4>AdBlockSubscription.__rulesDownloaded</h4>
171 <b>__rulesDownloaded</b>(<i></i>)
172 <p>
173 Private slot to deal with the downloaded rules.
174 </p><a NAME="AdBlockSubscription.addRule" ID="AdBlockSubscription.addRule"></a>
175 <h4>AdBlockSubscription.addRule</h4>
176 <b>addRule</b>(<i>rule</i>)
177 <p>
178 Public method to add a rule.
179 </p><dl>
180 <dt><i>rule</i></dt>
181 <dd>
182 reference to the rule to add (AdBlockRule)
183 </dd>
184 </dl><a NAME="AdBlockSubscription.allRules" ID="AdBlockSubscription.allRules"></a>
185 <h4>AdBlockSubscription.allRules</h4>
186 <b>allRules</b>(<i></i>)
187 <p>
188 Public method to get the list of rules.
189 </p><dl>
190 <dt>Returns:</dt>
191 <dd>
192 list of rules (list of AdBlockRule)
193 </dd>
194 </dl><a NAME="AdBlockSubscription.allow" ID="AdBlockSubscription.allow"></a>
195 <h4>AdBlockSubscription.allow</h4>
196 <b>allow</b>(<i>urlString</i>)
197 <p>
198 Public method to check, if the given URL is allowed.
199 </p><dl>
200 <dt>Returns:</dt>
201 <dd>
202 reference to the rule object or None (AdBlockRule)
203 </dd>
204 </dl><a NAME="AdBlockSubscription.block" ID="AdBlockSubscription.block"></a>
205 <h4>AdBlockSubscription.block</h4>
206 <b>block</b>(<i>urlString</i>)
207 <p>
208 Public method to check, if the given URL should be blocked.
209 </p><dl>
210 <dt>Returns:</dt>
211 <dd>
212 reference to the rule object or None (AdBlockRule)
213 </dd>
214 </dl><a NAME="AdBlockSubscription.isEnabled" ID="AdBlockSubscription.isEnabled"></a>
215 <h4>AdBlockSubscription.isEnabled</h4>
216 <b>isEnabled</b>(<i></i>)
217 <p>
218 Public method to check, if the subscription is enabled.
219 </p><dl>
220 <dt>Returns:</dt>
221 <dd>
222 flag indicating the enabled status (boolean)
223 </dd>
224 </dl><a NAME="AdBlockSubscription.lastUpdate" ID="AdBlockSubscription.lastUpdate"></a>
225 <h4>AdBlockSubscription.lastUpdate</h4>
226 <b>lastUpdate</b>(<i></i>)
227 <p>
228 Public method to get the date and time of the last update.
229 </p><dl>
230 <dt>Returns:</dt>
231 <dd>
232 date and time of the last update (QDateTime)
233 </dd>
234 </dl><a NAME="AdBlockSubscription.location" ID="AdBlockSubscription.location"></a>
235 <h4>AdBlockSubscription.location</h4>
236 <b>location</b>(<i></i>)
237 <p>
238 Public method to get the subscription location.
239 </p><dl>
240 <dt>Returns:</dt>
241 <dd>
242 URL of the subscription location (QUrl)
243 </dd>
244 </dl><a NAME="AdBlockSubscription.pageRules" ID="AdBlockSubscription.pageRules"></a>
245 <h4>AdBlockSubscription.pageRules</h4>
246 <b>pageRules</b>(<i></i>)
247 <p>
248 Public method to get the page rules of the subscription.
249 </p><dl>
250 <dt>Returns:</dt>
251 <dd>
252 list of rule objects (list of AdBlockRule)
253 </dd>
254 </dl><a NAME="AdBlockSubscription.removeRule" ID="AdBlockSubscription.removeRule"></a>
255 <h4>AdBlockSubscription.removeRule</h4>
256 <b>removeRule</b>(<i>offset</i>)
257 <p>
258 Public method to remove a rule given the offset.
259 </p><dl>
260 <dt><i>offset</i></dt>
261 <dd>
262 offset of the rule to remove (integer)
263 </dd>
264 </dl><a NAME="AdBlockSubscription.replaceRule" ID="AdBlockSubscription.replaceRule"></a>
265 <h4>AdBlockSubscription.replaceRule</h4>
266 <b>replaceRule</b>(<i>rule, offset</i>)
267 <p>
268 Public method to replace a rule given the offset.
269 </p><dl>
270 <dt><i>rule</i></dt>
271 <dd>
272 reference to the rule to set (AdBlockRule)
273 </dd><dt><i>offset</i></dt>
274 <dd>
275 offset of the rule to remove (integer)
276 </dd>
277 </dl><a NAME="AdBlockSubscription.rulesFileName" ID="AdBlockSubscription.rulesFileName"></a>
278 <h4>AdBlockSubscription.rulesFileName</h4>
279 <b>rulesFileName</b>(<i></i>)
280 <p>
281 Public method to get the name of the rules file.
282 </p><dl>
283 <dt>Returns:</dt>
284 <dd>
285 name of the rules file (string)
286 </dd>
287 </dl><a NAME="AdBlockSubscription.saveRules" ID="AdBlockSubscription.saveRules"></a>
288 <h4>AdBlockSubscription.saveRules</h4>
289 <b>saveRules</b>(<i></i>)
290 <p>
291 Public method to save the subscription rules.
292 </p><a NAME="AdBlockSubscription.setEnabled" ID="AdBlockSubscription.setEnabled"></a>
293 <h4>AdBlockSubscription.setEnabled</h4>
294 <b>setEnabled</b>(<i>enabled</i>)
295 <p>
296 Public method to set the enabled status.
297 </p><dl>
298 <dt><i>enabled</i></dt>
299 <dd>
300 flag indicating the enabled status (boolean)
301 </dd>
302 </dl><a NAME="AdBlockSubscription.setLocation" ID="AdBlockSubscription.setLocation"></a>
303 <h4>AdBlockSubscription.setLocation</h4>
304 <b>setLocation</b>(<i>url</i>)
305 <p>
306 Public method to set the subscription location.
307 </p><dl>
308 <dt><i>url</i></dt>
309 <dd>
310 URL of the subscription location (QUrl)
311 </dd>
312 </dl><a NAME="AdBlockSubscription.setTitle" ID="AdBlockSubscription.setTitle"></a>
313 <h4>AdBlockSubscription.setTitle</h4>
314 <b>setTitle</b>(<i>title</i>)
315 <p>
316 Public method to set the subscription title.
317 </p><dl>
318 <dt><i>title</i></dt>
319 <dd>
320 subscription title (string)
321 </dd>
322 </dl><a NAME="AdBlockSubscription.title" ID="AdBlockSubscription.title"></a>
323 <h4>AdBlockSubscription.title</h4>
324 <b>title</b>(<i></i>)
325 <p>
326 Public method to get the subscription title.
327 </p><dl>
328 <dt>Returns:</dt>
329 <dd>
330 subscription title (string)
331 </dd>
332 </dl><a NAME="AdBlockSubscription.updateNow" ID="AdBlockSubscription.updateNow"></a>
333 <h4>AdBlockSubscription.updateNow</h4>
334 <b>updateNow</b>(<i></i>)
335 <p>
336 Public method to update the subscription immediately.
337 </p><a NAME="AdBlockSubscription.url" ID="AdBlockSubscription.url"></a>
338 <h4>AdBlockSubscription.url</h4>
339 <b>url</b>(<i></i>)
340 <p>
341 Public method to generate the url for this subscription.
342 </p><dl>
343 <dt>Returns:</dt>
344 <dd>
345 AdBlock URL for the subscription (QUrl)
346 </dd>
347 </dl>
348 <div align="right"><a href="#top">Up</a></div>
349 <hr />
350 </body></html>

eric ide

mercurial