8 """ |
8 """ |
9 |
9 |
10 from PyQt6.QtCore import pyqtSlot |
10 from PyQt6.QtCore import pyqtSlot |
11 from PyQt6.QtWidgets import QDialog |
11 from PyQt6.QtWidgets import QDialog |
12 |
12 |
13 from eric7 import Utilities |
13 from eric7 import EricUtilities |
14 |
14 |
15 from .Ui_SpellCheckingDialog import Ui_SpellCheckingDialog |
15 from .Ui_SpellCheckingDialog import Ui_SpellCheckingDialog |
16 |
16 |
17 |
17 |
18 class SpellCheckingDialog(QDialog, Ui_SpellCheckingDialog): |
18 class SpellCheckingDialog(QDialog, Ui_SpellCheckingDialog): |
73 self.word, self.wordStart, self.wordEnd = self.__spell.getError() |
73 self.word, self.wordStart, self.wordEnd = self.__spell.getError() |
74 lcontext, rcontext = self.__spell.getContext(self.wordStart, self.wordEnd) |
74 lcontext, rcontext = self.__spell.getContext(self.wordStart, self.wordEnd) |
75 self.changeEdit.setText(self.word) |
75 self.changeEdit.setText(self.word) |
76 self.contextLabel.setText( |
76 self.contextLabel.setText( |
77 '{0}<font color="#FF0000">{1}</font>{2}'.format( |
77 '{0}<font color="#FF0000">{1}</font>{2}'.format( |
78 Utilities.html_encode(lcontext), |
78 EricUtilities.html_encode(lcontext), |
79 self.word, |
79 self.word, |
80 Utilities.html_encode(rcontext), |
80 EricUtilities.html_encode(rcontext), |
81 ) |
81 ) |
82 ) |
82 ) |
83 suggestions = self.__spell.getSuggestions(self.word) |
83 suggestions = self.__spell.getSuggestions(self.word) |
84 self.suggestionsList.clear() |
84 self.suggestionsList.clear() |
85 self.suggestionsList.addItems(suggestions) |
85 self.suggestionsList.addItems(suggestions) |