mirror of
https://github.com/caperren/school_archives.git
synced 2025-11-09 21:51:15 +00:00
These are all design documents that I thought I had lost. It's may make me cringe, but it's still cool to use it to see how far I've come.
35 lines
539 B
C++
35 lines
539 B
C++
#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
|