462 ErrorFormat.setUnderlineColor(Qt.GlobalColor.red) |
462 ErrorFormat.setUnderlineColor(Qt.GlobalColor.red) |
463 ErrorFormat.setUnderlineStyle( |
463 ErrorFormat.setUnderlineStyle( |
464 QTextCharFormat.UnderlineStyle.SpellCheckUnderline |
464 QTextCharFormat.UnderlineStyle.SpellCheckUnderline |
465 ) |
465 ) |
466 |
466 |
467 def __init__(self, *args): |
467 def __init__(self, *args, **kwargs): |
468 """ |
468 """ |
469 Constructor |
469 Constructor |
470 |
470 |
471 @param *args list of arguments for the QSyntaxHighlighter |
471 @param *args list of arguments for the QSyntaxHighlighter |
472 @type list |
472 @type list |
473 """ |
473 @keyparam **kwargs dictionary of keyword arguments for the |
474 QSyntaxHighlighter.__init__(self, *args) |
474 QSyntaxHighlighter |
|
475 @type dict |
|
476 """ |
|
477 QSyntaxHighlighter.__init__(self, *args, **kwargs) |
475 |
478 |
476 self.__spellDict = None |
479 self.__spellDict = None |
477 self.__tokenizer = None |
480 self.__tokenizer = None |
478 self.__chunkers = [] |
481 self.__chunkers = [] |
479 |
482 |
656 class EricSpellCheckedPlainTextEdit(QPlainTextEdit, SpellCheckMixin): |
659 class EricSpellCheckedPlainTextEdit(QPlainTextEdit, SpellCheckMixin): |
657 """ |
660 """ |
658 Class implementing a QPlainTextEdit with built-in spell checker. |
661 Class implementing a QPlainTextEdit with built-in spell checker. |
659 """ |
662 """ |
660 |
663 |
661 def __init__(self, *args): |
664 def __init__(self, *args, **kwargs): |
662 """ |
665 """ |
663 Constructor |
666 Constructor |
664 |
667 |
665 @param *args list of arguments for the QPlainTextEdit constructor. |
668 @param *args list of arguments for the QPlainTextEdit constructor. |
666 @type list |
669 @type list |
667 """ |
670 @keyparam **kwargs dictionary of keyword arguments for the QSyntaxHighlighter |
668 QPlainTextEdit.__init__(self, *args) |
671 @type dict |
|
672 """ |
|
673 QPlainTextEdit.__init__(self, *args, **kwargs) |
669 SpellCheckMixin.__init__(self) |
674 SpellCheckMixin.__init__(self) |
670 |
675 |
671 self.setContextMenuPolicy(Qt.ContextMenuPolicy.CustomContextMenu) |
676 self.setContextMenuPolicy(Qt.ContextMenuPolicy.CustomContextMenu) |
672 self.customContextMenuRequested.connect(self._showContextMenu) |
677 self.customContextMenuRequested.connect(self._showContextMenu) |
673 |
678 |
675 class EricSpellCheckedTextEdit(QTextEdit, SpellCheckMixin): |
680 class EricSpellCheckedTextEdit(QTextEdit, SpellCheckMixin): |
676 """ |
681 """ |
677 Class implementing a QTextEdit with built-in spell checker. |
682 Class implementing a QTextEdit with built-in spell checker. |
678 """ |
683 """ |
679 |
684 |
680 def __init__(self, *args): |
685 def __init__(self, *args, **kwargs): |
681 """ |
686 """ |
682 Constructor |
687 Constructor |
683 |
688 |
684 @param *args list of arguments for the QPlainTextEdit constructor. |
689 @param *args list of arguments for the QPlainTextEdit constructor. |
685 @type list |
690 @type list |
686 """ |
691 @keyparam **kwargs dictionary of keyword arguments for the QSyntaxHighlighter |
687 QTextEdit.__init__(self, *args) |
692 @type dict |
|
693 """ |
|
694 QTextEdit.__init__(self, *args, **kwargs) |
688 SpellCheckMixin.__init__(self) |
695 SpellCheckMixin.__init__(self) |
689 |
696 |
690 self.setFormat("html") |
697 self.setFormat("html") |
691 |
698 |
692 self.setContextMenuPolicy(Qt.ContextMenuPolicy.CustomContextMenu) |
699 self.setContextMenuPolicy(Qt.ContextMenuPolicy.CustomContextMenu) |