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
|
|
|
|
|
|
|
|
ApplicationWindow {
|
|
|
|
id: root
|
|
|
|
width: 800
|
|
|
|
height: 600
|
|
|
|
visible: true
|
|
|
|
minimumHeight: 600
|
|
|
|
minimumWidth: 800
|
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: {
|
|
|
|
console.log("shit")
|
|
|
|
}
|
|
|
|
background: Image {
|
|
|
|
anchors.fill: parent
|
|
|
|
source: "qrc:///res/proto.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 = false
|
|
|
|
proto_debug.visible = true
|
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-07 15:45:42 +00:00
|
|
|
objectName: net_choose
|
|
|
|
}
|
2021-04-10 14:22:41 +00:00
|
|
|
|
|
|
|
|
2021-04-07 15:45:42 +00:00
|
|
|
Rectangle {
|
|
|
|
objectName: proto_debug
|
|
|
|
width: parent.width - 80
|
|
|
|
height: parent.height
|
|
|
|
color: "grey"
|
|
|
|
visible: false
|
2021-04-04 02:57:36 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|