summaryrefslogtreecommitdiffstats
path: root/tdeui/kled.h
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-07-01 19:12:13 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-07-01 19:12:13 -0500
commit513ffc6edff67b5f7f121c3064b059ce82cbb842 (patch)
tree21f144c87ddbde85964e075ffa9d53feca37d961 /tdeui/kled.h
parente202ca79c3b3f989d7b0c4be4bb96b38e7924a9a (diff)
downloadtdelibs-513ffc6edff67b5f7f121c3064b059ce82cbb842.tar.gz
tdelibs-513ffc6edff67b5f7f121c3064b059ce82cbb842.zip
Add ability to set KLed off color
Diffstat (limited to 'tdeui/kled.h')
-rw-r--r--tdeui/kled.h29
1 files changed, 28 insertions, 1 deletions
diff --git a/tdeui/kled.h b/tdeui/kled.h
index 7b9f327fa..b4f828ea4 100644
--- a/tdeui/kled.h
+++ b/tdeui/kled.h
@@ -1,5 +1,5 @@
/* This file is part of the KDE libraries
- Copyright (C) 1998 Jörg Habenicht (j.habenicht@europemail.com)
+ Copyright (C) 1998 J�rg Habenicht (j.habenicht@europemail.com)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -50,6 +50,7 @@ class TDEUI_EXPORT KLed : public TQWidget
Q_PROPERTY( Shape shape READ shape WRITE setShape )
Q_PROPERTY( Look look READ look WRITE setLook )
Q_PROPERTY( TQColor color READ color WRITE setColor )
+ Q_PROPERTY( TQColor offColor READ color WRITE setOffColor )
Q_PROPERTY( int darkFactor READ darkFactor WRITE setDarkFactor )
public:
@@ -148,6 +149,14 @@ public:
TQColor color() const;
/**
+ * Returns the off color of the widget
+ *
+ * @see OffColor
+ * @short Returns LED off color.
+ */
+ TQColor offColor() const;
+
+ /**
* Returns the look of the widget.
*
* @see Look
@@ -204,6 +213,23 @@ public:
void setColor(const TQColor& color);
/**
+ * Set the off color of the widget.
+ * The Color is shown with the KLed::On state.
+ * The KLed::Off state is shown with this color if set
+ *
+ * The widget calls the update() method, so it will
+ * be updated when entering the main event loop.
+ *
+ * Note that calling setColor will override this value
+ *
+ * @see Color
+ *
+ * @param color New off color of the LED.
+ * @short Sets the LED off color.
+ */
+ void setOffColor(const TQColor& color);
+
+ /**
* Sets the factor to darken the LED in OFF state.
* Same as TQColor::dark().
* "darkfactor should be greater than 100, else the LED gets lighter
@@ -316,6 +342,7 @@ protected:
private:
State led_state;
TQColor led_color;
+ TQColor led_off_color;
Look led_look;
Shape led_shape;