2866 |
2866 |
2867 dlg = EditBreakpointDialog( |
2867 dlg = EditBreakpointDialog( |
2868 (self.fileName, ln), |
2868 (self.fileName, ln), |
2869 (cond, temp, enabled, ignorecount), |
2869 (cond, temp, enabled, ignorecount), |
2870 condHistory, |
2870 condHistory, |
2871 self, |
2871 parent=self, |
2872 modal=True, |
2872 modal=True, |
2873 ) |
2873 ) |
2874 if dlg.exec() == QDialog.DialogCode.Accepted: |
2874 if dlg.exec() == QDialog.DialogCode.Accepted: |
2875 cond, temp, enabled, ignorecount = dlg.getData() |
2875 cond, temp, enabled, ignorecount = dlg.getData() |
2876 self.breakpointModel.setBreakPointByIndex( |
2876 self.breakpointModel.setBreakPointByIndex( |
8771 Private method to handle the Add localized resource context menu |
8771 Private method to handle the Add localized resource context menu |
8772 action. |
8772 action. |
8773 """ |
8773 """ |
8774 from eric7.Project.AddLanguageDialog import AddLanguageDialog |
8774 from eric7.Project.AddLanguageDialog import AddLanguageDialog |
8775 |
8775 |
8776 dlg = AddLanguageDialog(self) |
8776 dlg = AddLanguageDialog(parent=self) |
8777 if dlg.exec() == QDialog.DialogCode.Accepted: |
8777 if dlg.exec() == QDialog.DialogCode.Accepted: |
8778 lang = dlg.getSelectedLanguage() |
8778 lang = dlg.getSelectedLanguage() |
8779 line, index = self.getCursorPosition() |
8779 line, index = self.getCursorPosition() |
8780 self.insert('<qresource lang="{0}">\n</qresource>\n'.format(lang)) |
8780 self.insert('<qresource lang="{0}">\n</qresource>\n'.format(lang)) |
8781 self.setCursorPosition(line + 2, index) |
8781 self.setCursorPosition(line + 2, index) |
9197 """ |
9197 """ |
9198 from .SpellCheckingDialog import SpellCheckingDialog |
9198 from .SpellCheckingDialog import SpellCheckingDialog |
9199 |
9199 |
9200 if self.spell: |
9200 if self.spell: |
9201 cline, cindex = self.getCursorPosition() |
9201 cline, cindex = self.getCursorPosition() |
9202 dlg = SpellCheckingDialog(self.spell, 0, self.length(), self) |
9202 dlg = SpellCheckingDialog(self.spell, 0, self.length(), parent=self) |
9203 dlg.exec() |
9203 dlg.exec() |
9204 self.setCursorPosition(cline, cindex) |
9204 self.setCursorPosition(cline, cindex) |
9205 if Preferences.getEditor("AutoSpellCheckingEnabled"): |
9205 if Preferences.getEditor("AutoSpellCheckingEnabled"): |
9206 self.spell.checkDocumentIncrementally() |
9206 self.spell.checkDocumentIncrementally() |
9207 |
9207 |
9213 from .SpellCheckingDialog import SpellCheckingDialog |
9213 from .SpellCheckingDialog import SpellCheckingDialog |
9214 |
9214 |
9215 sline, sindex, eline, eindex = self.getSelection() |
9215 sline, sindex, eline, eindex = self.getSelection() |
9216 startPos = self.positionFromLineIndex(sline, sindex) |
9216 startPos = self.positionFromLineIndex(sline, sindex) |
9217 endPos = self.positionFromLineIndex(eline, eindex) |
9217 endPos = self.positionFromLineIndex(eline, eindex) |
9218 dlg = SpellCheckingDialog(self.spell, startPos, endPos, self) |
9218 dlg = SpellCheckingDialog(self.spell, startPos, endPos, parent=self) |
9219 dlg.exec() |
9219 dlg.exec() |
9220 |
9220 |
9221 @pyqtSlot() |
9221 @pyqtSlot() |
9222 def __checkSpellingWord(self): |
9222 def __checkSpellingWord(self): |
9223 """ |
9223 """ |
9227 |
9227 |
9228 line, index = self.lineIndexFromPosition(self.spellingMenuPos) |
9228 line, index = self.lineIndexFromPosition(self.spellingMenuPos) |
9229 wordStart, wordEnd = self.getWordBoundaries(line, index) |
9229 wordStart, wordEnd = self.getWordBoundaries(line, index) |
9230 wordStartPos = self.positionFromLineIndex(line, wordStart) |
9230 wordStartPos = self.positionFromLineIndex(line, wordStart) |
9231 wordEndPos = self.positionFromLineIndex(line, wordEnd) |
9231 wordEndPos = self.positionFromLineIndex(line, wordEnd) |
9232 dlg = SpellCheckingDialog(self.spell, wordStartPos, wordEndPos, self) |
9232 dlg = SpellCheckingDialog(self.spell, wordStartPos, wordEndPos, parent=self) |
9233 dlg.exec() |
9233 dlg.exec() |
9234 |
9234 |
9235 @pyqtSlot() |
9235 @pyqtSlot() |
9236 def __showContextMenuSpelling(self): |
9236 def __showContextMenuSpelling(self): |
9237 """ |
9237 """ |
9671 from .SortOptionsDialog import SortOptionsDialog |
9671 from .SortOptionsDialog import SortOptionsDialog |
9672 |
9672 |
9673 if not self.selectionIsRectangle(): |
9673 if not self.selectionIsRectangle(): |
9674 return |
9674 return |
9675 |
9675 |
9676 dlg = SortOptionsDialog() |
9676 dlg = SortOptionsDialog(parent=self) |
9677 if dlg.exec() == QDialog.DialogCode.Accepted: |
9677 if dlg.exec() == QDialog.DialogCode.Accepted: |
9678 ascending, alnum, caseSensitive = dlg.getData() |
9678 ascending, alnum, caseSensitive = dlg.getData() |
9679 ( |
9679 ( |
9680 origStartLine, |
9680 origStartLine, |
9681 origStartIndex, |
9681 origStartIndex, |
10280 withProject = ( |
10280 withProject = ( |
10281 self.fileName |
10281 self.fileName |
10282 and self.project.isOpen() |
10282 and self.project.isOpen() |
10283 and self.project.isProjectCategory(self.fileName, "SOURCES") |
10283 and self.project.isProjectCategory(self.fileName, "SOURCES") |
10284 ) |
10284 ) |
10285 dlg = BlackConfigurationDialog(withProject=withProject) |
10285 dlg = BlackConfigurationDialog(withProject=withProject, parent=self) |
10286 if dlg.exec() == QDialog.DialogCode.Accepted: |
10286 if dlg.exec() == QDialog.DialogCode.Accepted: |
10287 config = dlg.getConfiguration() |
10287 config = dlg.getConfiguration() |
10288 |
10288 |
10289 formattingDialog = BlackFormattingDialog( |
10289 formattingDialog = BlackFormattingDialog( |
10290 config, [self.fileName], project=self.project, action=action |
10290 config, |
|
10291 [self.fileName], |
|
10292 project=self.project, |
|
10293 action=action, |
|
10294 parent=self, |
10291 ) |
10295 ) |
10292 formattingDialog.exec() |
10296 formattingDialog.exec() |
10293 |
10297 |
10294 def __performImportSortingWithIsort(self, action): |
10298 def __performImportSortingWithIsort(self, action): |
10295 """ |
10299 """ |
10316 withProject = ( |
10320 withProject = ( |
10317 self.fileName |
10321 self.fileName |
10318 and self.project.isOpen() |
10322 and self.project.isOpen() |
10319 and self.project.isProjectCategory(self.fileName, "SOURCES") |
10323 and self.project.isProjectCategory(self.fileName, "SOURCES") |
10320 ) |
10324 ) |
10321 dlg = IsortConfigurationDialog(withProject=withProject) |
10325 dlg = IsortConfigurationDialog(withProject=withProject, parent=self) |
10322 if dlg.exec() == QDialog.DialogCode.Accepted: |
10326 if dlg.exec() == QDialog.DialogCode.Accepted: |
10323 config = dlg.getConfiguration() |
10327 config = dlg.getConfiguration() |
10324 |
10328 |
10325 formattingDialog = IsortFormattingDialog( |
10329 formattingDialog = IsortFormattingDialog( |
10326 config, |
10330 config, |
10327 [self.fileName], |
10331 [self.fileName], |
10328 project=self.project if withProject else None, |
10332 project=self.project if withProject else None, |
10329 action=action, |
10333 action=action, |
|
10334 parent=self, |
10330 ) |
10335 ) |
10331 formattingDialog.exec() |
10336 formattingDialog.exec() |