Typica is a free program for professional coffee roasters. https://typica.us
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.

hled.h 538B

12345678910111213141516171819202122232425262728293031323334
  1. #ifndef HLED_H
  2. #define HLED_H
  3. #include <QWidget>
  4. class QColor;
  5. class HLed : public QWidget
  6. {
  7. Q_OBJECT
  8. public:
  9. HLed(QWidget *parent = 0);
  10. ~HLed();
  11. QColor color() const;
  12. QSize sizeHint() const;
  13. QSize minimumSizeHint() const;
  14. public slots:
  15. void setColor(const QColor &color);
  16. void toggle();
  17. void turnOn(bool on=true);
  18. void turnOff(bool off=true);
  19. protected:
  20. void paintEvent(QPaintEvent*);
  21. int ledWidth() const;
  22. private:
  23. struct Private;
  24. Private * const m_d;
  25. };
  26. #endif // HLED_H