You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
573 B
34 lines
573 B
#ifndef HLED_H |
|
#define HLED_H |
|
|
|
#include <QWidget> |
|
|
|
class QColor; |
|
|
|
class HLed : public QWidget |
|
{ |
|
Q_OBJECT |
|
public: |
|
HLed(QWidget *parent = 0); |
|
~HLed(); |
|
|
|
QColor color() const; |
|
QSize sizeHint() const; |
|
QSize minimumSizeHint() const; |
|
|
|
public slots: |
|
void setColor(const QColor &color); |
|
void toggle(); |
|
void turnOn(bool on=true); |
|
void turnOff(bool off=true); |
|
|
|
protected: |
|
void paintEvent(QPaintEvent *); |
|
int ledWidth() const; |
|
|
|
private: |
|
struct Private; |
|
Private * const m_d; |
|
}; |
|
|
|
#endif // HLED_H
|
|
|