DPS_Manage/main.qml

75 lines
1.6 KiB
QML

import QtQuick 2.15
import QtQuick.Window 2.15
import HuskarUI.Basic 1.0
import "./MyGlobals" 1.0
import "Page" 1.0
HusWindow {
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"
}
}
captionBar.topCallback: (checked) => {HusApi.setWindowStaysOnTopHint(mainWindow, checked);}
Component.onCompleted: {
// setSpecialEffect(2)
GlobalVars.main_Window = this
GlobalVars.msg_control = message1
HusTheme.installThemePrimaryFontFamiliesBase('"Microsoft YaHei UI", BlinkMacSystemFont, "Segoe UI", Roboto');
}
HusMessage {
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{
}
}
}