1
/***************************************************************************
2
* Copyright (C) 2010 by P. Sereno *
3
* http://www.sereno-online.com *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU Lesser General Public License *
7
* version 2.1 as published by the Free Software Foundation *
9
* This program 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 *
12
* GNU Lesser General Public License for more details. *
13
* http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. *
14
***************************************************************************/
25
class QLed : public QWidget
30
Q_PROPERTY(bool value READ value WRITE setValue);
31
Q_PROPERTY(ledColor onColor READ onColor WRITE setOnColor);
32
Q_PROPERTY(ledColor offColor READ offColor WRITE setOffColor);
33
Q_PROPERTY(ledShape shape READ shape WRITE setShape)
36
QLed(QWidget *parent = 0);
42
enum ledColor { Red = 0, Green, Yellow, Grey, Orange, Blue, Black };
43
enum ledShape { Circle = 0};
44
ledColor onColor() const
48
ledColor offColor() const
52
ledShape shape() const
59
void setOnColor(ledColor);
60
void setOffColor(ledColor);
61
void setShape(ledShape);
66
ledColor m_onColor, m_offColor;
71
void paintEvent(QPaintEvent *event);
72
void resizeEvent(QResizeEvent*);
75
QSvgRenderer *renderer ;