cut
1.2.1-pre1
|
LED widget. More...
#include <CutWidgets.h>
Public Slots | |
void | setColorOn (QColor newColorOn) |
void | setColorOff (QColor newColorOff) |
void | setLit (bool newValue) |
void | setNegate (bool newValue) |
Signals | |
void | colorOnChanged (QColor newColorOn) |
Communicates a change in on color. More... | |
void | colorOffChanged (QColor newColorOff) |
Communicates a change in off color. More... | |
void | toggled (bool newValue) |
If the lit value changes, the signal send. More... | |
void | negated (bool newValue) |
If the negate value changes, the signal send. More... | |
Public Member Functions | |
QeLed (QWidget *parent=nullptr) | |
QColor | colorOn () |
QColor | colorOff () |
bool | isLit () |
bool | isNegated () |
Protected Member Functions | |
void | paintEvent (QPaintEvent *event) override |
Properties | |
QColor | colorOn |
Color to be used when the LED is lit, or turned on. More... | |
QColor | colorOff |
Color to be used when the LED is turned off. More... | |
bool | lit |
Indicates if the led is to be on or not. More... | |
bool | negate |
Configures the widget to negate the lit value. More... | |
LED widget.
A LED representation, with two states. The colors for both on and off states can be changed. When the on color is specified, the off color is automatically calculated as a darker shade of the on color
Negate allows to switch state, in case the input signal represents the opposite.
Any color can be used. A base image is used to represent the LED, and the widget replaces the color of the image by the ones indicated in the widgets properties.
A detailed description of RefClass.
|
explicit |
|
inline |
|
signal |
Communicates a change in off color.
|
inline |
|
signal |
Communicates a change in on color.
|
inline |
|
inline |
|
signal |
If the negate value changes, the signal send.
|
overrideprotected |
|
inlineslot |
|
inlineslot |
|
inlineslot |
|
inlineslot |
|
signal |
If the lit value changes, the signal send.
|
readwrite |
Color to be used when the LED is turned off.
If no color is manually set, the widget will calculate a darker version of the colorOn.
@accessors colorOff(), setColorOff(QColor)
|
readwrite |
Color to be used when the LED is lit, or turned on.
If no color is manually set, the widget will default to red.
@accessors colorOn(), setColorOn(QColor)
|
readwrite |
Indicates if the led is to be on or not.
@accessors isLit(), setLit(bool)
|
readwrite |
Configures the widget to negate the lit value.
@accessors isNegated(), setNegate(bool)