118 lines
3.1 KiB
QML
118 lines
3.1 KiB
QML
import QtQuick 2.14
|
|
|
|
import QtQuick.Window 2.14
|
|
import QtQuick.Controls 2.14
|
|
import QtQuick.Layouts 1.12
|
|
|
|
Rectangle {
|
|
id: root
|
|
width: 800
|
|
height: 600
|
|
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
|
|
|
|
}
|
|
|
|
NetSelect{
|
|
id: net_choose
|
|
}
|
|
|
|
ProtoDebug{
|
|
id: proto_debug
|
|
width: parent.width - 80
|
|
height: parent.height
|
|
visible: false
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
|