|
|
Display a round or rectangular light emitting diode.
It is configurable to five colors, the two on/off states and three styles (or "looks");
It may display itself in a performant flat view, a round view with light spot or a round view sunken in the screen.
enum |
Status of the light is on/off.
enum |
Shades of the lamp.
enum |
Display a flat, round or sunken LED.
Displaying the LED flat is less time and color consuming, but not so nice to see.
The sunken LED itself is (certainly) smaller than the round LED because of the 3 shading circles and is most time consuming. Makes sense for LED > 15x15 pixels.
The widget will be updated on the next repaining event.
|
Constructs a green, round LED widget which will initially be turned on.
|
Constructor with the ledcolor, the parent widget, and the name.
The State will be defaulted On and the Look round.
Parameters:
|
Constructor with the ledcolor, ledstate, ledlook, the parent widget, and the name.
Differs from above only in the parameters, which configure all settings.
Parameters:
~ |
Destructor
State |
[const]
Hand back the current state of the widget (on/off).
Shape |
[const]
const QColor |
[const]
Hand back the color of the widget
Look |
[const]
Hand back the look of the widget.
int |
[const]
hands back the factor to darken the LED.
void |
Sets the state of the widget to On or Off.
The widget will be painted immediately.
Parameters:
See also: on(), off(), toggle(), toggleState()
void |
Set the shape.
void |
Toggle the state of the LED from Off to On and vice versa.
The widget will be repainted when returning to the main event loop.
void |
Set the color of the widget. The Color is shown with the KLed::On state. The KLed::Off state is shown with QColor.dark() method
The widget calls the update() method, so it will be updated when entering the main event loop.
Parameters:
void |
Set the factor to darken the LED in OFF state. Same as QColor::dark(). "darkfactor should be greater than 100, else the LED gets lighter in OFF state. Defaults to 300.
Parameters:
void |
Set 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.
Parameters:
void |
[slot]
Toggle the state of the led from Off to On or vice versa.
The widget repaints itself immediately.
void |
[slot]
Sets the state of the widget to On.
The widget will be painted immediately.
See also: off(), toggle(), toggleState(), setState()
void |
[slot]
Sets the state of the widget to Off.
The widget will be painted immediately.
See also: on(), toggle(), toggleState(), setState()
void |
[protected virtual]
Paints a circular, flat LED.
void |
[protected virtual]
Paints a circular, raised LED.
void |
[protected virtual]
Paints a circular, sunken LED.
void |
[protected virtual]
Paints a rectangular, flat LED.
void |
[protected virtual]
Paints a rectangular LED, either raised or sunken, depending on its argument.
void |
[protected]