ESP32_upper/QML/pages/MainPage.qml
2024-12-20 11:11:59 +08:00

67 lines
1.3 KiB
QML

import QtQuick 2.15
import QtQuick.Controls
import QtQuick.Layouts
import ESP32_upper 1.0
import com.esp32upper 1.0
Item {
id: root
// GlobalProperties {
// id: id_gp
// }
ListModel {
id: protname_list_model
}
ESP32UperWrapper {
id: id_esp32upperwaper
onPortNameListChange: (port_name_list) => {
protname_list_model.append({text: qsTr(port_name_list)})
}
}
RowLayout {
spacing: 0
Rectangle {
id: id_left_panel
width: 80
height: Window.height
color: "#00FF00"
LeftMenu {
anchors.fill: parent
}
}
Rectangle {
id: id_right_panel
width: Window.width - id_left_panel.width
height: Window.height
color: "#0000FF"
StackLayout{
id: id_layout_right_panel
currentIndex: 0
anchors.fill: parent
HomePage {
}
SerialPage {
}
CmdPage {
}
PlotPage {
}
OTAPage {
}
}
}
}
Component.onCompleted: {
id_esp32upperwaper.GetPortNameList();
}
}