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 |