2025-07-09 14:29:29 +08:00
|
|
|
|
#ifndef DPBASECHART_H
|
|
|
|
|
|
#define DPBASECHART_H
|
|
|
|
|
|
|
|
|
|
|
|
#include "dpBaseWidget.h"
|
|
|
|
|
|
|
|
|
|
|
|
class dpBaseChart : public dpBaseWidget
|
|
|
|
|
|
{
|
|
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
dpBaseChart(QWidget *parent = nullptr);
|
|
|
|
|
|
~dpBaseChart();
|
|
|
|
|
|
|
|
|
|
|
|
void setTimeRange(TimeUnit) {}
|
|
|
|
|
|
void setDateTime(const QDateTime&) {}
|
|
|
|
|
|
void viewHistoricalData(const QDateTime&) {}
|
2025-07-14 15:02:29 +08:00
|
|
|
|
void synchronizeConfigData(const configurationResults&) {}
|
2025-07-09 14:29:29 +08:00
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
struct ChartStyle
|
|
|
|
|
|
{
|
|
|
|
|
|
QColor bgColor; //背景颜色
|
|
|
|
|
|
QColor axisColor; //坐标轴颜色
|
|
|
|
|
|
QColor tickColor; //刻度颜色
|
|
|
|
|
|
QColor tickLabelColor; //刻度label颜色
|
|
|
|
|
|
QFont tickLabelFont; //刻度label字体
|
2025-07-14 15:02:29 +08:00
|
|
|
|
QPen gridPen; //网格线画笔
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
struct Axis //坐标轴配置信息
|
|
|
|
|
|
{
|
|
|
|
|
|
QString name; //坐标轴名称,例如:电压
|
|
|
|
|
|
QString unit; //坐标轴单位,例如:V
|
|
|
|
|
|
RealTimeDataType dataType;
|
2025-07-09 14:29:29 +08:00
|
|
|
|
};
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|