widget.h 1023 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #ifndef WIDGET_H
  2. #define WIDGET_H
  3. #include "configure.h"
  4. #include <QWidget>
  5. #include <QThreadPool>
  6. QT_BEGIN_NAMESPACE
  7. namespace Ui { class Widget; }
  8. QT_END_NAMESPACE
  9. class Widget : public QWidget
  10. {
  11. Q_OBJECT
  12. public:
  13. Widget(QWidget *parent = nullptr);
  14. option conf;
  15. ~Widget();
  16. private:
  17. QString numToReadableString(const quint64);
  18. Ui::Widget *ui;
  19. unsigned int m_mode = 1;
  20. uint64_t m_speedRecord = 0;
  21. bool m_isStarted = false;
  22. QThreadPool* m_tpool = nullptr;
  23. public slots:
  24. void setAddr(const QString address);
  25. void setLog(const QString, const quint64, const quint64, const quint64);
  26. private slots:
  27. void secondByteEdit(int);
  28. void ipv6_pat_mode();
  29. void high_mode();
  30. void ipv6_pat_high_mode();
  31. void ipv6_reg_mode();
  32. void ipv6_reg_high_mode();
  33. void mesh_pat_mode();
  34. void mesh_reg_mode();
  35. void altitude_status(bool);
  36. void string_status(bool);
  37. void action();
  38. };
  39. #endif // WIDGET_H