27 |
27 |
28 @param parent reference to the parent widget (QWidget) |
28 @param parent reference to the parent widget (QWidget) |
29 """ |
29 """ |
30 super(SafeBrowsingLabel, self).__init__(parent) |
30 super(SafeBrowsingLabel, self).__init__(parent) |
31 |
31 |
32 self.setFocusPolicy(Qt.NoFocus) |
32 self.setFocusPolicy(Qt.FocusPolicy.NoFocus) |
33 self.setCursor(Qt.PointingHandCursor) |
33 self.setCursor(Qt.CursorShape.PointingHandCursor) |
34 |
34 |
35 self.setStyleSheet(SafeBrowsingLabel.nokStyle) |
35 self.setStyleSheet(SafeBrowsingLabel.nokStyle) |
36 |
36 |
37 self.__threatType = "" |
37 self.__threatType = "" |
38 self.__threatMessages = "" |
38 self.__threatMessages = "" |
44 """ |
44 """ |
45 Protected method to handle mouse release events. |
45 Protected method to handle mouse release events. |
46 |
46 |
47 @param evt reference to the mouse event (QMouseEvent) |
47 @param evt reference to the mouse event (QMouseEvent) |
48 """ |
48 """ |
49 if evt.button() == Qt.LeftButton: |
49 if evt.button() == Qt.MouseButton.LeftButton: |
50 self.clicked.emit(evt.globalPos()) |
50 self.clicked.emit(evt.globalPos()) |
51 else: |
51 else: |
52 super(SafeBrowsingLabel, self).mouseReleaseEvent(evt) |
52 super(SafeBrowsingLabel, self).mouseReleaseEvent(evt) |
53 |
53 |
54 def mouseDoubleClickEvent(self, evt): |
54 def mouseDoubleClickEvent(self, evt): |
55 """ |
55 """ |
56 Protected method to handle mouse double click events. |
56 Protected method to handle mouse double click events. |
57 |
57 |
58 @param evt reference to the mouse event (QMouseEvent) |
58 @param evt reference to the mouse event (QMouseEvent) |
59 """ |
59 """ |
60 if evt.button() == Qt.LeftButton: |
60 if evt.button() == Qt.MouseButton.LeftButton: |
61 self.clicked.emit(evt.globalPos()) |
61 self.clicked.emit(evt.globalPos()) |
62 else: |
62 else: |
63 super(SafeBrowsingLabel, self).mouseDoubleClickEvent(evt) |
63 super(SafeBrowsingLabel, self).mouseDoubleClickEvent(evt) |
64 |
64 |
65 @pyqtSlot() |
65 @pyqtSlot() |