etNetworkTest.h 657 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef ETNETWORKTEST_H
  2. #define ETNETWORKTEST_H
  3. #include <QWidget>
  4. #include <thread>
  5. #include <mutex>
  6. namespace Ui {
  7. class etNetworkTest;
  8. }
  9. class etNetworkTest : public QWidget
  10. {
  11. Q_OBJECT
  12. signals:
  13. void checkInfo(QString speed, QString sTime);
  14. public:
  15. explicit etNetworkTest(QWidget *parent = nullptr);
  16. ~etNetworkTest();
  17. int setUI(const int nLeft, const int nTop, const int nWidth);
  18. int widgetHeight();
  19. int getCheckStatus();//0:false 1:true 2:未检测
  20. private:
  21. void threadProc();
  22. Ui::etNetworkTest *ui;
  23. std::thread m_thread;
  24. bool m_bIsRun;
  25. bool bSpeedPass;
  26. bool bDelayPass;
  27. };
  28. #endif // ETNETWORKTEST_H