11 from PyQt4.QtGui import QColor, QPalette, QApplication, QLinearGradient, QIcon |
11 from PyQt4.QtGui import QColor, QPalette, QApplication, QLinearGradient, QIcon |
12 try: |
12 try: |
13 from PyQt4.QtNetwork import QSslCertificate |
13 from PyQt4.QtNetwork import QSslCertificate |
14 except ImportError: |
14 except ImportError: |
15 QSslCertificate = None # __IGNORE_WARNING__ |
15 QSslCertificate = None # __IGNORE_WARNING__ |
16 from PyQt4.QtWebKit import QWebSettings |
16 from PyQt4.QtWebKit import QWebSettings, QWebPage |
17 |
17 |
18 from E5Gui.E5LineEdit import E5LineEdit |
18 from E5Gui.E5LineEdit import E5LineEdit |
19 from E5Gui.E5LineEditButton import E5LineEditButton |
19 from E5Gui.E5LineEditButton import E5LineEditButton |
20 |
20 |
21 import Helpviewer.HelpWindow |
21 import Helpviewer.HelpWindow |
271 """ |
271 """ |
272 if self.text() == "" and self.__browser is not None: |
272 if self.text() == "" and self.__browser is not None: |
273 self.__browserUrlChanged(self.__browser.url()) |
273 self.__browserUrlChanged(self.__browser.url()) |
274 E5LineEdit.focusOutEvent(self, evt) |
274 E5LineEdit.focusOutEvent(self, evt) |
275 |
275 |
|
276 def mousePressEvent(self, evt): |
|
277 """ |
|
278 Protected method called by a mouse press event. |
|
279 |
|
280 @param evt reference to the mouse event (QMouseEvent) |
|
281 """ |
|
282 if evt.button() == Qt.XButton1: |
|
283 self.__mw.currentBrowser().pageAction(QWebPage.Back).trigger() |
|
284 elif evt.button() == Qt.XButton2: |
|
285 self.__mw.currentBrowser().pageAction(QWebPage.Forward).trigger() |
|
286 else: |
|
287 super().mousePressEvent(evt) |
|
288 |
276 def mouseDoubleClickEvent(self, evt): |
289 def mouseDoubleClickEvent(self, evt): |
277 """ |
290 """ |
278 Protected method to handle mouse double click events. |
291 Protected method to handle mouse double click events. |
279 |
292 |
280 @param evt reference to the mouse event (QMouseEvent) |
293 @param evt reference to the mouse event (QMouseEvent) |