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.
57 lines
1.5 KiB
57 lines
1.5 KiB
#ifndef __TIME_SHOW_WIDGET_HEADER__
|
|
#define __TIME_SHOW_WIDGET_HEADER__
|
|
|
|
#include <time.h>
|
|
#include "../guiClass.h"
|
|
#include "../../components/base/basicEventHandler.h"
|
|
#include "../../components/base/basicEventHeap.h"
|
|
|
|
typedef enum{
|
|
TSW_NO_STATUS=0,
|
|
TSW_NO_CONNECTION,
|
|
TSW_LEARNING,
|
|
TSW_ARMING,
|
|
TSW_ARMED,
|
|
TSW_ALARMING,
|
|
TSW_ALARMED,
|
|
TSW_DEARMING
|
|
} TSW_STATUS;
|
|
|
|
class TimeShowWidget : public QWidget, public basicEventHandler {
|
|
private:
|
|
QPixmap *m_pGreenPixmap;
|
|
QPixmap *m_pRedPixmap;
|
|
QPixmap *m_pGrayPixmap;
|
|
QPixmap *m_pBluePixmap;
|
|
|
|
QPixmap *m_pArmedPixmap[10];
|
|
QPixmap *m_pPreArmedPixmap[10];
|
|
QPixmap *m_pAlarmedPixmap[10];
|
|
|
|
int m_iLogoSize;
|
|
int m_iLogoIndex;
|
|
int m_iLogoStage;
|
|
TSW_STATUS m_bWorkingStatus;
|
|
QLCDNumber *m_pYearNumber;
|
|
QLCDNumber *m_pMonthNumber;
|
|
QLCDNumber *m_pDayNumber;
|
|
QLCDNumber *m_pHourNumber;
|
|
QLCDNumber *m_pMinutesNumber;
|
|
QLCDNumber *m_pSecondsNumber;
|
|
QPixmap *m_pPixmap;
|
|
QPixmap *m_pOverlayPixmap;
|
|
QTimer *m_pClockTimer;
|
|
QTimer *m_pLogoTimer;
|
|
QLabel *m_pLogoLabel;
|
|
public:
|
|
explicit TimeShowWidget(QWidget *parent = NULL);
|
|
~TimeShowWidget();
|
|
void setLogoSize(int Z);
|
|
void setStatus(TSW_STATUS S){ m_bWorkingStatus = S; };
|
|
public slots:
|
|
virtual bool dispatchEvent(basicEvent *Evt);
|
|
void updateClock();
|
|
void updateLogo();
|
|
};
|
|
|
|
#endif
|