2024-10-31 22:02:32 +08:00
|
|
|
|
#ifndef MAINWINDOW_H
|
2024-10-31 17:47:16 +08:00
|
|
|
|
#define MAINWINDOW_H
|
|
|
|
|
|
2024-11-01 17:40:37 +08:00
|
|
|
|
#include <QDateTime>
|
2024-10-31 17:47:16 +08:00
|
|
|
|
#include <QMainWindow>
|
2024-11-05 17:48:05 +08:00
|
|
|
|
#include <QSettings>
|
2024-10-31 17:47:16 +08:00
|
|
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
|
class MainWindow;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class MainWindow : public QMainWindow {
|
2024-11-11 22:19:24 +08:00
|
|
|
|
Q_OBJECT
|
2024-10-31 17:47:16 +08:00
|
|
|
|
|
|
|
|
|
public:
|
2024-11-11 22:19:24 +08:00
|
|
|
|
explicit MainWindow(QWidget *parent = nullptr);
|
|
|
|
|
~MainWindow();
|
2024-11-05 17:48:05 +08:00
|
|
|
|
|
|
|
|
|
protected:
|
2024-11-11 22:19:24 +08:00
|
|
|
|
bool eventFilter(QObject *watched, QEvent *event) override;
|
2024-11-01 17:40:37 +08:00
|
|
|
|
|
|
|
|
|
public slots:
|
2024-11-11 22:19:24 +08:00
|
|
|
|
/**
|
2024-11-04 21:11:39 +08:00
|
|
|
|
* @brief 皮带报警信息
|
|
|
|
|
* @param consoleInfo
|
|
|
|
|
*/
|
2024-11-11 22:19:24 +08:00
|
|
|
|
void addBeltWarnInfoToTextEdit(const QString &consoleInfo);
|
2024-10-31 17:47:16 +08:00
|
|
|
|
|
|
|
|
|
private slots:
|
2024-11-11 22:19:24 +08:00
|
|
|
|
void on_pushButton_close_clicked();
|
2024-10-31 17:47:16 +08:00
|
|
|
|
|
2024-11-11 22:19:24 +08:00
|
|
|
|
void on_pushButton_max_clicked();
|
2024-10-31 17:47:16 +08:00
|
|
|
|
|
2024-11-11 22:19:24 +08:00
|
|
|
|
void on_pushButton_min_clicked();
|
2024-10-31 17:47:16 +08:00
|
|
|
|
|
|
|
|
|
private:
|
2024-11-11 22:19:24 +08:00
|
|
|
|
/**
|
2024-10-31 22:02:32 +08:00
|
|
|
|
* @brief calendarLoopPlay 时间轮播
|
|
|
|
|
*/
|
2024-11-11 22:19:24 +08:00
|
|
|
|
void calendarLoopPlay();
|
2024-11-05 17:48:05 +08:00
|
|
|
|
|
2024-11-11 22:19:24 +08:00
|
|
|
|
/**
|
|
|
|
|
* @brief createSystemINI 创建系统配置文件
|
|
|
|
|
*/
|
|
|
|
|
void createSystemINI();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @brief setSystemTitle 设置系统标题
|
|
|
|
|
*/
|
|
|
|
|
void setSystemTitle();
|
2024-11-01 17:40:37 +08:00
|
|
|
|
|
2024-11-11 22:19:24 +08:00
|
|
|
|
/**
|
2024-11-04 21:11:39 +08:00
|
|
|
|
* @brief setBeltWarnInfoTextEditStyle 调整皮带报警信息编辑框样式
|
|
|
|
|
*/
|
2024-11-11 22:19:24 +08:00
|
|
|
|
void setBeltWarnInfoTextEditStyle();
|
2024-10-31 22:02:32 +08:00
|
|
|
|
|
2024-11-11 22:19:24 +08:00
|
|
|
|
/**
|
2024-10-31 22:02:32 +08:00
|
|
|
|
* @brief addcoalDistributChart 添加煤流分布柱状图
|
|
|
|
|
*/
|
2024-11-11 22:19:24 +08:00
|
|
|
|
void addcoalDistributChart();
|
2024-11-04 21:11:39 +08:00
|
|
|
|
|
2024-11-11 22:19:24 +08:00
|
|
|
|
/**
|
2024-11-04 21:11:39 +08:00
|
|
|
|
* @brief addbeltSpeedChat 添加皮带机速度曲线图
|
|
|
|
|
*/
|
2024-11-11 22:19:24 +08:00
|
|
|
|
void addbeltSpeedChat();
|
2024-11-01 17:40:37 +08:00
|
|
|
|
|
2024-11-11 22:19:24 +08:00
|
|
|
|
/**
|
2024-11-04 21:11:39 +08:00
|
|
|
|
* @brief addCoalStatisticsChart 添加煤量统计图表
|
|
|
|
|
*/
|
2024-11-11 22:19:24 +08:00
|
|
|
|
void addCoalStatisticsChart();
|
2024-11-01 17:40:37 +08:00
|
|
|
|
|
2024-11-11 22:19:24 +08:00
|
|
|
|
/**
|
2024-11-04 21:11:39 +08:00
|
|
|
|
* @brief addCoalBeltVideo 添加皮带机视频窗口
|
|
|
|
|
*/
|
2024-11-11 22:19:24 +08:00
|
|
|
|
void addCoalBeltVideo();
|
2024-10-31 17:47:16 +08:00
|
|
|
|
|
|
|
|
|
private:
|
2024-11-11 22:19:24 +08:00
|
|
|
|
Ui::MainWindow *ui;
|
2024-11-01 17:40:37 +08:00
|
|
|
|
|
2024-11-11 22:19:24 +08:00
|
|
|
|
/**
|
2024-11-04 21:11:39 +08:00
|
|
|
|
* @brief m_textEditConsoleInfo 控制台命令列表信息
|
|
|
|
|
*/
|
2024-11-11 22:19:24 +08:00
|
|
|
|
QList<QString> m_textEditConsoleInfo;
|
2024-11-01 17:40:37 +08:00
|
|
|
|
|
2024-11-11 22:19:24 +08:00
|
|
|
|
/**
|
2024-11-04 21:11:39 +08:00
|
|
|
|
* @brief m_previousConsleInfoDateTime 上一条控制台命令发送时间
|
|
|
|
|
*/
|
2024-11-11 22:19:24 +08:00
|
|
|
|
QDateTime m_previousConsleInfoDateTime;
|
2024-11-05 17:48:05 +08:00
|
|
|
|
|
2024-11-11 22:19:24 +08:00
|
|
|
|
/**
|
|
|
|
|
* @brief m_systemSetting 系统配置信息
|
|
|
|
|
*/
|
|
|
|
|
QSettings *m_systemSetting;
|
2024-11-05 17:48:05 +08:00
|
|
|
|
|
2024-11-11 22:19:24 +08:00
|
|
|
|
// 窗口拖拽
|
|
|
|
|
QPoint m_mousePoint;
|
|
|
|
|
bool m_mousePressed{false};
|
2024-10-31 17:47:16 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif // MAINWINDOW_H
|