Helpviewer/UrlBar/SslLabel.py

branch
Py2 comp.
changeset 2525
8b507a9a2d40
parent 2432
b1a2f9054b28
child 3145
a9de05d4a22f
equal deleted inserted replaced
2523:139f182b72f6 2525:8b507a9a2d40
4 # 4 #
5 5
6 """ 6 """
7 Module implementing the label to show some SSL info. 7 Module implementing the label to show some SSL info.
8 """ 8 """
9
10 from __future__ import unicode_literals # __IGNORE_WARNING__
9 11
10 from PyQt4.QtCore import Qt, pyqtSignal, QPoint 12 from PyQt4.QtCore import Qt, pyqtSignal, QPoint
11 from PyQt4.QtGui import QLabel 13 from PyQt4.QtGui import QLabel
12 14
13 15
24 """ 26 """
25 Constructor 27 Constructor
26 28
27 @param parent reference to the parent widget (QWidget) 29 @param parent reference to the parent widget (QWidget)
28 """ 30 """
29 super().__init__(parent) 31 super(SslLabel, self).__init__(parent)
30 32
31 self.setFocusPolicy(Qt.NoFocus) 33 self.setFocusPolicy(Qt.NoFocus)
32 self.setCursor(Qt.ArrowCursor) 34 self.setCursor(Qt.ArrowCursor)
33 35
34 def mouseReleaseEvent(self, evt): 36 def mouseReleaseEvent(self, evt):
38 @param evt reference to the mouse event (QMouseEvent) 40 @param evt reference to the mouse event (QMouseEvent)
39 """ 41 """
40 if evt.button() == Qt.LeftButton: 42 if evt.button() == Qt.LeftButton:
41 self.clicked.emit(evt.globalPos()) 43 self.clicked.emit(evt.globalPos())
42 else: 44 else:
43 super().mouseReleaseEvent(evt) 45 super(SslLabel, self).mouseReleaseEvent(evt)
44 46
45 def mouseDoubleClickEvent(self, evt): 47 def mouseDoubleClickEvent(self, evt):
46 """ 48 """
47 Protected method to handle mouse double click events. 49 Protected method to handle mouse double click events.
48 50
49 @param evt reference to the mouse event (QMouseEvent) 51 @param evt reference to the mouse event (QMouseEvent)
50 """ 52 """
51 if evt.button() == Qt.LeftButton: 53 if evt.button() == Qt.LeftButton:
52 self.clicked.emit(evt.globalPos()) 54 self.clicked.emit(evt.globalPos())
53 else: 55 else:
54 super().mouseDoubleClickEvent(evt) 56 super(SslLabel, self).mouseDoubleClickEvent(evt)
55 57
56 def setValidity(self, valid): 58 def setValidity(self, valid):
57 """ 59 """
58 Public method to set the validity indication. 60 Public method to set the validity indication.
59 61

eric ide

mercurial