129 |
130 |
130 def createSubMenu(self, menu, view, hitTestResult): |
131 def createSubMenu(self, menu, view, hitTestResult): |
131 """ |
132 """ |
132 Public method to create the personal information sub-menu. |
133 Public method to create the personal information sub-menu. |
133 |
134 |
134 @param menu reference to the main menu (QMenu) |
135 @param menu reference to the main menu |
135 @param view reference to the view (HelpBrowser) |
136 @type QMenu |
|
137 @param view reference to the view |
|
138 @type WebBrowserView |
136 @param hitTestResult reference to the hit test result |
139 @param hitTestResult reference to the hit test result |
137 (WebHitTestResult) |
140 @type WebHitTestResult |
138 """ |
141 """ |
139 self.__view = view |
142 self.__view = view |
140 self.__clickedPos = hitTestResult.pos() |
143 self.__clickedPos = hitTestResult.pos() |
141 |
144 |
142 if not hitTestResult.isContentEditable(): |
145 if not hitTestResult.isContentEditable(): |
188 |
191 |
189 def viewKeyPressEvent(self, view, evt): |
192 def viewKeyPressEvent(self, view, evt): |
190 """ |
193 """ |
191 Protected method to handle key press events we are interested in. |
194 Protected method to handle key press events we are interested in. |
192 |
195 |
193 @param view reference to the view (HelpBrowser) |
196 @param view reference to the view |
194 @param evt reference to the key event (QKeyEvent) |
197 @type WebBrowserView |
195 @return flag indicating handling of the event (boolean) |
198 @param evt reference to the key event |
|
199 @type QKeyEvent |
|
200 @return flag indicating handling of the event |
|
201 @rtype bool |
196 """ |
202 """ |
197 if view is None: |
203 if view is None: |
198 return False |
204 return False |
199 |
205 |
200 isEnter = evt.key() in [Qt.Key.Key_Return, Qt.Key.Key_Enter] |
206 isEnter = evt.key() in [Qt.Key.Key_Return, Qt.Key.Key_Enter] |