import QtQuick import QtQuick.Layouts import QtQuick.Controls import QtDataVisualization 1.2 import "components" /* 软件显示界面框架逻辑 */ Item { id: rootItem width: 1920 height: 1080 property string textTitle: '大冶智能驾驶系统' property string mainTextColor: '#29b6fb' property string mainAppColor: '#29b6fb' property string textClickedColor: '#7ad4ff' property string textColorGreen: '#00FFFF' property color popupBgColorErr: "#b44" property color popupBgColorWarn: "#f7bd3e" property color popupBgColorOK: "#29b6fb" property color popupTextColor: "#ffffff" FontLoader { id: alibaba source: "qrc:/components/font/Alibaba-PuHuiTi-Bold.ttf" } FontLoader { id: fontawesome source: "qrc:/components/font/fontawesome-webfont.ttf" } FontLoader { id: digtalFont source: "qrc:/components/font/DS-DIGIB.ttf" } Popup { id: popup property alias popMessage: message.text property alias popColor: popupBg.color background: Rectangle { id: popupBg implicitWidth: rootItem.width implicitHeight: 60 } y: (rootItem.height - 60) modal: true focus: true closePolicy: Popup.CloseOnPressOutside Text { id: message anchors.centerIn: parent font.pointSize: 12 color: popupTextColor font.family: '黑体' } onOpened: popupClose.start() } signal qmlSignalMaxWindow signal qmlSignalQuit state: "loading" states: [ State { name: "loading" PropertyChanges { target: panelView opacity: 0 } }, State { name: "loaded" PropertyChanges { target: panelView opacity: 1 } } ] Item { id: panelView width: 1920 height: 1080 visible: true x: 0 y: 0 Dialog { id: closeDialog visible: false modal: true x: (parent.width - width) / 2 y: (parent.height - height) / 2 closePolicy: Popup.NoAutoClose implicitWidth: 500 implicitHeight: 300 Text { text: "该账号已登录,程序将自动退出" font.pointSize: 24 font.family: alibaba.name color: mainAppColor anchors.horizontalCenter: parent.horizontalCenter y: 100 } onOpened: { closeWinTimer.start() } } Dialog { id: panelDialog visible: false modal: true x: (parent.width - width) / 2 y: (parent.height - height) / 2 closePolicy: Popup.NoAutoClose implicitWidth: 500 implicitHeight: 300 Text { text: "确认退出吗?" font.pointSize: 24 font.family: alibaba.name color: mainAppColor anchors.horizontalCenter: parent.horizontalCenter y: 100 } Row { height: parent.height anchors.horizontalCenter: parent.horizontalCenter y: 200 CButton { id: cancelBtn textHeight: 50 fontHeight: 0.4 width: 150 height: 50 color: pressed ? textClickedColor : mainAppColor text: "取消" onClicked: panelDialog.visible = false } spacing: 50 CButton { id: quitButton textHeight: 50 fontHeight: 0.4 width: 150 height: 50 color: pressed ? textClickedColor : mainAppColor text: "退出" onClicked: { videoWindow.close() rootItem.qmlSignalQuit() } } } } PanelWindow { id: subPage focus: true Keys.enabled: true Keys.onEscapePressed: { panelDialog.visible = true } } Window { id: videoWindow property int wndIndex: 0 visible: true width: 3840 height: 1080 //原版 x: 1920 //屏幕移动调整位置 //x: 1920+650 //x: 1920+1920 //档位显示 //x: 0-1500 //灯显示 //x:800 title: qsTr("Hyper vision remote control System") flags: Qt.Window | Qt.FramelessWindowHint screen: Qt.application.screens[wndIndex] MainWindow {} Component.onCompleted: { appModel.radar1 = 5000 appModel.radar2 = 5000 appModel.radar3 = 5000 appModel.radar4 = 5000 appModel.radar5 = 5000 appModel.radar6 = 5000 appModel.radar7 = 5000 appModel.radar8 = 5000 appModel.radar9 = 5000 appModel.ping = 0 appModel.ready = 0 } } } Timer { id: splashScreenClose interval: 1000 onTriggered: { splashScreenLoader.item.visible = false splashScreenLoader.source = "" rootItem.qmlSignalMaxWindow() rootItem.state = "loaded" } } Loader { id: splashScreenLoader source: "qrc:/components/SplashScreen.qml" onLoaded: { splashScreenClose.start() } } }