QtPdWidgets  2.3.1
Classes | Public Types | Public Member Functions | Protected Member Functions | Properties | Private Member Functions | Private Attributes | List of all members
Pd::Led Class Reference

LED widget. More...

#include <Led.h>

Inheritance diagram for Pd::Led:
Inheritance graph
[legend]
Collaboration diagram for Pd::Led:
Collaboration graph
[legend]

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...
 
- Public Member Functions inherited from Pd::MultiLed
 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...
 
- Protected Member Functions inherited from Pd::MultiLed
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
 
- Properties inherited from Pd::MultiLed
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< Implimpl
 

Additional Inherited Members

- Static Protected Attributes inherited from Pd::MultiLed
static QColor disconnectColor = Qt::darkGray
 

Detailed Description

LED widget.

Member Enumeration Documentation

◆ OffColorMode

Off color mode.

This influences the displayed color, when the LED is off.

Enumerator
DarkOnColor 

Display a darker shade of onColor.

ExplicitOffColor 

Use offColor.

Constructor & Destructor Documentation

◆ Led()

Led::Led ( QWidget *  parent = 0)

Constructor.

Parameters
parentParent widget.

References Impl.

◆ ~Led()

Led::~Led ( )
virtual

Destructor.

Member Function Documentation

◆ event()

bool Led::event ( QEvent *  event)
overrideprotected

Event handler.

Parameters
eventPaint event flags.

References Pd::MultiLed::event(), and impl.

◆ getInvert()

bool Led::getInvert ( ) const
Returns
The invert flag.

References impl.

◆ getOffColor()

QColor Led::getOffColor ( ) const
Returns
The offColor.

References impl.

◆ getOffColorMode()

Led::OffColorMode Led::getOffColorMode ( ) const
Returns
The offColorMode.

References impl.

◆ getOnColor()

QColor Led::getOnColor ( ) const
Returns
The onColor.

References impl.

◆ resetInvert()

void Led::resetInvert ( )

Resets the invert flag.

References DEFAULT_INVERT, and setInvert().

◆ resetOffColor()

void Led::resetOffColor ( )

Resets the offColor.

References DEFAULT_OFFCOLOR, and setOffColor().

◆ resetOffColorMode()

void Led::resetOffColorMode ( )

Resets the offColorMode.

References DEFAULT_OFFCOLORMODE, and setOffColorMode().

◆ resetOnColor()

void Led::resetOnColor ( )

Resets the onColor.

References DEFAULT_ONCOLOR, and setOnColor().

◆ setHash()

void Pd::Led::setHash ( const Hash )
private

MultiLed::setHash() made private.

◆ setInvert()

void Led::setInvert ( bool  i)

Sets the invert flag.

References impl, and updateColor().

Referenced by resetInvert().

◆ setOffColor()

void Led::setOffColor ( QColor  c)

Sets the offColor.

References impl.

Referenced by resetOffColor().

◆ setOffColorMode()

void Led::setOffColorMode ( OffColorMode  m)

Sets the offColorMode.

References impl.

Referenced by resetOffColorMode().

◆ setOnColor()

void Led::setOnColor ( QColor  c)

Sets the onColor.

References impl, and updateColor().

Referenced by resetOnColor().

◆ updateColor()

void Led::updateColor ( )
privatevirtual

Member Data Documentation

◆ Impl

struct PD_PRIVATE Pd::Led::Impl
private

Referenced by Led().

◆ impl

std::unique_ptr<Impl> Pd::Led::impl
private

Property Documentation

◆ invert

bool Pd::Led::invert
readwrite

◆ offColor

QColor Pd::Led::offColor
readwrite

◆ offColorMode

OffColorMode Pd::Led::offColorMode
readwrite

◆ onColor

QColor Pd::Led::onColor
readwrite

The documentation for this class was generated from the following files: