1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677 |
- #ifndef NOISEMONITORPARAMDIALOG_H
- #define NOISEMONITORPARAMDIALOG_H
- #include "DialogBase.h"
- #include "spdlog/spdlog.h"
- #include "SystemConfigStruct.h"
- namespace Ui {
- class NoiseMonitorParamWidget;
- }
- class NoiseMonitorParamDialog : public DialogBase
- {
- Q_OBJECT
- public:
- explicit NoiseMonitorParamDialog(QWidget *parent = nullptr);
- ~NoiseMonitorParamDialog();
- /* 设置初始参数 */
- void setInitialParams(NoiseDetectParam_t& noiseDetectParam);
- /* 获取当前参数 */
- NoiseDetectParam_t getCurrentParams() const { return m_noiseDetectParam; }
- private slots:
- /* 恢复默认值 */
- void do_pBtn_restoreDefault_clicked();
- private:
- /* 设置qss */
- void setQss();
- /* 点击了OK */
- bool isOKClicked() override;
- /* 更新噪音检测参数 */
- bool updateNoiseDetectParam();
- /* 设置限制参数范围 */
- void setLimitParamRange();
- /* 取消所有的报警红框 */
- void cancelAllWarn();
- private:
- Ui::NoiseMonitorParamWidget *ui;
- std::shared_ptr<spdlog::logger> m_logger = nullptr;
- NoiseDetectParam_t m_noiseDetectParam; // 噪音检测参数
- NoiseDetectParam_t m_defaultNoiseDetectParam;
- /* 检测参数范围 */
- int m_noiseOneDetectDurationLow = 1;
- int m_noiseOneDetectDurationHigh = 60;
- int m_noiseDetectContinueCountLow = 1;
- int m_noiseDetectContinueCountHigh = 100;
- int m_noiseContinueCountIsWarnLow = 1;
- int m_noiseContinueCountIsWarnHigh = 10;
- int m_noiseContinueCountPercentLow = 1;
- int m_noiseContinueCountPercentHigh = 100;
- double m_thresholdSlientLow = -99.99;
- double m_thresholdSlientHigh = 0;
- double m_thresholdDBLow = -100;
- double m_thresholdDBHigh = 0;
- double m_thresholdCVLow = -100;
- double m_thresholdCVHigh = 0;
- int m_npersegLow = 1;
- int m_npersegHigh = 4096;
- int m_noverlapLow = 0;
- int m_noverlapHigh = 4096;
- int m_nfftLow = 1;
- int m_nfftHigh = 4096;
- };
- #endif // NOISEMONITORPARAMDIALOG_H
|