HX_CoalFlowDetect/view/coalstatisticschartwidget.h

59 lines
1.2 KiB
C
Raw Normal View History

2024-11-01 17:40:37 +08:00
#ifndef COALSTATISTICSCHARTWIDGET_H
#define COALSTATISTICSCHARTWIDGET_H
#include <QWidget>
#include <QtCharts>
QT_CHARTS_USE_NAMESPACE
namespace Ui {
class CoalStatisticsChartWidget;
}
2024-11-05 17:48:05 +08:00
enum TimeUnit {
Hour = 0, // 时
Day = 1, // 天
Month = 2, // 月
Year = 3 // 年
};
2024-11-01 17:40:37 +08:00
class CoalStatisticsChartWidget : public QWidget {
Q_OBJECT
public:
explicit CoalStatisticsChartWidget(QWidget* parent = nullptr);
~CoalStatisticsChartWidget();
2024-11-05 17:48:05 +08:00
private slots:
/**
* @brief on_pushButton_coalStatisOk_clicked
*/
void on_pushButton_coalStatisOk_clicked();
2024-11-01 17:40:37 +08:00
private:
/**
* @brief initCoalStatisticsBarChart
*/
void initCoalStatisticsBarChart();
2024-11-04 18:11:55 +08:00
/**
* @brief getCoalStatisInfoByHttpRequest通过Http请求获取煤量统计信息
*/
void getCoalStatisInfoByHttpRequest(const QString& startTime, const QString& endTime);
2024-11-01 17:40:37 +08:00
private:
Ui::CoalStatisticsChartWidget* ui;
QChart* m_chart;
QChartView* m_chartView;
QBarSeries* m_series;
2024-11-05 17:48:05 +08:00
QDateTimeAxis* m_axisX;
QValueAxis* m_axisY;
2024-11-01 17:40:37 +08:00
QTimer* m_timer;
2024-11-05 17:48:05 +08:00
QSettings* m_systemSetting;
2024-11-01 17:40:37 +08:00
};
#endif // COALSTATISTICSCHARTWIDGET_H