59 lines
1.2 KiB
C++
59 lines
1.2 KiB
C++
#ifndef MAINWINDOW_H
|
|
#define MAINWINDOW_H
|
|
|
|
#define _DISPLAY_DATA_LENGTH_ 201
|
|
|
|
#include <QMainWindow>
|
|
#include <QMessageBox>
|
|
#include <QSerialPort>
|
|
#include <QSerialPortInfo>
|
|
#include <QDebug>
|
|
|
|
#include <serial_command.h>
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
namespace Ui {
|
|
class MainWindow;
|
|
}
|
|
QT_END_NAMESPACE
|
|
|
|
class MainWindow : public QMainWindow
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
MainWindow(QWidget *parent = nullptr);
|
|
~MainWindow();
|
|
void msgBox(QWidget* ctx, QString title, QString content);
|
|
void msgBox(QWidget* ctx, QString content);
|
|
|
|
void initFigure();
|
|
void processTempData();
|
|
void processBodyData();
|
|
void processGasState();
|
|
void processGasData();
|
|
|
|
private slots:
|
|
void receiveData();
|
|
|
|
void on_btn_serial_search_clicked();
|
|
|
|
void on_btn_serial_toggle_clicked();
|
|
|
|
void on_comboBox_sys_mode_currentIndexChanged(int index);
|
|
|
|
void on_comboBox_cycle_currentIndexChanged(int index);
|
|
|
|
void on_comboBox_temp_fetch_currentIndexChanged(int index);
|
|
|
|
void on_comboBox_body_fetch_currentIndexChanged(int index);
|
|
|
|
void on_comboBox_gas_fetch_currentIndexChanged(int index);
|
|
|
|
private:
|
|
Ui::MainWindow *ui;
|
|
|
|
QSerialPort* m_serialPort;
|
|
};
|
|
#endif // MAINWINDOW_H
|