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.Plugins.UiExtensionPlugins.Translator.TranslatorWidget</h1> |
9 <h1>eric7.Plugins.UiExtensionPlugins.Translator.TranslatorWidget</h1> |
10 |
|
11 <p> |
10 <p> |
12 Module implementing the translator widget. |
11 Module implementing the translator widget. |
13 </p> |
12 </p> |
|
13 |
14 <h3>Global Attributes</h3> |
14 <h3>Global Attributes</h3> |
15 |
|
16 <table> |
15 <table> |
17 <tr><td>MULTIMEDIA_AVAILABLE</td></tr> |
16 <tr><td>MULTIMEDIA_AVAILABLE</td></tr> |
18 </table> |
17 </table> |
|
18 |
19 <h3>Classes</h3> |
19 <h3>Classes</h3> |
20 |
20 <table> |
21 <table> |
|
22 |
|
23 <tr> |
21 <tr> |
24 <td><a href="#TranslatorWidget">TranslatorWidget</a></td> |
22 <td><a href="#TranslatorWidget">TranslatorWidget</a></td> |
25 <td>Class implementing the translator widget.</td> |
23 <td>Class implementing the translator widget.</td> |
26 </tr> |
24 </tr> |
27 </table> |
25 </table> |
|
26 |
28 <h3>Functions</h3> |
27 <h3>Functions</h3> |
29 |
|
30 <table> |
28 <table> |
31 <tr><td>None</td></tr> |
29 <tr><td>None</td></tr> |
32 </table> |
30 </table> |
|
31 |
33 <hr /> |
32 <hr /> |
34 <hr /> |
33 <hr /> |
35 <a NAME="TranslatorWidget" ID="TranslatorWidget"></a> |
34 <a NAME="TranslatorWidget" ID="TranslatorWidget"></a> |
36 <h2>TranslatorWidget</h2> |
35 <h2>TranslatorWidget</h2> |
37 |
|
38 <p> |
36 <p> |
39 Class implementing the translator widget. |
37 Class implementing the translator widget. |
40 </p> |
38 </p> |
|
39 |
41 <h3>Derived from</h3> |
40 <h3>Derived from</h3> |
42 QWidget, Ui_TranslatorWidget |
41 QWidget, Ui_TranslatorWidget |
43 <h3>Class Attributes</h3> |
42 <h3>Class Attributes</h3> |
44 |
|
45 <table> |
43 <table> |
46 <tr><td>None</td></tr> |
44 <tr><td>None</td></tr> |
47 </table> |
45 </table> |
|
46 |
48 <h3>Class Methods</h3> |
47 <h3>Class Methods</h3> |
49 |
|
50 <table> |
48 <table> |
51 <tr><td>None</td></tr> |
49 <tr><td>None</td></tr> |
52 </table> |
50 </table> |
|
51 |
53 <h3>Methods</h3> |
52 <h3>Methods</h3> |
54 |
53 <table> |
55 <table> |
|
56 |
|
57 <tr> |
54 <tr> |
58 <td><a href="#TranslatorWidget.__init__">TranslatorWidget</a></td> |
55 <td><a href="#TranslatorWidget.__init__">TranslatorWidget</a></td> |
59 <td>Constructor</td> |
56 <td>Constructor</td> |
60 </tr> |
57 </tr> |
61 <tr> |
58 <tr> |
184 </dd> |
182 </dd> |
185 </dl> |
183 </dl> |
186 <a NAME="TranslatorWidget.__availableTranslationsLoaded" ID="TranslatorWidget.__availableTranslationsLoaded"></a> |
184 <a NAME="TranslatorWidget.__availableTranslationsLoaded" ID="TranslatorWidget.__availableTranslationsLoaded"></a> |
187 <h4>TranslatorWidget.__availableTranslationsLoaded</h4> |
185 <h4>TranslatorWidget.__availableTranslationsLoaded</h4> |
188 <b>__availableTranslationsLoaded</b>(<i></i>) |
186 <b>__availableTranslationsLoaded</b>(<i></i>) |
189 |
|
190 <p> |
187 <p> |
191 Private slot to handle the availability of translations. |
188 Private slot to handle the availability of translations. |
192 </p> |
189 </p> |
|
190 |
193 <a NAME="TranslatorWidget.__engineComboBoxCurrentIndexChanged" ID="TranslatorWidget.__engineComboBoxCurrentIndexChanged"></a> |
191 <a NAME="TranslatorWidget.__engineComboBoxCurrentIndexChanged" ID="TranslatorWidget.__engineComboBoxCurrentIndexChanged"></a> |
194 <h4>TranslatorWidget.__engineComboBoxCurrentIndexChanged</h4> |
192 <h4>TranslatorWidget.__engineComboBoxCurrentIndexChanged</h4> |
195 <b>__engineComboBoxCurrentIndexChanged</b>(<i>index</i>) |
193 <b>__engineComboBoxCurrentIndexChanged</b>(<i>index</i>) |
196 |
|
197 <p> |
194 <p> |
198 Private slot to handle the selection of a translation service. |
195 Private slot to handle the selection of a translation service. |
199 </p> |
196 </p> |
|
197 |
200 <dl> |
198 <dl> |
201 |
199 |
202 <dt><i>index</i> (int)</dt> |
200 <dt><i>index</i> (int)</dt> |
203 <dd> |
201 <dd> |
204 current index |
202 current index |
205 </dd> |
203 </dd> |
206 </dl> |
204 </dl> |
207 <a NAME="TranslatorWidget.__ensureTranslationEngineReady" ID="TranslatorWidget.__ensureTranslationEngineReady"></a> |
205 <a NAME="TranslatorWidget.__ensureTranslationEngineReady" ID="TranslatorWidget.__ensureTranslationEngineReady"></a> |
208 <h4>TranslatorWidget.__ensureTranslationEngineReady</h4> |
206 <h4>TranslatorWidget.__ensureTranslationEngineReady</h4> |
209 <b>__ensureTranslationEngineReady</b>(<i></i>) |
207 <b>__ensureTranslationEngineReady</b>(<i></i>) |
210 |
|
211 <p> |
208 <p> |
212 Private slot to ensure, that the currently selected translation engine |
209 Private slot to ensure, that the currently selected translation engine |
213 is ready. |
210 is ready. |
214 </p> |
211 </p> |
|
212 |
215 <a NAME="TranslatorWidget.__mediaPlayerError" ID="TranslatorWidget.__mediaPlayerError"></a> |
213 <a NAME="TranslatorWidget.__mediaPlayerError" ID="TranslatorWidget.__mediaPlayerError"></a> |
216 <h4>TranslatorWidget.__mediaPlayerError</h4> |
214 <h4>TranslatorWidget.__mediaPlayerError</h4> |
217 <b>__mediaPlayerError</b>(<i>error, errorString</i>) |
215 <b>__mediaPlayerError</b>(<i>error, errorString</i>) |
218 |
|
219 <p> |
216 <p> |
220 Private slot to handle errors during playback of the data. |
217 Private slot to handle errors during playback of the data. |
221 </p> |
218 </p> |
|
219 |
222 <dl> |
220 <dl> |
223 |
221 |
224 <dt><i>error</i> (QMediaPlayer.Error)</dt> |
222 <dt><i>error</i> (QMediaPlayer.Error)</dt> |
225 <dd> |
223 <dd> |
226 media player error condition |
224 media player error condition |
335 </dd> |
333 </dd> |
336 </dl> |
334 </dl> |
337 <a NAME="TranslatorWidget.__updateClearButton" ID="TranslatorWidget.__updateClearButton"></a> |
335 <a NAME="TranslatorWidget.__updateClearButton" ID="TranslatorWidget.__updateClearButton"></a> |
338 <h4>TranslatorWidget.__updateClearButton</h4> |
336 <h4>TranslatorWidget.__updateClearButton</h4> |
339 <b>__updateClearButton</b>(<i></i>) |
337 <b>__updateClearButton</b>(<i></i>) |
340 |
|
341 <p> |
338 <p> |
342 Private slot to set the state of the clear button. |
339 Private slot to set the state of the clear button. |
343 </p> |
340 </p> |
|
341 |
344 <a NAME="TranslatorWidget.__updateEngines" ID="TranslatorWidget.__updateEngines"></a> |
342 <a NAME="TranslatorWidget.__updateEngines" ID="TranslatorWidget.__updateEngines"></a> |
345 <h4>TranslatorWidget.__updateEngines</h4> |
343 <h4>TranslatorWidget.__updateEngines</h4> |
346 <b>__updateEngines</b>(<i></i>) |
344 <b>__updateEngines</b>(<i></i>) |
347 |
|
348 <p> |
345 <p> |
349 Private slot to update the engines combo box. |
346 Private slot to update the engines combo box. |
350 </p> |
347 </p> |
|
348 |
351 <a NAME="TranslatorWidget.__updateLanguages" ID="TranslatorWidget.__updateLanguages"></a> |
349 <a NAME="TranslatorWidget.__updateLanguages" ID="TranslatorWidget.__updateLanguages"></a> |
352 <h4>TranslatorWidget.__updateLanguages</h4> |
350 <h4>TranslatorWidget.__updateLanguages</h4> |
353 <b>__updateLanguages</b>(<i></i>) |
351 <b>__updateLanguages</b>(<i></i>) |
354 |
|
355 <p> |
352 <p> |
356 Private slot to update the language combo boxes. |
353 Private slot to update the language combo boxes. |
357 </p> |
354 </p> |
|
355 |
358 <a NAME="TranslatorWidget.__updatePronounceButtons" ID="TranslatorWidget.__updatePronounceButtons"></a> |
356 <a NAME="TranslatorWidget.__updatePronounceButtons" ID="TranslatorWidget.__updatePronounceButtons"></a> |
359 <h4>TranslatorWidget.__updatePronounceButtons</h4> |
357 <h4>TranslatorWidget.__updatePronounceButtons</h4> |
360 <b>__updatePronounceButtons</b>(<i></i>) |
358 <b>__updatePronounceButtons</b>(<i></i>) |
361 |
|
362 <p> |
359 <p> |
363 Private slot to set the state of the pronounce buttons. |
360 Private slot to set the state of the pronounce buttons. |
364 </p> |
361 </p> |
|
362 |
365 <a NAME="TranslatorWidget.__updateTranslateButton" ID="TranslatorWidget.__updateTranslateButton"></a> |
363 <a NAME="TranslatorWidget.__updateTranslateButton" ID="TranslatorWidget.__updateTranslateButton"></a> |
366 <h4>TranslatorWidget.__updateTranslateButton</h4> |
364 <h4>TranslatorWidget.__updateTranslateButton</h4> |
367 <b>__updateTranslateButton</b>(<i></i>) |
365 <b>__updateTranslateButton</b>(<i></i>) |
368 |
|
369 <p> |
366 <p> |
370 Private slot to set the state of the translate button. |
367 Private slot to set the state of the translate button. |
371 </p> |
368 </p> |
|
369 |
372 <a NAME="TranslatorWidget.on_clearButton_clicked" ID="TranslatorWidget.on_clearButton_clicked"></a> |
370 <a NAME="TranslatorWidget.on_clearButton_clicked" ID="TranslatorWidget.on_clearButton_clicked"></a> |
373 <h4>TranslatorWidget.on_clearButton_clicked</h4> |
371 <h4>TranslatorWidget.on_clearButton_clicked</h4> |
374 <b>on_clearButton_clicked</b>(<i></i>) |
372 <b>on_clearButton_clicked</b>(<i></i>) |
375 |
|
376 <p> |
373 <p> |
377 Private slot to clear the text fields. |
374 Private slot to clear the text fields. |
378 </p> |
375 </p> |
|
376 |
379 <a NAME="TranslatorWidget.on_origEdit_textChanged" ID="TranslatorWidget.on_origEdit_textChanged"></a> |
377 <a NAME="TranslatorWidget.on_origEdit_textChanged" ID="TranslatorWidget.on_origEdit_textChanged"></a> |
380 <h4>TranslatorWidget.on_origEdit_textChanged</h4> |
378 <h4>TranslatorWidget.on_origEdit_textChanged</h4> |
381 <b>on_origEdit_textChanged</b>(<i></i>) |
379 <b>on_origEdit_textChanged</b>(<i></i>) |
382 |
|
383 <p> |
380 <p> |
384 Private slot to handle changes of the original text. |
381 Private slot to handle changes of the original text. |
385 </p> |
382 </p> |
|
383 |
386 <a NAME="TranslatorWidget.on_origLanguageComboBox_currentIndexChanged" ID="TranslatorWidget.on_origLanguageComboBox_currentIndexChanged"></a> |
384 <a NAME="TranslatorWidget.on_origLanguageComboBox_currentIndexChanged" ID="TranslatorWidget.on_origLanguageComboBox_currentIndexChanged"></a> |
387 <h4>TranslatorWidget.on_origLanguageComboBox_currentIndexChanged</h4> |
385 <h4>TranslatorWidget.on_origLanguageComboBox_currentIndexChanged</h4> |
388 <b>on_origLanguageComboBox_currentIndexChanged</b>(<i>index</i>) |
386 <b>on_origLanguageComboBox_currentIndexChanged</b>(<i>index</i>) |
389 |
|
390 <p> |
387 <p> |
391 Private slot to handle the selection of the original language. |
388 Private slot to handle the selection of the original language. |
392 </p> |
389 </p> |
|
390 |
393 <dl> |
391 <dl> |
394 |
392 |
395 <dt><i>index</i> (int)</dt> |
393 <dt><i>index</i> (int)</dt> |
396 <dd> |
394 <dd> |
397 current index |
395 current index |
398 </dd> |
396 </dd> |
399 </dl> |
397 </dl> |
400 <a NAME="TranslatorWidget.on_preferencesButton_clicked" ID="TranslatorWidget.on_preferencesButton_clicked"></a> |
398 <a NAME="TranslatorWidget.on_preferencesButton_clicked" ID="TranslatorWidget.on_preferencesButton_clicked"></a> |
401 <h4>TranslatorWidget.on_preferencesButton_clicked</h4> |
399 <h4>TranslatorWidget.on_preferencesButton_clicked</h4> |
402 <b>on_preferencesButton_clicked</b>(<i></i>) |
400 <b>on_preferencesButton_clicked</b>(<i></i>) |
403 |
|
404 <p> |
401 <p> |
405 Private slot to open the Translator configuration page. |
402 Private slot to open the Translator configuration page. |
406 </p> |
403 </p> |
|
404 |
407 <a NAME="TranslatorWidget.on_pronounceOrigButton_clicked" ID="TranslatorWidget.on_pronounceOrigButton_clicked"></a> |
405 <a NAME="TranslatorWidget.on_pronounceOrigButton_clicked" ID="TranslatorWidget.on_pronounceOrigButton_clicked"></a> |
408 <h4>TranslatorWidget.on_pronounceOrigButton_clicked</h4> |
406 <h4>TranslatorWidget.on_pronounceOrigButton_clicked</h4> |
409 <b>on_pronounceOrigButton_clicked</b>(<i></i>) |
407 <b>on_pronounceOrigButton_clicked</b>(<i></i>) |
410 |
|
411 <p> |
408 <p> |
412 Private slot to pronounce the original text. |
409 Private slot to pronounce the original text. |
413 </p> |
410 </p> |
|
411 |
414 <a NAME="TranslatorWidget.on_pronounceTransButton_clicked" ID="TranslatorWidget.on_pronounceTransButton_clicked"></a> |
412 <a NAME="TranslatorWidget.on_pronounceTransButton_clicked" ID="TranslatorWidget.on_pronounceTransButton_clicked"></a> |
415 <h4>TranslatorWidget.on_pronounceTransButton_clicked</h4> |
413 <h4>TranslatorWidget.on_pronounceTransButton_clicked</h4> |
416 <b>on_pronounceTransButton_clicked</b>(<i></i>) |
414 <b>on_pronounceTransButton_clicked</b>(<i></i>) |
417 |
|
418 <p> |
415 <p> |
419 Private slot to pronounce the translated text. |
416 Private slot to pronounce the translated text. |
420 </p> |
417 </p> |
|
418 |
421 <a NAME="TranslatorWidget.on_swapButton_clicked" ID="TranslatorWidget.on_swapButton_clicked"></a> |
419 <a NAME="TranslatorWidget.on_swapButton_clicked" ID="TranslatorWidget.on_swapButton_clicked"></a> |
422 <h4>TranslatorWidget.on_swapButton_clicked</h4> |
420 <h4>TranslatorWidget.on_swapButton_clicked</h4> |
423 <b>on_swapButton_clicked</b>(<i></i>) |
421 <b>on_swapButton_clicked</b>(<i></i>) |
424 |
|
425 <p> |
422 <p> |
426 Private slot to swap the languages. |
423 Private slot to swap the languages. |
427 </p> |
424 </p> |
|
425 |
428 <a NAME="TranslatorWidget.on_transEdit_textChanged" ID="TranslatorWidget.on_transEdit_textChanged"></a> |
426 <a NAME="TranslatorWidget.on_transEdit_textChanged" ID="TranslatorWidget.on_transEdit_textChanged"></a> |
429 <h4>TranslatorWidget.on_transEdit_textChanged</h4> |
427 <h4>TranslatorWidget.on_transEdit_textChanged</h4> |
430 <b>on_transEdit_textChanged</b>(<i></i>) |
428 <b>on_transEdit_textChanged</b>(<i></i>) |
431 |
|
432 <p> |
429 <p> |
433 Private slot to handle changes of the translation text. |
430 Private slot to handle changes of the translation text. |
434 </p> |
431 </p> |
|
432 |
435 <a NAME="TranslatorWidget.on_transLanguageComboBox_currentIndexChanged" ID="TranslatorWidget.on_transLanguageComboBox_currentIndexChanged"></a> |
433 <a NAME="TranslatorWidget.on_transLanguageComboBox_currentIndexChanged" ID="TranslatorWidget.on_transLanguageComboBox_currentIndexChanged"></a> |
436 <h4>TranslatorWidget.on_transLanguageComboBox_currentIndexChanged</h4> |
434 <h4>TranslatorWidget.on_transLanguageComboBox_currentIndexChanged</h4> |
437 <b>on_transLanguageComboBox_currentIndexChanged</b>(<i>index</i>) |
435 <b>on_transLanguageComboBox_currentIndexChanged</b>(<i>index</i>) |
438 |
|
439 <p> |
436 <p> |
440 Private slot to handle the selection of the translation language. |
437 Private slot to handle the selection of the translation language. |
441 </p> |
438 </p> |
|
439 |
442 <dl> |
440 <dl> |
443 |
441 |
444 <dt><i>index</i> (int)</dt> |
442 <dt><i>index</i> (int)</dt> |
445 <dd> |
443 <dd> |
446 current index |
444 current index |
447 </dd> |
445 </dd> |
448 </dl> |
446 </dl> |
449 <a NAME="TranslatorWidget.on_translateButton_clicked" ID="TranslatorWidget.on_translateButton_clicked"></a> |
447 <a NAME="TranslatorWidget.on_translateButton_clicked" ID="TranslatorWidget.on_translateButton_clicked"></a> |
450 <h4>TranslatorWidget.on_translateButton_clicked</h4> |
448 <h4>TranslatorWidget.on_translateButton_clicked</h4> |
451 <b>on_translateButton_clicked</b>(<i></i>) |
449 <b>on_translateButton_clicked</b>(<i></i>) |
452 |
|
453 <p> |
450 <p> |
454 Private slot to translate the entered text. |
451 Private slot to translate the entered text. |
455 </p> |
452 </p> |
|
453 |
456 <div align="right"><a href="#top">Up</a></div> |
454 <div align="right"><a href="#top">Up</a></div> |
457 <hr /> |
455 <hr /> |
458 </body></html> |
456 </body></html> |