Multi-Color LED widget.
More...
#include <MultiLed.h>
|
PD_PRIVATE void | newValues (std::chrono::nanoseconds) override |
| This virtual method is called by the ProcessVariable, if its value changes. More...
|
|
Multi-Color LED widget.
- Todo:
- Default color property.
◆ MultiLed()
MultiLed::MultiLed |
( |
QWidget * |
parent = 0 | ) |
|
Constructor.
- Parameters
-
References Impl.
◆ ~MultiLed()
◆ blinkEvent
void MultiLed::blinkEvent |
( |
| ) |
|
|
privateslot |
◆ clearData()
void MultiLed::clearData |
( |
| ) |
|
◆ event()
bool MultiLed::event |
( |
QEvent * |
event | ) |
|
|
overrideprotected |
◆ getDiameter()
quint32 MultiLed::getDiameter |
( |
| ) |
const |
◆ getValue()
int MultiLed::getValue |
( |
| ) |
const |
◆ hasData()
bool MultiLed::hasData |
( |
| ) |
const |
◆ newValues()
void MultiLed::newValues |
( |
std::chrono::nanoseconds |
| ) |
|
|
overrideprivate |
This virtual method is called by the ProcessVariable, if its value changes.
References setValue().
◆ paintEvent()
void MultiLed::paintEvent |
( |
QPaintEvent * |
event | ) |
|
|
overrideprotected |
Paint function.
- Parameters
-
References event(), and impl.
◆ resetDiameter()
void MultiLed::resetDiameter |
( |
| ) |
|
◆ setCurrentValue()
void MultiLed::setCurrentValue |
( |
Value |
v | ) |
|
|
protected |
◆ setDiameter()
void MultiLed::setDiameter |
( |
quint32 |
diameter | ) |
|
◆ setHash()
void MultiLed::setHash |
( |
const Hash * |
h | ) |
|
◆ setValue()
void MultiLed::setValue |
( |
int |
value | ) |
|
Sets the current #value.
Looks up the LED color and redraws the widget, if necessary.
References impl, and updateColor().
Referenced by newValues().
◆ sizeHint()
QSize MultiLed::sizeHint |
( |
| ) |
const |
|
virtual |
Gives a hint aboute the optimal size.
References impl.
◆ updateColor()
void MultiLed::updateColor |
( |
| ) |
|
|
protectedvirtual |
◆ blinkTimer
QTimer MultiLed::blinkTimer |
|
staticprivate |
◆ disconnectColor
QColor MultiLed::disconnectColor = Qt::darkGray |
|
staticprotected |
◆ Impl
◆ impl
std::unique_ptr<Impl> Pd::MultiLed::impl |
|
private |
Referenced by blinkEvent(), clearData(), event(), getDiameter(), getValue(), hasData(), paintEvent(), setCurrentValue(), setDiameter(), setHash(), setValue(), sizeHint(), and updateColor().
◆ diameter
quint32 Pd::MultiLed::diameter |
|
readwrite |
The documentation for this class was generated from the following files: