proto-debuger/protoDebuger/main.qml

127 lines
3.5 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
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
console.log(uart_choose)
uart_choose.visible = true
net_choose = false
proto_debug = 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: {
console.log("shit")
}
background: Image {
anchors.fill: parent
source: "qrc:///res/net.svg"
}
onPressed:{
2021-04-07 15:45:42 +00:00
uart_choose.visible = false
net_choose = true
proto_debug = 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
net_choose = false
proto_debug = true
2021-04-04 02:57:36 +00:00
}
}
Text {
text: qsTr("协议调试")
width: parent.width
anchors.centerIn: parent.Center
color: "white"
font.pointSize: 10
}
}
}
Rectangle {
2021-04-07 15:45:42 +00:00
id: uart_choose
width: parent.width - 80
2021-04-04 02:57:36 +00:00
height: parent.height
2021-04-07 15:45:42 +00:00
color: "grey"
visible: false
}
Rectangle {
objectName: net_choose
width: parent.width - 80
height: parent.height
color: "grey"
visible: false
}
Rectangle {
objectName: proto_debug
width: parent.width - 80
height: parent.height
color: "grey"
visible: false
2021-04-04 02:57:36 +00:00
}
}
}