noisemonitorparamdialog.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. #ifndef NOISEMONITORPARAMDIALOG_H
  2. #define NOISEMONITORPARAMDIALOG_H
  3. #include "DialogBase.h"
  4. #include "spdlog/spdlog.h"
  5. #include "SystemConfigStruct.h"
  6. namespace Ui {
  7. class NoiseMonitorParamWidget;
  8. }
  9. class NoiseMonitorParamDialog : public DialogBase
  10. {
  11. Q_OBJECT
  12. public:
  13. explicit NoiseMonitorParamDialog(QWidget *parent = nullptr);
  14. ~NoiseMonitorParamDialog();
  15. /* 设置初始参数 */
  16. void setInitialParams(NoiseDetectParam_t& noiseDetectParam);
  17. /* 获取当前参数 */
  18. NoiseDetectParam_t getCurrentParams() const { return m_noiseDetectParam; }
  19. private slots:
  20. /* 恢复默认值 */
  21. void do_pBtn_restoreDefault_clicked();
  22. private:
  23. /* 设置qss */
  24. void setQss();
  25. /* 点击了OK */
  26. bool isOKClicked() override;
  27. /* 更新噪音检测参数 */
  28. void updateNoiseDetectParam();
  29. private:
  30. Ui::NoiseMonitorParamWidget *ui;
  31. std::shared_ptr<spdlog::logger> m_logger = nullptr;
  32. NoiseDetectParam_t m_noiseDetectParam; // 噪音检测参数
  33. NoiseDetectParam_t m_defaultNoiseDetectParam;
  34. };
  35. #endif // NOISEMONITORPARAMDIALOG_H