#ifndef COMMON_H
#define COMMON_H
#include <QPointF>
struct PointEx {
    double x;
    double y;
    PointEx(double a, double b)
    {
        x = a;
        y = b;
    }
    PointEx() {}
};
struct LineSegment {
    QPointF startPoint;
    QPointF endPoint;
    LineSegment(QPointF a, QPointF b)
    {
        startPoint = a;
        endPoint = b;
    }
    LineSegment() {}
};
struct LineInfo {
    bool bDraw;  //是否绘制

    bool bSelLine;     //是否选中线
    bool bSelStartPt;  //是否选中线段起点
    bool bSelEndPt;    //是否选线段终点
    LineSegment* seg;
    LineInfo()
    {
        bDraw = false;
        bSelLine = false;
        bSelStartPt = false;
        bSelEndPt = false;
        seg = new LineSegment;
    }
    ~LineInfo() { delete seg; }
};

#endif  // COMMON_H
