svgui  1.9
LEDButton Class Reference

#include <LEDButton.h>

Collaboration diagram for LEDButton:

List of all members.

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


Member Function Documentation

bool LEDButton::state ( ) const

Definition at line 271 of file LEDButton.cpp.

References led_state.

Referenced by mousePressEvent(), and setState().

QColor LEDButton::color ( ) const

Referenced by paintEvent().

int LEDButton::darkFactor ( ) const
QSize LEDButton::sizeHint ( ) const [virtual]

Definition at line 349 of file LEDButton.cpp.

QSize LEDButton::minimumSizeHint ( ) const [virtual]

Definition at line 355 of file LEDButton.cpp.

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 331 of file LEDButton.cpp.

References toggleState().

Referenced by mousePressEvent().

void LEDButton::on ( ) [slot]

Definition at line 337 of file LEDButton.cpp.

References setState().

void LEDButton::off ( ) [slot]

Definition at line 343 of file LEDButton.cpp.

References setState().

void LEDButton::toggleState ( ) [slot]

Definition at line 293 of file LEDButton.cpp.

References led_state.

Referenced by toggle().

void LEDButton::setDarkFactor ( int  darkfactor) [slot]
void LEDButton::mousePressEvent ( QMouseEvent *  e) [protected]

Definition at line 95 of file LEDButton.cpp.

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

void LEDButton::enterEvent ( QEvent *  ) [protected]

Definition at line 108 of file LEDButton.cpp.

References mouseEntered().

void LEDButton::leaveEvent ( QEvent *  ) [protected]

Definition at line 114 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(), and setDarkFactor().

Definition at line 80 of file LEDButton.h.

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


Property Documentation

QColor LEDButton::color [read, write]

Definition at line 39 of file LEDButton.h.

int LEDButton::darkFactor [read, write]

Definition at line 40 of file LEDButton.h.


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