#include <LEDButton.h>

Inheritance diagram for LEDButton:
Inheritance graph
Collaboration diagram for LEDButton:
Collaboration graph

Classes

class  LEDButtonPrivate
 

Public Slots

void toggle ()
 
void on ()
 
void off ()
 
void setState (bool)
 
void toggleState ()
 
void setColor (const QColor &color)
 
void setDarkFactor (int darkfactor)
 

Signals

void stateChanged (bool)
 
void mouseEntered ()
 
void mouseLeft ()
 

Public Member Functions

 LEDButton (QWidget *parent=0)
 
 LEDButton (const QColor &col, QWidget *parent=0)
 
 LEDButton (const QColor &col, bool state, QWidget *parent=0)
 
 ~LEDButton ()
 
bool state () const
 
QColor color () const
 
int darkFactor () const
 
QSize sizeHint () const override
 
QSize minimumSizeHint () const override
 

Protected Member Functions

void paintEvent (QPaintEvent *) override
 
void mousePressEvent (QMouseEvent *) override
 
void enterEvent (QEvent *) override
 
void leaveEvent (QEvent *) override
 

Protected Attributes

bool led_state
 
QColor led_color
 
LEDButtonPrivated
 

Properties

QColor color
 
int darkFactor
 

Detailed Description

Definition at line 36 of file LEDButton.h.

Constructor & Destructor Documentation

LEDButton::LEDButton ( QWidget *  parent = 0)
LEDButton::LEDButton ( const QColor &  col,
QWidget *  parent = 0 
)
LEDButton::LEDButton ( const QColor &  col,
bool  state,
QWidget *  parent = 0 
)
LEDButton::~LEDButton ( )

Definition at line 80 of file LEDButton.cpp.

References d.

Member Function Documentation

bool LEDButton::state ( ) const

Definition at line 207 of file LEDButton.cpp.

References color(), led_color, and led_state.

Referenced by mousePressEvent(), and setState().

QColor LEDButton::color ( ) const

Referenced by paintEvent(), and state().

int LEDButton::darkFactor ( ) const

Referenced by setDarkFactor().

QSize LEDButton::sizeHint ( ) const
override

Definition at line 281 of file LEDButton.cpp.

References WidgetScale::scaleQSize().

QSize LEDButton::minimumSizeHint ( ) const
override

Definition at line 287 of file LEDButton.cpp.

References WidgetScale::scaleQSize().

void LEDButton::stateChanged ( bool  )
signal

Referenced by mousePressEvent().

void LEDButton::mouseEntered ( )
signal

Referenced by enterEvent().

void LEDButton::mouseLeft ( )
signal

Referenced by leaveEvent().

void LEDButton::toggle ( )
slot

Definition at line 263 of file LEDButton.cpp.

References toggleState().

Referenced by mousePressEvent().

void LEDButton::on ( )
slot

Definition at line 269 of file LEDButton.cpp.

References setState().

void LEDButton::off ( )
slot

Definition at line 275 of file LEDButton.cpp.

References setState().

void LEDButton::setState ( bool  state)
slot

Definition at line 219 of file LEDButton.cpp.

References led_state, and state().

Referenced by PropertyBox::layerVisibilityChanged(), off(), and on().

void LEDButton::toggleState ( )
slot

Definition at line 229 of file LEDButton.cpp.

References led_state.

Referenced by toggle().

void LEDButton::setColor ( const QColor &  color)
slot
void LEDButton::setDarkFactor ( int  darkfactor)
slot
void LEDButton::paintEvent ( QPaintEvent *  )
overrideprotected

Definition at line 111 of file LEDButton.cpp.

References color(), d, led_color, led_state, and LEDButton::LEDButtonPrivate::offcolor.

void LEDButton::mousePressEvent ( QMouseEvent *  e)
overrideprotected

Definition at line 86 of file LEDButton.cpp.

References state(), stateChanged(), and toggle().

void LEDButton::enterEvent ( QEvent *  )
overrideprotected

Definition at line 99 of file LEDButton.cpp.

References mouseEntered().

void LEDButton::leaveEvent ( QEvent *  )
overrideprotected

Definition at line 105 of file LEDButton.cpp.

References mouseLeft().

Member Data Documentation

bool LEDButton::led_state
protected

Definition at line 77 of file LEDButton.h.

Referenced by paintEvent(), setState(), state(), and toggleState().

QColor LEDButton::led_color
protected

Definition at line 78 of file LEDButton.h.

Referenced by paintEvent(), setColor(), setDarkFactor(), and state().

LEDButtonPrivate* LEDButton::d
protected

Definition at line 80 of file LEDButton.h.

Referenced by LEDButton(), paintEvent(), setColor(), setDarkFactor(), and ~LEDButton().

Property Documentation

QColor LEDButton::color
readwrite

Definition at line 39 of file LEDButton.h.

int LEDButton::darkFactor
readwrite

Definition at line 40 of file LEDButton.h.


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