#ifndef MYCANVAS_H #define MYCANVAS_H #include #include #include #include #include #include #include #include #include "RadarExt.h" struct TColPoint { double x, y, amp; QColor col; }; class ToPaintState { public: ToPaintState() {} ToPaintState(int type) : type(type) {} int type = 0; double pointSize = 5; double axisX = 1; double axisY = 1; }; class MyCanvas : public QWidget { Q_OBJECT public: explicit MyCanvas(QWidget *parent = nullptr); TRadar radar = TRadar(); QVector> FDNMass; void drawState(ToPaintState); void ColorAxis(QPaintEvent *event, QPainter *painter, double step, double max); private: ToPaintState state = ToPaintState(); QRectF transposeRect(double x, double y, double x2, double y2, double axisX, double axisY); QPointF transposePoint(double x, double y, double axisX, double axisY); protected: void paintEvent(QPaintEvent *event); }; #endif // MYCANVAS_H