ViewManager/ViewManager.py

changeset 3591
2f2a4a76dd22
parent 3547
c2a187c63209
child 3656
441956d8fce5
equal deleted inserted replaced
3590:5280e37405b8 3591:2f2a4a76dd22
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
4276 4276
4277 return res 4277 return res
4278 4278
4279 def closeAllWindows(self): 4279 def closeAllWindows(self):
4280 """ 4280 """
4281 Private method to close all editor windows via file menu. 4281 Public method to close all editor windows via file menu.
4282 """ 4282 """
4283 savedEditors = self.editors[:] 4283 savedEditors = self.editors[:]
4284 for editor in savedEditors: 4284 for editor in savedEditors:
4285 self.closeEditor(editor) 4285 self.closeEditor(editor)
4286 4286
4570 pixmap = QPixmap() 4570 pixmap = QPixmap()
4571 return pixmap 4571 return pixmap
4572 4572
4573 def __unhighlight(self): 4573 def __unhighlight(self):
4574 """ 4574 """
4575 Privat slot to switch of all highlights. 4575 Private slot to switch of all highlights.
4576 """ 4576 """
4577 self.unhighlight() 4577 self.unhighlight()
4578 4578
4579 def unhighlight(self, current=False): 4579 def unhighlight(self, current=False):
4580 """ 4580 """
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")

eric ide

mercurial