TwiceAsNice  2019-02-18
Classes | Public Types | Public Slots | Public Member Functions | Protected Member Functions | Properties | Private Attributes | List of all members
LedWidget Class Reference

An LED widget. More...

#include <LedWidget.h>

Inheritance diagram for LedWidget:
Inheritance graph
Collaboration diagram for LedWidget:
Collaboration graph

Classes

class  Private
 

Public Types

enum  State {
  Off, On, Off, On,
  Off, On
}
 Status of the light is on/off. More...
 
enum  Shape {
  Rectangular, Circular, Rectangular, Circular,
  Rectangular, Circular
}
 Shades of the lamp. More...
 
enum  Look {
  Flat, Raised, Sunken, Flat,
  Raised, Sunken, Flat, Raised,
  Sunken
}
 Displays a flat, round or sunken LED. More...
 
enum  State {
  Off, On, Off, On,
  Off, On
}
 Status of the light is on/off. More...
 
enum  Shape {
  Rectangular, Circular, Rectangular, Circular,
  Rectangular, Circular
}
 Shades of the lamp. More...
 
enum  Look {
  Flat, Raised, Sunken, Flat,
  Raised, Sunken, Flat, Raised,
  Sunken
}
 Displays a flat, round or sunken LED. More...
 
enum  State {
  Off, On, Off, On,
  Off, On
}
 Status of the light is on/off. More...
 
enum  Shape {
  Rectangular, Circular, Rectangular, Circular,
  Rectangular, Circular
}
 Shades of the lamp. More...
 
enum  Look {
  Flat, Raised, Sunken, Flat,
  Raised, Sunken, Flat, Raised,
  Sunken
}
 Displays a flat, round or sunken LED. More...
 

Public Slots

void toggle ()
 Toggles the state of the led from Off to On or vice versa. More...
 
void on ()
 Sets the state of the widget to On. More...
 
void off ()
 Sets the state of the widget to Off. More...
 
void toggle ()
 Toggles the state of the led from Off to On or vice versa. More...
 
void on ()
 Sets the state of the widget to On. More...
 
void off ()
 Sets the state of the widget to Off. More...
 
void toggle ()
 Toggles the state of the led from Off to On or vice versa. More...
 
void on ()
 Sets the state of the widget to On. More...
 
void off ()
 Sets the state of the widget to Off. More...
 

Public Member Functions

 LedWidget (QWidget *parent=0)
 Constructs a green, round LED widget which will initially be turned on. More...
 
 LedWidget (const QColor &color, QWidget *parent=0)
 Constructs a round LED widget with the supplied color which will initially be turned on. More...
 
 LedWidget (const QColor &color, LedWidget::State state, LedWidget::Look look, LedWidget::Shape shape, QWidget *parent=0)
 Constructor with the color, state and look. More...
 
 ~LedWidget ()
 Destroys the LED widget. More...
 
QColor color () const
 Returns the current color of the widget. More...
 
State state () const
 Returns the current state of the widget (on/off). More...
 
Look look () const
 Returns the current look of the widget. More...
 
Shape shape () const
 Returns the current shape of the widget. More...
 
int darkFactor () const
 Returns the factor to darken the LED. More...
 
void setColor (const QColor &color)
 Set the color of the widget. More...
 
void setState (State state)
 Sets the state of the widget to On or Off. More...
 
void setLook (Look look)
 Sets the look of the widget. More...
 
void setShape (Shape shape)
 Set the shape of the LED. More...
 
void setDarkFactor (int darkFactor)
 Sets the factor to darken the LED in LedWidget::Off state. More...
 
virtual QSize sizeHint () const
 
virtual QSize minimumSizeHint () const
 
 LedWidget (QWidget *parent=0)
 Constructs a green, round LED widget which will initially be turned on. More...
 
 LedWidget (const QColor &color, QWidget *parent=0)
 Constructs a round LED widget with the supplied color which will initially be turned on. More...
 
 LedWidget (const QColor &color, LedWidget::State state, LedWidget::Look look, LedWidget::Shape shape, QWidget *parent=0)
 Constructor with the color, state and look. More...
 
 ~LedWidget ()
 Destroys the LED widget. More...
 
QColor color () const
 Returns the current color of the widget. More...
 
State state () const
 Returns the current state of the widget (on/off). More...
 
Look look () const
 Returns the current look of the widget. More...
 
Shape shape () const
 Returns the current shape of the widget. More...
 
int darkFactor () const
 Returns the factor to darken the LED. More...
 
void setColor (const QColor &color)
 Set the color of the widget. More...
 
void setState (State state)
 Sets the state of the widget to On or Off. More...
 
void setLook (Look look)
 Sets the look of the widget. More...
 
void setShape (Shape shape)
 Set the shape of the LED. More...
 
void setDarkFactor (int darkFactor)
 Sets the factor to darken the LED in LedWidget::Off state. More...
 
virtual QSize sizeHint () const
 
virtual QSize minimumSizeHint () const
 
 LedWidget (QWidget *parent=0)
 Constructs a green, round LED widget which will initially be turned on. More...
 
 LedWidget (const QColor &color, QWidget *parent=0)
 Constructs a round LED widget with the supplied color which will initially be turned on. More...
 
 LedWidget (const QColor &color, LedWidget::State state, LedWidget::Look look, LedWidget::Shape shape, QWidget *parent=0)
 Constructor with the color, state and look. More...
 
 ~LedWidget ()
 Destroys the LED widget. More...
 
QColor color () const
 Returns the current color of the widget. More...
 
State state () const
 Returns the current state of the widget (on/off). More...
 
Look look () const
 Returns the current look of the widget. More...
 
Shape shape () const
 Returns the current shape of the widget. More...
 
int darkFactor () const
 Returns the factor to darken the LED. More...
 
void setColor (const QColor &color)
 Set the color of the widget. More...
 
void setState (State state)
 Sets the state of the widget to On or Off. More...
 
void setLook (Look look)
 Sets the look of the widget. More...
 
void setShape (Shape shape)
 Set the shape of the LED. More...
 
void setDarkFactor (int darkFactor)
 Sets the factor to darken the LED in LedWidget::Off state. More...
 
virtual QSize sizeHint () const
 
virtual QSize minimumSizeHint () const
 

Protected Member Functions

virtual int ledWidth () const
 Returns the width of the led. More...
 
virtual void paintFlat ()
 Paints a circular, flat LED. More...
 
virtual void paintRaised ()
 Paints a circular, raised LED. More...
 
virtual void paintSunken ()
 Paints a circular, sunken LED. More...
 
virtual void paintRect ()
 Paints a rectangular, flat LED. More...
 
virtual void paintRectFrame (bool raised)
 Paints a rectangular LED, either raised or sunken, depending on its argument. More...
 
void paintEvent (QPaintEvent *)
 
bool paintCachedPixmap ()
 Paint the cached antialiased pixmap corresponding to the state if any. More...
 
virtual int ledWidth () const
 Returns the width of the led. More...
 
virtual void paintFlat ()
 Paints a circular, flat LED. More...
 
virtual void paintRaised ()
 Paints a circular, raised LED. More...
 
virtual void paintSunken ()
 Paints a circular, sunken LED. More...
 
virtual void paintRect ()
 Paints a rectangular, flat LED. More...
 
virtual void paintRectFrame (bool raised)
 Paints a rectangular LED, either raised or sunken, depending on its argument. More...
 
void paintEvent (QPaintEvent *)
 
bool paintCachedPixmap ()
 Paint the cached antialiased pixmap corresponding to the state if any. More...
 
virtual int ledWidth () const
 Returns the width of the led. More...
 
virtual void paintFlat ()
 Paints a circular, flat LED. More...
 
virtual void paintRaised ()
 Paints a circular, raised LED. More...
 
virtual void paintSunken ()
 Paints a circular, sunken LED. More...
 
virtual void paintRect ()
 Paints a rectangular, flat LED. More...
 
virtual void paintRectFrame (bool raised)
 Paints a rectangular LED, either raised or sunken, depending on its argument. More...
 
void paintEvent (QPaintEvent *)
 
bool paintCachedPixmap ()
 Paint the cached antialiased pixmap corresponding to the state if any. More...
 

Properties

State state
 
Shape shape
 
Look look
 
QColor color
 
int darkFactor
 

Private Attributes

Private *const d
 

Detailed Description

An LED widget.

Displays a round or rectangular light emitting diode.

It is configurable to arbitrary colors, the two on/off states and three styles (or "looks");

It may display itself in a performant flat view, a round view with light spot or a round view sunken in the screen.

kled.png
KDE LED Widget
Author
Joerg Habenicht, Richard J. Moore (rich@.nosp@m.kde..nosp@m.org) 1998, 1999

Member Enumeration Documentation

◆ Look [1/3]

Displays a flat, round or sunken LED.

Displaying the LED flat is less time and color consuming, but not so nice to see.

The sunken LED itself is (certainly) smaller than the round LED because of the 3 shading circles and is most time consuming. Makes sense for LED > 15x15 pixels.

Timings:
( AMD K5/133, Diamond Stealth 64 PCI Graphics, widgetsize 29x29 )

  • flat Approximately 0.7 msec per paint
  • round Approximately 2.9 msec per paint
  • sunken Approximately 3.3 msec per paint

The widget will be updated on the next repaining event.

LED look.

Enumerator
Flat 
Raised 
Sunken 
Flat 
Raised 
Sunken 
Flat 
Raised 
Sunken 

◆ Look [2/3]

Displays a flat, round or sunken LED.

Displaying the LED flat is less time and color consuming, but not so nice to see.

The sunken LED itself is (certainly) smaller than the round LED because of the 3 shading circles and is most time consuming. Makes sense for LED > 15x15 pixels.

Timings:
( AMD K5/133, Diamond Stealth 64 PCI Graphics, widgetsize 29x29 )

  • flat Approximately 0.7 msec per paint
  • round Approximately 2.9 msec per paint
  • sunken Approximately 3.3 msec per paint

The widget will be updated on the next repaining event.

LED look.

Enumerator
Flat 
Raised 
Sunken 
Flat 
Raised 
Sunken 
Flat 
Raised 
Sunken 

◆ Look [3/3]

Displays a flat, round or sunken LED.

Displaying the LED flat is less time and color consuming, but not so nice to see.

The sunken LED itself is (certainly) smaller than the round LED because of the 3 shading circles and is most time consuming. Makes sense for LED > 15x15 pixels.

Timings:
( AMD K5/133, Diamond Stealth 64 PCI Graphics, widgetsize 29x29 )

  • flat Approximately 0.7 msec per paint
  • round Approximately 2.9 msec per paint
  • sunken Approximately 3.3 msec per paint

The widget will be updated on the next repaining event.

LED look.

Enumerator
Flat 
Raised 
Sunken 
Flat 
Raised 
Sunken 
Flat 
Raised 
Sunken 

◆ Shape [1/3]

Shades of the lamp.

LED shape

Enumerator
Rectangular 
Circular 
Rectangular 
Circular 
Rectangular 
Circular 

◆ Shape [2/3]

Shades of the lamp.

LED shape

Enumerator
Rectangular 
Circular 
Rectangular 
Circular 
Rectangular 
Circular 

◆ Shape [3/3]

Shades of the lamp.

LED shape

Enumerator
Rectangular 
Circular 
Rectangular 
Circular 
Rectangular 
Circular 

◆ State [1/3]

Status of the light is on/off.

LED on/off.

Enumerator
Off 
On 
Off 
On 
Off 
On 

◆ State [2/3]

Status of the light is on/off.

LED on/off.

Enumerator
Off 
On 
Off 
On 
Off 
On 

◆ State [3/3]

Status of the light is on/off.

LED on/off.

Enumerator
Off 
On 
Off 
On 
Off 
On 

Constructor & Destructor Documentation

◆ LedWidget() [1/9]

LedWidget::LedWidget ( QWidget *  parent = 0)
explicit

Constructs a green, round LED widget which will initially be turned on.

Parameters
parentThe parent widget.

◆ LedWidget() [2/9]

LedWidget::LedWidget ( const QColor &  color,
QWidget *  parent = 0 
)
explicit

Constructs a round LED widget with the supplied color which will initially be turned on.

Parameters
colorInitial color of the LED.
parentThe parent widget. Constructor

◆ LedWidget() [3/9]

LedWidget::LedWidget ( const QColor &  color,
LedWidget::State  state,
LedWidget::Look  look,
LedWidget::Shape  shape,
QWidget *  parent = 0 
)

Constructor with the color, state and look.

Differs from above only in the parameters, which configure all settings.

Parameters
colorInitial color of the LED.
stateSets the State.
lookSets the Look.
shapeSets the Shape (rectangular or circular).
parentThe parent widget. Constructor

◆ ~LedWidget() [1/3]

LedWidget::~LedWidget ( )

Destroys the LED widget.

Destructor

◆ LedWidget() [4/9]

LedWidget::LedWidget ( QWidget *  parent = 0)
explicit

Constructs a green, round LED widget which will initially be turned on.

Parameters
parentThe parent widget.

◆ LedWidget() [5/9]

LedWidget::LedWidget ( const QColor &  color,
QWidget *  parent = 0 
)
explicit

Constructs a round LED widget with the supplied color which will initially be turned on.

Parameters
colorInitial color of the LED.
parentThe parent widget. Constructor

◆ LedWidget() [6/9]

LedWidget::LedWidget ( const QColor &  color,
LedWidget::State  state,
LedWidget::Look  look,
LedWidget::Shape  shape,
QWidget *  parent = 0 
)

Constructor with the color, state and look.

Differs from above only in the parameters, which configure all settings.

Parameters
colorInitial color of the LED.
stateSets the State.
lookSets the Look.
shapeSets the Shape (rectangular or circular).
parentThe parent widget. Constructor

◆ ~LedWidget() [2/3]

LedWidget::~LedWidget ( )

Destroys the LED widget.

Destructor

◆ LedWidget() [7/9]

LedWidget::LedWidget ( QWidget *  parent = 0)
explicit

Constructs a green, round LED widget which will initially be turned on.

Parameters
parentThe parent widget.

◆ LedWidget() [8/9]

LedWidget::LedWidget ( const QColor &  color,
QWidget *  parent = 0 
)
explicit

Constructs a round LED widget with the supplied color which will initially be turned on.

Parameters
colorInitial color of the LED.
parentThe parent widget. Constructor

◆ LedWidget() [9/9]

LedWidget::LedWidget ( const QColor &  color,
LedWidget::State  state,
LedWidget::Look  look,
LedWidget::Shape  shape,
QWidget *  parent = 0 
)

Constructor with the color, state and look.

Differs from above only in the parameters, which configure all settings.

Parameters
colorInitial color of the LED.
stateSets the State.
lookSets the Look.
shapeSets the Shape (rectangular or circular).
parentThe parent widget. Constructor

◆ ~LedWidget() [3/3]

LedWidget::~LedWidget ( )

Destroys the LED widget.

Destructor

Member Function Documentation

◆ color() [1/3]

QColor LedWidget::color ( ) const

Returns the current color of the widget.

See also
Color Returns LED color.

◆ color() [2/3]

QColor LedWidget::color ( ) const

Returns the current color of the widget.

See also
Color Returns LED color.

◆ color() [3/3]

QColor LedWidget::color ( ) const

Returns the current color of the widget.

See also
Color Returns LED color.

◆ darkFactor() [1/3]

int LedWidget::darkFactor ( ) const

Returns the factor to darken the LED.

See also
setDarkFactor() Returns dark factor.

◆ darkFactor() [2/3]

int LedWidget::darkFactor ( ) const

Returns the factor to darken the LED.

See also
setDarkFactor() Returns dark factor.

◆ darkFactor() [3/3]

int LedWidget::darkFactor ( ) const

Returns the factor to darken the LED.

See also
setDarkFactor() Returns dark factor.

◆ ledWidth() [1/3]

int LedWidget::ledWidth ( ) const
protectedvirtual

Returns the width of the led.

◆ ledWidth() [2/3]

virtual int LedWidget::ledWidth ( ) const
protectedvirtual

Returns the width of the led.

◆ ledWidth() [3/3]

virtual int LedWidget::ledWidth ( ) const
protectedvirtual

Returns the width of the led.

◆ look() [1/3]

Look LedWidget::look ( ) const

Returns the current look of the widget.

See also
Look Returns LED look.

◆ look() [2/3]

Look LedWidget::look ( ) const

Returns the current look of the widget.

See also
Look Returns LED look.

◆ look() [3/3]

Look LedWidget::look ( ) const

Returns the current look of the widget.

See also
Look Returns LED look.

◆ minimumSizeHint() [1/3]

virtual QSize LedWidget::minimumSizeHint ( ) const
virtual

◆ minimumSizeHint() [2/3]

QSize LedWidget::minimumSizeHint ( ) const
virtual

◆ minimumSizeHint() [3/3]

virtual QSize LedWidget::minimumSizeHint ( ) const
virtual

◆ off [1/3]

void LedWidget::off ( )
slot

Sets the state of the widget to Off.

The widget will be painted immediately.

See also
on() toggle() setState()

◆ off [2/3]

void LedWidget::off ( )
slot

Sets the state of the widget to Off.

The widget will be painted immediately.

See also
on() toggle() setState()

◆ off [3/3]

void LedWidget::off ( )
slot

Sets the state of the widget to Off.

The widget will be painted immediately.

See also
on() toggle() setState()

◆ on [1/3]

void LedWidget::on ( )
slot

Sets the state of the widget to On.

The widget will be painted immediately.

See also
off() toggle() setState()

◆ on [2/3]

void LedWidget::on ( )
slot

Sets the state of the widget to On.

The widget will be painted immediately.

See also
off() toggle() setState()

◆ on [3/3]

void LedWidget::on ( )
slot

Sets the state of the widget to On.

The widget will be painted immediately.

See also
off() toggle() setState()

◆ paintCachedPixmap() [1/3]

bool LedWidget::paintCachedPixmap ( )
protected

Paint the cached antialiased pixmap corresponding to the state if any.

Returns
true if the pixmap was painted, false if it hasn't been created yet

◆ paintCachedPixmap() [2/3]

bool LedWidget::paintCachedPixmap ( )
protected

Paint the cached antialiased pixmap corresponding to the state if any.

Returns
true if the pixmap was painted, false if it hasn't been created yet

◆ paintCachedPixmap() [3/3]

bool LedWidget::paintCachedPixmap ( )
protected

Paint the cached antialiased pixmap corresponding to the state if any.

Returns
true if the pixmap was painted, false if it hasn't been created yet

◆ paintEvent() [1/3]

void LedWidget::paintEvent ( QPaintEvent *  )
protected

◆ paintEvent() [2/3]

void LedWidget::paintEvent ( QPaintEvent *  )
protected

◆ paintEvent() [3/3]

void LedWidget::paintEvent ( QPaintEvent *  )
protected

◆ paintFlat() [1/3]

virtual void LedWidget::paintFlat ( )
protectedvirtual

Paints a circular, flat LED.

◆ paintFlat() [2/3]

void LedWidget::paintFlat ( )
protectedvirtual

Paints a circular, flat LED.

◆ paintFlat() [3/3]

virtual void LedWidget::paintFlat ( )
protectedvirtual

Paints a circular, flat LED.

◆ paintRaised() [1/3]

virtual void LedWidget::paintRaised ( )
protectedvirtual

Paints a circular, raised LED.

◆ paintRaised() [2/3]

void LedWidget::paintRaised ( )
protectedvirtual

Paints a circular, raised LED.

◆ paintRaised() [3/3]

virtual void LedWidget::paintRaised ( )
protectedvirtual

Paints a circular, raised LED.

◆ paintRect() [1/3]

virtual void LedWidget::paintRect ( )
protectedvirtual

Paints a rectangular, flat LED.

◆ paintRect() [2/3]

virtual void LedWidget::paintRect ( )
protectedvirtual

Paints a rectangular, flat LED.

◆ paintRect() [3/3]

void LedWidget::paintRect ( )
protectedvirtual

Paints a rectangular, flat LED.

◆ paintRectFrame() [1/3]

virtual void LedWidget::paintRectFrame ( bool  raised)
protectedvirtual

Paints a rectangular LED, either raised or sunken, depending on its argument.

◆ paintRectFrame() [2/3]

void LedWidget::paintRectFrame ( bool  raised)
protectedvirtual

Paints a rectangular LED, either raised or sunken, depending on its argument.

◆ paintRectFrame() [3/3]

virtual void LedWidget::paintRectFrame ( bool  raised)
protectedvirtual

Paints a rectangular LED, either raised or sunken, depending on its argument.

◆ paintSunken() [1/3]

virtual void LedWidget::paintSunken ( )
protectedvirtual

Paints a circular, sunken LED.

◆ paintSunken() [2/3]

void LedWidget::paintSunken ( )
protectedvirtual

Paints a circular, sunken LED.

◆ paintSunken() [3/3]

virtual void LedWidget::paintSunken ( )
protectedvirtual

Paints a circular, sunken LED.

◆ setColor() [1/3]

void LedWidget::setColor ( const QColor &  color)

Set the color of the widget.

The LED is shown with Color when in the LedWidget::On state or with the darken Color (

See also
setDarkFactor) in LedWidget::Off state.

The widget calls the update() method, so it will be updated when entering the main event loop.

See also
Color
Parameters
colorNew color of the LED. Sets the LED color.

◆ setColor() [2/3]

void LedWidget::setColor ( const QColor &  color)

Set the color of the widget.

The LED is shown with Color when in the LedWidget::On state or with the darken Color (

See also
setDarkFactor) in LedWidget::Off state.

The widget calls the update() method, so it will be updated when entering the main event loop.

See also
Color
Parameters
colorNew color of the LED. Sets the LED color.

◆ setColor() [3/3]

void LedWidget::setColor ( const QColor &  color)

Set the color of the widget.

The LED is shown with Color when in the LedWidget::On state or with the darken Color (

See also
setDarkFactor) in LedWidget::Off state.

The widget calls the update() method, so it will be updated when entering the main event loop.

See also
Color
Parameters
colorNew color of the LED. Sets the LED color.

◆ setDarkFactor() [1/3]

void LedWidget::setDarkFactor ( int  darkFactor)

Sets the factor to darken the LED in LedWidget::Off state.

The

Parameters
darkFactorshould be greater than 100, otherwise the LED becomes lighter in LedWidget::Off state.

Defaults to 300.

See also
QColor
Parameters
darkFactorSets the factor to darken the LED. Sets the factor to darken the LED.

◆ setDarkFactor() [2/3]

void LedWidget::setDarkFactor ( int  darkFactor)

Sets the factor to darken the LED in LedWidget::Off state.

The

Parameters
darkFactorshould be greater than 100, otherwise the LED becomes lighter in LedWidget::Off state.

Defaults to 300.

See also
QColor
Parameters
darkFactorSets the factor to darken the LED. Sets the factor to darken the LED.

◆ setDarkFactor() [3/3]

void LedWidget::setDarkFactor ( int  darkFactor)

Sets the factor to darken the LED in LedWidget::Off state.

The

Parameters
darkFactorshould be greater than 100, otherwise the LED becomes lighter in LedWidget::Off state.

Defaults to 300.

See also
QColor
Parameters
darkFactorSets the factor to darken the LED. Sets the factor to darken the LED.

◆ setLook() [1/3]

void LedWidget::setLook ( Look  look)

Sets the look of the widget.

The look may be Flat, Raised or Sunken.

The widget calls the update() method, so it will be updated when entering the main event loop.

See also
Look
Parameters
lookNew look of the LED. Sets LED look.

◆ setLook() [2/3]

void LedWidget::setLook ( Look  look)

Sets the look of the widget.

The look may be Flat, Raised or Sunken.

The widget calls the update() method, so it will be updated when entering the main event loop.

See also
Look
Parameters
lookNew look of the LED. Sets LED look.

◆ setLook() [3/3]

void LedWidget::setLook ( Look  look)

Sets the look of the widget.

The look may be Flat, Raised or Sunken.

The widget calls the update() method, so it will be updated when entering the main event loop.

See also
Look
Parameters
lookNew look of the LED. Sets LED look.

◆ setShape() [1/3]

void LedWidget::setShape ( Shape  shape)

Set the shape of the LED.

Parameters
shapeThe LED shape. Set LED shape.

◆ setShape() [2/3]

void LedWidget::setShape ( Shape  shape)

Set the shape of the LED.

Parameters
shapeThe LED shape. Set LED shape.

◆ setShape() [3/3]

void LedWidget::setShape ( Shape  shape)

Set the shape of the LED.

Parameters
shapeThe LED shape. Set LED shape.

◆ setState() [1/3]

void LedWidget::setState ( State  state)

Sets the state of the widget to On or Off.

The widget will be painted immediately.

See also
on() off() toggle()
Parameters
stateThe LED state: on or off. Set LED state.

◆ setState() [2/3]

void LedWidget::setState ( State  state)

Sets the state of the widget to On or Off.

The widget will be painted immediately.

See also
on() off() toggle()
Parameters
stateThe LED state: on or off. Set LED state.

◆ setState() [3/3]

void LedWidget::setState ( State  state)

Sets the state of the widget to On or Off.

The widget will be painted immediately.

See also
on() off() toggle()
Parameters
stateThe LED state: on or off. Set LED state.

◆ shape() [1/3]

Shape LedWidget::shape ( ) const

Returns the current shape of the widget.

See also
Shape Returns LED shape.

◆ shape() [2/3]

Shape LedWidget::shape ( ) const

Returns the current shape of the widget.

See also
Shape Returns LED shape.

◆ shape() [3/3]

Shape LedWidget::shape ( ) const

Returns the current shape of the widget.

See also
Shape Returns LED shape.

◆ sizeHint() [1/3]

virtual QSize LedWidget::sizeHint ( ) const
virtual

◆ sizeHint() [2/3]

virtual QSize LedWidget::sizeHint ( ) const
virtual

◆ sizeHint() [3/3]

QSize LedWidget::sizeHint ( ) const
virtual

◆ state() [1/3]

State LedWidget::state ( ) const

Returns the current state of the widget (on/off).

See also
State Returns LED state.

◆ state() [2/3]

State LedWidget::state ( ) const

Returns the current state of the widget (on/off).

See also
State Returns LED state.

◆ state() [3/3]

State LedWidget::state ( ) const

Returns the current state of the widget (on/off).

See also
State Returns LED state.

◆ toggle [1/3]

void LedWidget::toggle ( )
slot

Toggles the state of the led from Off to On or vice versa.

The widget repaints itself immediately.

◆ toggle [2/3]

void LedWidget::toggle ( )
slot

Toggles the state of the led from Off to On or vice versa.

The widget repaints itself immediately.

◆ toggle [3/3]

void LedWidget::toggle ( )
slot

Toggles the state of the led from Off to On or vice versa.

The widget repaints itself immediately.

Member Data Documentation

◆ d

Private *const LedWidget::d
private

Property Documentation

◆ color

QColor LedWidget::color
readwrite

◆ darkFactor

int LedWidget::darkFactor
readwrite

◆ look

Look LedWidget::look
readwrite

◆ shape

Shape LedWidget::shape
readwrite

◆ state

State LedWidget::state
readwrite

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