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.
35 lines
573 B
35 lines
573 B
11 years ago
|
#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
|