widget.h 939 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #ifndef WIDGET_H
  2. #define WIDGET_H
  3. #include <QWidget>
  4. #include <QVBoxLayout>
  5. #include <QMouseEvent>
  6. #include <QDebug>
  7. #include "lhtransmitterswitchapi.h"
  8. namespace Ui {
  9. class Widget;
  10. }
  11. class Widget : public QWidget
  12. {
  13. Q_OBJECT
  14. public:
  15. explicit Widget(QWidget *parent = nullptr);
  16. ~Widget();
  17. private slots:
  18. /* 导入数据按钮 */
  19. void on_pBtn_getData_clicked();
  20. /* 导出数据按钮 */
  21. void on_pBtn_saveData_clicked();
  22. /* 切换亮色/暗色的按钮 */
  23. void on_pBtn_light_dark_clicked();
  24. private:
  25. /* 添加测试用的设备信息 */
  26. // void addTestDevice();
  27. /* 回调函数 */
  28. static void trackCallBack(int actionID, QString strMemo);
  29. private:
  30. Ui::Widget *ui;
  31. LHTransmitterSwitchAPI* m_tSwitch; /* 开关页面 */
  32. QVBoxLayout* m_layout; /* 布局 */
  33. int m_style = 0; /* 亮色/暗色 */
  34. };
  35. #endif // WIDGET_H