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