src/eric7/WebBrowser/UrlBar/SslLabel.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9413
80c06d472826
equal deleted inserted replaced
9220:e9e7eca7efee 9221:bf71ee032bb4
14 14
15 class SslLabel(EricClickableLabel): 15 class SslLabel(EricClickableLabel):
16 """ 16 """
17 Class implementing the label to show some SSL info (if available). 17 Class implementing the label to show some SSL info (if available).
18 """ 18 """
19
19 okStyle = "QLabel { color : white; background-color : green; }" 20 okStyle = "QLabel { color : white; background-color : green; }"
20 nokStyle = "QLabel { color : white; background-color : red; }" 21 nokStyle = "QLabel { color : white; background-color : red; }"
21 22
22 def __init__(self, parent=None): 23 def __init__(self, parent=None):
23 """ 24 """
24 Constructor 25 Constructor
25 26
26 @param parent reference to the parent widget (QWidget) 27 @param parent reference to the parent widget (QWidget)
27 """ 28 """
28 super().__init__(parent) 29 super().__init__(parent)
29 30
30 self.setFocusPolicy(Qt.FocusPolicy.NoFocus) 31 self.setFocusPolicy(Qt.FocusPolicy.NoFocus)
31 32
32 def setValidity(self, valid): 33 def setValidity(self, valid):
33 """ 34 """
34 Public method to set the validity indication. 35 Public method to set the validity indication.
35 36
36 @param valid flag indicating the certificate validity (boolean) 37 @param valid flag indicating the certificate validity (boolean)
37 """ 38 """
38 if valid: 39 if valid:
39 self.setStyleSheet(SslLabel.okStyle) 40 self.setStyleSheet(SslLabel.okStyle)
40 else: 41 else:

eric ide

mercurial