|
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>eric5.Helpviewer.SpeedDial.SpeedDial</title> |
|
6 <style> |
|
7 body { |
|
8 background: #EDECE6; |
|
9 margin: 0em 1em 10em 1em; |
|
10 color: black; |
|
11 } |
|
12 |
|
13 h1 { color: white; background: #85774A; } |
|
14 h2 { color: white; background: #85774A; } |
|
15 h3 { color: white; background: #9D936E; } |
|
16 h4 { color: white; background: #9D936E; } |
|
17 |
|
18 a { color: #BA6D36; } |
|
19 |
|
20 </style> |
|
21 </head> |
|
22 <body><a NAME="top" ID="top"></a> |
|
23 <h1>eric5.Helpviewer.SpeedDial.SpeedDial</h1> |
|
24 <p> |
|
25 Module implementing the speed dial. |
|
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="#Page">Page</a></td> |
|
35 <td>Class to hold the data for a speed dial page.</td> |
|
36 </tr><tr> |
|
37 <td><a href="#SpeedDial">SpeedDial</a></td> |
|
38 <td>Class implementing the speed dial.</td> |
|
39 </tr> |
|
40 </table> |
|
41 <h3>Functions</h3> |
|
42 <table> |
|
43 <tr><td>None</td></tr> |
|
44 </table> |
|
45 <hr /><hr /> |
|
46 <a NAME="Page" ID="Page"></a> |
|
47 <h2>Page</h2> |
|
48 <p> |
|
49 Class to hold the data for a speed dial page. |
|
50 </p> |
|
51 <h3>Derived from</h3> |
|
52 object |
|
53 <h3>Class Attributes</h3> |
|
54 <table> |
|
55 <tr><td>None</td></tr> |
|
56 </table> |
|
57 <h3>Class Methods</h3> |
|
58 <table> |
|
59 <tr><td>None</td></tr> |
|
60 </table> |
|
61 <h3>Methods</h3> |
|
62 <table> |
|
63 <tr> |
|
64 <td><a href="#Page.__init__">Page</a></td> |
|
65 <td>Constructor</td> |
|
66 </tr><tr> |
|
67 <td><a href="#Page.__eq__">__eq__</a></td> |
|
68 <td>Public method implementing the equality operator.</td> |
|
69 </tr> |
|
70 </table> |
|
71 <h3>Static Methods</h3> |
|
72 <table> |
|
73 <tr><td>None</td></tr> |
|
74 </table> |
|
75 <a NAME="Page.__init__" ID="Page.__init__"></a> |
|
76 <h4>Page (Constructor)</h4> |
|
77 <b>Page</b>(<i>url="", title="", broken=False</i>) |
|
78 <p> |
|
79 Constructor |
|
80 </p><dl> |
|
81 <dt><i>url</i></dt> |
|
82 <dd> |
|
83 URL of the page (string) |
|
84 </dd><dt><i>title</i></dt> |
|
85 <dd> |
|
86 title of the page (string) |
|
87 </dd> |
|
88 </dl><a NAME="Page.__eq__" ID="Page.__eq__"></a> |
|
89 <h4>Page.__eq__</h4> |
|
90 <b>__eq__</b>(<i>other</i>) |
|
91 <p> |
|
92 Public method implementing the equality operator. |
|
93 </p><dl> |
|
94 <dt><i>other</i></dt> |
|
95 <dd> |
|
96 reference to the other page object (Page) |
|
97 </dd> |
|
98 </dl><dl> |
|
99 <dt>Returns:</dt> |
|
100 <dd> |
|
101 flag indicating equality (boolean) |
|
102 </dd> |
|
103 </dl> |
|
104 <div align="right"><a href="#top">Up</a></div> |
|
105 <hr /><hr /> |
|
106 <a NAME="SpeedDial" ID="SpeedDial"></a> |
|
107 <h2>SpeedDial</h2> |
|
108 <p> |
|
109 Class implementing the speed dial. |
|
110 </p><h3>Signals</h3> |
|
111 <dl> |
|
112 <dt>pagesChanged()</dt> |
|
113 <dd> |
|
114 emitted after the list of pages changed |
|
115 </dd> |
|
116 </dl> |
|
117 <h3>Derived from</h3> |
|
118 QObject |
|
119 <h3>Class Attributes</h3> |
|
120 <table> |
|
121 <tr><td>None</td></tr> |
|
122 </table> |
|
123 <h3>Class Methods</h3> |
|
124 <table> |
|
125 <tr><td>None</td></tr> |
|
126 </table> |
|
127 <h3>Methods</h3> |
|
128 <table> |
|
129 <tr> |
|
130 <td><a href="#SpeedDial.__init__">SpeedDial</a></td> |
|
131 <td>Constructor</td> |
|
132 </tr><tr> |
|
133 <td><a href="#SpeedDial.__cleanFrames">__cleanFrames</a></td> |
|
134 <td>Private method to clean all frames.</td> |
|
135 </tr><tr> |
|
136 <td><a href="#SpeedDial.__generateAllPages">__generateAllPages</a></td> |
|
137 <td>Private method to generate s string with all pages managed by the speed dial.</td> |
|
138 </tr><tr> |
|
139 <td><a href="#SpeedDial.__imageFileName">__imageFileName</a></td> |
|
140 <td>Private method to generate the image file name for a URL.</td> |
|
141 </tr><tr> |
|
142 <td><a href="#SpeedDial.__initialize">__initialize</a></td> |
|
143 <td>Private method to initialize the speed dial.</td> |
|
144 </tr><tr> |
|
145 <td><a href="#SpeedDial.__pagesChanged">__pagesChanged</a></td> |
|
146 <td>Private slot to react on a change of the pages configuration.</td> |
|
147 </tr><tr> |
|
148 <td><a href="#SpeedDial.__thumbnailCreated">__thumbnailCreated</a></td> |
|
149 <td>Private slot to handle the creation of a thumbnail image.</td> |
|
150 </tr><tr> |
|
151 <td><a href="#SpeedDial.addPage">addPage</a></td> |
|
152 <td>Public method to add a page for the given data.</td> |
|
153 </tr><tr> |
|
154 <td><a href="#SpeedDial.addWebFrame">addWebFrame</a></td> |
|
155 <td>Public method to add a web frame.</td> |
|
156 </tr><tr> |
|
157 <td><a href="#SpeedDial.changed">changed</a></td> |
|
158 <td>Public slot to react on changed pages.</td> |
|
159 </tr><tr> |
|
160 <td><a href="#SpeedDial.initialScript">initialScript</a></td> |
|
161 <td>Public method to get the 'initial' JavaScript script.</td> |
|
162 </tr><tr> |
|
163 <td><a href="#SpeedDial.loadThumbnail">loadThumbnail</a></td> |
|
164 <td>Public slot to load a thumbnail of the given URL.</td> |
|
165 </tr><tr> |
|
166 <td><a href="#SpeedDial.pageForUrl">pageForUrl</a></td> |
|
167 <td>Public method to get the page for the given URL.</td> |
|
168 </tr><tr> |
|
169 <td><a href="#SpeedDial.pagesInRow">pagesInRow</a></td> |
|
170 <td>Public method to get the number of dials per row.</td> |
|
171 </tr><tr> |
|
172 <td><a href="#SpeedDial.removeImageForUrl">removeImageForUrl</a></td> |
|
173 <td>Public slot to remove the image for a URL.</td> |
|
174 </tr><tr> |
|
175 <td><a href="#SpeedDial.removePage">removePage</a></td> |
|
176 <td>Public method to remove a page.</td> |
|
177 </tr><tr> |
|
178 <td><a href="#SpeedDial.sdSize">sdSize</a></td> |
|
179 <td>Public method to get the speed dial size.</td> |
|
180 </tr><tr> |
|
181 <td><a href="#SpeedDial.setPagesInRow">setPagesInRow</a></td> |
|
182 <td>Public slot to set the number of pages per row.</td> |
|
183 </tr><tr> |
|
184 <td><a href="#SpeedDial.setSdSize">setSdSize</a></td> |
|
185 <td>Public slot to set the size of the speed dial.</td> |
|
186 </tr><tr> |
|
187 <td><a href="#SpeedDial.urlForShortcut">urlForShortcut</a></td> |
|
188 <td>Public method to get the URL for the given shortcut key.</td> |
|
189 </tr><tr> |
|
190 <td><a href="#SpeedDial.urlFromUserInput">urlFromUserInput</a></td> |
|
191 <td>Public slot to get the URL from user input.</td> |
|
192 </tr> |
|
193 </table> |
|
194 <h3>Static Methods</h3> |
|
195 <table> |
|
196 <tr><td>None</td></tr> |
|
197 </table> |
|
198 <a NAME="SpeedDial.__init__" ID="SpeedDial.__init__"></a> |
|
199 <h4>SpeedDial (Constructor)</h4> |
|
200 <b>SpeedDial</b>(<i>parent=None</i>) |
|
201 <p> |
|
202 Constructor |
|
203 </p><dl> |
|
204 <dt><i>parent</i></dt> |
|
205 <dd> |
|
206 reference to the parent object (QObject) |
|
207 </dd> |
|
208 </dl><a NAME="SpeedDial.__cleanFrames" ID="SpeedDial.__cleanFrames"></a> |
|
209 <h4>SpeedDial.__cleanFrames</h4> |
|
210 <b>__cleanFrames</b>(<i></i>) |
|
211 <p> |
|
212 Private method to clean all frames. |
|
213 </p><dl> |
|
214 <dt>Returns:</dt> |
|
215 <dd> |
|
216 list of speed dial frames (list of QWebFrame) |
|
217 </dd> |
|
218 </dl><a NAME="SpeedDial.__generateAllPages" ID="SpeedDial.__generateAllPages"></a> |
|
219 <h4>SpeedDial.__generateAllPages</h4> |
|
220 <b>__generateAllPages</b>(<i></i>) |
|
221 <p> |
|
222 Private method to generate s string with all pages managed by the speed dial. |
|
223 </p><dl> |
|
224 <dt>Returns:</dt> |
|
225 <dd> |
|
226 string with all pages (string) |
|
227 </dd> |
|
228 </dl><a NAME="SpeedDial.__imageFileName" ID="SpeedDial.__imageFileName"></a> |
|
229 <h4>SpeedDial.__imageFileName</h4> |
|
230 <b>__imageFileName</b>(<i>url</i>) |
|
231 <p> |
|
232 Private method to generate the image file name for a URL. |
|
233 </p><dl> |
|
234 <dt><i>url</i></dt> |
|
235 <dd> |
|
236 URL to generate the file name from (string) |
|
237 </dd> |
|
238 </dl><dl> |
|
239 <dt>Returns:</dt> |
|
240 <dd> |
|
241 name of the image file (string) |
|
242 </dd> |
|
243 </dl><a NAME="SpeedDial.__initialize" ID="SpeedDial.__initialize"></a> |
|
244 <h4>SpeedDial.__initialize</h4> |
|
245 <b>__initialize</b>(<i></i>) |
|
246 <p> |
|
247 Private method to initialize the speed dial. |
|
248 </p><a NAME="SpeedDial.__pagesChanged" ID="SpeedDial.__pagesChanged"></a> |
|
249 <h4>SpeedDial.__pagesChanged</h4> |
|
250 <b>__pagesChanged</b>(<i></i>) |
|
251 <p> |
|
252 Private slot to react on a change of the pages configuration. |
|
253 </p><a NAME="SpeedDial.__thumbnailCreated" ID="SpeedDial.__thumbnailCreated"></a> |
|
254 <h4>SpeedDial.__thumbnailCreated</h4> |
|
255 <b>__thumbnailCreated</b>(<i>image</i>) |
|
256 <p> |
|
257 Private slot to handle the creation of a thumbnail image. |
|
258 </p><dl> |
|
259 <dt><i>image</i></dt> |
|
260 <dd> |
|
261 thumbnail image (QPixmap) |
|
262 </dd> |
|
263 </dl><a NAME="SpeedDial.addPage" ID="SpeedDial.addPage"></a> |
|
264 <h4>SpeedDial.addPage</h4> |
|
265 <b>addPage</b>(<i>url, title</i>) |
|
266 <p> |
|
267 Public method to add a page for the given data. |
|
268 </p><dl> |
|
269 <dt><i>url</i></dt> |
|
270 <dd> |
|
271 URL of the page (QUrl) |
|
272 </dd><dt><i>title</i></dt> |
|
273 <dd> |
|
274 title of the page (string) |
|
275 </dd> |
|
276 </dl><a NAME="SpeedDial.addWebFrame" ID="SpeedDial.addWebFrame"></a> |
|
277 <h4>SpeedDial.addWebFrame</h4> |
|
278 <b>addWebFrame</b>(<i>frame</i>) |
|
279 <p> |
|
280 Public method to add a web frame. |
|
281 </p><dl> |
|
282 <dt><i>frame</i></dt> |
|
283 <dd> |
|
284 reference to the frame to be added (QWebFrame) |
|
285 </dd> |
|
286 </dl><a NAME="SpeedDial.changed" ID="SpeedDial.changed"></a> |
|
287 <h4>SpeedDial.changed</h4> |
|
288 <b>changed</b>(<i>allPages</i>) |
|
289 <p> |
|
290 Public slot to react on changed pages. |
|
291 </p><dl> |
|
292 <dt><i>allPages</i></dt> |
|
293 <dd> |
|
294 string giving all pages (string) |
|
295 </dd> |
|
296 </dl><a NAME="SpeedDial.initialScript" ID="SpeedDial.initialScript"></a> |
|
297 <h4>SpeedDial.initialScript</h4> |
|
298 <b>initialScript</b>(<i></i>) |
|
299 <p> |
|
300 Public method to get the 'initial' JavaScript script. |
|
301 </p><dl> |
|
302 <dt>Returns:</dt> |
|
303 <dd> |
|
304 initial JavaScript script (string) |
|
305 </dd> |
|
306 </dl><a NAME="SpeedDial.loadThumbnail" ID="SpeedDial.loadThumbnail"></a> |
|
307 <h4>SpeedDial.loadThumbnail</h4> |
|
308 <b>loadThumbnail</b>(<i>url, loadTitle=False</i>) |
|
309 <p> |
|
310 Public slot to load a thumbnail of the given URL. |
|
311 </p><dl> |
|
312 <dt><i>url</i></dt> |
|
313 <dd> |
|
314 URL of the thumbnail (string) |
|
315 </dd><dt><i>loadTitle</i></dt> |
|
316 <dd> |
|
317 flag indicating to get the title for the thumbnail |
|
318 from the site (boolean) |
|
319 </dd> |
|
320 </dl><a NAME="SpeedDial.pageForUrl" ID="SpeedDial.pageForUrl"></a> |
|
321 <h4>SpeedDial.pageForUrl</h4> |
|
322 <b>pageForUrl</b>(<i>url</i>) |
|
323 <p> |
|
324 Public method to get the page for the given URL. |
|
325 </p><dl> |
|
326 <dt><i>url</i></dt> |
|
327 <dd> |
|
328 URL to be searched for (QUrl) |
|
329 </dd> |
|
330 </dl><dl> |
|
331 <dt>Returns:</dt> |
|
332 <dd> |
|
333 page for the URL (Page) |
|
334 </dd> |
|
335 </dl><a NAME="SpeedDial.pagesInRow" ID="SpeedDial.pagesInRow"></a> |
|
336 <h4>SpeedDial.pagesInRow</h4> |
|
337 <b>pagesInRow</b>(<i></i>) |
|
338 <p> |
|
339 Public method to get the number of dials per row. |
|
340 </p><dl> |
|
341 <dt>Returns:</dt> |
|
342 <dd> |
|
343 number of dials per row (integer) |
|
344 </dd> |
|
345 </dl><a NAME="SpeedDial.removeImageForUrl" ID="SpeedDial.removeImageForUrl"></a> |
|
346 <h4>SpeedDial.removeImageForUrl</h4> |
|
347 <b>removeImageForUrl</b>(<i>url</i>) |
|
348 <p> |
|
349 Public slot to remove the image for a URL. |
|
350 </p><dl> |
|
351 <dt><i>url</i></dt> |
|
352 <dd> |
|
353 URL to remove the image for (string) |
|
354 </dd> |
|
355 </dl><a NAME="SpeedDial.removePage" ID="SpeedDial.removePage"></a> |
|
356 <h4>SpeedDial.removePage</h4> |
|
357 <b>removePage</b>(<i>url</i>) |
|
358 <p> |
|
359 Public method to remove a page. |
|
360 </p><dl> |
|
361 <dt><i>url</i></dt> |
|
362 <dd> |
|
363 URL of the page (QUrl) |
|
364 </dd> |
|
365 </dl><a NAME="SpeedDial.sdSize" ID="SpeedDial.sdSize"></a> |
|
366 <h4>SpeedDial.sdSize</h4> |
|
367 <b>sdSize</b>(<i></i>) |
|
368 <p> |
|
369 Public method to get the speed dial size. |
|
370 </p><dl> |
|
371 <dt>Returns:</dt> |
|
372 <dd> |
|
373 speed dial size (integer) |
|
374 </dd> |
|
375 </dl><a NAME="SpeedDial.setPagesInRow" ID="SpeedDial.setPagesInRow"></a> |
|
376 <h4>SpeedDial.setPagesInRow</h4> |
|
377 <b>setPagesInRow</b>(<i>count</i>) |
|
378 <p> |
|
379 Public slot to set the number of pages per row. |
|
380 </p><dl> |
|
381 <dt><i>count</i></dt> |
|
382 <dd> |
|
383 number of pages per row (integer) |
|
384 </dd> |
|
385 </dl><a NAME="SpeedDial.setSdSize" ID="SpeedDial.setSdSize"></a> |
|
386 <h4>SpeedDial.setSdSize</h4> |
|
387 <b>setSdSize</b>(<i>size</i>) |
|
388 <p> |
|
389 Public slot to set the size of the speed dial. |
|
390 </p><dl> |
|
391 <dt><i>size</i></dt> |
|
392 <dd> |
|
393 size of the speed dial (integer) |
|
394 </dd> |
|
395 </dl><a NAME="SpeedDial.urlForShortcut" ID="SpeedDial.urlForShortcut"></a> |
|
396 <h4>SpeedDial.urlForShortcut</h4> |
|
397 <b>urlForShortcut</b>(<i>key</i>) |
|
398 <p> |
|
399 Public method to get the URL for the given shortcut key. |
|
400 </p><dl> |
|
401 <dt><i>key</i></dt> |
|
402 <dd> |
|
403 shortcut key (integer) |
|
404 </dd> |
|
405 </dl><dl> |
|
406 <dt>Returns:</dt> |
|
407 <dd> |
|
408 URL for the key (QUrl) |
|
409 </dd> |
|
410 </dl><a NAME="SpeedDial.urlFromUserInput" ID="SpeedDial.urlFromUserInput"></a> |
|
411 <h4>SpeedDial.urlFromUserInput</h4> |
|
412 <b>urlFromUserInput</b>(<i>url</i>) |
|
413 <p> |
|
414 Public slot to get the URL from user input. |
|
415 </p><dl> |
|
416 <dt><i>url</i></dt> |
|
417 <dd> |
|
418 URL entered by the user (string) |
|
419 </dd> |
|
420 </dl><dl> |
|
421 <dt>Returns:</dt> |
|
422 <dd> |
|
423 sanitized URL (string) |
|
424 </dd> |
|
425 </dl> |
|
426 <div align="right"><a href="#top">Up</a></div> |
|
427 <hr /> |
|
428 </body></html> |