spectrum.h 428 B

123456789101112131415161718192021222324
  1. #ifndef SPECTRUM_H
  2. #define SPECTRUM_H
  3. #include <QObject>
  4. #include <QQuickPaintedItem>
  5. #include "thirdparty/qcustomplot/qcustomplot.h"
  6. class Spectrum : public QQuickPaintedItem
  7. {
  8. Q_OBJECT
  9. public:
  10. Spectrum(QQuickItem* parent = nullptr);
  11. ~Spectrum();
  12. virtual void paint(QPainter *painter);
  13. private:
  14. QCustomPlot* m_pCustomPlot;
  15. QCPColorMap* m_pColorMap;
  16. void setGradient();
  17. };
  18. #endif // SPECTRUM_H