etTimeTest.h 739 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef ETTIMETEST_H
  2. #define ETTIMETEST_H
  3. #include <QWidget>
  4. #include <QTimer>
  5. #include <QDateTime>
  6. #include <windows.h>
  7. namespace Ui {
  8. class etTimeTest;
  9. }
  10. class etTimeTest : public QWidget
  11. {
  12. Q_OBJECT
  13. public:
  14. explicit etTimeTest(QWidget *parent = nullptr);
  15. ~etTimeTest();
  16. int setUI(const int nLeft, const int nTop, const int nWidth);
  17. int widgetHeight();
  18. int getCheckStatus();//0:false 1:true 2:未检测
  19. private:
  20. void setNtp();
  21. void send();
  22. Ui::etTimeTest *ui;
  23. std::shared_ptr<QTimer> m_pTimer;
  24. QDateTime m_startTime;
  25. QDateTime m_endTime;
  26. LARGE_INTEGER m_freq;
  27. LARGE_INTEGER m_start_t;
  28. LARGE_INTEGER m_stop_t;
  29. bool bStart;
  30. bool m_bTimeZone;
  31. bool m_bTime;
  32. };
  33. #endif // ETTIMETEST_H