#ifndef LEDWIDGET_H
#define LEDWIDGET_H

#include "GlobalDefine.h"
#include <QGraphicsWidget>

class CLedWidget : public QGraphicsWidget
{
    Q_OBJECT

public:
    CLedWidget(QString Label,QGraphicsItem *Parent = 0);

    QGraphicsTextItem *mLabel;
    QImage mLedONImage,mLedOFFImage;
    QGraphicsPixmapItem *mLedOnPixmap,*mLedOffPixmap;

    void LedON();
    void LedOFF();
    void SetLed(bool ON);

    virtual void resizeEvent(QGraphicsSceneResizeEvent *event);
};

#endif // LEDWIDGET_H
