121 lines
3.3 KiB
QML
121 lines
3.3 KiB
QML
import QtQuick 2.14
|
|
|
|
import QtQuick.Window 2.14
|
|
import QtQuick.Controls 2.14
|
|
import QtQuick.Layouts 1.12
|
|
|
|
Rectangle {
|
|
objectName: "main"
|
|
id: root
|
|
width: 1440
|
|
height: 900
|
|
visible: true
|
|
|
|
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: {
|
|
uart_choose.visible = true
|
|
net_choose.visible = false
|
|
proto_debug.visible = false
|
|
}
|
|
background: Image {
|
|
anchors.fill: parent
|
|
source: "qrc:///res/serial.svg"
|
|
}
|
|
|
|
}
|
|
Text {
|
|
text: qsTr("串口设置")
|
|
width: parent.width
|
|
anchors.centerIn: parent.Center
|
|
color: "white"
|
|
font.pointSize: 10
|
|
|
|
}
|
|
Button{
|
|
width: parent.width
|
|
height:60
|
|
onClicked: {
|
|
|
|
}
|
|
background: Image {
|
|
anchors.fill: parent
|
|
source: "qrc:///res/net.svg"
|
|
}
|
|
onPressed:{
|
|
uart_choose.visible = false
|
|
net_choose.visible = true
|
|
proto_debug.visible = false
|
|
}
|
|
}
|
|
Text {
|
|
text: qsTr("网口设置")
|
|
width: parent.width
|
|
anchors.centerIn: parent.Center
|
|
color: "white"
|
|
font.pointSize: 10
|
|
|
|
}
|
|
Button{
|
|
width: parent.width
|
|
height:60
|
|
onClicked: {
|
|
uart_choose.visible = false
|
|
net_choose.visible = false
|
|
proto_debug.visible = true
|
|
DataWrap.getValFromQml(1)
|
|
}
|
|
background: Image {
|
|
anchors.fill: parent
|
|
source: "qrc:///res/proto.svg"
|
|
}
|
|
|
|
}
|
|
Text {
|
|
text: qsTr("协议调试")
|
|
width: parent.width
|
|
anchors.centerIn: parent.Center
|
|
color: "white"
|
|
font.pointSize: 10
|
|
}
|
|
}
|
|
}
|
|
SerialSelect{
|
|
id: uart_choose
|
|
width: parent.width - 80
|
|
height: parent.height
|
|
}
|
|
|
|
NetSelect{
|
|
id: net_choose
|
|
width: parent.width - 80
|
|
height: parent.height
|
|
}
|
|
|
|
ProtoDebug{
|
|
id: proto_debug
|
|
width: parent.width - 80
|
|
height: parent.height
|
|
visible: false
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
|