-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdevicesystem.h
192 lines (141 loc) · 5.68 KB
/
devicesystem.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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
#ifndef DEVICESYSTEM_H
#define DEVICESYSTEM_H
#include <QObject>
#include <QThread>
#include "SerialPort/serialport.h"
#include "Database/database.h"
#include <QTime>
class DeviceSystem : public QObject
{
Q_OBJECT
public:
static DeviceSystem *getInstance();
static void setCurrentPatientInfo(QString ID, QString name, QString birthday, QString sex);
static QString getCurrentDatabaseID();
static QString getCurrentName();
static QString getCurrentBitrhday();
static QString getCurrentSex();
QVector3D getLeftStaticCoord();
QVector3D getRightStaticCoord();
static void initDeviceSystem();
static void initDataBase();
static void setMeasureStart(bool value);
static void setStep(int value);
static int getStep();
static Database *getDatabase();
static SerialPort *getSerialPort();
static void paintChart();
// static void paintChartMain();
// static void paintChartMain();
// static void paintChartMain();
static void generateChartIMage();
//static void getStaticCoord(int id, int step);
static void test();
static void drawImage(QString name, QPixmap pixmap);
private slots:
static void on_posDataChanged(float x, float y, float z, float c, float p, float r);
static void on_queryPosChanged(int step, QSqlQuery query);
signals:
void facebowPosChanged(float x, float y, float z, float c, float p, float r);
void vertexDataChanged(QString step, QVector<float> vertexTooth, QVector<float> vertexLeftCondyle, QVector<float> vertexRightCondyle);
void vertexStaticDataChanged(int step, float *forwardStaticCoord, float *leftStaticCoord, float *rightStaticCoord);
void loadImage(int step);
private:
DeviceSystem(){}
static DeviceSystem *self;
static int step;
static bool measureStart;
static QString patientDataBaseID;
static QString patientName;
static QString patientBirthday;
static QString patientSex;
static SerialPort *serialPort;
static Database *dataBase;
static QThread *systemThread;
static QTime startTime;
static int margin;
static QVector<float> vertexForwardTooth;
static QVector<float> vertexLeftCondyle;
static QVector<float> vertexRightCondyle;
static QVector<float> vertexDataStaticForward;
static QVector<float> vertexDataStaticLeft;
static QVector<float> vertexDataStaticRight;
//MoveForward
static QVector<float> MoveForward_Forward_In_X;
static QVector<float> MoveForward_Forward_In_Y;
static QVector<float> MoveForward_Forward_In_Z;
static QVector<float> MoveForward_Left_In_X;
static QVector<float> MoveForward_Left_In_Y;
static QVector<float> MoveForward_Left_In_Z;
static QVector<float> MoveForward_Right_In_X;
static QVector<float> MoveForward_Right_In_Y;
static QVector<float> MoveForward_Right_In_Z;
static float* MoveForward_Forward_Out_X;
static float* MoveForward_Forward_Out_Y;
static float* MoveForward_Forward_Out_Z;
static float* MoveForward_Left_Out_X;
static float* MoveForward_Left_Out_Y;
static float* MoveForward_Left_Out_Z;
static float* MoveForward_Right_Out_X;
static float* MoveForward_Right_Out_Y;
static float* MoveForward_Right_Out_Z;
//MoveLeft
static QVector<float> MoveLeft_Forward_In_X;
static QVector<float> MoveLeft_Forward_In_Y;
static QVector<float> MoveLeft_Forward_In_Z;
static QVector<float> MoveLeft_Left_In_X;
static QVector<float> MoveLeft_Left_In_Y;
static QVector<float> MoveLeft_Left_In_Z;
static QVector<float> MoveLeft_Right_In_X;
static QVector<float> MoveLeft_Right_In_Y;
static QVector<float> MoveLeft_Right_In_Z;
static float* MoveLeft_Forward_Out_X;
static float* MoveLeft_Forward_Out_Y;
static float* MoveLeft_Forward_Out_Z;
static float* MoveLeft_Left_Out_X;
static float* MoveLeft_Left_Out_Y;
static float* MoveLeft_Left_Out_Z;
static float* MoveLeft_Right_Out_X;
static float* MoveLeft_Right_Out_Y;
static float* MoveLeft_Right_Out_Z;
//MoveRight
static QVector<float> MoveRight_Forward_In_X;
static QVector<float> MoveRight_Forward_In_Y;
static QVector<float> MoveRight_Forward_In_Z;
static QVector<float> MoveRight_Left_In_X;
static QVector<float> MoveRight_Left_In_Y;
static QVector<float> MoveRight_Left_In_Z;
static QVector<float> MoveRight_Right_In_X;
static QVector<float> MoveRight_Right_In_Y;
static QVector<float> MoveRight_Right_In_Z;
static float* MoveRight_Forward_Out_X;
static float* MoveRight_Forward_Out_Y;
static float* MoveRight_Forward_Out_Z;
static float* MoveRight_Left_Out_X;
static float* MoveRight_Left_Out_Y;
static float* MoveRight_Left_Out_Z;
static float* MoveRight_Right_Out_X;
static float* MoveRight_Right_Out_Y;
static float* MoveRight_Right_Out_Z;
//OpenClosed
static QVector<float> OpenClosed_Forward_In_X;
static QVector<float> OpenClosed_Forward_In_Y;
static QVector<float> OpenClosed_Forward_In_Z;
static QVector<float> OpenClosed_Left_In_X;
static QVector<float> OpenClosed_Left_In_Y;
static QVector<float> OpenClosed_Left_In_Z;
static QVector<float> OpenClosed_Right_In_X;
static QVector<float> OpenClosed_Right_In_Y;
static QVector<float> OpenClosed_Right_In_Z;
static float* OpenClosed_Forward_Out_X;
static float* OpenClosed_Forward_Out_Y;
static float* OpenClosed_Forward_Out_Z;
static float* OpenClosed_Left_Out_X;
static float* OpenClosed_Left_Out_Y;
static float* OpenClosed_Left_Out_Z;
static float* OpenClosed_Right_Out_X;
static float* OpenClosed_Right_Out_Y;
static float* OpenClosed_Right_Out_Z;
static int* out_len;
};
#endif // DEVICESYSTEM_H