QtPdWidgets
2.3.1
|
LED widget. More...
#include <Led.h>
Classes | |
struct | Impl |
Public Types | |
enum | OffColorMode { DarkOnColor, ExplicitOffColor } |
Off color mode. More... | |
Public Member Functions | |
Led (QWidget *parent=0) | |
Constructor. More... | |
virtual | ~Led () |
Destructor. More... | |
QColor | getOnColor () const |
void | setOnColor (QColor) |
Sets the onColor. More... | |
void | resetOnColor () |
Resets the onColor. More... | |
QColor | getOffColor () const |
void | setOffColor (QColor) |
Sets the offColor. More... | |
void | resetOffColor () |
Resets the offColor. More... | |
OffColorMode | getOffColorMode () const |
void | setOffColorMode (OffColorMode) |
Sets the offColorMode. More... | |
void | resetOffColorMode () |
Resets the offColorMode. More... | |
bool | getInvert () const |
void | setInvert (bool) |
Sets the invert flag. More... | |
void | resetInvert () |
Resets the invert flag. More... | |
![]() | |
MultiLed (QWidget *parent=0) | |
Constructor. More... | |
virtual | ~MultiLed () |
Destructor. More... | |
bool | hasData () const |
void | clearData () |
int | getValue () const |
void | setValue (int) |
Sets the current #value. More... | |
quint32 | getDiameter () const |
void | setDiameter (quint32) |
Sets the LED diameter. More... | |
void | resetDiameter () |
Resets the LED diameter. More... | |
void | setHash (const Hash *) |
Sets the hash. More... | |
virtual QSize | sizeHint () const |
Gives a hint aboute the optimal size. More... | |
Protected Member Functions | |
bool | event (QEvent *) override |
Event handler. More... | |
![]() | |
void | setCurrentValue (Value) |
Sets the current LED color. More... | |
bool | event (QEvent *) override |
Event handler. More... | |
void | paintEvent (QPaintEvent *) override |
Paint function. More... | |
Properties | |
QColor | onColor |
QColor | offColor |
OffColorMode | offColorMode |
bool | invert |
![]() | |
quint32 | diameter |
Private Member Functions | |
PD_PRIVATE void | updateColor () |
Calculates the LED color. More... | |
void | setHash (const Hash *) |
MultiLed::setHash() made private. More... | |
Private Attributes | |
struct PD_PRIVATE | Impl |
std::unique_ptr< Impl > | impl |
Additional Inherited Members | |
![]() | |
static QColor | disconnectColor = Qt::darkGray |
LED widget.
Led::Led | ( | QWidget * | parent = 0 | ) |
|
virtual |
Destructor.
|
overrideprotected |
Led::OffColorMode Led::getOffColorMode | ( | ) | const |
References impl.
void Led::resetInvert | ( | ) |
Resets the invert flag.
References DEFAULT_INVERT, and setInvert().
void Led::resetOffColor | ( | ) |
Resets the offColor.
References DEFAULT_OFFCOLOR, and setOffColor().
void Led::resetOffColorMode | ( | ) |
Resets the offColorMode.
References DEFAULT_OFFCOLORMODE, and setOffColorMode().
void Led::resetOnColor | ( | ) |
Resets the onColor.
References DEFAULT_ONCOLOR, and setOnColor().
|
private |
MultiLed::setHash() made private.
void Led::setInvert | ( | bool | i | ) |
void Led::setOffColor | ( | QColor | c | ) |
void Led::setOffColorMode | ( | OffColorMode | m | ) |
void Led::setOnColor | ( | QColor | c | ) |
|
privatevirtual |
Calculates the LED color.
Reimplemented from Pd::MultiLed.
References Pd::MultiLed::Value::blink, Pd::MultiLed::Value::color, Pd::MultiLed::disconnectColor, Pd::MultiLed::getValue(), Pd::MultiLed::hasData(), impl, Pd::MultiLed::setCurrentValue(), and Pd::MultiLed::Value::Steady.
Referenced by setInvert(), setOnColor(), and Pd::Led::Impl::updateCurrentOffColor().
|
private |
Referenced by Led().
|
private |
Referenced by event(), getInvert(), getOffColor(), getOffColorMode(), getOnColor(), setInvert(), setOffColor(), setOffColorMode(), setOnColor(), and updateColor().
|
readwrite |
|
readwrite |
|
readwrite |
|
readwrite |