63 elif cmd == QsciScintilla.SCI_CANCEL: |
63 elif cmd == QsciScintilla.SCI_CANCEL: |
64 self.escPressed.emit() |
64 self.escPressed.emit() |
65 |
65 |
66 def keyPressEvent(self, evt): |
66 def keyPressEvent(self, evt): |
67 """ |
67 """ |
68 Re-implemented to handle the press of the ESC key. |
68 Protected method to handle the press of the ESC key. |
69 |
69 |
70 @param evt key event (QKeyPressEvent) |
70 @param evt key event (QKeyPressEvent) |
71 """ |
71 """ |
72 if evt.key() == Qt.Key_Escape: |
72 if evt.key() == Qt.Key_Escape: |
73 self.escPressed.emit() |
73 self.escPressed.emit() |
74 else: |
74 else: |
75 super(QuickSearchLineEdit, self).keyPressEvent(evt) # pass it on |
75 super(QuickSearchLineEdit, self).keyPressEvent(evt) # pass it on |
76 |
76 |
77 def focusInEvent(self, evt): |
77 def focusInEvent(self, evt): |
78 """ |
78 """ |
79 Re-implemented to record the current editor widget. |
79 Protected method to record the current editor widget. |
80 |
80 |
81 @param evt focus event (QFocusEvent) |
81 @param evt focus event (QFocusEvent) |
82 """ |
82 """ |
83 self.gotFocus.emit() |
83 self.gotFocus.emit() |
84 super(QuickSearchLineEdit, self).focusInEvent(evt) # pass it on |
84 super(QuickSearchLineEdit, self).focusInEvent(evt) # pass it on |
6694 ## Symbols viewer related methods |
6694 ## Symbols viewer related methods |
6695 ####################################################################### |
6695 ####################################################################### |
6696 |
6696 |
6697 def insertSymbol(self, txt): |
6697 def insertSymbol(self, txt): |
6698 """ |
6698 """ |
6699 Private slot to insert a symbol text into the active window. |
6699 Public slot to insert a symbol text into the active window. |
6700 |
6700 |
6701 @param txt text to be inserted (string) |
6701 @param txt text to be inserted (string) |
6702 """ |
6702 """ |
6703 if self.__lastFocusWidget == e5App().getObject("Shell"): |
6703 if self.__lastFocusWidget == e5App().getObject("Shell"): |
6704 e5App().getObject("Shell").insert(txt) |
6704 e5App().getObject("Shell").insert(txt) |
6713 ## Numbers viewer related methods |
6713 ## Numbers viewer related methods |
6714 ####################################################################### |
6714 ####################################################################### |
6715 |
6715 |
6716 def insertNumber(self, txt): |
6716 def insertNumber(self, txt): |
6717 """ |
6717 """ |
6718 Private slot to insert a number text into the active window. |
6718 Public slot to insert a number text into the active window. |
6719 |
6719 |
6720 @param txt text to be inserted (string) |
6720 @param txt text to be inserted (string) |
6721 """ |
6721 """ |
6722 if self.__lastFocusWidget == e5App().getObject("Shell"): |
6722 if self.__lastFocusWidget == e5App().getObject("Shell"): |
6723 aw = e5App().getObject("Shell") |
6723 aw = e5App().getObject("Shell") |