-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainwindow.h
More file actions
95 lines (63 loc) · 1.54 KB
/
Copy pathmainwindow.h
File metadata and controls
95 lines (63 loc) · 1.54 KB
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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <vector>
#include <QMainWindow>
#include <QBasicTimer>
#include "laserpointer.h"
#include "observer.h"
#include "uartinterface.h"
enum CalibrationState
{
OFF,
LEFTTOP,
RIGHTTOP,
RIGHTBOTTOM,
LEFTBOTTOM,
};
enum Direction
{
NONE,
LEFT,
RIGHT,
UP,
DOWN,
};
namespace Ui
{
class MainWindow;
}
class MainWindow : public QMainWindow, public Observer
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
void updateObserver(QRectF minMaxAngles, QPointF angles, LaserMode laserMode, std::vector<QPointF> calibrationAngles);
protected:
void timerEvent(QTimerEvent *e) Q_DECL_OVERRIDE;
private slots:
void on_laserStateComboBox_currentIndexChanged(int index);
void on_xAxisSlider_valueChanged(int value);
void on_yAxisSlider_valueChanged(int value);
void on_pushButton_3_clicked();
void on_pushButton_4_pressed();
void on_pushButton_4_released();
void on_pushButton_pressed();
void on_pushButton_released();
void on_pushButton_5_pressed();
void on_pushButton_5_released();
void on_pushButton_2_pressed();
void on_pushButton_2_released();
void on_calibrationButton_clicked();
private:
Ui::MainWindow *ui;
QBasicTimer timer;
Direction direction;
int counter;
bool disableSliderUpdate;
Laserpointer laserpointer;
UARTInterface uartInterface;
CalibrationState calibrationState;
QPointF calibrationBuffer[4];
};
#endif // MAINWINDOW_H