-
Notifications
You must be signed in to change notification settings - Fork 0
/
terminalCreator.h
53 lines (42 loc) · 1.29 KB
/
terminalCreator.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef WINDOWTERMINAL_H
#define WINDOWTERMINAL_H
#include <QSerialPort>
#include "ui_guicreator.h"
#include "terminalSettings.h"
#include "networkcreator.h"
class QLabel;
class Console;
class terminalSettings;
class terminalCreator: public QObject
{
Q_OBJECT
public:
explicit terminalCreator() {};
public slots:
void openSerialPort(Ui::guiUI *m_ui);
void closeSerialPort(Ui::guiUI *m_ui);
void readData();
void changeTerminalSettingsHere(Ui::guiUI *m_ui);
void handleError(QSerialPort::SerialPortError error);
void showTerminalPortInfoHere(int idx,Ui::guiUI *m_ui);
void checkTerminalCustomBaudRatePolicyHere(int idx,Ui::guiUI *m_ui);
void checkTerminalCustomDevicePathPolicyHere(int idx,Ui::guiUI *m_ui);
void sendFile(int);
void sendEmptyFile(int);
void sendStatus();
void readInfo(QByteArray fileData);
void nothing();
void allFilesIsSentSlot();
signals:
void closeSerialPortSignal();
void TarrayNewByteSend(QByteArray*,uint16_t);
private:
void showStatusMessage(const QString &message,Ui::guiUI *m_ui);
Ui::guiUI *t_ui;
QTimer *timer;
Console *m_console = nullptr;
terminalSettings *m_settings = nullptr;
QSerialPort *m_serial = nullptr;
QString terminalFilePath = "files/";
};
#endif // WINDOWTERMINAL_H