#ifndef CUSTOMPLOTHEAD_H #define CUSTOMPLOTHEAD_H #include "QCustomPlot.h" #include "qlayout.h" #pragma execution_character_set("utf-8") #ifndef TIMEMS #define TIMEMS qPrintable(QTime::currentTime().toString("HH:mm:ss zzz")) #endif #include #include #include #include //重新定义一些数据类型 typedef QList lcolor; typedef QVector vpoint; typedef QVector vstring; typedef QVector vdouble; typedef QList > lvdouble; typedef QList lstringl; //线条数据结构体 struct LineData { int index; //画布索引 QString name; //画布名称 vdouble key; //X轴数据 vdouble value; //Y轴数据 vpoint points; //数据点集合 就是XY轴数据合并的点 int lineWidth; //线条宽度 QColor lineColor; //线条颜色 int dataWidth; //数据点宽度 QColor dataColor; //数据点颜色 int lineStyle; //线条样式 int scatterShape; //数据形状 int fillColor; //填充画布形成面积图 0-不填充 1-单色填充 2-渐变填充 int smoothType; //平滑算法类型 bool drawValue; //绘制对应的值 bool autoScale; //坐标轴自动缩放 LineData() { index = 0; name = ""; lineWidth = 3; lineColor = "darkorange"; dataWidth = 6; dataColor = "white"; lineStyle = 1; scatterShape = 4; fillColor = 0; smoothType = 0; drawValue = false; autoScale = false; } }; #endif // CUSTOMPLOTHEAD_H