HX_CoalFlowDetect/view/coalstaticwidget.h

77 lines
1.8 KiB
C
Raw Permalink Normal View History

2024-11-13 17:39:20 +08:00
#ifndef COALSTATICWIDGET_H
#define COALSTATICWIDGET_H
#include <QSettings>
#include <QWidget>
#include <QtCharts>
namespace Ui {
class CoalStaticWidget;
}
class CoalStaticWidget : public QWidget {
Q_OBJECT
public:
explicit CoalStaticWidget(QWidget* parent = nullptr);
~CoalStaticWidget();
signals:
void querySuccessInfo(QString queryInfo);
private slots:
void on_pushButton_clicked();
private:
/**
* @brief initCoalStatisticsBarChart
*/
void initCoalStatisticsBarChart();
/**
* @brief getLastSixFullHours
* @param currentTime
* @return
*/
QList<QString> getLastSixFullHours(const QDateTime& currentTime);
/**
* @brief updateCoalStatisticsChart
* @param volumeDataMap
*/
void updateCoalStatisticsChart(const QMap<QString, double>& volumeDataMap);
/**
* @brief getCoalStatisInfoByHttpRequest Http请求获取煤量统计信息
* @param startTime
* @param endTime
* @param statisticUnit
*/
void getCoalStatisInfoByHttpRequest(const QString& startTime, const QString& endTime, const QString& statisticUnit);
private:
Ui::CoalStaticWidget* ui;
// 柱状图标
QChart* m_chart;
QChartView* m_chartView;
QBarSeries* m_series;
// QDateTimeAxis* m_axisX;
QBarCategoryAxis* m_axisX;
QValueAxis* m_axisY;
/**
* @brief m_systemSetting
*/
QSettings* m_systemSetting;
double m_toalValue = 0.0;
/**
* @brief m_volumeDataMap
*/
QMap<QString, double> m_volumeDataMap;
};
#endif // COALSTATICWIDGET_H