ViewManager/ViewManager.py

changeset 1131
7781e396c903
parent 1128
b8ab8eac9dde
child 1134
9185e9dd52ef
equal deleted inserted replaced
1130:3e9f0330f833 1131:7781e396c903
79 @param evt key event (QKeyPressEvent) 79 @param evt key event (QKeyPressEvent)
80 """ 80 """
81 if evt.key() == Qt.Key_Escape: 81 if evt.key() == Qt.Key_Escape:
82 self.escPressed.emit() 82 self.escPressed.emit()
83 else: 83 else:
84 QLineEdit.keyPressEvent(self, evt) # pass it on 84 super().keyPressEvent(evt) # pass it on
85 85
86 def focusInEvent(self, evt): 86 def focusInEvent(self, evt):
87 """ 87 """
88 Re-implemented to record the current editor widget. 88 Re-implemented to record the current editor widget.
89 89
90 @param evt focus event (QFocusEvent) 90 @param evt focus event (QFocusEvent)
91 """ 91 """
92 self.gotFocus.emit() 92 self.gotFocus.emit()
93 QLineEdit.focusInEvent(self, evt) # pass it on 93 super().focusInEvent(evt) # pass it on
94 94
95 95
96 class ViewManager(QObject): 96 class ViewManager(QObject):
97 """ 97 """
98 Base class inherited by all specific viewmanager classes. 98 Base class inherited by all specific viewmanager classes.
130 Constructor 130 Constructor
131 131
132 @param ui reference to the main user interface 132 @param ui reference to the main user interface
133 @param dbs reference to the debug server object 133 @param dbs reference to the debug server object
134 """ 134 """
135 QObject.__init__(self) 135 super().__init__()
136 136
137 # initialize the instance variables 137 # initialize the instance variables
138 self.editors = [] 138 self.editors = []
139 self.currentEditor = None 139 self.currentEditor = None
140 self.untitledCount = 0 140 self.untitledCount = 0

eric ide

mercurial