|
|
KLed displays a round light emmiting diode.
It is configurable to 5 colors and the 2 on/off states.
It may display itself in a performant flat view, a round view with light spot or a round view sunken in the screen.
enum |
color of the led
enum |
Status of the light is on/off
enum |
Displays a flat, round or round-sunken led. Displaying the led flat is less time and color consuming, but not so nice to see.
The sunken led itself is (for shure) smaller than the round led because of the 3 shading circles and is most time consuming. Makes sense for led > 15x15 pixels.
timings: ( AMD K5/133, Diamond Stealth 64 PCI Graphics, widgetsize 29x29 ) - flat approx. 0.7 msec per paint - round approx. 2.9 msec per paint - sunken approx. 3.3 msec per paint
The widget will be updated the next repaining event.
|
Constructor with the ledcolor, the parent widget, and the name.
The State will be defaulted On and the Look round
Parameters:
ledcolor | initializes with Color |
parent | will be handed over to QWidget |
name | will be handed over to QWidget |
|
Constructor with the ledcolor, ledstate, ledlook, the parent widget, and the name.
Differs from above only in the parameters, which configure all settings
Parameters:
ledcolor | initializes with Color |
state | sets the State |
look | sets the Look |
parent | will be handed over to QWidget |
name | will be handed over to QWidget |
inline State |
[const]
Hands back the current state of the widget (on/off) see enum State
inline Color |
[const]
Hands back the color of the widget see enum Color
inline QRgb |
[const]
Hands back the color of the widget in RGB value. The value depends on the state of the the led (on, off) see QRgb
inline Look |
[const]
Hands back the look of the widget see enum Look
inline void |
sets the state of the widget to On or Off. The widget will be painted immediately. see also: on(), off(), toggle(), toggleState()
Parameters:
state | the led state on or off |
inline void |
toggles the state of the led from Off to On and vice versa. The widget will be repainted when returning to the main event loop.
inline void |
Sets the color of the widget. The widget calls the update method, so it will be updated when entering the main event loop.
see also: enum Color
Parameters:
color | new Color of the led |
inline void |
Sets the look of the widget. the look may be flat, round or sunken. The widget calls the update method, so it will be updated when entering the main event loop.
see also: enum Look
Parameters:
look | new look of the led |
inline void |
[slot]
toggles the state of the led from Off to On an vice versa. The widget repaints itself immediately.
inline void |
[slot]
sets the state of the widget to On. The widget will be painted immediately. see off(), toggle(), toggleState(), setState()
inline void |
[slot]
sets the state of the widget to Off. The widget will be painted immediately. see also: on(), toggle(), toggleState(), setState()