4 # |
4 # |
5 |
5 |
6 """ |
6 """ |
7 Module implementing the URL bar widget. |
7 Module implementing the URL bar widget. |
8 """ |
8 """ |
|
9 |
|
10 from __future__ import unicode_literals # __IGNORE_WARNING__ |
|
11 try: |
|
12 str = unicode |
|
13 except (NameError): |
|
14 pass |
9 |
15 |
10 from PyQt4.QtCore import pyqtSlot, Qt, QPointF, QUrl, QDateTime, qVersion |
16 from PyQt4.QtCore import pyqtSlot, Qt, QPointF, QUrl, QDateTime, qVersion |
11 from PyQt4.QtGui import QColor, QPalette, QLinearGradient, QIcon, QDialog, QApplication |
17 from PyQt4.QtGui import QColor, QPalette, QLinearGradient, QIcon, QDialog, QApplication |
12 try: |
18 try: |
13 from PyQt4.QtNetwork import QSslCertificate # __IGNORE_EXCEPTION__ |
19 from PyQt4.QtNetwork import QSslCertificate # __IGNORE_EXCEPTION__ |
338 if evt.button() == Qt.XButton1: |
344 if evt.button() == Qt.XButton1: |
339 self.__mw.currentBrowser().pageAction(QWebPage.Back).trigger() |
345 self.__mw.currentBrowser().pageAction(QWebPage.Back).trigger() |
340 elif evt.button() == Qt.XButton2: |
346 elif evt.button() == Qt.XButton2: |
341 self.__mw.currentBrowser().pageAction(QWebPage.Forward).trigger() |
347 self.__mw.currentBrowser().pageAction(QWebPage.Forward).trigger() |
342 else: |
348 else: |
343 super().mousePressEvent(evt) |
349 super(UrlBar, self).mousePressEvent(evt) |
344 |
350 |
345 def mouseDoubleClickEvent(self, evt): |
351 def mouseDoubleClickEvent(self, evt): |
346 """ |
352 """ |
347 Protected method to handle mouse double click events. |
353 Protected method to handle mouse double click events. |
348 |
354 |