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 ***************************************************************************/
23 // My Qt designer widget plugin class
27 class QLed : public QWidget
33 QLed(QWidget *parent = 0);
34 bool value() const { return m_value; }
35 enum ledColor { Red=0,Green,Yellow,Grey,Orange,Purple,Blue };
36 enum ledShape { Circle=0,Square,Triangle,Rounded};
37 ledColor onColor() const { return m_onColor; }
38 ledColor offColor() const { return m_offColor; }
39 ledShape shape() const { return m_shape; }
43 void setOnColor(ledColor);
44 void setOffColor(ledColor);
45 void setShape(ledShape);
50 ledColor m_onColor, m_offColor;
55 void paintEvent(QPaintEvent *event);