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

Displays a simple light widget that can be set to blink or change colors. More...

#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

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

Protected Member Functions

void paintEvent (QPaintEvent *)
 

Protected Attributes

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

Detailed Description

Displays a simple light widget that can be set to blink or change colors.


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 = ConstantRGBColor >::Invalid )

◆ 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 file: