-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainForm.ui.qml
246 lines (213 loc) · 5.14 KB
/
MainForm.ui.qml
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
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
import QtQuick 2.4
import QtSensors 5.6
import QtQuick.Layouts 1.3
import QtQuick.Controls 1.5
Item {
id: item1
width: 640
height: 480
property alias pauseCheckBox: pauseCheckBox
property alias resetButton: resetButton
property alias tanintercept_textinput: tanintercept_textinput
property alias tanslope_textInput: tanslope_textInput
Text
{
id: xread
y: 89
text: accelerometer_values.xaxis
anchors.left: xtext.right
anchors.leftMargin: 2
font.pixelSize: 12
}
Text {
id: xtext
y: 89
text: qsTr("x:")
anchors.left: accelerometer_values_header.left
anchors.leftMargin: 5
font.pixelSize: 12
}
Text {
id: ytext
y: 110
text: qsTr("y:")
anchors.left: accelerometer_values_header.left
anchors.leftMargin: 5
font.pixelSize: 12
}
Text {
id: yread
y: 110
text: accelerometer_values.yaxis
anchors.left: ytext.right
anchors.leftMargin: 2
font.pixelSize: 12
}
Text {
id: ztext
y: 130
text: qsTr("z:")
anchors.left: accelerometer_values_header.left
anchors.leftMargin: 5
font.pixelSize: 12
}
Text {
id: zread
y: 130
text: accelerometer_values.zaxis
anchors.left: ztext.right
anchors.leftMargin: 2
font.pixelSize: 12
}
Text
{
id: accelerometer_values_header
y: 69
text: qsTr("Accelerometer Values")
anchors.left: parent.left
anchors.leftMargin: 6
font.pixelSize: 12
}
Rectangle {
id: xaxisrect
y: 278
width: 25
height: rect_props.xRectHeight
color: rect_props.xRectColor
anchors.left: accelerometer_values_header.left
anchors.leftMargin: 0
}
Rectangle {
id: yaxisrect
y: 278
width: 25
height: rect_props.yRectHeight
color: rect_props.yRectColor
anchors.left: xaxisrect.right
anchors.leftMargin: 20
}
Rectangle {
id: zaxisrect
y: 278
width: 25
height: rect_props.zRectHeight
color: rect_props.zRectColor
anchors.left: yaxisrect.right
anchors.leftMargin: 20
}
Text {
id: xrecttext
x: 17
y: 248
text: qsTr("x")
anchors.horizontalCenter: xaxisrect.horizontalCenter
anchors.bottom: xaxisrect.top
anchors.bottomMargin: 15
font.pixelSize: 12
}
Text {
id: yrecttext
x: 84
y: 248
text: qsTr("y")
anchors.horizontalCenter: yaxisrect.horizontalCenter
anchors.bottom: yaxisrect.top
anchors.bottomMargin: 15
font.pixelSize: 12
}
Text {
id: zrecttext
x: 160
y: 248
text: qsTr("z")
anchors.bottom: zaxisrect.top
anchors.bottomMargin: 15
anchors.horizontalCenter: zaxisrect.horizontalCenter
font.pixelSize: 12
}
Text {
id: stepstext
text: qsTr("Steps:")
anchors.top: accelerometer_values_header.bottom
anchors.topMargin: 90
anchors.left: accelerometer_values_header.left
anchors.leftMargin: 5
font.pixelSize: 12
}
Text {
id: stepsread
x: 52
y: 174
text: accelerometer_values.step_count
font.pixelSize: 12
}
Text {
id: tanslopetext
y: 201
text: qsTr("tangent_slope(a):")
anchors.left: accelerometer_values_header.left
anchors.leftMargin: 5
font.pixelSize: 12
}
Text {
id: tanintercepttext
y: 222
text: qsTr("tangent_intercept(B):")
anchors.left: accelerometer_values_header.left
anchors.leftMargin: 5
font.pixelSize: 12
}
TextInput {
id: tanslope_textInput
y: 201
width: 211
height: 20
validator: DoubleValidator {bottom: -100; top: 100; decimals: 4;}
focus: false
text: "0"
anchors.left: tanslopetext.right
anchors.leftMargin: 5
font.pixelSize: 12
}
TextInput {
id: tanintercept_textinput
y: 222
width: 227
height: 20
validator: DoubleValidator {bottom: -100; top: 100; decimals: 4;}
focus: false
text: "0"
anchors.left: tanintercepttext.right
anchors.leftMargin: 5
font.pixelSize: 12
}
Button {
id: resetButton
x: 132
y: 248
text: qsTr("Reset")
}
CheckBox {
id: pauseCheckBox
x: 132
y: 284
text: qsTr("Pause")
checked: true
}
Text {
id: threshold_eq
y: 24
text: qsTr("th = (a / (i-k)) + B")
anchors.left: parent.left
anchors.leftMargin: 8
font.pixelSize: 12
}
Text {
id: step_detect_text
y: 48
text: qsTr("1 step: max_accel_z - current_accel_z >= th")
anchors.left: parent.left
anchors.leftMargin: 8
font.pixelSize: 12
}
}