12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- #ifndef COMPAREITEMDIALOG_H
- #define COMPAREITEMDIALOG_H
- #include "DialogBase.h"
- #include "singlecompareroadwidget.h"
- #include "GlobalVariable.h"
- #include <QDialog>
- #include <QVBoxLayout>
- namespace Ui {
- class CompareItemWidget;
- }
- enum class EDBType
- {
- DBType_Mute,
- DBType_Overload,
- DBType_Phase
- };
- /**
- * @brief 对比项设置页面
- *
- */
- class CompareItemDialog : public DialogBase
- {
- Q_OBJECT
- public:
- explicit CompareItemDialog(QWidget *parent = nullptr);
- ~CompareItemDialog();
- /* 设置可选的声卡通道信息 */
- void setSoundCardRoadList(const SoundCardInfo_t& soundCardInfo);
-
- /* 设置默认的参数 */
- void setDefaultParams(const CompareItemInfo_t& item);
- /* 获取生成的对比项信息 */
- CompareItemInfo_t& getCompareItemInfo();
- /* 设置样式表 */
- void setQSS();
- private slots:
- /* 新增通道 */
- void do_pBtn_add_clicked();
- /* 删除通道 */
- void do_CompareRoadWgtDeleted(int nIndex);
- /* 静音、过载、反相检测条件开关 */
- void do_checkBox_MOP_clicked(bool checked);
-
- private:
- /* 设置静音过载反相可编辑 */
- void setMOPEditable(EDBType type, bool editable);
- /* 设置检测参数输入栏只能输入数字 */
- void setDetectParamInputOnlyNumber();
- /* 新增一个通道 */
- SingleCompareRoadWidget* addOneRoadWidget(int nIndex, bool bDelBtnVisible = true);
- /* 重载按下关闭按钮之后,弹窗关闭之前的操作,在这里更新成员变量对比项信息 */
- bool isOKClicked() override;
- /* 获取对比项的基础信息 */
- bool getCompareItemBaseInfo(CompareItemInfo_t& compareItemInfo);
- /* 获取各个通道信息 */
- bool getCompareRoadInfo(CompareItemInfo_t& compareItemInfo);
- /* 获取音频检测信息 */
- bool getAudioDetectInfo(CompareItemInfo_t& compareItemInfo);
- /* 取消所有的报警 */
- void cancelAllWarn();
- private:
- Ui::CompareItemWidget *ui;
- SoundCardInfo_t m_soundCardInfo; /* 声卡信息 */
- QList<SingleCompareRoadWidget*> m_listOtherRoadWgt;
- CompareItemInfo_t m_compareItemInfo; /* 对比项信息 */
- QString m_qssRecordRoad; /* 录音通道的样式表 */
- };
- #endif // COMPAREITEMDIALOG_H
|