Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 

46 linhas
682 B

  1. #ifndef ONOFFSTATUSWIDGET_H
  2. #define ONOFFSTATUSWIDGET_H
  3. #include <QWidget>
  4. #include <QRect>
  5. #include <QTimer>
  6. #include <QLabel>
  7. class CONOFFStatusWidget : public QWidget
  8. {
  9. Q_OBJECT
  10. public:
  11. enum eONOFFLedColor
  12. {
  13. ON_OFF_LED_COLOR_GREEN,
  14. ON_OFF_LED_COLOR_RED
  15. };
  16. CONOFFStatusWidget(eONOFFLedColor Color, QWidget *Parent = NULL,QString Label = QString());
  17. ~CONOFFStatusWidget();
  18. void paintEvent(QPaintEvent *PaintEvent);
  19. void resizeEvent(QResizeEvent *);
  20. QLabel *mLabel;
  21. QPixmap mLedOnPixmap,mLedOffPixmap;
  22. bool IsOn;
  23. void SetON();
  24. void SetOFF();
  25. void Toggle();
  26. public slots:
  27. };
  28. #endif // ONOFFSTATUSWIDGET_H