35 lines
714 B
C
35 lines
714 B
C
|
|
#ifndef DPLINECHART_H
|
|||
|
|
#define DPLINECHART_H
|
|||
|
|
|
|||
|
|
/*******************************************************************************
|
|||
|
|
** DataPanel-LineChart
|
|||
|
|
** author dsc
|
|||
|
|
**
|
|||
|
|
** 折线图展示面板,用来展示带有时序数据,可以和TimeLine等组件进行时间属性的交互
|
|||
|
|
** 采用QCustomPlot实现
|
|||
|
|
**
|
|||
|
|
******************************************************************************/
|
|||
|
|
|
|||
|
|
#include "dpBaseWidget.h"
|
|||
|
|
|
|||
|
|
class QCustomPlot;
|
|||
|
|
|
|||
|
|
class dpLineChart : public dpBaseWidget
|
|||
|
|
{
|
|||
|
|
Q_OBJECT
|
|||
|
|
|
|||
|
|
public:
|
|||
|
|
dpLineChart(QWidget *parent = nullptr);
|
|||
|
|
~dpLineChart();
|
|||
|
|
|
|||
|
|
void setTimeRange(TimeUnit);
|
|||
|
|
void viewHistoricalData(QDateTime);
|
|||
|
|
|
|||
|
|
private:
|
|||
|
|
void initQCP();
|
|||
|
|
|
|||
|
|
QCustomPlot* m_pCustomPlot;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
#endif
|