singlecompareroadwidget.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #ifndef SINGLECOMPAREROADWIDGET_H
  2. #define SINGLECOMPAREROADWIDGET_H
  3. #include <QWidget>
  4. #include "SoundCardData.h"
  5. namespace Ui {
  6. class SingleCompareRoadWidget;
  7. }
  8. class SingleCompareRoadWidget : public QWidget
  9. {
  10. Q_OBJECT
  11. Q_PROPERTY(bool bDelBtnVisible READ isDelBtnVisible WRITE setDelBtnVisible)
  12. Q_PROPERTY(int nIndex READ getIndex WRITE setIndex)
  13. public:
  14. explicit SingleCompareRoadWidget(QWidget *parent = nullptr);
  15. ~SingleCompareRoadWidget();
  16. /* 设置删除按钮是否可见 */
  17. bool isDelBtnVisible() const;
  18. void setDelBtnVisible(bool bVisible);
  19. /* 设置声卡通道列表 */
  20. void setSoundCardRoadList(const QList<SoundCardRoadInfo_t>& listRoad);
  21. /* 设置默认参数,设置之前需要先设置完成声卡可选通道列表 */
  22. void setDefaultParams(const CompareItemRoadInfo_t& roadInfo);
  23. /* 获取设置编号 */
  24. int getIndex() const;
  25. void setIndex(int nIndex);
  26. /* 获取通道名称 */
  27. QString getRoadName() const;
  28. /* 获取声卡录音通道编号 */
  29. SoundCardRoadInfo_t getSoundCardRoadInfo();
  30. /* 是否开启录音 */
  31. bool isRecordEnabled() const;
  32. /* 设置通道名称报警 */
  33. void setRoadNameWarn(bool isWarn);
  34. signals:
  35. void deleted(int nIndex);
  36. private:
  37. Ui::SingleCompareRoadWidget *ui;
  38. int m_nIndex;
  39. };
  40. #endif // SINGLECOMPAREROADWIDGET_H