proto-debuger/protoDebuger/main.qml

121 lines
3.2 KiB
QML
Raw Normal View History

2021-04-04 02:57:36 +00:00
import QtQuick 2.14
import QtQuick.Window 2.14
import QtQuick.Controls 2.14
import QtQuick.Layouts 1.12
2021-04-12 15:39:06 +00:00
Rectangle {
2021-04-04 02:57:36 +00:00
id: root
width: 800
height: 600
visible: true
2021-04-07 15:45:42 +00:00
2021-04-04 02:57:36 +00:00
Flow{
anchors.fill: parent
width: parent.width
height: parent.height
Rectangle {
width: 80;
height: parent.height
color: "black"
Flow{
id: element
flow:Flow.TopToBottom //从上到下排列
width: parent.width
height: parent.height
Button{
width: parent.width
height:60
onClicked: {
2021-04-07 15:45:42 +00:00
uart_choose.visible = true
2021-04-10 14:22:41 +00:00
net_choose.visible = false
proto_debug.visible = false
2021-04-04 02:57:36 +00:00
}
background: Image {
anchors.fill: parent
source: "qrc:///res/serial.svg"
}
2021-04-07 15:45:42 +00:00
2021-04-04 02:57:36 +00:00
}
Text {
text: qsTr("串口设置")
width: parent.width
anchors.centerIn: parent.Center
color: "white"
font.pointSize: 10
}
Button{
width: parent.width
height:60
onClicked: {
2021-04-10 14:22:41 +00:00
2021-04-04 02:57:36 +00:00
}
background: Image {
anchors.fill: parent
source: "qrc:///res/net.svg"
}
onPressed:{
2021-04-07 15:45:42 +00:00
uart_choose.visible = false
2021-04-10 14:22:41 +00:00
net_choose.visible = true
proto_debug.visible = false
2021-04-04 02:57:36 +00:00
}
}
Text {
text: qsTr("网口设置")
width: parent.width
anchors.centerIn: parent.Center
color: "white"
font.pointSize: 10
}
Button{
width: parent.width
height:60
onClicked: {
2021-04-11 03:28:04 +00:00
uart_choose.visible = false
net_choose.visible = false
proto_debug.visible = true
2021-04-12 15:39:06 +00:00
console.log(DataWrap)
console.log(DataWrap._txt)
DataWrap.getValFromQml(1)
2021-04-04 02:57:36 +00:00
}
background: Image {
anchors.fill: parent
source: "qrc:///res/proto.svg"
}
2021-04-11 03:28:04 +00:00
2021-04-04 02:57:36 +00:00
}
Text {
text: qsTr("协议调试")
width: parent.width
anchors.centerIn: parent.Center
color: "white"
font.pointSize: 10
}
}
}
2021-04-10 14:22:41 +00:00
SerialSelect{
2021-04-07 15:45:42 +00:00
id: uart_choose
2021-04-10 14:22:41 +00:00
2021-04-07 15:45:42 +00:00
}
2021-04-10 14:22:41 +00:00
NetSelect{
2021-04-11 03:28:04 +00:00
id: net_choose
2021-04-07 15:45:42 +00:00
}
2021-04-10 14:22:41 +00:00
2021-04-13 17:28:19 +00:00
ProtoDebug{
2021-04-11 03:28:04 +00:00
id: proto_debug
2021-04-07 15:45:42 +00:00
width: parent.width - 80
height: parent.height
visible: false
2021-04-04 02:57:36 +00:00
}
2021-04-13 17:28:19 +00:00
2021-04-04 02:57:36 +00:00
}
}