import QtQuick 2.0 import "../com/neusoft/auto/widgets" Item { id: dialogrect x:0 y:0 width: 960 height: 960 property string bgImageStyle: systemCtrl.style // set the title in center property bool isCenterTitle: false property string centerTitle: "Confirm" property string centerTitleColor: "red" // set the button at the bottom property bool isBottomBtn: false // set the button Num at the bottom, default :2 property int bottomBtnNum: 2 // set the button Text at the center of bottom property string bottomOneBtnText: "Cancel" // set the button Text at the both side of bottom property string bottomLeftBtnText: "Yes" property string bottomRightBtnText: "No" // set the line visible or not //property bool toplineVisible: true //property bool bottomlineVisible: true // set the size of rectange at the center property int dialogWidth: 840 property int dialogHeight: 300 // property int rectX: 175 // set the Y of rectange at the center Total:1024 * 600 //property int rectY: 75 // signal for outside Click signal outSideClick // signal for 1 button at the bottom signal oneButtonClick // signal for 2 button at the bottom signal leftButtonClick signal rightButtonClick //width: dialogWidth;height: dialogHeight MouseArea { anchors.fill: parent onClicked: { outSideClick(); } } Image { id :rect anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter width: dialogWidth height: dialogHeight source: "qrc:MATERIAL/MATERIAL_M8X_POPUP_BG_WARNING"+bgImageStyle /* Top Center Title */ Rectangle { anchors.fill: parent color: "black" } HMILabel { id:title visible: isCenterTitle anchors.top:parent.top anchors.topMargin: 30 height: 40 width:parent.width anchors.horizontalCenter: parent.horizontalCenter font.pixelSize: 28 text:centerTitle color:centerTitleColor } /* Bottom One Button */ HMIButton { id : bottomBtn width: 262 height: 80 visible: isBottomBtn && bottomBtnNum == 1 anchors.bottom: parent.bottom anchors.bottomMargin: 25 anchors.horizontalCenter: parent.horizontalCenter Image { x:1;y:1 width: parent.width height: parent.height source:bottom.focus?"qrc:MATERIAL/MATERIAL_M8X_SETTINGS_BUTTON_W262_P"+bgImageStyle:"qrc:MATERIAL/MATERIAL_M8X_SETTINGS_BUTTON_W262"+bgImageStyle } HMILabel { id:bottom height: 80 width:262 anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter font.pixelSize: 28*rate text:bottomOneBtnText color:"white" } HMIMouseArea { anchors.fill: parent onPressed: { bottom.focus = true } onReleased: { bottom.focus = false centerTitleColor = "#FFFFFF" oneButtonClick() } } } /* Bottom Two Button */ Row { id : bottomTwoBtn visible: isBottomBtn && bottomBtnNum == 2 anchors.bottom: parent.bottom anchors.bottomMargin: 30 anchors.horizontalCenter: parent.horizontalCenter spacing: 5 /* Bottom Left Button */ HMIButton { id : bottomBtnLeft width: 262 height: 80 anchors.verticalCenter: parent.verticalCenter Image { id:left x:1;y:1 source:bottomBtnLeft.focus?"qrc:MATERIAL/MATERIAL_M8X_SETTINGS_BUTTON_W262_P"+bgImageStyle:"qrc:MATERIAL/MATERIAL_M8X_SETTINGS_BUTTON_W262"+bgImageStyle } HMILabel { id:bottomLeft height: 80 width:262 anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter font.pixelSize: 28*rate text:bottomLeftBtnText color:"white" } HMIMouseArea { anchors.fill: parent onPressed: { bottomBtnLeft.focus = true } onReleased: { bottomBtnLeft.focus = false } onClicked: { centerTitleColor = "#FFFFFF" leftButtonClick() } } } /* Bottom Right Button */ HMIButton { id : bottomBtnRight width: 262 height: 80 anchors.verticalCenter: parent.verticalCenter Item { width: parent.width height: parent.height anchors.top:parent.top anchors.left: parent.left anchors.horizontalCenter: parent.horizontalCenter Image{ x:1;y:1 source: bottomBtnRight.focus?"qrc:MATERIAL/MATERIAL_M8X_SETTINGS_BUTTON_W262_P"+bgImageStyle:"qrc:MATERIAL/MATERIAL_M8X_SETTINGS_BUTTON_W262"+bgImageStyle } } HMILabel { id:bottomRight height: 80 width:262 anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter font.pixelSize: 28*rate text:bottomRightBtnText color:"white" } HMIMouseArea { anchors.fill: parent onPressed: { bottomBtnRight.focus = true } onReleased: { bottomBtnRight.focus = false } onClicked: { centerTitleColor = "#FFFFFF" rightButtonClick() } } } } } //add by plc for #334353 //delete by zhanglixin 2019/06/28 jin chu ye mian xian shi AC/menubar /*Connections { target: carplayCtrl onCarpalyModesChanged: { if (dialogrect.visible == true) { console.log("@ZLX**onVisibleChanged**hardwareversion="+hardwareversion) ScreenManager.hideOverlay(WindowsList.AC_ITEM) diagCtrl.bDevelopMode = true } else { ScreenManager.showOverlay(WindowsList.AC_ITEM) diagCtrl.bDevelopMode = false } } onCarpalyShow: { ScreenManager.showOverlay(WindowsList.AC_ITEM) diagCtrl.bDevelopMode = false } } //end by plc for #334353 //add by zhanglixin androidauto display kong tiao bu xian shi wen ti begin Connections { target: andrCtrl //AndroidAuto bu xian shi onVideoFocusChanged: { console.log("\n@AndroidAuto**ZLX**onVideoFocusChanged**dialogrect**") console.log("\n@AndroidAuto**ZLX**onVideoFocusChanged**dialogrect.visible="+dialogrect.visible) if (dialogrect.visible == true) { ScreenManager.hideOverlay(WindowsList.AC_ITEM) diagCtrl.bDevelopMode = true } else { ScreenManager.showOverlay(WindowsList.AC_ITEM) diagCtrl.bDevelopMode = false } } //AndroidAuto xian shi onAndroidAuto_show: { console.log("\n@AndroidAuto**ZLX**onAndroidAuto_show**dialogrect**") ScreenManager.showOverlay(WindowsList.AC_ITEM) diagCtrl.bDevelopMode = false } }*/ //add by zhanglixin androidauto display kong tiao bu xian shi wen ti end }