27#include <tdelibs_export.h>
45class TDEUI_EXPORT
KLed :
public TQWidget
68 enum Shape { Rectangular, Circular };
90 enum Look { Flat, Raised, Sunken };
96 KLed(TQWidget *parent=0,
const char *name=0);
107 KLed(
const TQColor &col, TQWidget *parent=0,
const char *name=0);
124 TQWidget *parent=0,
const char *name=0);
149 TQColor color()
const;
157 TQColor offColor()
const;
173 int darkFactor()
const;
184 void setState( State state );
189 void setShape(Shape s);
198 void toggleState() TDE_DEPRECATED;
213 void setColor(const TQColor& color);
230 void setOffColor(const TQColor& color);
244 void setDarkFactor(
int darkfactor);
276 void setLook( Look look );
278 virtual TQSize sizeHint() const;
279 virtual TQSize minimumSizeHint() const;
310 virtual
void paintFlat();
314 virtual
void paintRound();
318 virtual
void paintSunken();
322 virtual
void paintRect();
327 virtual
void paintRectFrame(
bool raised);
329 void paintEvent( TQPaintEvent * );
334 int ensureRoundLed();
340 bool paintCachedPixmap();
345 TQColor led_off_color;
350 virtual
void virtual_hook(
int id,
void* data );
State
Status of the light is on/off.
void setOffColor(const TQColor &color)
Set the off color of the widget.
void setDarkFactor(int darkfactor)
Sets the factor to darken the LED in OFF state.
Look
Displays a flat, round or sunken LED.
State state() const
Returns the current state of the widget (on/off).
void setColor(const TQColor &color)
Set the color of the widget.
TQColor color() const
Returns the color of the widget.
Look look() const
Returns the look of the widget.
void setState(State state)
Sets the state of the widget to On or Off.
KLed(TQWidget *parent=0, const char *name=0)
Constructs a green, round LED widget which will initially be turned on.
TQColor offColor() const
Returns the off color of the widget.
void setLook(Look look)
Sets the color of the widget.
void setShape(Shape s)
Set the shape of the LED to s.
int darkFactor() const
Returns the factor to darken the LED.