paramconfig.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #ifndef PARAMCONFIG_H
  2. #define PARAMCONFIG_H
  3. #include <QDialog>
  4. #include "spdlog/spdlog.h"
  5. #include "EyeMapInfo.h"
  6. // #include <QStandardItemModel>
  7. // #include <QTableView>
  8. struct OneEyeMapInfo;
  9. class OneParamItem;
  10. namespace Ui {
  11. class ParamConfig;
  12. }
  13. class ParamConfig : public QDialog
  14. {
  15. Q_OBJECT
  16. public:
  17. explicit ParamConfig(QWidget *parent = nullptr);
  18. ~ParamConfig();
  19. /* 创建项 */
  20. void createItem(const QList<OneEyeMapInfo> &listInfo);
  21. protected:
  22. /* 事件过滤器 */
  23. bool eventFilter(QObject *watched, QEvent *event) override;
  24. private:
  25. // /* 初始化表格 */
  26. // void initTable();
  27. // /* 初始化数据 */
  28. // void initData();
  29. /* 布局item */
  30. void layoutItem();
  31. /* 更新全局的眼图数据 */
  32. void updateEyeMapInfo();
  33. /* 获取时间刻度对应的字符串 */
  34. QString getTimeGridValueStr(OscTimeGridValue value);
  35. private slots:
  36. /* 关闭按钮 */
  37. void do_pBtn_close();
  38. /* 保存按钮 */
  39. void do_pBtn_save();
  40. /* 点击了取消按钮 */
  41. void do_pBtn_cancel();
  42. public:
  43. bool isOk = false;
  44. private:
  45. Ui::ParamConfig *ui;
  46. std::shared_ptr<spdlog::logger> m_logger = nullptr;
  47. QList<OneParamItem*> m_listItem;
  48. // QStandardItemModel *m_model = nullptr;
  49. // QTableView *m_tableView = nullptr;
  50. };
  51. #endif // PARAMCONFIG_H