| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- #ifndef TIMEOUT_H
- #define TIMEOUT_H
- #include <QObject>
- #include <QTimerEvent>
- #include <QDateTime>
- #define TIMER_LOCKNOTCLOSED 1000 * 1 // 物资柜未关闭检测定时器
- #define TIMER_HTTPSENDRELAY 1000 * 1 // 发送至服务器检测定时器
- class timeout : public QObject
- {
- Q_OBJECT
- public:
- timeout();
- void timerEvent(QTimerEvent *event);
- private:
- // void timeoutRun(int epoch);
- // void timeoutEnd();
- signals:
- // 超时进行
- void signal_timeoutRun(int);
- // 超时开始
- void signal_timeoutStart();
- // 超时结束
- void signal_timeoutEnd();
- private:
- int m_iLockTimeout; // 锁超时未关检测定时器
- int m_iHttpTimeout; // 锁超时未关检测定时器
- qint64 m_epochLaseHttpPost = 0; // 向服务器发消息的时间戳
- };
- #endif // TIMEOUT_H
|