PowerMaster/dataPanel/dpLineChart.h

43 lines
965 B
C
Raw Normal View History

2024-12-25 08:34:51 +08:00
#ifndef DPLINECHART_H
#define DPLINECHART_H
/*******************************************************************************
** DataPanel-LineChart
** author dsc
**
** 线TimeLine等组件进行时间属性的交互
** QCustomPlot实现
**
******************************************************************************/
#include "dpBaseChart.h"
2024-12-25 08:34:51 +08:00
class QCustomPlot;
class QCPRange;
2024-12-25 08:34:51 +08:00
class dpLineChart : public dpBaseChart
2024-12-25 08:34:51 +08:00
{
Q_OBJECT
public:
dpLineChart(QWidget *parent = nullptr);
~dpLineChart();
void setTimeRange(TimeUnit) override;
void setDateTime(const QDateTime&) override;
void viewHistoricalData(const QDateTime&) override;
public slots:
void onSignal_rangeChanged_xAxis(const QCPRange&);
2024-12-25 08:34:51 +08:00
private:
void initQCP();
QCustomPlot* m_pCustomPlot;
ChartStyle m_chartStyle;
qint64 m_timeRange;
QDateTime m_curDateTime;
2024-12-25 08:34:51 +08:00
};
#endif