|
- #ifndef ONOFFSTATUSWIDGET_H
- #define ONOFFSTATUSWIDGET_H
-
- #include <QWidget>
- #include <QRect>
- #include <QTimer>
- #include <QLabel>
-
- class CONOFFStatusWidget : public QWidget
- {
-
-
- Q_OBJECT
- public:
-
- enum eONOFFLedColor
- {
- ON_OFF_LED_COLOR_GREEN,
- ON_OFF_LED_COLOR_RED
- };
-
- CONOFFStatusWidget(eONOFFLedColor Color, QWidget *Parent = NULL,QString Label = QString());
- ~CONOFFStatusWidget();
- void paintEvent(QPaintEvent *PaintEvent);
- void resizeEvent(QResizeEvent *);
-
- QLabel *mLabel;
- QPixmap mLedOnPixmap,mLedOffPixmap;
-
- bool IsOn;
-
- void SetON();
- void SetOFF();
- void Toggle();
-
-
-
-
- public slots:
-
-
-
- };
-
- #endif // ONOFFSTATUSWIDGET_H
|