-
Notifications
You must be signed in to change notification settings - Fork 2
/
ConsoleForm.ui.qml
102 lines (88 loc) · 2.68 KB
/
ConsoleForm.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
import QtQuick 2.9
import QtQuick.Controls 2.3
import QtQuick.Controls.Material 2.0
import QtQuick.Layouts 1.0
Page {
id: item1
width: 400
height: 400
property alias connectButton: connectButton
property alias switchHex: switchHex
property alias comboBoxAppend: comboBoxAppend
property alias textFieldConsole: textFieldConsole
property alias buttonEnviar: buttonEnviar
property alias clearButton: clearButton
title: "Terminal"
anchors.fill: parent
property bool localEcho: false
property bool consmode: false
property bool hex: false
property alias flowConsole: flowConsole
RoundButton{
id: clearButton
icon.source: "limpiar.png"
anchors.right: parent.right
hoverEnabled: true
opacity: hovered ? 1 : 0.2
z:1
}
RoundButton{
id: connectButton
icon.source: "connect.png"
anchors.right: parent.right
anchors.top: clearButton.bottom
hoverEnabled: true
opacity: hovered ? 1 : 0.2
z:1
}
Flow {
id: flowConsole
y: 342
spacing: 10
anchors.bottom: parent.bottom
anchors.bottomMargin: 10
anchors.left: parent.left
anchors.leftMargin: 10
anchors.right: parent.right
anchors.rightMargin: 10
TextField {
id: textFieldConsole
selectByMouse: true
text: qsTr("")
visible: !consmode
height: consmode ? 0 : 46
width: (flowConsole.width < 400) ? flowConsole.width :
flowConsole.width -
comboBoxAppend.width -
switchHex.width -
buttonEnviar.width -
3*flowConsole.spacing
}
ComboBox {
id: comboBoxAppend
width: 95
textRole: "text"
visible: !consmode
height: consmode ? 0 : 46
model: ListModel {
id: cbParItems
ListElement { text: ""; value: "" }
ListElement { text: "LF"; value: "\n" }
ListElement { text: "CR"; value: "\r" }
ListElement { text: "CR/LF"; value:"\r\n"}
}
}
Switch {
id: switchHex
visible: !consmode
height: consmode ? 0 : 46
text: qsTr("HEX")
}
Button {
id: buttonEnviar
text: qsTr("Enviar")
visible: !consmode
height: consmode ? 0 : 48
}
}
}