[kdeui Index] [kdeui Hierarchy] [Headers]
A round led widget More...
#include <kled.h>
Inherits: QWidget (qt)
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.
[public]
color of the led
[public]
Status of the light is on/off
[public]
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.
[public]
Hands back the current state of the widget (on/off) see enum State
[public]
Hands back the color of the widget see enum Color
[public]
Hands back the color of the widget in RGB value. The value depends on the state of the the led (on, off) see QRgb
[public]
Hands back the look of the widget see enum Look
[public]
sets the state of the widget to On or Off. The widget will be painted immediately. see also: on(), off(), toggle(), toggleState()
state | the led state on or off |
[public]
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.
[public]
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
color | new Color of the led |
[public]
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
look | new look of the led |
[public slot]
toggles the state of the led from Off to On an vice versa. The widget repaints itself immediately.
[public slot]
sets the state of the widget to On. The widget will be painted immediately. see off(), toggle(), toggleState(), setState()
[public slot]
sets the state of the widget to Off. The widget will be painted immediately. see also: on(), toggle(), toggleState(), setState()
| Kdoc |