#pragma once #include #include #include #include #include struct LineGraphSeries { std::vector data; double minX, maxX; double minY, maxY; double rangeX, rangeY; QColor color; }; //bool compTest(QPoint a, QPoint b) { // return a.x() < b.x(); //} class CustomLineGraph :public QWidget { Q_OBJECT public: CustomLineGraph(QWidget* parent); ~CustomLineGraph(); void CustomLineGraph::paintEvent(QPaintEvent* event); private: std::vector seriesVec; QPen linePen, rectPen, axisPen; QPoint transformPoint(QPoint& point, LineGraphSeries& lgs, double stregth_factorX, double stregth_factorY); };