160 self.__lastConfigurationPageName = "" |
160 self.__lastConfigurationPageName = "" |
161 |
161 |
162 WebBrowserWindow._isPrivate = private |
162 WebBrowserWindow._isPrivate = private |
163 |
163 |
164 self.__shortcutsDialog = None |
164 self.__shortcutsDialog = None |
165 |
|
166 self.__eventMouseButtons = Qt.MouseButton.NoButton |
|
167 self.__eventKeyboardModifiers = Qt.KeyboardModifier.NoModifier |
|
168 |
165 |
169 WebBrowserWindow.setUseQtHelp(qthelp or bool(searchWord)) |
166 WebBrowserWindow.setUseQtHelp(qthelp or bool(searchWord)) |
170 |
167 |
171 self.webProfile(private) |
168 self.webProfile(private) |
172 self.networkManager() |
169 self.networkManager() |
4407 """ |
4404 """ |
4408 self.statusBar().setVisible(visible) |
4405 self.statusBar().setVisible(visible) |
4409 |
4406 |
4410 Preferences.setWebBrowser("StatusBarVisible", visible) |
4407 Preferences.setWebBrowser("StatusBarVisible", visible) |
4411 |
4408 |
4412 def eventMouseButtons(self): |
|
4413 """ |
|
4414 Public method to get the last recorded mouse buttons. |
|
4415 |
|
4416 @return mouse buttons (Qt.MouseButtons) |
|
4417 """ |
|
4418 return self.__eventMouseButtons |
|
4419 |
|
4420 def eventKeyboardModifiers(self): |
|
4421 """ |
|
4422 Public method to get the last recorded keyboard modifiers. |
|
4423 |
|
4424 @return keyboard modifiers (Qt.KeyboardModifiers) |
|
4425 """ |
|
4426 return self.__eventKeyboardModifiers |
|
4427 |
|
4428 def setEventMouseButtons(self, buttons): |
|
4429 """ |
|
4430 Public method to record mouse buttons. |
|
4431 |
|
4432 @param buttons mouse buttons to record (Qt.MouseButtons) |
|
4433 """ |
|
4434 self.__eventMouseButtons = buttons |
|
4435 |
|
4436 def setEventKeyboardModifiers(self, modifiers): |
|
4437 """ |
|
4438 Public method to record keyboard modifiers. |
|
4439 |
|
4440 @param modifiers keyboard modifiers to record (Qt.KeyboardModifiers) |
|
4441 """ |
|
4442 self.__eventKeyboardModifiers = modifiers |
|
4443 |
|
4444 def mousePressEvent(self, evt): |
|
4445 """ |
|
4446 Protected method called by a mouse press event. |
|
4447 |
|
4448 @param evt reference to the mouse event (QMouseEvent) |
|
4449 """ |
|
4450 if evt.button() == Qt.MouseButton.XButton1: |
|
4451 self.currentBrowser().triggerPageAction( |
|
4452 QWebEnginePage.WebAction.Back) |
|
4453 elif evt.button() == Qt.MouseButton.XButton2: |
|
4454 self.currentBrowser().triggerPageAction( |
|
4455 QWebEnginePage.WebAction.Forward) |
|
4456 else: |
|
4457 super().mousePressEvent(evt) |
|
4458 |
|
4459 @classmethod |
4409 @classmethod |
4460 def feedsManager(cls): |
4410 def feedsManager(cls): |
4461 """ |
4411 """ |
4462 Class method to get a reference to the RSS feeds manager. |
4412 Class method to get a reference to the RSS feeds manager. |
4463 |
4413 |