Go to the documentation of this file.
6 #include <QSvgRenderer>
8 #include <QXmlStreamReader>
65 explicit QeLed(QWidget *parent =
nullptr);
66 QColor
colorOn(){
return this->m_colorOn;}
68 bool isLit(){
return this->m_lit;}
72 void setColorOn(QColor newColorOn){this->m_colorOn = newColorOn; this->updateColor();
74 void setColorOff(QColor newColorOff){this->m_colorOff = newColorOff; this->updateColor();
76 void setLit(
bool newValue){this->m_lit = newValue; this->updateColor();
78 void setNegate(
bool newValue){this->m_negate = newValue; this->updateColor();
107 bool m_negate =
false;
111 QSvgRenderer m_svg_on;
112 QSvgRenderer m_svg_off;
113 QString m_originalXml;
114 QString m_modifiedXml;
115 const QString c_ledImagePath =
":/led.svg";
118 QColor calculateColor();
void setLit(bool newValue)
Definition: QeLed.hpp:76
bool isLit()
Definition: QeLed.hpp:68
bool isNegated()
Definition: QeLed.hpp:69
QColor colorOn
Color to be used when the LED is lit, or turned on.
Definition: QeLed.hpp:41
void paintEvent(QPaintEvent *event) override
Definition: QeLed.cpp:22
LED widget.
Definition: QeLed.hpp:31
QColor colorOff()
Definition: QeLed.hpp:67
QColor colorOff
Color to be used when the LED is turned off.
Definition: QeLed.hpp:50
void setColorOff(QColor newColorOff)
Definition: QeLed.hpp:74
void toggled(bool newValue)
If the lit value changes, the signal send.
void colorOnChanged(QColor newColorOn)
Communicates a change in on color.
void negated(bool newValue)
If the negate value changes, the signal send.
void setNegate(bool newValue)
Definition: QeLed.hpp:78
bool lit
Indicates if the led is to be on or not.
Definition: QeLed.hpp:56
void colorOffChanged(QColor newColorOff)
Communicates a change in off color.
bool negate
Configures the widget to negate the lit value.
Definition: QeLed.hpp:62
QeLed(QWidget *parent=nullptr)
Definition: QeLed.cpp:7
void setColorOn(QColor newColorOn)
Definition: QeLed.hpp:72
QColor colorOn()
Definition: QeLed.hpp:66