-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConfigurationWindowForm.ui.qml
More file actions
98 lines (93 loc) · 3.71 KB
/
Copy pathConfigurationWindowForm.ui.qml
File metadata and controls
98 lines (93 loc) · 3.71 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
96
97
98
import QtQuick 2.4
import QtQuick.Controls 2.2
import QtQuick.Layouts 1.3
Item{
property alias saveConfigButon: saveConfigButton
property alias baudrateText: baudrate_textField.text
property alias serialText: serialport_textField.text
property alias footerPane: footerPane
property alias popup: popup
signal open
signal serialConfigurationChanged
Popup {
//property alias dialogButtonBox: dialogButtonBox
id: popup
width: parent.width
height: parent.height
closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside
modal: false
focus: true
padding: 1
Pane{
id: popupPage
anchors.fill: parent
//background: Rectangle{color: "red"}
Column{
id: formColumns
property int num_form_columns: 3
width: parent.width
height: parent.height - footerPane.height - 5 - num_form_columns * spacing
anchors.centerIn: parent
spacing: 5
Row{
width: parent.width
spacing: 10
property alias serialport_label: serialport_label
property alias serialport_textField: serialport_textField
Label{
id: serialport_label
anchors.verticalCenter: parent.verticalCenter
text: "Serial port: "
font.pixelSize: parent.height / 4
}
TextField{
id: serialport_textField
height: formColumns.height/formColumns.num_form_columns
width: parent.width - parent.serialport_label.width - parent.spacing
placeholderText: "Ex.: /dev/tty*"
font.pixelSize: parent.height / 4
validator: RegExpValidator { regExp: /\/dev\/.*/ }
}
}
Row{
width: parent.width
spacing: 10
property alias baudrate_label: baudrate_label
property alias buadrate_textField: baudrate_textField
Label{
id: baudrate_label
anchors.verticalCenter: parent.verticalCenter
text: "Baudrate: "
font.pixelSize: parent.height / 4
}
TextField{
id: baudrate_textField
height: formColumns.height/formColumns.num_form_columns
width: parent.width - parent.baudrate_label.width - parent.spacing
placeholderText: "Ex.: 115200"
font.pixelSize: parent.height / 4
validator: IntValidator{bottom: 1200; top: 115200;}
}
}
}
// Botão de salvar
Pane{
id: footerPane
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
anchors.bottomMargin: 0
//background: Rectangle{color: "yellow"}
height: 0.15 * parent.height
width: parent.width
Button {
id: saveConfigButton
text: qsTr("Save Configuration")
height: parent.parent.height
width: 0.8 * parent.width
anchors.centerIn: parent
font.pixelSize: footerPane.height/3
}
}
}
}
}