E5Gui/E5Led.py

changeset 2953
703452a2876f
parent 2302
f29e9405c851
child 2990
583beaf0b4b8
equal deleted inserted replaced
2952:94fc661a54a2 2953:703452a2876f
25 Constructor 25 Constructor
26 26
27 @param parent reference to parent widget (QWidget) 27 @param parent reference to parent widget (QWidget)
28 @param color color of the LED (QColor) 28 @param color color of the LED (QColor)
29 @param shape shape of the LED (E5LedCircular, E5LedRectangular) 29 @param shape shape of the LED (E5LedCircular, E5LedRectangular)
30 @param rectRation ratio width to height, if shape is rectangular (float) 30 @param rectRatio ratio width to height, if shape is rectangular (float)
31 """ 31 """
32 super().__init__(parent) 32 super().__init__(parent)
33 33
34 if color is None: 34 if color is None:
35 color = QColor("green") 35 color = QColor("green")
138 """ 138 """
139 return self.__shape 139 return self.__shape
140 140
141 def ratio(self): 141 def ratio(self):
142 """ 142 """
143 Public method to return the LED rectangular ratio (width / height). 143 Public method to return the LED rectangular ratio [= width / height].
144 144
145 @return LED rectangular ratio (float) 145 @return LED rectangular ratio (float)
146 """ 146 """
147 return self.__rectRatio 147 return self.__rectRatio
148 148

eric ide

mercurial