#ifndef CUSTOMQWTPLOT_H #define CUSTOMQWTPLOT_H #include #include class QwtPlotCurve; class QwtPlotMarker; class CustomQwtPlot : public QwtPlot { public: explicit CustomQwtPlot(QWidget* parent = nullptr); QwtPlotCurve* GetCurve(const QString& curve_name); QList GetCurveList() const; void AddCurve(QwtPlotCurve* curve); QwtPlotMarker* GetMarker(const QString& marker_name, const QString& postion); QList GetMarkerList() const; void AddMarker(QwtPlotMarker *marker, const QString &marker_name, const QString &postion); void RemoveMarker(const QString& marker_name, const QString& postion); void CleanMarkers(); private: QMap _curves; QMap > _markers; }; QColor getDistinctColorForManyCurves(int curve_index); #endif // CUSTOMQWTPLOT_H