API Documentation
Loading...
Searching...
No Matches
LEDLightWidget Class Reference

#include <LEDLightWidget.h>

Inheritance diagram for LEDLightWidget:
[legend]
Collaboration diagram for LEDLightWidget:
[legend]

Public Slots

void disableSlot ()
 Disable - Manually disables (turn off) the LED.
 
void updateBlinkSlot ()
 

Signals

bool lightToggledSignal (bool is_on)
 

Public Member Functions

 LEDLightWidget (QWidget *parent=0)
 
QSize sizeHint () const
 
void setColor (QColor crOn, QColor crOff)
 SetColor - Sets the LED on and off color.
 
void setColor (RGBColor crOn, RGBColor crOff=Constant< RGBColor >::NaN)
 
RGBColor currentColor () const
 
void ping (int mSec=1000)
 Ping - Use Ping to momentarily enable (turn on) the LED.
 
void enable ()
 Enable - Manually enables (turn on) the LED.
 

Protected Member Functions

void paintEvent (QPaintEvent *)
 

Protected Attributes

QTimer * m_ping_timer = nullptr
 
QTimer * m_blink_timer = nullptr
 
RGBColor m_on_color
 On color.
 
RGBColor m_off_color
 Off color.
 
bool m_is_on
 Led state on or off, default off.
 
int m_ping_cascade_count
 Cascase level.
 

Constructor & Destructor Documentation

◆ LEDLightWidget()

LEDLightWidget ( QWidget * parent = 0)
explicit

Member Function Documentation

◆ currentColor()

RGBColor currentColor ( ) const

◆ disableSlot

void disableSlot ( )
slot

Disable - Manually disables (turn off) the LED.

◆ enable()

void enable ( )

Enable - Manually enables (turn on) the LED.

◆ lightToggledSignal

bool lightToggledSignal ( bool is_on)
signal

◆ paintEvent()

void paintEvent ( QPaintEvent * )
protected

◆ ping()

void ping ( int mSec = 1000)

Ping - Use Ping to momentarily enable (turn on) the LED.

The Ping method will turn on the led for mSec milliseconds.

Parameters
mSec- int - number of milliseconds to enable the LED

◆ setColor() [1/2]

void setColor ( QColor crOn,
QColor crOff )

SetColor - Sets the LED on and off color.

Parameters
crOnQColor On color
crOffQColor off color

◆ setColor() [2/2]

void setColor ( RGBColor crOn,
RGBColor crOff = Constant<RGBColor>::NaN )

◆ sizeHint()

QSize sizeHint ( ) const

◆ updateBlinkSlot

void updateBlinkSlot ( )
slot

Member Data Documentation

◆ m_blink_timer

QTimer* m_blink_timer = nullptr
protected

◆ m_is_on

bool m_is_on
protected

Led state on or off, default off.

◆ m_off_color

RGBColor m_off_color
protected

Off color.

◆ m_on_color

RGBColor m_on_color
protected

On color.

◆ m_ping_cascade_count

int m_ping_cascade_count
protected

Cascase level.

◆ m_ping_timer

QTimer* m_ping_timer = nullptr
protected

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