5 <link rel="stylesheet" href="styles.css"> |
5 <link rel="stylesheet" href="styles.css"> |
6 </head> |
6 </head> |
7 <body> |
7 <body> |
8 <a NAME="top" ID="top"></a> |
8 <a NAME="top" ID="top"></a> |
9 <h1>eric7.UI.CodeDocumentationViewer</h1> |
9 <h1>eric7.UI.CodeDocumentationViewer</h1> |
10 |
|
11 <p> |
10 <p> |
12 Module implementing a widget to show some source code information provided by |
11 Module implementing a widget to show some source code information provided by |
13 plug-ins. |
12 plug-ins. |
14 </p> |
13 </p> |
|
14 |
15 <h3>Global Attributes</h3> |
15 <h3>Global Attributes</h3> |
16 |
16 <table> |
17 <table> |
17 <tr><td>None</td></tr> |
18 <tr><td>None</td></tr> |
18 </table> |
19 </table> |
19 |
20 <h3>Classes</h3> |
20 <h3>Classes</h3> |
21 |
21 <table> |
22 <table> |
|
23 |
|
24 <tr> |
22 <tr> |
25 <td><a href="#CodeDocumentationViewer">CodeDocumentationViewer</a></td> |
23 <td><a href="#CodeDocumentationViewer">CodeDocumentationViewer</a></td> |
26 <td>Class implementing a widget to show some source code information provided by plug-ins.</td> |
24 <td>Class implementing a widget to show some source code information provided by plug-ins.</td> |
27 </tr> |
25 </tr> |
28 <tr> |
26 <tr> |
29 <td><a href="#DocumentationViewerWidget">DocumentationViewerWidget</a></td> |
27 <td><a href="#DocumentationViewerWidget">DocumentationViewerWidget</a></td> |
30 <td>Class implementing a rich text documentation viewer.</td> |
28 <td>Class implementing a rich text documentation viewer.</td> |
31 </tr> |
29 </tr> |
32 </table> |
30 </table> |
|
31 |
33 <h3>Functions</h3> |
32 <h3>Functions</h3> |
34 |
33 <table> |
35 <table> |
34 <tr><td>None</td></tr> |
36 <tr><td>None</td></tr> |
35 </table> |
37 </table> |
36 |
38 <hr /> |
37 <hr /> |
39 <hr /> |
38 <hr /> |
40 <a NAME="CodeDocumentationViewer" ID="CodeDocumentationViewer"></a> |
39 <a NAME="CodeDocumentationViewer" ID="CodeDocumentationViewer"></a> |
41 <h2>CodeDocumentationViewer</h2> |
40 <h2>CodeDocumentationViewer</h2> |
42 |
|
43 <p> |
41 <p> |
44 Class implementing a widget to show some source code information provided |
42 Class implementing a widget to show some source code information provided |
45 by plug-ins. |
43 by plug-ins. |
46 </p> |
44 </p> |
|
45 |
47 <h3>Signals</h3> |
46 <h3>Signals</h3> |
48 <dl> |
47 <dl> |
49 |
48 |
50 <dt>providerAdded()</dt> |
49 <dt>providerAdded()</dt> |
51 <dd> |
50 <dd> |
136 <tr> |
133 <tr> |
137 <td><a href="#CodeDocumentationViewer.unregisterProvider">unregisterProvider</a></td> |
134 <td><a href="#CodeDocumentationViewer.unregisterProvider">unregisterProvider</a></td> |
138 <td>Public method register a source docu provider.</td> |
135 <td>Public method register a source docu provider.</td> |
139 </tr> |
136 </tr> |
140 </table> |
137 </table> |
|
138 |
141 <h3>Static Methods</h3> |
139 <h3>Static Methods</h3> |
142 |
140 <table> |
143 <table> |
141 <tr><td>None</td></tr> |
144 <tr><td>None</td></tr> |
142 </table> |
145 </table> |
143 |
146 |
144 |
147 <a NAME="CodeDocumentationViewer.__init__" ID="CodeDocumentationViewer.__init__"></a> |
145 <a NAME="CodeDocumentationViewer.__init__" ID="CodeDocumentationViewer.__init__"></a> |
148 <h4>CodeDocumentationViewer (Constructor)</h4> |
146 <h4>CodeDocumentationViewer (Constructor)</h4> |
149 <b>CodeDocumentationViewer</b>(<i>parent=None</i>) |
147 <b>CodeDocumentationViewer</b>(<i>parent=None</i>) |
150 |
|
151 <p> |
148 <p> |
152 Constructor |
149 Constructor |
153 </p> |
150 </p> |
|
151 |
154 <dl> |
152 <dl> |
155 |
153 |
156 <dt><i>parent</i> (QWidget)</dt> |
154 <dt><i>parent</i> (QWidget)</dt> |
157 <dd> |
155 <dd> |
158 reference to the parent widget |
156 reference to the parent widget |
159 </dd> |
157 </dd> |
160 </dl> |
158 </dl> |
161 <a NAME="CodeDocumentationViewer.__selectProvider" ID="CodeDocumentationViewer.__selectProvider"></a> |
159 <a NAME="CodeDocumentationViewer.__selectProvider" ID="CodeDocumentationViewer.__selectProvider"></a> |
162 <h4>CodeDocumentationViewer.__selectProvider</h4> |
160 <h4>CodeDocumentationViewer.__selectProvider</h4> |
163 <b>__selectProvider</b>(<i>provider</i>) |
161 <b>__selectProvider</b>(<i>provider</i>) |
164 |
|
165 <p> |
162 <p> |
166 Private method to select a provider programmatically. |
163 Private method to select a provider programmatically. |
167 </p> |
164 </p> |
|
165 |
168 <dl> |
166 <dl> |
169 |
167 |
170 <dt><i>provider</i> (str)</dt> |
168 <dt><i>provider</i> (str)</dt> |
171 <dd> |
169 <dd> |
172 name of the provider to be selected |
170 name of the provider to be selected |
173 </dd> |
171 </dd> |
174 </dl> |
172 </dl> |
175 <a NAME="CodeDocumentationViewer.__setupUi" ID="CodeDocumentationViewer.__setupUi"></a> |
173 <a NAME="CodeDocumentationViewer.__setupUi" ID="CodeDocumentationViewer.__setupUi"></a> |
176 <h4>CodeDocumentationViewer.__setupUi</h4> |
174 <h4>CodeDocumentationViewer.__setupUi</h4> |
177 <b>__setupUi</b>(<i></i>) |
175 <b>__setupUi</b>(<i></i>) |
178 |
|
179 <p> |
176 <p> |
180 Private method to generate the UI layout. |
177 Private method to generate the UI layout. |
181 </p> |
178 </p> |
|
179 |
182 <a NAME="CodeDocumentationViewer.__showDisabledMessage" ID="CodeDocumentationViewer.__showDisabledMessage"></a> |
180 <a NAME="CodeDocumentationViewer.__showDisabledMessage" ID="CodeDocumentationViewer.__showDisabledMessage"></a> |
183 <h4>CodeDocumentationViewer.__showDisabledMessage</h4> |
181 <h4>CodeDocumentationViewer.__showDisabledMessage</h4> |
184 <b>__showDisabledMessage</b>(<i></i>) |
182 <b>__showDisabledMessage</b>(<i></i>) |
185 |
|
186 <p> |
183 <p> |
187 Private method to show a message giving the reason for being disabled. |
184 Private method to show a message giving the reason for being disabled. |
188 </p> |
185 </p> |
|
186 |
189 <a NAME="CodeDocumentationViewer.__unregisterTimerTimeout" ID="CodeDocumentationViewer.__unregisterTimerTimeout"></a> |
187 <a NAME="CodeDocumentationViewer.__unregisterTimerTimeout" ID="CodeDocumentationViewer.__unregisterTimerTimeout"></a> |
190 <h4>CodeDocumentationViewer.__unregisterTimerTimeout</h4> |
188 <h4>CodeDocumentationViewer.__unregisterTimerTimeout</h4> |
191 <b>__unregisterTimerTimeout</b>(<i></i>) |
189 <b>__unregisterTimerTimeout</b>(<i></i>) |
192 |
|
193 <p> |
190 <p> |
194 Private slot handling the timeout signal of the unregister timer. |
191 Private slot handling the timeout signal of the unregister timer. |
195 </p> |
192 </p> |
|
193 |
196 <a NAME="CodeDocumentationViewer.documentationReady" ID="CodeDocumentationViewer.documentationReady"></a> |
194 <a NAME="CodeDocumentationViewer.documentationReady" ID="CodeDocumentationViewer.documentationReady"></a> |
197 <h4>CodeDocumentationViewer.documentationReady</h4> |
195 <h4>CodeDocumentationViewer.documentationReady</h4> |
198 <b>documentationReady</b>(<i>documentationInfo, isWarning=False, isDocWarning=False</i>) |
196 <b>documentationReady</b>(<i>documentationInfo, isWarning=False, isDocWarning=False</i>) |
199 |
|
200 <p> |
197 <p> |
201 Public method to provide the documentation info to the viewer. |
198 Public method to provide the documentation info to the viewer. |
202 </p> |
199 </p> |
203 <p> |
200 <p> |
204 If documentationInfo is a dictionary, it should contain these |
201 If documentationInfo is a dictionary, it should contain these |
228 </dd> |
226 </dd> |
229 </dl> |
227 </dl> |
230 <a NAME="CodeDocumentationViewer.finalizeSetup" ID="CodeDocumentationViewer.finalizeSetup"></a> |
228 <a NAME="CodeDocumentationViewer.finalizeSetup" ID="CodeDocumentationViewer.finalizeSetup"></a> |
231 <h4>CodeDocumentationViewer.finalizeSetup</h4> |
229 <h4>CodeDocumentationViewer.finalizeSetup</h4> |
232 <b>finalizeSetup</b>(<i></i>) |
230 <b>finalizeSetup</b>(<i></i>) |
233 |
|
234 <p> |
231 <p> |
235 Public method to finalize the setup of the documentation viewer. |
232 Public method to finalize the setup of the documentation viewer. |
236 </p> |
233 </p> |
|
234 |
237 <a NAME="CodeDocumentationViewer.getProviders" ID="CodeDocumentationViewer.getProviders"></a> |
235 <a NAME="CodeDocumentationViewer.getProviders" ID="CodeDocumentationViewer.getProviders"></a> |
238 <h4>CodeDocumentationViewer.getProviders</h4> |
236 <h4>CodeDocumentationViewer.getProviders</h4> |
239 <b>getProviders</b>(<i></i>) |
237 <b>getProviders</b>(<i></i>) |
240 |
|
241 <p> |
238 <p> |
242 Public method to get a list of providers and their visible strings. |
239 Public method to get a list of providers and their visible strings. |
243 </p> |
240 </p> |
|
241 |
244 <dl> |
242 <dl> |
245 <dt>Return:</dt> |
243 <dt>Return:</dt> |
246 <dd> |
244 <dd> |
247 list containing the providers and their visible strings |
245 list containing the providers and their visible strings |
248 </dd> |
246 </dd> |
300 </dd> |
298 </dd> |
301 </dl> |
299 </dl> |
302 <a NAME="CodeDocumentationViewer.on_providerComboBox_currentIndexChanged" ID="CodeDocumentationViewer.on_providerComboBox_currentIndexChanged"></a> |
300 <a NAME="CodeDocumentationViewer.on_providerComboBox_currentIndexChanged" ID="CodeDocumentationViewer.on_providerComboBox_currentIndexChanged"></a> |
303 <h4>CodeDocumentationViewer.on_providerComboBox_currentIndexChanged</h4> |
301 <h4>CodeDocumentationViewer.on_providerComboBox_currentIndexChanged</h4> |
304 <b>on_providerComboBox_currentIndexChanged</b>(<i>index</i>) |
302 <b>on_providerComboBox_currentIndexChanged</b>(<i>index</i>) |
305 |
|
306 <p> |
303 <p> |
307 Private slot to handle the selection of a provider. |
304 Private slot to handle the selection of a provider. |
308 </p> |
305 </p> |
|
306 |
309 <dl> |
307 <dl> |
310 |
308 |
311 <dt><i>index</i> (int)</dt> |
309 <dt><i>index</i> (int)</dt> |
312 <dd> |
310 <dd> |
313 index of the selected provider |
311 index of the selected provider |
314 </dd> |
312 </dd> |
315 </dl> |
313 </dl> |
316 <a NAME="CodeDocumentationViewer.preferencesChanged" ID="CodeDocumentationViewer.preferencesChanged"></a> |
314 <a NAME="CodeDocumentationViewer.preferencesChanged" ID="CodeDocumentationViewer.preferencesChanged"></a> |
317 <h4>CodeDocumentationViewer.preferencesChanged</h4> |
315 <h4>CodeDocumentationViewer.preferencesChanged</h4> |
318 <b>preferencesChanged</b>(<i></i>) |
316 <b>preferencesChanged</b>(<i></i>) |
319 |
|
320 <p> |
317 <p> |
321 Public slot to handle a change of preferences. |
318 Public slot to handle a change of preferences. |
322 </p> |
319 </p> |
|
320 |
323 <a NAME="CodeDocumentationViewer.registerProvider" ID="CodeDocumentationViewer.registerProvider"></a> |
321 <a NAME="CodeDocumentationViewer.registerProvider" ID="CodeDocumentationViewer.registerProvider"></a> |
324 <h4>CodeDocumentationViewer.registerProvider</h4> |
322 <h4>CodeDocumentationViewer.registerProvider</h4> |
325 <b>registerProvider</b>(<i>providerName, providerDisplay, provider, supported</i>) |
323 <b>registerProvider</b>(<i>providerName, providerDisplay, provider, supported</i>) |
326 |
|
327 <p> |
324 <p> |
328 Public method register a source docu provider. |
325 Public method register a source docu provider. |
329 </p> |
326 </p> |
|
327 |
330 <dl> |
328 <dl> |
331 |
329 |
332 <dt><i>providerName</i> (str)</dt> |
330 <dt><i>providerName</i> (str)</dt> |
333 <dd> |
331 <dd> |
334 name of the provider (must be unique) |
332 name of the provider (must be unique) |
356 </dd> |
354 </dd> |
357 </dl> |
355 </dl> |
358 <a NAME="CodeDocumentationViewer.showInfo" ID="CodeDocumentationViewer.showInfo"></a> |
356 <a NAME="CodeDocumentationViewer.showInfo" ID="CodeDocumentationViewer.showInfo"></a> |
359 <h4>CodeDocumentationViewer.showInfo</h4> |
357 <h4>CodeDocumentationViewer.showInfo</h4> |
360 <b>showInfo</b>(<i>editor</i>) |
358 <b>showInfo</b>(<i>editor</i>) |
361 |
|
362 <p> |
359 <p> |
363 Public method to request code documentation data from a provider. |
360 Public method to request code documentation data from a provider. |
364 </p> |
361 </p> |
|
362 |
365 <dl> |
363 <dl> |
366 |
364 |
367 <dt><i>editor</i> (Editor)</dt> |
365 <dt><i>editor</i> (Editor)</dt> |
368 <dd> |
366 <dd> |
369 reference to the editor to request code docu for |
367 reference to the editor to request code docu for |
370 </dd> |
368 </dd> |
371 </dl> |
369 </dl> |
372 <a NAME="CodeDocumentationViewer.shutdown" ID="CodeDocumentationViewer.shutdown"></a> |
370 <a NAME="CodeDocumentationViewer.shutdown" ID="CodeDocumentationViewer.shutdown"></a> |
373 <h4>CodeDocumentationViewer.shutdown</h4> |
371 <h4>CodeDocumentationViewer.shutdown</h4> |
374 <b>shutdown</b>(<i></i>) |
372 <b>shutdown</b>(<i></i>) |
375 |
|
376 <p> |
373 <p> |
377 Public method to perform shutdown actions. |
374 Public method to perform shutdown actions. |
378 </p> |
375 </p> |
|
376 |
379 <a NAME="CodeDocumentationViewer.unregisterProvider" ID="CodeDocumentationViewer.unregisterProvider"></a> |
377 <a NAME="CodeDocumentationViewer.unregisterProvider" ID="CodeDocumentationViewer.unregisterProvider"></a> |
380 <h4>CodeDocumentationViewer.unregisterProvider</h4> |
378 <h4>CodeDocumentationViewer.unregisterProvider</h4> |
381 <b>unregisterProvider</b>(<i>providerName</i>) |
379 <b>unregisterProvider</b>(<i>providerName</i>) |
382 |
|
383 <p> |
380 <p> |
384 Public method register a source docu provider. |
381 Public method register a source docu provider. |
385 </p> |
382 </p> |
|
383 |
386 <dl> |
384 <dl> |
387 |
385 |
388 <dt><i>providerName</i> (str)</dt> |
386 <dt><i>providerName</i> (str)</dt> |
389 <dd> |
387 <dd> |
390 name of the provider (must be unique) |
388 name of the provider (must be unique) |
393 <div align="right"><a href="#top">Up</a></div> |
391 <div align="right"><a href="#top">Up</a></div> |
394 <hr /> |
392 <hr /> |
395 <hr /> |
393 <hr /> |
396 <a NAME="DocumentationViewerWidget" ID="DocumentationViewerWidget"></a> |
394 <a NAME="DocumentationViewerWidget" ID="DocumentationViewerWidget"></a> |
397 <h2>DocumentationViewerWidget</h2> |
395 <h2>DocumentationViewerWidget</h2> |
398 |
|
399 <p> |
396 <p> |
400 Class implementing a rich text documentation viewer. |
397 Class implementing a rich text documentation viewer. |
401 </p> |
398 </p> |
|
399 |
402 <h3>Derived from</h3> |
400 <h3>Derived from</h3> |
403 QWidget |
401 QWidget |
404 <h3>Class Attributes</h3> |
402 <h3>Class Attributes</h3> |
405 |
403 <table> |
406 <table> |
404 <tr><td>EmpytDocument_Dark</td></tr> |
407 <tr><td>EmpytDocument_Dark</td></tr><tr><td>EmpytDocument_Light</td></tr> |
405 <tr><td>EmpytDocument_Light</td></tr> |
408 </table> |
406 </table> |
|
407 |
409 <h3>Class Methods</h3> |
408 <h3>Class Methods</h3> |
410 |
409 <table> |
411 <table> |
410 <tr><td>None</td></tr> |
412 <tr><td>None</td></tr> |
411 </table> |
413 </table> |
412 |
414 <h3>Methods</h3> |
413 <h3>Methods</h3> |
415 |
414 <table> |
416 <table> |
|
417 |
|
418 <tr> |
415 <tr> |
419 <td><a href="#DocumentationViewerWidget.__init__">DocumentationViewerWidget</a></td> |
416 <td><a href="#DocumentationViewerWidget.__init__">DocumentationViewerWidget</a></td> |
420 <td>Constructor</td> |
417 <td>Constructor</td> |
421 </tr> |
418 </tr> |
422 <tr> |
419 <tr> |
430 <tr> |
427 <tr> |
431 <td><a href="#DocumentationViewerWidget.setHtml">setHtml</a></td> |
428 <td><a href="#DocumentationViewerWidget.setHtml">setHtml</a></td> |
432 <td>Public method to set the HTML text of the widget.</td> |
429 <td>Public method to set the HTML text of the widget.</td> |
433 </tr> |
430 </tr> |
434 </table> |
431 </table> |
|
432 |
435 <h3>Static Methods</h3> |
433 <h3>Static Methods</h3> |
436 |
434 <table> |
437 <table> |
435 <tr><td>None</td></tr> |
438 <tr><td>None</td></tr> |
436 </table> |
439 </table> |
437 |
440 |
438 |
441 <a NAME="DocumentationViewerWidget.__init__" ID="DocumentationViewerWidget.__init__"></a> |
439 <a NAME="DocumentationViewerWidget.__init__" ID="DocumentationViewerWidget.__init__"></a> |
442 <h4>DocumentationViewerWidget (Constructor)</h4> |
440 <h4>DocumentationViewerWidget (Constructor)</h4> |
443 <b>DocumentationViewerWidget</b>(<i>parent=None</i>) |
441 <b>DocumentationViewerWidget</b>(<i>parent=None</i>) |
444 |
|
445 <p> |
442 <p> |
446 Constructor |
443 Constructor |
447 </p> |
444 </p> |
|
445 |
448 <dl> |
446 <dl> |
449 |
447 |
450 <dt><i>parent</i> (QWidget)</dt> |
448 <dt><i>parent</i> (QWidget)</dt> |
451 <dd> |
449 <dd> |
452 reference to the parent widget |
450 reference to the parent widget |
453 </dd> |
451 </dd> |
454 </dl> |
452 </dl> |
455 <a NAME="DocumentationViewerWidget.__showLink" ID="DocumentationViewerWidget.__showLink"></a> |
453 <a NAME="DocumentationViewerWidget.__showLink" ID="DocumentationViewerWidget.__showLink"></a> |
456 <h4>DocumentationViewerWidget.__showLink</h4> |
454 <h4>DocumentationViewerWidget.__showLink</h4> |
457 <b>__showLink</b>(<i>urlStr</i>) |
455 <b>__showLink</b>(<i>urlStr</i>) |
458 |
|
459 <p> |
456 <p> |
460 Private slot to show the hovered link in a tooltip. |
457 Private slot to show the hovered link in a tooltip. |
461 </p> |
458 </p> |
|
459 |
462 <dl> |
460 <dl> |
463 |
461 |
464 <dt><i>urlStr</i> (str)</dt> |
462 <dt><i>urlStr</i> (str)</dt> |
465 <dd> |
463 <dd> |
466 hovered URL |
464 hovered URL |
467 </dd> |
465 </dd> |
468 </dl> |
466 </dl> |
469 <a NAME="DocumentationViewerWidget.clear" ID="DocumentationViewerWidget.clear"></a> |
467 <a NAME="DocumentationViewerWidget.clear" ID="DocumentationViewerWidget.clear"></a> |
470 <h4>DocumentationViewerWidget.clear</h4> |
468 <h4>DocumentationViewerWidget.clear</h4> |
471 <b>clear</b>(<i></i>) |
469 <b>clear</b>(<i></i>) |
472 |
|
473 <p> |
470 <p> |
474 Public method to clear the shown contents. |
471 Public method to clear the shown contents. |
475 </p> |
472 </p> |
|
473 |
476 <a NAME="DocumentationViewerWidget.setHtml" ID="DocumentationViewerWidget.setHtml"></a> |
474 <a NAME="DocumentationViewerWidget.setHtml" ID="DocumentationViewerWidget.setHtml"></a> |
477 <h4>DocumentationViewerWidget.setHtml</h4> |
475 <h4>DocumentationViewerWidget.setHtml</h4> |
478 <b>setHtml</b>(<i>html</i>) |
476 <b>setHtml</b>(<i>html</i>) |
479 |
|
480 <p> |
477 <p> |
481 Public method to set the HTML text of the widget. |
478 Public method to set the HTML text of the widget. |
482 </p> |
479 </p> |
|
480 |
483 <dl> |
481 <dl> |
484 |
482 |
485 <dt><i>html</i> (str)</dt> |
483 <dt><i>html</i> (str)</dt> |
486 <dd> |
484 <dd> |
487 HTML text to be shown |
485 HTML text to be shown |