8 |
8 |
9 It was inspired by KLed. |
9 It was inspired by KLed. |
10 """ |
10 """ |
11 |
11 |
12 from PyQt4.QtCore import Qt, QSize |
12 from PyQt4.QtCore import Qt, QSize |
13 from PyQt4.QtGui import QWidget, QColor, QRadialGradient, QPalette, QPainter, QBrush |
13 from PyQt4.QtGui import QWidget, QColor, QRadialGradient, QPalette, QPainter, \ |
|
14 QBrush |
14 |
15 |
15 E5LedRectangular = 0 |
16 E5LedRectangular = 0 |
16 E5LedCircular = 1 |
17 E5LedCircular = 1 |
17 |
18 |
18 |
19 |
19 class E5Led(QWidget): |
20 class E5Led(QWidget): |
20 """ |
21 """ |
21 Class implementing a LED widget. |
22 Class implementing a LED widget. |
22 """ |
23 """ |
23 def __init__(self, parent=None, color=None, shape=E5LedCircular, rectRatio=1): |
24 def __init__(self, parent=None, color=None, shape=E5LedCircular, |
|
25 rectRatio=1): |
24 """ |
26 """ |
25 Constructor |
27 Constructor |
26 |
28 |
27 @param parent reference to parent widget (QWidget) |
29 @param parent reference to parent widget (QWidget) |
28 @param color color of the LED (QColor) |
30 @param color color of the LED (QColor) |