• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeui
 

tdeui

  • tdeui
kled.h
1/* This file is part of the KDE libraries
2 Copyright (C) 1998 J�rg Habenicht (j.habenicht@europemail.com)
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18*/
19/*************************************************************************
20 * $Id$
21 *************************************************************************/
22
23#ifndef _KLED_H_
24#define _KLED_H_
25
26#include <tqwidget.h>
27#include <tdelibs_export.h>
28
29class TQColor;
45class TDEUI_EXPORT KLed : public TQWidget
46{
47 TQ_OBJECT
48 TQ_ENUMS( State Shape Look )
49 TQ_PROPERTY( State state READ state WRITE setState )
50 TQ_PROPERTY( Shape shape READ shape WRITE setShape )
51 TQ_PROPERTY( Look look READ look WRITE setLook )
52 TQ_PROPERTY( TQColor color READ color WRITE setColor )
53 TQ_PROPERTY( TQColor offColor READ color WRITE setOffColor )
54 TQ_PROPERTY( int darkFactor READ darkFactor WRITE setDarkFactor )
55
56public:
57
62 enum State { Off, On };
63
68 enum Shape { Rectangular, Circular };
69
90 enum Look { Flat, Raised, Sunken };
91
96 KLed(TQWidget *parent=0, const char *name=0);
107 KLed(const TQColor &col, TQWidget *parent=0, const char *name=0);
108
123 KLed(const TQColor& col, KLed::State state, KLed::Look look, KLed::Shape shape,
124 TQWidget *parent=0, const char *name=0);
125
126
131 ~KLed();
132
139 State state() const;
140
141 Shape shape() const;
142
149 TQColor color() const;
150
157 TQColor offColor() const;
158
165 Look look() const;
166
173 int darkFactor() const;
174
184 void setState( State state );
185
189 void setShape(Shape s);
198 void toggleState() TDE_DEPRECATED;
199
213 void setColor(const TQColor& color);
214
230 void setOffColor(const TQColor& color);
231
244 void setDarkFactor(int darkfactor);
245
276 void setLook( Look look );
277
278 virtual TQSize sizeHint() const;
279 virtual TQSize minimumSizeHint() const;
280
281public slots:
282
288 void toggle();
289
296 void on();
297
304 void off();
305
306protected:
310 virtual void paintFlat();
314 virtual void paintRound();
318 virtual void paintSunken();
322 virtual void paintRect();
327 virtual void paintRectFrame(bool raised);
328
329 void paintEvent( TQPaintEvent * );
330
334 int ensureRoundLed();
335
340 bool paintCachedPixmap();
341
342private:
343 State led_state;
344 TQColor led_color;
345 TQColor led_off_color;
346 Look led_look;
347 Shape led_shape;
348
349protected:
350 virtual void virtual_hook( int id, void* data );
351private:
352 class KLedPrivate;
353 KLedPrivate *d;
354};
355
356#endif
KLed
An LED widget.
Definition: kled.h:46
KLed::State
State
Status of the light is on/off.
Definition: kled.h:62
KLed::Shape
Shape
Shades of the lamp.
Definition: kled.h:68
KLed::Look
Look
Displays a flat, round or sunken LED.
Definition: kled.h:90

tdeui

Skip menu "tdeui"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeui

Skip menu "tdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.9.4
This website is maintained by Timothy Pearson.