PowerMaster/dataPanel/dpLineChart.h

46 lines
1.0 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef DPLINECHART_H
#define DPLINECHART_H
/*******************************************************************************
** DataPanel-LineChart
** author dsc
**
** 折线图展示面板用来展示带有时序数据可以和TimeLine等组件进行时间属性的交互
** 采用QCustomPlot实现
**
******************************************************************************/
#include "dpBaseChart.h"
class QCustomPlot;
class QCPRange;
class dpLineChart : public dpBaseChart
{
Q_OBJECT
public:
dpLineChart(QWidget *parent = nullptr);
~dpLineChart();
void setTimeRange(TimeUnit) override;
void setDateTime(const QDateTime&) override;
void viewHistoricalData(const QDateTime&) override;
void synchronizeConfigData(const configurationResults&) override;
public slots:
void onSignal_rangeChanged_xAxis(const QCPRange&);
private:
void initQCP();
QCustomPlot* m_pCustomPlot;
ChartStyle m_chartStyle;
qint64 m_timeRange;
QDateTime m_curDateTime;
QVector<Axis> m_axes;
};
#endif