#include <led.h>
Inheritance diagram for Led:

Public Types | |
| enum | Color { yellow, orange, red, green, blue } |
| enum | State { Off = 0, On = 1 } |
| enum | Look { flat, round, sunken, rect_sunken, rect_raised } |
Public Methods | |
| Led (Color ledcolor, QWidget *parent = 0, const char *name = 0) | |
| Led (Color ledcolor, State state, Look look, QWidget *parent = 0, const char *name = 0) | |
| State | getState () const |
| Color | getColor () const |
| QRgb | getRgbColor () const |
| Look | getLook () const |
| void | setState (State state) |
| void | toggleState () |
| void | setColor (Color color) |
| void | setLook (Look look) |
Public Slots | |
| void | toggle () |
| void | on () |
| void | off () |
Static Public Methods | |
| const char* | version () |
Protected Methods | |
| void | paintEvent (QPaintEvent *) |
Private Methods | |
| void | paintflat () |
| void | paintround () |
| void | paintsunken () |
| void | paintrect (bool sunken) |
Private Attributes | |
| State | led_state |
| Color | led_color |
| Look | led_look |
| QRgb | current_color |
Static Private Attributes | |
| const QRgb | lightcolor [] = { 0xFFFF00, 0xFFA500, 0xFF0000, 0x00FF00, 0x0000FF } |
| const QRgb | darkcolor [] = { 0xB0B000, 0xA26400, 0x800000, 0x008000, 0x000080 } |
Il widget Led visualizza un led circolare o rettangolare, configurabile in 5 diversi colori e due stati (on/off). Il led puņ apparire in 5 diversi aspetti:
|
|
Colore del led:
|
|
|
Stato del led:
|
|
|
Aspetto del led:
|
|
|
Costruisce un led di colore ledcolor. Lo stato č di default |
|
|
Costruisce un led di colore ledcolor, nello stato state e di aspetto look. |
|
|
Riporta lo stato attuale del led.
|
|
|
Riporta il colore attuale del led.
|
|
|
Riporta il colore attuale del led in componenti RGB.
|
|
|
Riporta l'aspetto attuale del led.
|
|
|
Imposta lo stato del led a state. Lo stato puņ essere
|
|
|
Commuta lo stato corrente del led.
|
|
|
Imposta a color il colore del led.
|
|
|
Imposta a look l'aspetto del led.
|
|
|
Riporta una stringa con la versione (e relativa data) del widget. |
|
|
Questo slot commuta lo stato attuale del led. |
|
|
Questo slot imposta lo stato attuale del led a |
|
|
Questo slot imposta lo stato attuale del led a |
|
|
Gestisce gli eventi di disegno del led, tenendo conto del suo aspetto. |
|
|
Disegna il led con aspetto flat. For internal use only. |
|
|
Disegna il led con aspetto round. For internal use only. |
|
|
Disegna il led con aspetto sunken. For internal use only. |
|
|
Disegna il led con aspetto rect_sunken o rect_raised. For internal use only. |
1.2.1 written by Dimitri van Heesch,
© 1997-2000