|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric7.WebBrowser.Feeds.FeedsManager</title> |
|
4 <meta charset="UTF-8"> |
|
5 <link rel="stylesheet" href="styles.css"> |
|
6 </head> |
|
7 <body> |
|
8 <a NAME="top" ID="top"></a> |
|
9 <h1>eric7.WebBrowser.Feeds.FeedsManager</h1> |
|
10 |
|
11 <p> |
|
12 Module implementing a RSS feeds manager dialog. |
|
13 </p> |
|
14 <h3>Global Attributes</h3> |
|
15 |
|
16 <table> |
|
17 <tr><td>None</td></tr> |
|
18 </table> |
|
19 <h3>Classes</h3> |
|
20 |
|
21 <table> |
|
22 |
|
23 <tr> |
|
24 <td><a href="#FeedsManager">FeedsManager</a></td> |
|
25 <td>Class implementing a RSS feeds manager dialog.</td> |
|
26 </tr> |
|
27 </table> |
|
28 <h3>Functions</h3> |
|
29 |
|
30 <table> |
|
31 <tr><td>None</td></tr> |
|
32 </table> |
|
33 <hr /> |
|
34 <hr /> |
|
35 <a NAME="FeedsManager" ID="FeedsManager"></a> |
|
36 <h2>FeedsManager</h2> |
|
37 |
|
38 <p> |
|
39 Class implementing a RSS feeds manager dialog. |
|
40 </p> |
|
41 <h3>Signals</h3> |
|
42 <dl> |
|
43 |
|
44 <dt>newBackgroundTab(QUrl, str)</dt> |
|
45 <dd> |
|
46 emitted to open a URL in a new |
|
47 background tab |
|
48 </dd> |
|
49 <dt>newPrivateWindow(QUrl, str)</dt> |
|
50 <dd> |
|
51 emitted to open a URL in a new |
|
52 private window |
|
53 </dd> |
|
54 <dt>newTab(QUrl, str)</dt> |
|
55 <dd> |
|
56 emitted to open a URL in a new tab |
|
57 </dd> |
|
58 <dt>newWindow(QUrl, str)</dt> |
|
59 <dd> |
|
60 emitted to open a URL in a new window |
|
61 </dd> |
|
62 <dt>openUrl(QUrl, str)</dt> |
|
63 <dd> |
|
64 emitted to open a URL in the current tab |
|
65 </dd> |
|
66 </dl> |
|
67 <h3>Derived from</h3> |
|
68 QDialog, Ui_FeedsManager |
|
69 <h3>Class Attributes</h3> |
|
70 |
|
71 <table> |
|
72 <tr><td>ErrorDataRole</td></tr><tr><td>UrlStringRole</td></tr> |
|
73 </table> |
|
74 <h3>Class Methods</h3> |
|
75 |
|
76 <table> |
|
77 <tr><td>None</td></tr> |
|
78 </table> |
|
79 <h3>Methods</h3> |
|
80 |
|
81 <table> |
|
82 |
|
83 <tr> |
|
84 <td><a href="#FeedsManager.__init__">FeedsManager</a></td> |
|
85 <td>Constructor</td> |
|
86 </tr> |
|
87 <tr> |
|
88 <td><a href="#FeedsManager.__addFeedItem">__addFeedItem</a></td> |
|
89 <td>Private slot to add a top level feed item.</td> |
|
90 </tr> |
|
91 <tr> |
|
92 <td><a href="#FeedsManager.__copyUrlToClipboard">__copyUrlToClipboard</a></td> |
|
93 <td>Private slot to copy the URL of the selected item to the clipboard.</td> |
|
94 </tr> |
|
95 <tr> |
|
96 <td><a href="#FeedsManager.__customContextMenuRequested">__customContextMenuRequested</a></td> |
|
97 <td>Private slot to handle the context menu request for the feeds tree.</td> |
|
98 </tr> |
|
99 <tr> |
|
100 <td><a href="#FeedsManager.__enableButtons">__enableButtons</a></td> |
|
101 <td>Private slot to disable/enable various buttons.</td> |
|
102 </tr> |
|
103 <tr> |
|
104 <td><a href="#FeedsManager.__feedLoaded">__feedLoaded</a></td> |
|
105 <td>Private slot to extract the loaded feed data.</td> |
|
106 </tr> |
|
107 <tr> |
|
108 <td><a href="#FeedsManager.__itemActivated">__itemActivated</a></td> |
|
109 <td>Private slot to handle the activation of an item.</td> |
|
110 </tr> |
|
111 <tr> |
|
112 <td><a href="#FeedsManager.__load">__load</a></td> |
|
113 <td>Private method to load the feeds data.</td> |
|
114 </tr> |
|
115 <tr> |
|
116 <td><a href="#FeedsManager.__openMessage">__openMessage</a></td> |
|
117 <td>Private method to open a feed message.</td> |
|
118 </tr> |
|
119 <tr> |
|
120 <td><a href="#FeedsManager.__openMessageInCurrentTab">__openMessageInCurrentTab</a></td> |
|
121 <td>Private slot to open a feed message in the current browser tab.</td> |
|
122 </tr> |
|
123 <tr> |
|
124 <td><a href="#FeedsManager.__openMessageInNewBackgroundTab">__openMessageInNewBackgroundTab</a></td> |
|
125 <td>Private slot to open a feed message in a new background tab.</td> |
|
126 </tr> |
|
127 <tr> |
|
128 <td><a href="#FeedsManager.__openMessageInNewTab">__openMessageInNewTab</a></td> |
|
129 <td>Private slot to open a feed message in a new browser tab.</td> |
|
130 </tr> |
|
131 <tr> |
|
132 <td><a href="#FeedsManager.__openMessageInNewWindow">__openMessageInNewWindow</a></td> |
|
133 <td>Private slot to open a feed message in a new browser window.</td> |
|
134 </tr> |
|
135 <tr> |
|
136 <td><a href="#FeedsManager.__openMessageInPrivateWindow">__openMessageInPrivateWindow</a></td> |
|
137 <td>Private slot to open a feed message in a new private browser window.</td> |
|
138 </tr> |
|
139 <tr> |
|
140 <td><a href="#FeedsManager.__reloadFeed">__reloadFeed</a></td> |
|
141 <td>Private method to reload the given feed.</td> |
|
142 </tr> |
|
143 <tr> |
|
144 <td><a href="#FeedsManager.__save">__save</a></td> |
|
145 <td>Private method to store the feeds data.</td> |
|
146 </tr> |
|
147 <tr> |
|
148 <td><a href="#FeedsManager.__showError">__showError</a></td> |
|
149 <td>Private slot to show error info for a failed load operation.</td> |
|
150 </tr> |
|
151 <tr> |
|
152 <td><a href="#FeedsManager.addFeed">addFeed</a></td> |
|
153 <td>Public method to add a feed.</td> |
|
154 </tr> |
|
155 <tr> |
|
156 <td><a href="#FeedsManager.on_deleteButton_clicked">on_deleteButton_clicked</a></td> |
|
157 <td>Private slot to delete the selected feed.</td> |
|
158 </tr> |
|
159 <tr> |
|
160 <td><a href="#FeedsManager.on_editButton_clicked">on_editButton_clicked</a></td> |
|
161 <td>Private slot to edit the selected feed.</td> |
|
162 </tr> |
|
163 <tr> |
|
164 <td><a href="#FeedsManager.on_feedsTree_itemSelectionChanged">on_feedsTree_itemSelectionChanged</a></td> |
|
165 <td>Private slot to enable the various buttons depending on the selection.</td> |
|
166 </tr> |
|
167 <tr> |
|
168 <td><a href="#FeedsManager.on_reloadAllButton_clicked">on_reloadAllButton_clicked</a></td> |
|
169 <td>Private slot to reload all feeds.</td> |
|
170 </tr> |
|
171 <tr> |
|
172 <td><a href="#FeedsManager.on_reloadButton_clicked">on_reloadButton_clicked</a></td> |
|
173 <td>Private slot to reload the selected feed.</td> |
|
174 </tr> |
|
175 <tr> |
|
176 <td><a href="#FeedsManager.show">show</a></td> |
|
177 <td>Public slot to show the feeds manager dialog.</td> |
|
178 </tr> |
|
179 </table> |
|
180 <h3>Static Methods</h3> |
|
181 |
|
182 <table> |
|
183 <tr><td>None</td></tr> |
|
184 </table> |
|
185 |
|
186 <a NAME="FeedsManager.__init__" ID="FeedsManager.__init__"></a> |
|
187 <h4>FeedsManager (Constructor)</h4> |
|
188 <b>FeedsManager</b>(<i>parent=None</i>) |
|
189 |
|
190 <p> |
|
191 Constructor |
|
192 </p> |
|
193 <dl> |
|
194 |
|
195 <dt><i>parent</i></dt> |
|
196 <dd> |
|
197 reference to the parent widget (QWidget) |
|
198 </dd> |
|
199 </dl> |
|
200 <a NAME="FeedsManager.__addFeedItem" ID="FeedsManager.__addFeedItem"></a> |
|
201 <h4>FeedsManager.__addFeedItem</h4> |
|
202 <b>__addFeedItem</b>(<i>feed</i>) |
|
203 |
|
204 <p> |
|
205 Private slot to add a top level feed item. |
|
206 </p> |
|
207 <dl> |
|
208 |
|
209 <dt><i>feed</i></dt> |
|
210 <dd> |
|
211 tuple containing feed info (URL, title, icon) |
|
212 (string, string, QIcon) |
|
213 </dd> |
|
214 </dl> |
|
215 <a NAME="FeedsManager.__copyUrlToClipboard" ID="FeedsManager.__copyUrlToClipboard"></a> |
|
216 <h4>FeedsManager.__copyUrlToClipboard</h4> |
|
217 <b>__copyUrlToClipboard</b>(<i></i>) |
|
218 |
|
219 <p> |
|
220 Private slot to copy the URL of the selected item to the clipboard. |
|
221 </p> |
|
222 <a NAME="FeedsManager.__customContextMenuRequested" ID="FeedsManager.__customContextMenuRequested"></a> |
|
223 <h4>FeedsManager.__customContextMenuRequested</h4> |
|
224 <b>__customContextMenuRequested</b>(<i>pos</i>) |
|
225 |
|
226 <p> |
|
227 Private slot to handle the context menu request for the feeds tree. |
|
228 </p> |
|
229 <dl> |
|
230 |
|
231 <dt><i>pos</i></dt> |
|
232 <dd> |
|
233 position the context menu was requested (QPoint) |
|
234 </dd> |
|
235 </dl> |
|
236 <a NAME="FeedsManager.__enableButtons" ID="FeedsManager.__enableButtons"></a> |
|
237 <h4>FeedsManager.__enableButtons</h4> |
|
238 <b>__enableButtons</b>(<i></i>) |
|
239 |
|
240 <p> |
|
241 Private slot to disable/enable various buttons. |
|
242 </p> |
|
243 <a NAME="FeedsManager.__feedLoaded" ID="FeedsManager.__feedLoaded"></a> |
|
244 <h4>FeedsManager.__feedLoaded</h4> |
|
245 <b>__feedLoaded</b>(<i>reply</i>) |
|
246 |
|
247 <p> |
|
248 Private slot to extract the loaded feed data. |
|
249 </p> |
|
250 <dl> |
|
251 |
|
252 <dt><i>reply</i> (QNetworkReply)</dt> |
|
253 <dd> |
|
254 reference to the network reply |
|
255 </dd> |
|
256 </dl> |
|
257 <a NAME="FeedsManager.__itemActivated" ID="FeedsManager.__itemActivated"></a> |
|
258 <h4>FeedsManager.__itemActivated</h4> |
|
259 <b>__itemActivated</b>(<i>itm, column</i>) |
|
260 |
|
261 <p> |
|
262 Private slot to handle the activation of an item. |
|
263 </p> |
|
264 <dl> |
|
265 |
|
266 <dt><i>itm</i></dt> |
|
267 <dd> |
|
268 reference to the activated item (QTreeWidgetItem) |
|
269 </dd> |
|
270 <dt><i>column</i></dt> |
|
271 <dd> |
|
272 column of the activation (integer) |
|
273 </dd> |
|
274 </dl> |
|
275 <a NAME="FeedsManager.__load" ID="FeedsManager.__load"></a> |
|
276 <h4>FeedsManager.__load</h4> |
|
277 <b>__load</b>(<i></i>) |
|
278 |
|
279 <p> |
|
280 Private method to load the feeds data. |
|
281 </p> |
|
282 <a NAME="FeedsManager.__openMessage" ID="FeedsManager.__openMessage"></a> |
|
283 <h4>FeedsManager.__openMessage</h4> |
|
284 <b>__openMessage</b>(<i>newTab=False, background=False, newWindow=False, privateWindow=False</i>) |
|
285 |
|
286 <p> |
|
287 Private method to open a feed message. |
|
288 </p> |
|
289 <dl> |
|
290 |
|
291 <dt><i>newTab</i> (bool)</dt> |
|
292 <dd> |
|
293 flag indicating to open the feed message in a new tab |
|
294 </dd> |
|
295 <dt><i>background</i> (bool)</dt> |
|
296 <dd> |
|
297 flag indicating to open the bookmark in a new |
|
298 background tab |
|
299 </dd> |
|
300 <dt><i>newWindow</i> (bool)</dt> |
|
301 <dd> |
|
302 flag indicating to open the bookmark in a new window |
|
303 </dd> |
|
304 <dt><i>privateWindow</i> (bool)</dt> |
|
305 <dd> |
|
306 flag indicating to open the bookmark in a new |
|
307 private window |
|
308 </dd> |
|
309 </dl> |
|
310 <a NAME="FeedsManager.__openMessageInCurrentTab" ID="FeedsManager.__openMessageInCurrentTab"></a> |
|
311 <h4>FeedsManager.__openMessageInCurrentTab</h4> |
|
312 <b>__openMessageInCurrentTab</b>(<i></i>) |
|
313 |
|
314 <p> |
|
315 Private slot to open a feed message in the current browser tab. |
|
316 </p> |
|
317 <a NAME="FeedsManager.__openMessageInNewBackgroundTab" ID="FeedsManager.__openMessageInNewBackgroundTab"></a> |
|
318 <h4>FeedsManager.__openMessageInNewBackgroundTab</h4> |
|
319 <b>__openMessageInNewBackgroundTab</b>(<i></i>) |
|
320 |
|
321 <p> |
|
322 Private slot to open a feed message in a new background tab. |
|
323 </p> |
|
324 <a NAME="FeedsManager.__openMessageInNewTab" ID="FeedsManager.__openMessageInNewTab"></a> |
|
325 <h4>FeedsManager.__openMessageInNewTab</h4> |
|
326 <b>__openMessageInNewTab</b>(<i></i>) |
|
327 |
|
328 <p> |
|
329 Private slot to open a feed message in a new browser tab. |
|
330 </p> |
|
331 <a NAME="FeedsManager.__openMessageInNewWindow" ID="FeedsManager.__openMessageInNewWindow"></a> |
|
332 <h4>FeedsManager.__openMessageInNewWindow</h4> |
|
333 <b>__openMessageInNewWindow</b>(<i></i>) |
|
334 |
|
335 <p> |
|
336 Private slot to open a feed message in a new browser window. |
|
337 </p> |
|
338 <a NAME="FeedsManager.__openMessageInPrivateWindow" ID="FeedsManager.__openMessageInPrivateWindow"></a> |
|
339 <h4>FeedsManager.__openMessageInPrivateWindow</h4> |
|
340 <b>__openMessageInPrivateWindow</b>(<i></i>) |
|
341 |
|
342 <p> |
|
343 Private slot to open a feed message in a new private browser window. |
|
344 </p> |
|
345 <a NAME="FeedsManager.__reloadFeed" ID="FeedsManager.__reloadFeed"></a> |
|
346 <h4>FeedsManager.__reloadFeed</h4> |
|
347 <b>__reloadFeed</b>(<i>itm</i>) |
|
348 |
|
349 <p> |
|
350 Private method to reload the given feed. |
|
351 </p> |
|
352 <dl> |
|
353 |
|
354 <dt><i>itm</i></dt> |
|
355 <dd> |
|
356 feed item to be reloaded (QTreeWidgetItem) |
|
357 </dd> |
|
358 </dl> |
|
359 <a NAME="FeedsManager.__save" ID="FeedsManager.__save"></a> |
|
360 <h4>FeedsManager.__save</h4> |
|
361 <b>__save</b>(<i></i>) |
|
362 |
|
363 <p> |
|
364 Private method to store the feeds data. |
|
365 </p> |
|
366 <a NAME="FeedsManager.__showError" ID="FeedsManager.__showError"></a> |
|
367 <h4>FeedsManager.__showError</h4> |
|
368 <b>__showError</b>(<i></i>) |
|
369 |
|
370 <p> |
|
371 Private slot to show error info for a failed load operation. |
|
372 </p> |
|
373 <a NAME="FeedsManager.addFeed" ID="FeedsManager.addFeed"></a> |
|
374 <h4>FeedsManager.addFeed</h4> |
|
375 <b>addFeed</b>(<i>urlString, title, icon</i>) |
|
376 |
|
377 <p> |
|
378 Public method to add a feed. |
|
379 </p> |
|
380 <dl> |
|
381 |
|
382 <dt><i>urlString</i></dt> |
|
383 <dd> |
|
384 URL of the feed (string) |
|
385 </dd> |
|
386 <dt><i>title</i></dt> |
|
387 <dd> |
|
388 title of the feed (string) |
|
389 </dd> |
|
390 <dt><i>icon</i></dt> |
|
391 <dd> |
|
392 icon for the feed (QIcon) |
|
393 </dd> |
|
394 </dl> |
|
395 <dl> |
|
396 <dt>Return:</dt> |
|
397 <dd> |
|
398 flag indicating a successful addition of the feed (boolean) |
|
399 </dd> |
|
400 </dl> |
|
401 <a NAME="FeedsManager.on_deleteButton_clicked" ID="FeedsManager.on_deleteButton_clicked"></a> |
|
402 <h4>FeedsManager.on_deleteButton_clicked</h4> |
|
403 <b>on_deleteButton_clicked</b>(<i></i>) |
|
404 |
|
405 <p> |
|
406 Private slot to delete the selected feed. |
|
407 </p> |
|
408 <a NAME="FeedsManager.on_editButton_clicked" ID="FeedsManager.on_editButton_clicked"></a> |
|
409 <h4>FeedsManager.on_editButton_clicked</h4> |
|
410 <b>on_editButton_clicked</b>(<i></i>) |
|
411 |
|
412 <p> |
|
413 Private slot to edit the selected feed. |
|
414 </p> |
|
415 <a NAME="FeedsManager.on_feedsTree_itemSelectionChanged" ID="FeedsManager.on_feedsTree_itemSelectionChanged"></a> |
|
416 <h4>FeedsManager.on_feedsTree_itemSelectionChanged</h4> |
|
417 <b>on_feedsTree_itemSelectionChanged</b>(<i></i>) |
|
418 |
|
419 <p> |
|
420 Private slot to enable the various buttons depending on the selection. |
|
421 </p> |
|
422 <a NAME="FeedsManager.on_reloadAllButton_clicked" ID="FeedsManager.on_reloadAllButton_clicked"></a> |
|
423 <h4>FeedsManager.on_reloadAllButton_clicked</h4> |
|
424 <b>on_reloadAllButton_clicked</b>(<i></i>) |
|
425 |
|
426 <p> |
|
427 Private slot to reload all feeds. |
|
428 </p> |
|
429 <a NAME="FeedsManager.on_reloadButton_clicked" ID="FeedsManager.on_reloadButton_clicked"></a> |
|
430 <h4>FeedsManager.on_reloadButton_clicked</h4> |
|
431 <b>on_reloadButton_clicked</b>(<i></i>) |
|
432 |
|
433 <p> |
|
434 Private slot to reload the selected feed. |
|
435 </p> |
|
436 <a NAME="FeedsManager.show" ID="FeedsManager.show"></a> |
|
437 <h4>FeedsManager.show</h4> |
|
438 <b>show</b>(<i></i>) |
|
439 |
|
440 <p> |
|
441 Public slot to show the feeds manager dialog. |
|
442 </p> |
|
443 <div align="right"><a href="#top">Up</a></div> |
|
444 <hr /> |
|
445 </body></html> |