197 |
197 |
198 def __finished(self): |
198 def __finished(self): |
199 """ |
199 """ |
200 Private method called, when the shell process has finished. |
200 Private method called, when the shell process has finished. |
201 """ |
201 """ |
202 QsciScintilla.clear(self) |
202 super().clear() |
203 |
203 |
204 self.__startAct.setEnabled(True) |
204 self.__startAct.setEnabled(True) |
205 self.__stopAct.setEnabled(False) |
205 self.__stopAct.setEnabled(False) |
206 self.__resetAct.setEnabled(False) |
206 self.__resetAct.setEnabled(False) |
207 self.__ctrlAct.setEnabled(False) |
207 self.__ctrlAct.setEnabled(False) |
479 Protected method to handle the mouse press event. |
479 Protected method to handle the mouse press event. |
480 |
480 |
481 @param event the mouse press event (QMouseEvent) |
481 @param event the mouse press event (QMouseEvent) |
482 """ |
482 """ |
483 self.setFocus() |
483 self.setFocus() |
484 QsciScintillaCompat.mousePressEvent(self, event) |
484 super().mousePressEvent(event) |
485 |
485 |
486 def editorCommand(self, cmd): |
486 def editorCommand(self, cmd): |
487 """ |
487 """ |
488 Public method to perform an editor command. |
488 Public method to perform an editor command. |
489 |
489 |
515 if len(txt) and txt >= " ": |
515 if len(txt) and txt >= " ": |
516 if not self.__isCursorOnLastLine(): |
516 if not self.__isCursorOnLastLine(): |
517 line, col = self.__getEndPos() |
517 line, col = self.__getEndPos() |
518 self.setCursorPosition(line, col) |
518 self.setCursorPosition(line, col) |
519 self.prline, self.prcol = self.getCursorPosition() |
519 self.prline, self.prcol = self.getCursorPosition() |
520 QsciScintillaCompat.keyPressEvent(self, ev) |
520 super().keyPressEvent(ev) |
521 self.incrementalSearchActive = True |
521 self.incrementalSearchActive = True |
522 else: |
522 else: |
523 ev.ignore() |
523 ev.ignore() |
524 |
524 |
525 def __QScintillaLeftDeleteCommand(self, method): |
525 def __QScintillaLeftDeleteCommand(self, method): |
905 except AttributeError: |
905 except AttributeError: |
906 pass |
906 pass |
907 self.setCaretWidth(self.caretWidth) |
907 self.setCaretWidth(self.caretWidth) |
908 self.setCursorFlashTime(QApplication.cursorFlashTime()) |
908 self.setCursorFlashTime(QApplication.cursorFlashTime()) |
909 |
909 |
910 QsciScintillaCompat.focusInEvent(self, event) |
910 super().focusInEvent(event) |
911 |
911 |
912 def focusOutEvent(self, event): |
912 def focusOutEvent(self, event): |
913 """ |
913 """ |
914 Public method called when the shell loses focus. |
914 Public method called when the shell loses focus. |
915 |
915 |
918 try: |
918 try: |
919 self.vm.editorActGrp.setEnabled(False) |
919 self.vm.editorActGrp.setEnabled(False) |
920 except AttributeError: |
920 except AttributeError: |
921 pass |
921 pass |
922 self.setCaretWidth(0) |
922 self.setCaretWidth(0) |
923 QsciScintillaCompat.focusOutEvent(self, event) |
923 super().focusOutEvent(event) |
924 |
924 |
925 def insert(self, txt): |
925 def insert(self, txt): |
926 """ |
926 """ |
927 Public slot to insert text at the current cursor position. |
927 Public slot to insert text at the current cursor position. |
928 |
928 |