39 lines
915 B
C++
39 lines
915 B
C++
#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&) {}
|
||
void synchronizeConfigData(const configurationResults&) {}
|
||
|
||
protected:
|
||
struct ChartStyle
|
||
{
|
||
QColor bgColor; //背景颜色
|
||
QColor axisColor; //坐标轴颜色
|
||
QColor tickColor; //刻度颜色
|
||
QColor tickLabelColor; //刻度label颜色
|
||
QFont tickLabelFont; //刻度label字体
|
||
QPen gridPen; //网格线画笔
|
||
};
|
||
|
||
struct Axis //坐标轴配置信息
|
||
{
|
||
QString name; //坐标轴名称,例如:电压
|
||
QString unit; //坐标轴单位,例如:V
|
||
RealTimeDataType dataType;
|
||
};
|
||
};
|
||
|
||
#endif
|