#ifndef COALSTATISTICSCHARTWIDGET_H #define COALSTATISTICSCHARTWIDGET_H #include #include QT_CHARTS_USE_NAMESPACE namespace Ui { class CoalStatisticsChartWidget; } class CoalStatisticsChartWidget : public QWidget { Q_OBJECT public: explicit CoalStatisticsChartWidget(QWidget* parent = nullptr); ~CoalStatisticsChartWidget(); private: /** * @brief initCoalStatisticsBarChart 初始化煤量统计柱状图 */ void initCoalStatisticsBarChart(); /** * @brief getCoalStatisInfoByHttpRequest通过Http请求获取煤量统计信息 */ void getCoalStatisInfoByHttpRequest(const QString& startTime, const QString& endTime); private: Ui::CoalStatisticsChartWidget* ui; QChart* m_chart; QChartView* m_chartView; QBarSeries* m_series; QTimer* m_timer; }; #endif // COALSTATISTICSCHARTWIDGET_H