svgui  1.9
LEDButton Class Reference

#include <LEDButton.h>

Inheritance diagram for LEDButton:
Collaboration diagram for LEDButton:

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
 
virtual QSize sizeHint () const
 
virtual QSize minimumSizeHint () const
 

Protected Member Functions

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

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() [1/3]

◆ LEDButton() [2/3]

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

◆ LEDButton() [3/3]

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

◆ ~LEDButton()

LEDButton::~LEDButton ( )

Member Function Documentation

◆ state()

bool LEDButton::state ( ) const

Definition at line 271 of file LEDButton.cpp.

References led_state.

Referenced by mousePressEvent(), and setState().

◆ color()

QColor LEDButton::color ( ) const

Referenced by paintEvent().

◆ darkFactor()

int LEDButton::darkFactor ( ) const

◆ sizeHint()

QSize LEDButton::sizeHint ( ) const
virtual

Definition at line 349 of file LEDButton.cpp.

◆ minimumSizeHint()

QSize LEDButton::minimumSizeHint ( ) const
virtual

Definition at line 355 of file LEDButton.cpp.

◆ stateChanged

void LEDButton::stateChanged ( bool  )
signal

Referenced by mousePressEvent().

◆ mouseEntered

void LEDButton::mouseEntered ( )
signal

Referenced by enterEvent().

◆ mouseLeft

void LEDButton::mouseLeft ( )
signal

Referenced by leaveEvent().

◆ toggle

void LEDButton::toggle ( )
slot

Definition at line 331 of file LEDButton.cpp.

References toggleState().

Referenced by mousePressEvent().

◆ on

void LEDButton::on ( )
slot

Definition at line 337 of file LEDButton.cpp.

References setState().

◆ off

void LEDButton::off ( )
slot

Definition at line 343 of file LEDButton.cpp.

References setState().

◆ setState

void LEDButton::setState ( bool  state)
slot

◆ toggleState

void LEDButton::toggleState ( )
slot

Definition at line 293 of file LEDButton.cpp.

References led_state.

Referenced by toggle().

◆ setColor

void LEDButton::setColor ( const QColor &  color)
slot

◆ setDarkFactor

void LEDButton::setDarkFactor ( int  darkfactor)
slot

◆ paintEvent()

void LEDButton::paintEvent ( QPaintEvent *  )
protected

◆ mousePressEvent()

void LEDButton::mousePressEvent ( QMouseEvent *  e)
protected

Definition at line 95 of file LEDButton.cpp.

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

◆ enterEvent()

void LEDButton::enterEvent ( QEvent *  )
protected

Definition at line 108 of file LEDButton.cpp.

References mouseEntered().

◆ leaveEvent()

void LEDButton::leaveEvent ( QEvent *  )
protected

Definition at line 114 of file LEDButton.cpp.

References mouseLeft().

Member Data Documentation

◆ led_state

bool LEDButton::led_state
protected

Definition at line 77 of file LEDButton.h.

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

◆ led_color

QColor LEDButton::led_color
protected

Definition at line 78 of file LEDButton.h.

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

◆ d

LEDButtonPrivate* LEDButton::d
protected

Definition at line 80 of file LEDButton.h.

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

Property Documentation

◆ color

QColor LEDButton::color
readwrite

Definition at line 39 of file LEDButton.h.

◆ darkFactor

int LEDButton::darkFactor
readwrite

Definition at line 40 of file LEDButton.h.


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