audiowaveform.h 585 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef AUDIOWAVEFORM_H
  2. #define AUDIOWAVEFORM_H
  3. #include <QObject>
  4. #include <QQuickPaintedItem>
  5. #include "thirdparty/qcustomplot/qcustomplot.h"
  6. class AudioWaveform : public QQuickPaintedItem
  7. {
  8. Q_OBJECT
  9. public:
  10. AudioWaveform(QQuickItem* parent = nullptr);
  11. ~AudioWaveform();
  12. virtual void paint(QPainter *painter);
  13. void refresh();
  14. Q_INVOKABLE void paintWaveForm();
  15. void setData(QVector<double> xValue, QVector<double> yValue);
  16. private:
  17. QCustomPlot* m_pCustomPlot;
  18. QCPGraph* m_pAudioWaveformGraph;
  19. public slots:
  20. };
  21. #endif // AUDIOWAVEFORM_H