src/eric7/WebBrowser/PersonalInformationManager/PersonalInformationManager.py

branch
eric7
changeset 10436
f6881d10e995
parent 9653
e67609152c5e
child 10439
21c28b0f9e41
equal deleted inserted replaced
10435:c712d09cc839 10436:f6881d10e995
46 46
47 def __init__(self, parent=None): 47 def __init__(self, parent=None):
48 """ 48 """
49 Constructor 49 Constructor
50 50
51 @param parent reference to the parent object (QObject) 51 @param parent reference to the parent object
52 @type QObject
52 """ 53 """
53 super().__init__(parent) 54 super().__init__(parent)
54 55
55 self.__loaded = False 56 self.__loaded = False
56 self.__allInfo = {} 57 self.__allInfo = {}
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]

eric ide

mercurial