46 lines
691 B
C++
46 lines
691 B
C++
#ifndef MAINWINDOW_H
|
|
#define MAINWINDOW_H
|
|
|
|
#include <QMainWindow>
|
|
#include <QSerialPort>
|
|
#include <QSerialPortInfo>
|
|
#include <QMessageBox>
|
|
#include <QDebug>
|
|
#include <QString>
|
|
#include <QByteArray>
|
|
#include <QThread>
|
|
|
|
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
namespace Ui {
|
|
class MainWindow;
|
|
}
|
|
|
|
QT_END_NAMESPACE
|
|
|
|
|
|
|
|
class MainWindow : public QMainWindow
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit MainWindow(QMainWindow *parent = nullptr);
|
|
~MainWindow();
|
|
|
|
private:
|
|
Ui::MainWindow *ui;
|
|
QSerialPort *serial;
|
|
void initSerialPorts();
|
|
void updateSerialPortsList();
|
|
|
|
private slots:
|
|
void on_openCloseButton_clicked();
|
|
void on_sendButton_clicked();
|
|
void readData();
|
|
|
|
|
|
};
|
|
#endif // MAINWINDOW_H
|