QwwLed Class
The QwwLed class provides a widget that displays a LED. More...
Header: | #include <QwwLed> |
Public Types
enum | Shape { Circular, RectangularSunken, RectangularRaised, RectangularPlain } |
Properties
|
Public Functions
QwwLed(QWidget * parent = 0) | |
QwwLed(const QColor & col, Shape shap = Circular, QWidget * parent = 0) | |
QColor | color() const |
int | frameWidth() const |
bool | isAnimated() const |
bool | isChecked() const |
int | period() const |
Shape | shape() const |
Public Slots
void | blink() |
void | setAnimated(bool) |
void | setChecked(bool v) |
void | setColor(const QColor & c) |
void | setFrameWidth(int w) |
void | setPeriod(int) |
void | setShape(Shape s) |
void | toggle() |
Signals
void | clicked() |
void | colorChanged(const QColor & color) |
void | toggled(bool checked) |
Detailed Description
The QwwLed class provides a widget that displays a LED.
Member Type Documentation
enum QwwLed::Shape
Constant | Value | Description |
---|---|---|
QwwLed::Circular | 0 | round LED |
QwwLed::RectangularSunken | 1 | rectangular LED with sunken appearance |
QwwLed::RectangularRaised | 2 | rectangular LED with raised appearence |
QwwLed::RectangularPlain | 3 | rectangular flat LED |
Property Documentation
animated : bool
This property holds property keeping information whether the diode is animating.
Access functions:
bool | isAnimated() const |
void | setAnimated(bool) |
checked : bool
This property holds property keeping information whether the led is turned on.
Access functions:
bool | isChecked() const |
void | setChecked(bool v) |
color : QColor
This property holds this property holds the colour of the diode.
Access functions:
QColor | color() const |
void | setColor(const QColor & c) |
frameWidth : int
This property holds the width of led's frame.
Access functions:
int | frameWidth() const |
void | setFrameWidth(int w) |
period : int
This property holds blink period of the diode.
Access functions:
int | period() const |
void | setPeriod(int) |
shape : Shape
This property holds this property holds the shape of the diode.
Access functions:
Shape | shape() const |
void | setShape(Shape s) |
Member Function Documentation
QwwLed::QwwLed(QWidget * parent = 0)
Constructs a led widget with a given parent.
QwwLed::QwwLed(const QColor & col, Shape shap = Circular, QWidget * parent = 0)
Constructs a led widget of colour col and shape shap with a given parent.
void QwwLed::blink() [slot]
Blinks the diode once.
void QwwLed::clicked() [signal]
Signal emitted when the diode is clicked
void QwwLed::colorChanged(const QColor & color) [signal]
Signal emitted when the color of the diode is changed to color.
void QwwLed::toggle() [slot]
Toggles the diode on or off.
void QwwLed::toggled(bool checked) [signal]
Signal emitted when the diode is toggled.
checked carries the information about the current state of the diode.