61 <hr /> |
61 <hr /> |
62 <a NAME="EnchantHighlighter" ID="EnchantHighlighter"></a> |
62 <a NAME="EnchantHighlighter" ID="EnchantHighlighter"></a> |
63 <h2>EnchantHighlighter</h2> |
63 <h2>EnchantHighlighter</h2> |
64 |
64 |
65 <p> |
65 <p> |
66 Class implementing a QSyntaxHighlighter subclass that consults a |
66 Class implementing a QSyntaxHighlighter subclass that consults a |
67 pyEnchant dictionary to highlight misspelled words. |
67 pyEnchant dictionary to highlight misspelled words. |
68 </p> |
68 </p> |
69 <h3>Derived from</h3> |
69 <h3>Derived from</h3> |
70 QSyntaxHighlighter |
70 QSyntaxHighlighter |
71 <h3>Class Attributes</h3> |
71 <h3>Class Attributes</h3> |
72 |
72 |
130 <a NAME="EnchantHighlighter.chunkers" ID="EnchantHighlighter.chunkers"></a> |
130 <a NAME="EnchantHighlighter.chunkers" ID="EnchantHighlighter.chunkers"></a> |
131 <h4>EnchantHighlighter.chunkers</h4> |
131 <h4>EnchantHighlighter.chunkers</h4> |
132 <b>chunkers</b>(<i></i>) |
132 <b>chunkers</b>(<i></i>) |
133 |
133 |
134 <p> |
134 <p> |
135 Public method to get the chunkers in use. |
135 Public method to get the chunkers in use. |
136 </p> |
136 </p> |
137 <dl> |
137 <dl> |
138 <dt>Return:</dt> |
138 <dt>Return:</dt> |
139 <dd> |
139 <dd> |
140 list of chunkers in use |
140 list of chunkers in use |
168 <a NAME="EnchantHighlighter.highlightBlock" ID="EnchantHighlighter.highlightBlock"></a> |
168 <a NAME="EnchantHighlighter.highlightBlock" ID="EnchantHighlighter.highlightBlock"></a> |
169 <h4>EnchantHighlighter.highlightBlock</h4> |
169 <h4>EnchantHighlighter.highlightBlock</h4> |
170 <b>highlightBlock</b>(<i>text</i>) |
170 <b>highlightBlock</b>(<i>text</i>) |
171 |
171 |
172 <p> |
172 <p> |
173 Public method to apply the text highlight. |
173 Public method to apply the text highlight. |
174 </p> |
174 </p> |
175 <dl> |
175 <dl> |
176 |
176 |
177 <dt><i>text</i> (str)</dt> |
177 <dt><i>text</i> (str)</dt> |
178 <dd> |
178 <dd> |
182 <a NAME="EnchantHighlighter.setChunkers" ID="EnchantHighlighter.setChunkers"></a> |
182 <a NAME="EnchantHighlighter.setChunkers" ID="EnchantHighlighter.setChunkers"></a> |
183 <h4>EnchantHighlighter.setChunkers</h4> |
183 <h4>EnchantHighlighter.setChunkers</h4> |
184 <b>setChunkers</b>(<i>chunkers</i>) |
184 <b>setChunkers</b>(<i>chunkers</i>) |
185 |
185 |
186 <p> |
186 <p> |
187 Public method to set the chunkers to be used. |
187 Public method to set the chunkers to be used. |
188 </p> |
188 </p> |
189 <dl> |
189 <dl> |
190 |
190 |
191 <dt><i>chunkers</i> (list)</dt> |
191 <dt><i>chunkers</i> (list)</dt> |
192 <dd> |
192 <dd> |
196 <a NAME="EnchantHighlighter.setDict" ID="EnchantHighlighter.setDict"></a> |
196 <a NAME="EnchantHighlighter.setDict" ID="EnchantHighlighter.setDict"></a> |
197 <h4>EnchantHighlighter.setDict</h4> |
197 <h4>EnchantHighlighter.setDict</h4> |
198 <b>setDict</b>(<i>spellDict</i>) |
198 <b>setDict</b>(<i>spellDict</i>) |
199 |
199 |
200 <p> |
200 <p> |
201 Public method to set the spelling dictionary to be used. |
201 Public method to set the spelling dictionary to be used. |
202 </p> |
202 </p> |
203 <dl> |
203 <dl> |
204 |
204 |
205 <dt><i>spellDict</i> (enchant.Dict)</dt> |
205 <dt><i>spellDict</i> (enchant.Dict)</dt> |
206 <dd> |
206 <dd> |
212 <hr /> |
212 <hr /> |
213 <a NAME="EricSpellCheckedPlainTextEdit" ID="EricSpellCheckedPlainTextEdit"></a> |
213 <a NAME="EricSpellCheckedPlainTextEdit" ID="EricSpellCheckedPlainTextEdit"></a> |
214 <h2>EricSpellCheckedPlainTextEdit</h2> |
214 <h2>EricSpellCheckedPlainTextEdit</h2> |
215 |
215 |
216 <p> |
216 <p> |
217 Class implementing a QPlainTextEdit with built-in spell checker. |
217 Class implementing a QPlainTextEdit with built-in spell checker. |
218 </p> |
218 </p> |
219 <h3>Derived from</h3> |
219 <h3>Derived from</h3> |
220 QPlainTextEdit, SpellCheckMixin |
220 QPlainTextEdit, SpellCheckMixin |
221 <h3>Class Attributes</h3> |
221 <h3>Class Attributes</h3> |
222 |
222 |
262 <hr /> |
262 <hr /> |
263 <a NAME="EricSpellCheckedTextEdit" ID="EricSpellCheckedTextEdit"></a> |
263 <a NAME="EricSpellCheckedTextEdit" ID="EricSpellCheckedTextEdit"></a> |
264 <h2>EricSpellCheckedTextEdit</h2> |
264 <h2>EricSpellCheckedTextEdit</h2> |
265 |
265 |
266 <p> |
266 <p> |
267 Class implementing a QTextEdit with built-in spell checker. |
267 Class implementing a QTextEdit with built-in spell checker. |
268 </p> |
268 </p> |
269 <h3>Derived from</h3> |
269 <h3>Derived from</h3> |
270 QTextEdit, SpellCheckMixin |
270 QTextEdit, SpellCheckMixin |
271 <h3>Class Attributes</h3> |
271 <h3>Class Attributes</h3> |
272 |
272 |
314 <a NAME="EricSpellCheckedTextEdit.setAcceptRichText" ID="EricSpellCheckedTextEdit.setAcceptRichText"></a> |
314 <a NAME="EricSpellCheckedTextEdit.setAcceptRichText" ID="EricSpellCheckedTextEdit.setAcceptRichText"></a> |
315 <h4>EricSpellCheckedTextEdit.setAcceptRichText</h4> |
315 <h4>EricSpellCheckedTextEdit.setAcceptRichText</h4> |
316 <b>setAcceptRichText</b>(<i>accept</i>) |
316 <b>setAcceptRichText</b>(<i>accept</i>) |
317 |
317 |
318 <p> |
318 <p> |
319 Public method to set the text edit mode. |
319 Public method to set the text edit mode. |
320 </p> |
320 </p> |
321 <dl> |
321 <dl> |
322 |
322 |
323 <dt><i>accept</i> (bool)</dt> |
323 <dt><i>accept</i> (bool)</dt> |
324 <dd> |
324 <dd> |
330 <hr /> |
330 <hr /> |
331 <a NAME="SpellCheckMixin" ID="SpellCheckMixin"></a> |
331 <a NAME="SpellCheckMixin" ID="SpellCheckMixin"></a> |
332 <h2>SpellCheckMixin</h2> |
332 <h2>SpellCheckMixin</h2> |
333 |
333 |
334 <p> |
334 <p> |
335 Class implementing the spell-check mixin for the widget classes. |
335 Class implementing the spell-check mixin for the widget classes. |
336 </p> |
336 </p> |
337 <h3>Derived from</h3> |
337 <h3>Derived from</h3> |
338 None |
338 None |
339 <h3>Class Attributes</h3> |
339 <h3>Class Attributes</h3> |
340 |
340 |
341 <table> |
341 <table> |
342 <tr><td>MaxSuggestions</td></tr> |
342 <tr><td>DefaultLanguage</td></tr><tr><td>MaxSuggestions</td></tr> |
343 </table> |
343 </table> |
344 <h3>Class Methods</h3> |
344 <h3>Class Methods</h3> |
345 |
345 |
346 <table> |
346 <table> |
347 <tr><td>None</td></tr> |
347 |
|
348 <tr> |
|
349 <td><a href="#SpellCheckMixin.setDefaultLanguage">setDefaultLanguage</a></td> |
|
350 <td>Class method to set the default spell-check language.</td> |
|
351 </tr> |
348 </table> |
352 </table> |
349 <h3>Methods</h3> |
353 <h3>Methods</h3> |
350 |
354 |
351 <table> |
355 <table> |
352 |
356 |
407 |
411 |
408 <table> |
412 <table> |
409 <tr><td>None</td></tr> |
413 <tr><td>None</td></tr> |
410 </table> |
414 </table> |
411 |
415 |
|
416 <a NAME="SpellCheckMixin.setDefaultLanguage" ID="SpellCheckMixin.setDefaultLanguage"></a> |
|
417 <h4>SpellCheckMixin.setDefaultLanguage (class method)</h4> |
|
418 <b>setDefaultLanguage</b>(<i>language</i>) |
|
419 |
|
420 <p> |
|
421 Class method to set the default spell-check language. |
|
422 </p> |
|
423 <dl> |
|
424 |
|
425 <dt><i>language</i> (str)</dt> |
|
426 <dd> |
|
427 language to be set as default |
|
428 </dd> |
|
429 </dl> |
412 <a NAME="SpellCheckMixin.__init__" ID="SpellCheckMixin.__init__"></a> |
430 <a NAME="SpellCheckMixin.__init__" ID="SpellCheckMixin.__init__"></a> |
413 <h4>SpellCheckMixin (Constructor)</h4> |
431 <h4>SpellCheckMixin (Constructor)</h4> |
414 <b>SpellCheckMixin</b>(<i></i>) |
432 <b>SpellCheckMixin</b>(<i></i>) |
415 |
433 |
416 <p> |
434 <p> |
417 Constructor |
435 Constructor |
418 </p> |
436 </p> |
419 <a NAME="SpellCheckMixin.__correctWord" ID="SpellCheckMixin.__correctWord"></a> |
437 <a NAME="SpellCheckMixin.__correctWord" ID="SpellCheckMixin.__correctWord"></a> |
420 <h4>SpellCheckMixin.__correctWord</h4> |
438 <h4>SpellCheckMixin.__correctWord</h4> |
421 <b>__correctWord</b>(<i>act</i>) |
439 <b>__correctWord</b>(<i>act</i>) |
422 |
440 |
423 <p> |
441 <p> |
424 Private slot to correct the misspelled word with the selected |
442 Private slot to correct the misspelled word with the selected |
425 correction. |
443 correction. |
426 </p> |
444 </p> |
427 <dl> |
445 <dl> |
428 |
446 |
429 <dt><i>act</i> (QAction)</dt> |
447 <dt><i>act</i> (QAction)</dt> |
430 <dd> |
448 <dd> |
434 <a NAME="SpellCheckMixin.__createCorrectionsMenu" ID="SpellCheckMixin.__createCorrectionsMenu"></a> |
452 <a NAME="SpellCheckMixin.__createCorrectionsMenu" ID="SpellCheckMixin.__createCorrectionsMenu"></a> |
435 <h4>SpellCheckMixin.__createCorrectionsMenu</h4> |
453 <h4>SpellCheckMixin.__createCorrectionsMenu</h4> |
436 <b>__createCorrectionsMenu</b>(<i>cursor, parent=None</i>) |
454 <b>__createCorrectionsMenu</b>(<i>cursor, parent=None</i>) |
437 |
455 |
438 <p> |
456 <p> |
439 Private method to create a menu for corrections of the selected word. |
457 Private method to create a menu for corrections of the selected |
|
458 word. |
440 </p> |
459 </p> |
441 <dl> |
460 <dl> |
442 |
461 |
443 <dt><i>cursor</i> (QTextCursor)</dt> |
462 <dt><i>cursor</i> (QTextCursor)</dt> |
444 <dd> |
463 <dd> |
464 <a NAME="SpellCheckMixin.__createFormatsMenu" ID="SpellCheckMixin.__createFormatsMenu"></a> |
483 <a NAME="SpellCheckMixin.__createFormatsMenu" ID="SpellCheckMixin.__createFormatsMenu"></a> |
465 <h4>SpellCheckMixin.__createFormatsMenu</h4> |
484 <h4>SpellCheckMixin.__createFormatsMenu</h4> |
466 <b>__createFormatsMenu</b>(<i>parent=None</i>) |
485 <b>__createFormatsMenu</b>(<i>parent=None</i>) |
467 |
486 |
468 <p> |
487 <p> |
469 Private method to create a menu for selecting the document format. |
488 Private method to create a menu for selecting the document format. |
470 </p> |
489 </p> |
471 <dl> |
490 <dl> |
472 |
491 |
473 <dt><i>parent</i> (QWidget (optional))</dt> |
492 <dt><i>parent</i> (QWidget (optional))</dt> |
474 <dd> |
493 <dd> |
490 <a NAME="SpellCheckMixin.__createLanguagesMenu" ID="SpellCheckMixin.__createLanguagesMenu"></a> |
509 <a NAME="SpellCheckMixin.__createLanguagesMenu" ID="SpellCheckMixin.__createLanguagesMenu"></a> |
491 <h4>SpellCheckMixin.__createLanguagesMenu</h4> |
510 <h4>SpellCheckMixin.__createLanguagesMenu</h4> |
492 <b>__createLanguagesMenu</b>(<i>parent=None</i>) |
511 <b>__createLanguagesMenu</b>(<i>parent=None</i>) |
493 |
512 |
494 <p> |
513 <p> |
495 Private method to create a menu for selecting the spell-check language. |
514 Private method to create a menu for selecting the spell-check |
|
515 language. |
496 </p> |
516 </p> |
497 <dl> |
517 <dl> |
498 |
518 |
499 <dt><i>parent</i> (QWidget (optional))</dt> |
519 <dt><i>parent</i> (QWidget (optional))</dt> |
500 <dd> |
520 <dd> |
516 <a NAME="SpellCheckMixin.__createSpellcheckContextMenu" ID="SpellCheckMixin.__createSpellcheckContextMenu"></a> |
536 <a NAME="SpellCheckMixin.__createSpellcheckContextMenu" ID="SpellCheckMixin.__createSpellcheckContextMenu"></a> |
517 <h4>SpellCheckMixin.__createSpellcheckContextMenu</h4> |
537 <h4>SpellCheckMixin.__createSpellcheckContextMenu</h4> |
518 <b>__createSpellcheckContextMenu</b>(<i>pos</i>) |
538 <b>__createSpellcheckContextMenu</b>(<i>pos</i>) |
519 |
539 |
520 <p> |
540 <p> |
521 Private method to create the spell-check context menu. |
541 Private method to create the spell-check context menu. |
522 </p> |
542 </p> |
523 <dl> |
543 <dl> |
524 |
544 |
525 <dt><i>pos</i> (QPoint)</dt> |
545 <dt><i>pos</i> (QPoint)</dt> |
526 <dd> |
546 <dd> |
542 <a NAME="SpellCheckMixin.__cursorForMisspelling" ID="SpellCheckMixin.__cursorForMisspelling"></a> |
562 <a NAME="SpellCheckMixin.__cursorForMisspelling" ID="SpellCheckMixin.__cursorForMisspelling"></a> |
543 <h4>SpellCheckMixin.__cursorForMisspelling</h4> |
563 <h4>SpellCheckMixin.__cursorForMisspelling</h4> |
544 <b>__cursorForMisspelling</b>(<i>pos</i>) |
564 <b>__cursorForMisspelling</b>(<i>pos</i>) |
545 |
565 |
546 <p> |
566 <p> |
547 Private method to create a text cursor selecting the misspelled word. |
567 Private method to create a text cursor selecting the misspelled |
|
568 word. |
548 </p> |
569 </p> |
549 <dl> |
570 <dl> |
550 |
571 |
551 <dt><i>pos</i> (QPoint)</dt> |
572 <dt><i>pos</i> (QPoint)</dt> |
552 <dd> |
573 <dd> |
568 <a NAME="SpellCheckMixin.__setFormat" ID="SpellCheckMixin.__setFormat"></a> |
589 <a NAME="SpellCheckMixin.__setFormat" ID="SpellCheckMixin.__setFormat"></a> |
569 <h4>SpellCheckMixin.__setFormat</h4> |
590 <h4>SpellCheckMixin.__setFormat</h4> |
570 <b>__setFormat</b>(<i>act</i>) |
591 <b>__setFormat</b>(<i>act</i>) |
571 |
592 |
572 <p> |
593 <p> |
573 Private slot to set the selected document format. |
594 Private slot to set the selected document format. |
574 </p> |
595 </p> |
575 <dl> |
596 <dl> |
576 |
597 |
577 <dt><i>act</i> (QAction)</dt> |
598 <dt><i>act</i> (QAction)</dt> |
578 <dd> |
599 <dd> |
582 <a NAME="SpellCheckMixin.__setLanguage" ID="SpellCheckMixin.__setLanguage"></a> |
603 <a NAME="SpellCheckMixin.__setLanguage" ID="SpellCheckMixin.__setLanguage"></a> |
583 <h4>SpellCheckMixin.__setLanguage</h4> |
604 <h4>SpellCheckMixin.__setLanguage</h4> |
584 <b>__setLanguage</b>(<i>act</i>) |
605 <b>__setLanguage</b>(<i>act</i>) |
585 |
606 |
586 <p> |
607 <p> |
587 Private slot to set the selected language. |
608 Private slot to set the selected language. |
588 </p> |
609 </p> |
589 <dl> |
610 <dl> |
590 |
611 |
591 <dt><i>act</i> (QAction)</dt> |
612 <dt><i>act</i> (QAction)</dt> |
592 <dd> |
613 <dd> |
596 <a NAME="SpellCheckMixin.contextMenuEvent" ID="SpellCheckMixin.contextMenuEvent"></a> |
617 <a NAME="SpellCheckMixin.contextMenuEvent" ID="SpellCheckMixin.contextMenuEvent"></a> |
597 <h4>SpellCheckMixin.contextMenuEvent</h4> |
618 <h4>SpellCheckMixin.contextMenuEvent</h4> |
598 <b>contextMenuEvent</b>(<i>evt</i>) |
619 <b>contextMenuEvent</b>(<i>evt</i>) |
599 |
620 |
600 <p> |
621 <p> |
601 Protected method to handle context menu events to add a spelling |
622 Protected method to handle context menu events to add a spelling |
602 suggestions submenu. |
623 suggestions submenu. |
603 </p> |
624 </p> |
604 <dl> |
625 <dl> |
605 |
626 |
606 <dt><i>evt</i> (QContextMenuEvent)</dt> |
627 <dt><i>evt</i> (QContextMenuEvent)</dt> |
607 <dd> |
628 <dd> |
630 <a NAME="SpellCheckMixin.setDict" ID="SpellCheckMixin.setDict"></a> |
651 <a NAME="SpellCheckMixin.setDict" ID="SpellCheckMixin.setDict"></a> |
631 <h4>SpellCheckMixin.setDict</h4> |
652 <h4>SpellCheckMixin.setDict</h4> |
632 <b>setDict</b>(<i>spellDict</i>) |
653 <b>setDict</b>(<i>spellDict</i>) |
633 |
654 |
634 <p> |
655 <p> |
635 Public method to set the dictionary to be used. |
656 Public method to set the dictionary to be used. |
636 </p> |
657 </p> |
637 <dl> |
658 <dl> |
638 |
659 |
639 <dt><i>spellDict</i> (emchant.Dict)</dt> |
660 <dt><i>spellDict</i> (emchant.Dict)</dt> |
640 <dd> |
661 <dd> |
644 <a NAME="SpellCheckMixin.setFormat" ID="SpellCheckMixin.setFormat"></a> |
665 <a NAME="SpellCheckMixin.setFormat" ID="SpellCheckMixin.setFormat"></a> |
645 <h4>SpellCheckMixin.setFormat</h4> |
666 <h4>SpellCheckMixin.setFormat</h4> |
646 <b>setFormat</b>(<i>formatName</i>) |
667 <b>setFormat</b>(<i>formatName</i>) |
647 |
668 |
648 <p> |
669 <p> |
649 Public method to set the document format. |
670 Public method to set the document format. |
650 </p> |
671 </p> |
651 <dl> |
672 <dl> |
652 |
673 |
653 <dt><i>formatName</i> (str)</dt> |
674 <dt><i>formatName</i> (str)</dt> |
654 <dd> |
675 <dd> |