-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
152 lines (92 loc) · 2.91 KB
/
mainwindow.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QSerialPort>
#include <QStringListModel>
#include "glwidget.h"
#include "serialthread.h"
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
void sendCommand(QString);
void msgBox(QString);
private slots:
void onSerialPortConnected();
void onSerialPortResponseRecieved(const QString& response);
// void onSerialPortError(QSerialPort::SerialPortError error);
void onSerialPortTimeout();
private slots:
void handleError(QSerialPort::SerialPortError error);
// void openSerialPort();
//void closeSerialPort();
void writeData(const QByteArray &data);
void readData();
void onLayerMinMaxChanged(int min, int max);
void serialReceived();
void on_xm1_clicked();
void on_homeallbtn_clicked();
void on_y10btn_clicked();
void on_y1btn_clicked();
void on_emstopbtn_clicked();
void on_pushButton_4_clicked();
void on_pushButton_3_clicked();
void on_opengcodebtn_clicked();
void on_uploadsdbtn_clicked();
void on_uploadprintbtn_clicked();
void on_pauseSDbtn_2_clicked();
void on_printbtn_clicked();
void on_printbtn_2_clicked();
void on_connectionbtn_clicked();
void on_console_textChanged();
void on_tiptempslide_actionTriggered(int action);
void on_tiptempslide_sliderReleased();
void on_bedtempslide_sliderReleased();
void on_lineEdit_returnPressed();
void on_sendbtn_clicked();
void on_timedevent();
void on_tiptempslide_valueChanged(int value);
void on_em50btn_clicked();
void on_em10btn_clicked();
void on_em1btn_clicked();
void on_e1btn_clicked();
void on_e10btn_clicked();
void on_zm10_clicked();
void on_zm1btn_clicked();
void on_z1btn_clicked();
void on_z10btn_clicked();
void on_x1btn_clicked();
void on_x10btn_clicked();
void on_xm10btn_clicked();
void on_ym10btn_clicked();
void on_ym1btn_clicked();
void on_homexbtn_clicked();
void on_homeybtn_clicked();
void on_homezbtn_clicked();
void on_pausebtn_clicked();
void on_pauseSDbtn_clicked();
void on_setTipbutton_clicked();
void loadSettings();
void saveSettings();
void on_uploadprintbtn_3_clicked();
void on_uploadsdbtn2_clicked();
void on_actionExit_triggered();
void on_verticalSlider_valueChanged(int value);
private:
Ui::MainWindow *ui;
QSerialPort *serial;
//SerialThread* m_pSerial;
QStringListModel *model;
QVector<QString > lines;
QTimer *timer;
QString m_settings;
GLWidget* drawer;
int validm114;
QByteArray buffer;
};
#endif // MAINWINDOW_H