import QtQuick 2.0 import Label 2.0 import "../com/neusoft/auto/widgets" import "../layoutList.js" as Layout import "../USB/usb_define.js" as UsbStateList import "../eventsList.js" as EventsList Item { property int sysNaviCoding: systemCtrl.checkAppCommCodingData(EventsList.HMI_CODING_SYS_NAVI) property int misscall:btCtrl.btMissNums //ADD by wyc 2018/12/13 FOR ST#314757 property int north: 0//add by qwg 2019/1/23 start property int north_east: 2 property int east: 4 property int south_east: 6 property int south: 8 property int south_west: 10 property int west: 12 property int north_west: 14//add by qwg 2019/1/23 end property string idirection: "" property int enterAction: Layout.ENTER_BY_MENUBAR Component.onCompleted: { sysNaviCoding = systemCtrl.checkAppCommCodingData(EventsList.HMI_CODING_SYS_NAVI) if(0 == sysNaviCoding) { navi.enabled = false carplayCtrl.naiv_direction_Start(); } else if(1 == sysNaviCoding) { navi.enabled = true carplayCtrl.naiv_direction_Stop(); updateNaviMenuBar() } else { navi.enabled = true carplayCtrl.naiv_direction_Stop(); updateNaviMenuBar() } } property string bgImageStyle: systemCtrl.style //ADD 20170103 #141056 liduo begin property int buttonIndex: 0 //ADD 20170103 #141056 liduo end onVisibleChanged: { carplay.visible = carplayCtrl.getcarplayconnectstatus() androidauto.visible = andrCtrl.aa_ctrl_getConnectionStatus() if(1 == sysNaviCoding) { navi.enabled = true carplayCtrl.naiv_direction_Stop(); updateNaviMenuBar() } } //y:71 //FOD 2017/2/15 ld y:45//71 //height:90 height: 160 width:960 HMIButton { id:media //x:codingType?50:""//-1 x:136//166 //y:0 y:0//19 //width:codingType?108:""//191 width:89//29 //height:90 height: 83//45 Image { id:mediasimg x:0 y:0 // height:91 // width:90 anchors.horizontalCenter: parent.horizontalCenter source:media.pressed?("qrc:MATERIAL/MATERIAL_HEADE_ICON_MEDIA_P"+bgImageStyle):("qrc:MATERIAL/MATERIAL_HEADE_ICON_MEDIA"+bgImageStyle) } onClicked: { if(buttonIndex==0){ buttonIndex=1 buttonTimer.restart() } //ADD 20170103 #141056 liduo begin } } Image { id:mediasred x:110 y:32 width:136 height:56 visible: media.pressed?true:false source:"qrc:MATERIAL/MATERIAL_HEADE_BUTTON_P_MEDIA"+bgImageStyle } HMIButton { id:phone //x:241//216 x:266 //y:0 y:8 //width:104 width: 83//29 //height:90 height:82//42 visible: true //btnImg:phone.pressed?("qrc:MATERIAL/MATERIAL_HEADE_ICON_PHONE_P"+bgImageStyle):("qrc:MATERIAL/MATERIAL_HEADE_ICON_PHONE"+bgImageStyle) Image { id:phonesimg x:0 y:0 // height:91 // width:90 anchors.horizontalCenter: parent.horizontalCenter source:phone.pressed?("qrc:MATERIAL/MATERIAL_HEADE_ICON_PHONE_P"+bgImageStyle):("qrc:MATERIAL/MATERIAL_HEADE_ICON_PHONE"+bgImageStyle) } onClicked: { //update by ZhangLiXin #347393 console.log("\n@AndroidAuto**ZLX**Phone**onClicked**andrCtrl.aa_ctrl_getConnectionStatus()=["+andrCtrl.aa_ctrl_getConnectionStatus()+"]") console.log("\n@AndroidAuto**ZLX**Phone**onClicked**carplayCtrl.getcarplayconnectstatus()=["+carplayCtrl.getcarplayconnectstatus()+"]") if(/*false == andrCtrl.aa_ctrl_getConnectionStatus() && */false == carplayCtrl.getcarplayconnectstatus()) { if(buttonIndex==0) { buttonIndex=2 buttonTimer.restart() } } else { //do nothing } //ADD 20170103 #141056 liduo end } } Image { id:phonesred x:240 y:40 width:136 height:56 visible: phone.pressed?true:false source:"qrc:MATERIAL/MATERIAL_HEADE_BUTTON_P_PHONE"+bgImageStyle } //ADD by wyc 2018/12/13 FOR ST#314757 begin Item { id:phonecallicon x:324//822 y:19//176 width:40 height:28 visible:(misscall !=0) Image { id:misscall_10_down x:0 y:0 width:28 height:28 source:"qrc:MATERIAL/MATERIAL_PHONE_DOT_1_LITTLE"+style visible:(misscall<10)&&(misscall>0) } Image { id:misscall_10_up x:0 y:0 width:40 height:28 source:"qrc:MATERIAL/MATERIAL_PHONE_DOT_2_LITTLE"+style visible:(misscall>=10) } HMILabel { id:misscallnumber anchors.horizontalCenter: { if(misscall>9){ misscall_10_up.horizontalCenter }else{ misscall_10_down.horizontalCenter } } width: 28 height: 28 text:(misscall>99)?"99":misscall font.pixelSize: 20 color:"white" } } //ADD by wyc 2018/12/13 FOR ST#314757 end HMIButton { id:navi //x:216 x:641 //y:0 y:10 //width:104 width:56 //height:90 height: 70 enabled: sysNaviCoding == 0? false:true Image { id:naviimg x:0 y:0 source:navi.pressed?("qrc:MATERIAL/MATERIAL_HEADE_ICON_NAVI_P"+bgImageStyle):("qrc:MATERIAL/MATERIAL_HEADE_ICON_NAVI"+bgImageStyle) } HMILabel { id:nonavi_txt x:2 y:38 width: 54 height: 24 visible: sysNaviCoding == 0? true:false font.pixelSize: 22 text: (idirection == "")?"-":idirection } HMILabel { id: navi_txt //modify by Jiyulong for #20170310_design_change start 2017/3/15 //FOD by lishunan 2018/09/12 for #BF_USB_19 start x: 2//13 //bMaxWindow == true?320:13// 333:25//333//383 y: 38// bMaxWindow == true?636:166//bMaxWindow == true?680:239//bMaxWindow == true?546:243//541:238 width: 54// bMaxWindow == true?157:130//196//96 //modify by Jiyulong for #20170310_design_change end height: 24//26//30//20 //text:"NW"//usb_ptime==""?"00:00:00":usb_ptime visible: sysNaviCoding == 0? false:true font.pixelSize: 22//26//18 // color:"white" //horizontalAlignment: Label.AlignHCenter// Label.AlignLeft wtitesize:1 //FOD by lishunan 2018/09/12 for #BF_USB_19 end } onClicked: { if(buttonIndex==0){ buttonIndex=3 buttonTimer.restart() } // //ADD 20170103 #141056 liduo end } } Image { id:navired x:602 y:40 width:135 height:55 visible: navi.pressed?true:false source:"qrc:MATERIAL/MATERIAL_HEADE_BUTTON_P_NAVI"+bgImageStyle } HMIButton { id:home x:438 // y:0 y:24 width:84 //height:90 height: 81 Image { id:homesimg x:0 y:0 anchors.horizontalCenter: parent.horizontalCenter source:home.pressed?("qrc:MATERIAL/MATERIAL_HEADE_ICON_HOME_P"+bgImageStyle):("qrc:MATERIAL/MATERIAL_HEADE_ICON_HOME"+bgImageStyle) } onClicked: { if(buttonIndex==0){ buttonIndex=5 buttonTimer.restart() } //ADD 20170103 #141056 liduo end } } Image { id:homesred x:392 y:44 width:176 height:69 visible: home.pressed?true:false source:"qrc:MATERIAL/MATERIAL_HEADE_BUTTON_P_HOME"+bgImageStyle } HMIButton { id:carplay x:762 y:1 width: 79 height: 79 btnImg:carplay.pressed?("qrc:MATERIAL/MATERIAL_HEADE_ICON_CARPLAY_P"+bgImageStyle):("qrc:MATERIAL/MATERIAL_HEADE_ICON_CARPLAY"+bgImageStyle) onClicked: { carplayCtrl.cp_set_last_screen_carplay() console.log("####carplayCtrl.cp_44_set_last_screen_carplay()") if(buttonIndex==0) { buttonIndex=10 buttonTimer.restart() MessageTransfer.click_m_menubar_cp(true) } } } Image { id: caplayred x:734 y:32 width:135 height:55 visible: carplay.pressed?true:false source: "qrc:MATERIAL/MATERIAL_HEADE_BUTTON_P_AUTO"+bgImageStyle } HMIButton { id:androidauto x:762 y:1 width: 79 height: 79 visible: false btnImg:androidauto.pressed?("qrc:MATERIAL/MATERIAL_HEADE_ICON_ANDROID_AUTO_P"+bgImageStyle):("qrc:MATERIAL/MATERIAL_HEADE_ICON_ANDROID_AUTO"+bgImageStyle) onClicked: { if(buttonIndex == 0) { buttonIndex = 11 buttonTimer.restart() MessageTransfer.click_m_menubar_aa(true) } } } Image { id: androidautored x:734 y:32 width:135 height:55 visible: androidauto.pressed?true:false source: "qrc:MATERIAL/MATERIAL_HEADE_BUTTON_P_AUTO"+bgImageStyle } HMIButton { id:settings //x:codingType?615:770 x:8//11 //y:0 y:-18//-15//45 //width:codingType?104:191 width:91 //height:90 height:90 Image { id:settingssimg x:0 y:0 width:91 height:90 anchors.horizontalCenter: parent.horizontalCenter source:settings.pressed?("qrc:MATERIAL/MATERIAL_HEADE_ICON_SETTINGS_P"+bgImageStyle):("qrc:MATERIAL/MATERIAL_HEADE_ICON_SETTINGS"+bgImageStyle) } onClicked: { if(buttonIndex==0){ buttonIndex=8 buttonTimer.restart() } //ADD 20170103 #141056 liduo end } } Image { id: settingred x:0 y:24 width:120 height:56 visible: settings.pressed?true:false source: "qrc:MATERIAL/MATERIAL_HEADE_BUTTON_P_SETTINGS"+bgImageStyle } //ADD 20170103 #141056 liduo begin Timer { id:buttonTimer interval: 100 running: false repeat: false onTriggered: { //ADD 2019/04/30 by wyc FOR 329897 begin if (false == visible) { enterAction = Layout.ENTER_BY_HOME; } else { enterAction = Layout.ENTER_BY_MENUBAR; } //ADD 2019/04/30 by wyc FOR 329897 end switch(buttonIndex){ case 1: //ve5Ctrl.fullToClose = true //console.log("------------~~~~~~~~~~~-------------------",ve5Ctrl.fullToClose) //settingCtrl.reqHideQuickLink();//DEL #167396 baojinfeng 2017/4/19 end USBControl1.usbCtrlSetEnterPageWay(UsbStateList.USB_BUTTON_ENTER) //FOD by lishunan for changeForm start //systemCtrl.changeApp(Layout.HMI_APP_MEDIA,Layout.ENTER_BY_MENUBAR) systemCtrl.changeApp(Layout.HMI_APP_MEDIA,enterAction) //systemCtrl.changeApp(Layout.HMI_APP_MEDIA) //FOD by lishunan for changeForm end break; case 2: //settingCtrl.reqHideQuickLink();//DEL #167396 baojinfeng 2017/4/19 end //FOD 2018/09/26 by wangyuecheng for changeForm begin //systemCtrl.changeApp(Layout.HMI_APP_PHONE) //console.log("$$$$$$$$$$$$$$$$$$$$$$$$$$btCtrl.getOperationAfterCall():",btCtrl.getOperationAfterCall()) if (btCtrl.getOperationAfterCall() != Layout.INVALID_VALUE) { btCtrl.setOperateAfterCall(Layout.HMI_BTP_NO_OPERATE) } //systemCtrl.changeApp(Layout.HMI_APP_PHONE,Layout.ENTER_BY_MENUBAR) systemCtrl.changeApp(Layout.HMI_APP_PHONE,enterAction) //FOD 2018/09/26 by wangyuecheng for changeForm end break; case 3: // ve5Ctrl.fullToClose = true //settingCtrl.reqHideQuickLink();//DEL #167396 baojinfeng 2017/4/19 end naviCtrl.startNaviAppProcess();//ADD 2017/5/10 ld //systemCtrl.changeApp(Layout.HMI_APP_NAVI,Layout.ENTER_BY_MENUBAR) systemCtrl.changeApp(Layout.HMI_APP_NAVI,enterAction) break; case 4: //settingCtrl.reqHideQuickLink();//DEL #167396 baojinfeng 2017/4/19 end // if(true == onlineEnableSts) // { // systemCtrl.changeApp(Layout.HMI_APP_ENTER) // } // else // { // systemCtrl.changeApp(Layout.HMI_APP_SOUND) // } // if (systemCtrl.getCurrentSource() !== Layout.HMI_SRC_OL_ENTER) // { // systemCtrl.reqSource(Layout.HMI_SRC_OL_ENTER,Layout.HMI_SRC_START,Layout.HMI_SRC_Front); // } break; case 5: console.log("***llll****home*****222222222222222") ScreenManager.changeForm(Layout.ACT_MENUBAR) //ScreenManager.hideOverlay(WindowsList.QUICKLINK) //settingCtrl.reqHideQuickLink();//DEL #167396 baojinfeng 2017/4/19 end systemCtrl.homelinevisible(); console.log("***llll****home*****333333333333333333") break; case 6: //settingCtrl.reqHideQuickLink();//DEL #167396 baojinfeng 2017/4/19 end // systemCtrl.changeApp(Layout.HMI_APP_PHONELINK) break; case 7: //settingCtrl.reqHideQuickLink();//DEL #167396 baojinfeng 2017/4/19 end // systemCtrl.changeApp(Layout.HMI_APP_CALENDAR) break; case 8: //settingCtrl.reqHideQuickLink();//DEL #167396 baojinfeng 2017/4/19 end systemCtrl.changeApp(Layout.HMI_APP_SETTING,enterAction) break; case 9: // systemCtrl.changeApp(Layout.HMI_APP_SPEECH) //settingCtrl.reqHideQuickLink();//DEL #167396 baojinfeng 2017/4/19 end break; case 10: carplayCtrl.request_cp_home(""); //systemCtrl.changeApp(Layout.HMI_APP_PHONELINK,Layout.ENTER_BY_MENUBAR) break; case 11: andrCtrl.aa_ctrl_lastScreen(); andrCtrl.aa_ctrl_setPermissionToMD(Layout.AA_VIDEO_FOCUS_PROJECTED,Layout.AA_ACTIVE); //systemCtrl.changeApp(Layout.HMI_APP_PHONELINK,Layout.ENTER_BY_MENUBAR) break; default: buttonIndex=0 break; } buttonIndex=0 } } //ADD 20170103 #141056 liduo end Connections { target: systemCtrl onCodingChange: { sysNaviCoding = systemCtrl.checkAppCommCodingData(EventsList.HMI_CODING_SYS_NAVI) if(0 == sysNaviCoding) { navi.enabled = false carplayCtrl.naiv_direction_Start(); } else if(1 == sysNaviCoding) { navi.enabled = true carplayCtrl.naiv_direction_Stop(); updateNaviMenuBar() } else { navi.enabled = true carplayCtrl.naiv_direction_Stop(); updateNaviMenuBar() } } } Connections { target: carplayCtrl onCp_icon_display: { if(eventid == 1) { carplay.visible = true } else { carplay.visible = false } } onCp_navi_info_direction: { idirection = carplayCtrl.get_ctrl_direction() console.log("##QML Home MenuBAR##idirection "+idirection) } } //add by qwg 2019/1/23 start function updateNaviMenuBar() { switch(naviCtrl.getCarHeadingDirection()) { case north: navi_txt.text = "N" break; case north_east: navi_txt.text = "NE" break; case east: navi_txt.text = "E" break; case south_east: navi_txt.text = "SE" break; case south: navi_txt.text = "S" break; case south_west: navi_txt.text = "SW" break; case west: navi_txt.text = "W" break; case north_west: navi_txt.text = "NW" break; default: navi_txt.text = "NW" break; } } Connections { target: naviCtrl onNavigetCarHeadingDirection: { updateNaviMenuBar() } //add by qwg 2019/1/23 end } //add by zhanglixin 2019/04/04 androidauto begin Connections { target: andrCtrl onAa_icon_display: { console.log("@ZLX**Home Menu Bar aa_icon_display status=**"+status) if(1 == status) { androidauto.visible = true } else { androidauto.visible = false console.log("\n\n@ZLX**Home Menu Bar aa_icon_display androidauto.visible=**"+androidauto.visible+"\n\n") } } } //add by zhanglixin 2019/04/04 androidauto end }