-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathConfigForm.ui.qml
357 lines (330 loc) · 12.3 KB
/
ConfigForm.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
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
import QtQuick 2.9
import QtQuick.Controls 2.3
import QtQuick.Controls.Material 2.0
import QtQuick.Layouts 1.0
Page {
id: page
width: 700
height: 700
property alias textCustomPort: textCustomPort
property alias checkBoxHex: checkBoxHex
property alias checkBoxConsola: checkBoxConsola
property alias checkBoxEcho: checkBoxEcho
property alias label_port_pid: label_port_pid
property alias label_port_vid: label_port_vid
property alias label_port_ub: label_port_ub
property alias label_port_ser: label_port_ser
property alias label_port_fab: label_port_fab
property alias label_port_desc: label_port_desc
property alias comboPuerto: comboPuerto
property alias comboFlujo: comboFlujo
property alias comboPar: comboPar
property alias comboStop: comboStop
property alias comboBits: comboBits
property alias comboBaudios: comboBaudios
property alias okButton: okButton
property alias flow1: flow1
property alias scrollView: scrollView
anchors.fill: parent
title: qsTr("Configuración")
ScrollView {
id: scrollView
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
height: parent.height - 20
width: parent.width - 20
Flow {
id: flow1
spacing: 10
width: scrollView.width
GroupBox {
id: groupBox
width: (parent.width > 600) ? parent.width / 2 - parent.spacing : parent.width
- parent.spacing
height: 370
title: qsTr("Puerto Serie:")
Label {
id: label
text: qsTr("Puerto:")
anchors.verticalCenter: comboPuerto.verticalCenter
}
ComboBox {
id: comboPuerto
flat: false
anchors.top: parent.top
anchors.topMargin: 5
anchors.left: label.right
anchors.leftMargin: 5
anchors.right: parent.right
anchors.rightMargin: 5
editable: false
}
Label {
id: label_port_desc
text: qsTr("Descripción:")
anchors.left: parent.left
anchors.leftMargin: 5
anchors.right: parent.right
anchors.rightMargin: 5
anchors.top: comboPuerto.bottom
anchors.topMargin: 15
elide: Text.ElideRight
visible: comboPuerto.currentText !== qsTr("Otro")
}
Label {
id: label_port_fab
x: 4
text: qsTr("Fabricante:")
anchors.left: parent.left
anchors.rightMargin: 5
anchors.right: parent.right
anchors.top: label_port_desc.bottom
anchors.leftMargin: 5
anchors.topMargin: 15
elide: Text.ElideRight
visible: comboPuerto.currentText !== qsTr("Otro")
}
Label {
id: label_port_ser
x: 9
text: qsTr("N° de Serie:")
anchors.left: parent.left
anchors.rightMargin: 5
anchors.right: parent.right
anchors.top: label_port_fab.bottom
anchors.leftMargin: 5
anchors.topMargin: 15
elide: Text.ElideRight
}
Label {
id: label_port_ub
x: 16
y: -8
text: qsTr("Ubicacion:")
anchors.left: parent.left
anchors.rightMargin: 5
anchors.right: parent.right
anchors.top: label_port_ser.bottom
anchors.leftMargin: 5
anchors.topMargin: 15
elide: Text.ElideRight
}
Label {
id: label_port_vid
x: 24
text: qsTr("VID:")
anchors.left: parent.left
anchors.rightMargin: 5
anchors.right: parent.right
anchors.top: label_port_ub.bottom
anchors.leftMargin: 5
anchors.topMargin: 15
elide: Text.ElideRight
}
Label {
id: label_port_pid
x: 32
text: qsTr("PID:")
anchors.left: parent.left
anchors.rightMargin: 5
anchors.right: parent.right
anchors.top: label_port_vid.bottom
anchors.leftMargin: 5
anchors.topMargin: 15
elide: Text.ElideRight
}
CheckBox {
id: checkBoxEcho
text: qsTr("Eco")
anchors.bottom: parent.bottom
anchors.bottomMargin: 5
anchors.right: parent.right
anchors.rightMargin: 5
}
CheckBox {
id: checkBoxConsola
x: 2
y: 0
text: qsTr("Modo Consola")
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
anchors.bottomMargin: 5
}
CheckBox {
id: checkBoxHex
y: -3
text: qsTr("Hex")
anchors.left: parent.left
anchors.leftMargin: 5
anchors.bottom: parent.bottom
anchors.bottomMargin: 5
}
TextField {
id: textCustomPort
y: 68
text: qsTr("")
placeholderText: qsTr("Ingrese el puerto manualmente")
anchors.left: parent.left
anchors.leftMargin: 5
anchors.right: parent.right
anchors.rightMargin: 5
anchors.top: comboPuerto.bottom
anchors.topMargin: 15
visible: comboPuerto.currentText === qsTr("Otro")
}
}
GroupBox {
id: groupBox1
height: 370
title: qsTr("Parámetros:")
width: (parent.width > 600) ? parent.width / 2 - parent.spacing : parent.width
- parent.spacing
ComboBox {
id: comboBaudios
anchors.top: parent.top
anchors.topMargin: 5
anchors.right: parent.right
anchors.rightMargin: 5
anchors.left: label5.right
anchors.leftMargin: 5
editable: true
model: ["9600", "19200", "38400", "115200"]
currentIndex: 3
}
Label {
id: label1
y: 20
text: qsTr("Baudios:")
anchors.verticalCenter: comboBaudios.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 5
}
Label {
id: label2
x: 1
y: 21
text: qsTr("Bits:")
anchors.verticalCenter: comboBits.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 5
}
ComboBox {
id: comboBits
y: 1
anchors.left: comboBaudios.left
anchors.rightMargin: 5
anchors.right: parent.right
anchors.top: comboBaudios.bottom
anchors.leftMargin: 0
anchors.topMargin: 5
model: ["5", "6", "7", "8"]
currentIndex: 3
}
Label {
id: label3
x: -2
y: 18
text: qsTr("Paridad:")
anchors.verticalCenter: comboPar.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 5
}
ComboBox {
id: comboPar
anchors.left: comboBaudios.left
anchors.rightMargin: 5
anchors.right: parent.right
anchors.top: comboBits.bottom
anchors.leftMargin: 0
anchors.topMargin: 5
textRole: "text"
model: ListModel {
id: cbParItems
ListElement {
text: qsTr("Ninguna")
value: "n"
}
ListElement {
text: qsTr("Par")
value: "e"
}
ListElement {
text: qsTr("Impar")
value: "o"
}
ListElement {
text: qsTr("Marca")
value: "m"
}
ListElement {
text: qsTr("Espacio")
value: "s"
}
}
}
Label {
id: label4
x: 6
y: 26
text: qsTr("Bits de Parada:")
anchors.verticalCenter: comboStop.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 5
}
ComboBox {
id: comboStop
anchors.left: comboBaudios.left
anchors.rightMargin: 5
anchors.right: parent.right
anchors.top: comboPar.bottom
anchors.leftMargin: 0
anchors.topMargin: 5
model: ["1", "2"]
}
Label {
id: label5
x: 6
y: 26
text: qsTr("Control de Flujo:")
anchors.verticalCenter: comboFlujo.verticalCenter
anchors.left: parent.left
anchors.leftMargin: 5
}
ComboBox {
id: comboFlujo
anchors.left: comboBaudios.left
anchors.rightMargin: 5
anchors.right: parent.right
anchors.top: comboStop.bottom
anchors.leftMargin: 0
anchors.topMargin: 5
textRole: "text"
model: ListModel {
id: cbFlowItems
ListElement {
text: qsTr("Ninguno")
value: "n"
}
ListElement {
text: "RTS/CTS"
value: "r"
}
ListElement {
text: "XON/XOFF"
value: "x"
}
}
}
Button {
id: okButton
x: 268
text: qsTr("Conectar")
anchors.right: comboFlujo.right
anchors.rightMargin: 0
anchors.top: comboFlujo.bottom
anchors.topMargin: 10
}
}
}
}
}