cut  1.2.2-pre1
Public Slots | Signals | Public Member Functions | Protected Member Functions | Properties | List of all members
QeLed Class Reference

LED widget. More...

#include <CutWidgets.h>

Inheritance diagram for QeLed:

Public Slots

void setColorOn (QColor newColorOn)
 
void setColorOff (QColor newColorOff)
 
void setLit (bool newValue)
 
void setNegate (bool newValue)
 

Signals

void colorOnChanged (QColor newColorOn)
 Communicates a change in on color. More...
 
void colorOffChanged (QColor newColorOff)
 Communicates a change in off color. More...
 
void toggled (bool newValue)
 If the lit value changes, the signal send. More...
 
void negated (bool newValue)
 If the negate value changes, the signal send. More...
 

Public Member Functions

 QeLed (QWidget *parent=nullptr)
 
QColor colorOn ()
 
QColor colorOff ()
 
bool isLit ()
 
bool isNegated ()
 

Protected Member Functions

void paintEvent (QPaintEvent *event) override
 

Properties

QColor colorOn
 Color to be used when the LED is lit, or turned on. More...
 
QColor colorOff
 Color to be used when the LED is turned off. More...
 
bool lit
 Indicates if the led is to be on or not. More...
 
bool negate
 Configures the widget to negate the lit value. More...
 

Detailed Description

LED widget.

A LED representation, with two states. The colors for both on and off states can be changed. When the on color is specified, the off color is automatically calculated as a darker shade of the on color

Negate allows to switch state, in case the input signal represents the opposite.

Any color can be used. A base image is used to represent the LED, and the widget replaces the color of the image by the ones indicated in the widgets properties.

A detailed description of RefClass.

Constructor & Destructor Documentation

◆ QeLed()

QeLed::QeLed ( QWidget *  parent = nullptr)
explicit

Member Function Documentation

◆ colorOff()

QColor QeLed::colorOff ( )
inline

◆ colorOffChanged

void QeLed::colorOffChanged ( QColor  newColorOff)
signal

Communicates a change in off color.

◆ colorOn()

QColor QeLed::colorOn ( )
inline

◆ colorOnChanged

void QeLed::colorOnChanged ( QColor  newColorOn)
signal

Communicates a change in on color.

◆ isLit()

bool QeLed::isLit ( )
inline

◆ isNegated()

bool QeLed::isNegated ( )
inline

◆ negated

void QeLed::negated ( bool  newValue)
signal

If the negate value changes, the signal send.

◆ paintEvent()

void QeLed::paintEvent ( QPaintEvent *  event)
overrideprotected

◆ setColorOff

void QeLed::setColorOff ( QColor  newColorOff)
inlineslot

◆ setColorOn

void QeLed::setColorOn ( QColor  newColorOn)
inlineslot

◆ setLit

void QeLed::setLit ( bool  newValue)
inlineslot

◆ setNegate

void QeLed::setNegate ( bool  newValue)
inlineslot

◆ toggled

void QeLed::toggled ( bool  newValue)
signal

If the lit value changes, the signal send.

Property Documentation

◆ colorOff

QColor QeLed::colorOff
readwrite

Color to be used when the LED is turned off.

If no color is manually set, the widget will calculate a darker version of the colorOn.

@accessors colorOff(), setColorOff(QColor)

◆ colorOn

QColor QeLed::colorOn
readwrite

Color to be used when the LED is lit, or turned on.

If no color is manually set, the widget will default to red.

@accessors colorOn(), setColorOn(QColor)

◆ lit

bool QeLed::lit
readwrite

Indicates if the led is to be on or not.

@accessors isLit(), setLit(bool)

◆ negate

bool QeLed::negate
readwrite

Configures the widget to negate the lit value.

@accessors isNegated(), setNegate(bool)


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