QSint Library  0.2.2
ledwidget.h
1 #ifndef LEDWIDGET_H
2 #define LEDWIDGET_H
3 
4 #include <QWidget>
5 
6 
7 namespace QSint
8 {
9 
10 
21 class LedWidget : public QWidget
22 {
23  Q_OBJECT
24 public:
25  explicit LedWidget(QWidget *parent = 0);
26 
27  virtual QSize minimumSizeHint() const
28  { return QSize(12,12); }
29 
30  virtual int heightForWidth(int w) const
31  { return w; }
32 
33 public slots:
38  void setColor(const QColor &ledColor);
44  void setColors(const QColor &ledColor, const QColor &highlightColor);
45 
46 protected:
47  virtual void paintEvent(QPaintEvent *event);
48 
49  QRadialGradient m_gradient;
50 };
51 
52 
53 }
54 
55 
56 #endif // LEDWIDGET_H
Round LED-style widget with gradient fill.
Definition: ledwidget.h:21
void setColors(const QColor &ledColor, const QColor &highlightColor)
setColors Funtion sets color of LED to ledColor and its highlight color to blickColor.
Definition: ledwidget.cpp:24
void setColor(const QColor &ledColor)
setColor Funtion sets color of LED to ledColor. Highlight color is set to Qt::white.
Definition: ledwidget.cpp:17

© Sintegrial Technologies 2011-2014
http://www.sintegrial.com