audioPlay.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef AUDIOPLAY_H
  2. #define AUDIOPLAY_H
  3. #include <QWidget>
  4. #include <QTimer>
  5. #include "json/json.h"
  6. #include "CBaseWidget.h"
  7. #include "CHttpBll.h"
  8. namespace Ui {
  9. class audioPlay;
  10. }
  11. class audioPlay : public CBaseWidget
  12. {
  13. Q_OBJECT
  14. public:
  15. explicit audioPlay(QString sAudioName, QString sAudioUrl, int nlimitedPlayTimes, QWidget *parent = nullptr);
  16. ~audioPlay();
  17. int setUI(const int nWidth);
  18. int widgetType();
  19. void getPalyedCount(QString &name, int &nCount);
  20. signals:
  21. void playedCountChange();
  22. private slots:
  23. void on_btn_ap_play_clicked();
  24. void timeOut();
  25. void onDownLoadFile(CDownLoadFileInfo downLoadFileInfo);
  26. private:
  27. bool eventFilter(QObject *obj, QEvent *ev);
  28. Ui::audioPlay *ui;
  29. QTimer *m_pTimer;
  30. int m_nTestSecord = 0;
  31. int m_nMaxTestSecord = 0;
  32. int m_nPlayVol = 0;
  33. std::string m_sRecordDevice = "";
  34. QString m_sAudioName = "";
  35. QString m_sAudioUrl = "";
  36. int m_nLeftPalyCount = 0;
  37. int m_nPlayedCont = 0;
  38. };
  39. #endif // audioPlay_H