widget.h 851 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. private:
  28. Ui::Widget *ui;
  29. LHTransmitterSwitchAPI* m_tSwitch; /* 开关页面 */
  30. QVBoxLayout* m_layout; /* 布局 */
  31. int m_style = 0; /* 亮色/暗色 */
  32. };
  33. #endif // WIDGET_H