DPS_Manage/main.qml

75 lines
1.6 KiB
QML
Raw Normal View History

2025-05-29 14:04:05 +08:00
import QtQuick 2.15
import QtQuick.Window 2.15
2025-09-15 09:46:04 +08:00
import HuskarUI.Basic 1.0
2025-05-29 14:04:05 +08:00
import "./MyGlobals" 1.0
import "Page" 1.0
2025-09-15 09:46:04 +08:00
HusWindow {
2025-05-29 14:04:05 +08:00
id:mainWindow
width: 1080
height: 760
visible: true
title: qsTr("DP_S服务端可视化后台管理工具" + " Ver." + GlobalVars.tool_version)
captionBar.themeButtonVisible: true
captionBar.topButtonVisible: true
captionBar.winIconDelegate: Item {
Image {
id: name
width: 20
height: 20
source: "qrc:/image/logo.png"
}
}
2025-09-15 09:46:04 +08:00
captionBar.topCallback: (checked) => {HusApi.setWindowStaysOnTopHint(mainWindow, checked);}
2025-05-29 14:04:05 +08:00
Component.onCompleted: {
// setSpecialEffect(2)
GlobalVars.main_Window = this
GlobalVars.msg_control = message1
2025-09-15 09:46:04 +08:00
HusTheme.installThemePrimaryFontFamiliesBase('"Microsoft YaHei UI", BlinkMacSystemFont, "Segoe UI", Roboto');
2025-05-29 14:04:05 +08:00
}
2025-09-15 09:46:04 +08:00
HusMessage {
2025-05-29 14:04:05 +08:00
id: message1
z: 999
parent: mainWindow.captionBar
width: parent.width
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.bottom
}
Loader {
id: pageLoader
anchors.fill: parent
sourceComponent: loginPage
}
function changePage(page){
switch(page){
case 0:
pageLoader.sourceComponent = loginPage
break;
case 1:
pageLoader.sourceComponent = home_Page
break;
}
}
Component {
id: loginPage
Page_Login{
}
}
Component {
id: home_Page
Page_Home{
}
}
}