forked from apsystems/GrblHoming
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
100 lines (91 loc) · 1.85 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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QFileDialog>
#include <QMessageBox>
#include <QFile>
#include "about.h"
#include "definitions.h"
#include "grbldialog.h"
#include "options.h"
#include "readthread.h"
#include "rs232.h"
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
//objects
Options opt;
RS232 port;
//variables
int delete_nr;
int port_nr;
signals:
//threads
void Stop();
//void sendPort(int port_nr);
private slots:
//buttons
void openPort();
void setGRBL();
//Adjust
void decX();
void decY();
void decZ();
void incX();
void incY();
void incZ();
void reset();
//manual
void gotoHome();
void gotoToolChange();
void gotoXYZ();
//send Gcode
void begin();
void openFile();
void stop();
//radio buttons
void adjustRBtn();
void manualRBtn();
void sendRBtn();
//combo boxes
void selectFav(int selected);
//check boxes
void toggleSpindle();
//communications
//options
void setSettings(int settings);
void setTCCoord(float coords[]);
//thread
void receiveList(QString msg);
void receiveMsg(QString msg);
void receiveAxis(QString axis);
//menu bar
void getOptions();
void showAbout();
private:
//objects
Ui::MainWindow *ui;
ReadThread readthread;
//variables
bool goHome;
bool toolChange;
bool invX;
bool invY;
bool invZ;
float toolChangeXYZ[3];
bool portOpen;
QString styleSheet;
//methods
int SendJog(QString strline);
int SendGcode(QString line);
void UpdateAxis(QString code);
void fillFavList();
void readSettings();
};
#endif // MAINWINDOW_H