import QtQuick 2.0 import "Com" import "../eventsList.js" as EventsList import "../layoutList.js" as Layout import "../windowsList.js" as WindowsList import Label 2.0 HMIWindow{ id:app_GuideSetting //windowImgSource:imagePath+"Common/M8X_Background.png" title: bLanguageType?"导航":"Navigation" //qsTr("导航") + applinkControl.qsEmptyString property bool bLanguageType : true property bool bList1VoiceGuideStatus:false property bool bList2EEyeStatus:false property bool bList3MagViewStatus:false property bool bList4ShowTMCStatus: false property bool bList5TMCAvoidStatus: false property bool bList1VoiceGuideStatusPre:false property bool bList2EEyeStatusPre:false property bool bList3MagViewStatusPre:false property bool bList4ShowTMCStatusPre: false property bool bList5TMCAvoidStatusPre: false property bool bGetExpiredate: false property int iMsgType:0 onSignal_returnClick:{ ScreenManager.backward(Layout.APPLINK) } onVisibleChanged: { if(visible){ bLanguageType = applinkControl.getLanguageType() bList1VoiceGuideStatus = applinkControl.QML_NIF_Gid_GetVoiceGuideStatus() bList2EEyeStatus = applinkControl.QML_NIF_Gid_GetEEyeStatus() bList3MagViewStatus = applinkControl.QML_NIF_Gid_GetMagViewStatus() bList4ShowTMCStatus = applinkControl.QML_NIF_Tmc_GetShowSwitch() bList5TMCAvoidStatus = applinkControl.QML_NIF_Tmc_GetAvoidSwitch() bList1VoiceGuideStatusPre = bList1VoiceGuideStatus bList2EEyeStatusPre = bList2EEyeStatus bList3MagViewStatusPre = bList3MagViewStatus bList4ShowTMCStatusPre = bList4ShowTMCStatus bList5TMCAvoidStatusPre = bList5TMCAvoidStatus }else{ if(bList1VoiceGuideStatusPre != bList1VoiceGuideStatus){ applinkControl.QML_NIF_Gid_SaveVoiceGuideStatus(bList1VoiceGuideStatus) } if(bList2EEyeStatusPre != bList2EEyeStatus){ applinkControl.QML_NIF_Gid_SaveEEyeStatus(bList2EEyeStatus) } if(bList3MagViewStatusPre != bList3MagViewStatus){ applinkControl.QML_NIF_Gid_SaveMagViewStatus(bList3MagViewStatus) } if(bList4ShowTMCStatusPre != bList4ShowTMCStatus){ applinkControl.QML_NIF_Tmc_SetShowSwitch(bList4ShowTMCStatus) } if(bList5TMCAvoidStatusPre != bList5TMCAvoidStatus){ applinkControl.QML_NIF_Tmc_SetAvoidSwitch(bList5TMCAvoidStatus) } } } HMIButton{ y: 1041-160 btnIcon: imagePath+"Navi/common/M8X_icon_close.png" btnImg:pressed?imagePath+"Navi/common/M8X_Function_close_Button_p.png":imagePath+"Navi/common/M8X_Function_close_Button.png" onClicked:{ applinkControl.QML_CloseAppLink() //ScreenManager.changeForm(Layout.FM_CLOSE,WindowsList.APP_GUIDE_SETTING) } } //切换到大分类设施选择画页按钮 HMIButton{ id: allBtn x: 90 y: 1041-160 enabled: false btnImg: imagePath+"M8X_Function_1_Button_NoSwitch.png" btnImgOnPressed: imagePath+"M8X_Function_1_Button_NoSwitch_p.png" } HMIButton{ y: 1041-160 btnIcon: imagePath+"Navi/common/M8X_icon_close.png" btnImg:pressed?imagePath+"Navi/common/M8X_Function_close_Button_p.png":imagePath+"Navi/common/M8X_Function_close_Button.png" onClicked:{ } } // HMIButtonComplex{ // id: confirmButton // x: 90 // y: 1041-160 // btnIcon: imagePath+"Navi/common/M8X_icon_OK.png" // btnImg: imagePath+"Navi/common/M8X_Function_1_Button_NoSwitch.png" // btnImgOnPressed: imagePath+"Navi/common/M8X_Function_1_Button_NoSwitch_p.png" // icon_y: 14 // label_y: 53 // //labelText:qsTr("OK") + systemCtrlLink.emptyString *-* // labelText: "确定" // labelPixelSize: 18 // onClicked: // { // iMsgType = 12 // msg_PopUp.visible = true // msg_timer.start() // applinkControl.QML_NIF_Gid_SaveVoiceGuideStatus(bList1VoiceGuideStatus) // applinkControl.QML_NIF_Gid_SaveEEyeStatus(bList2EEyeStatus) // applinkControl.QML_NIF_Gid_SaveMagViewStatus(bList3MagViewStatus) // // bList1VoiceGuideStatusPre = bList1VoiceGuideStatus // // bList2EEyeStatusPre = bList2EEyeStatus // // bList3MagViewStatusPre = bList3MagViewStatus // } // } //tags HMIButton { id: tag1 x: 0 y: 965-160 btnImg:tag1.pressed?imagePath+"Navi/TypeB_Search/Search_B-09_seach_gjz_select/M8X_Tag_Button_w319_p.png":imagePath+"Navi/TypeB_Search/Search_B-09_seach_gjz_select/M8X_Tag_Button_w318.png" labelText : qsTr("显示") + applinkControl.qsEmptyString labelSize : 30 onClicked: { ScreenManager.replace(Layout.APPLINK,WindowsList.APP_DISPLAY_SETTING) } } HMIButton { id: tag2 x: 321 y: 965-160 btnImg:imagePath+"Navi/TypeB_Search/Search_B-09_seach_gjz_select/M8X_Tag_Button_w318_p.png" enabled:false labelText: qsTr("导航") + applinkControl.qsEmptyString labelSize : 30 } HMIButton { id: tag3 x: 641 y: 965-160 btnImg:tag3.pressed?imagePath+"Navi/TypeB_Search/Search_B-09_seach_gjz_select/M8X_Tag_Button_w319_p.png":imagePath+"Navi/TypeB_Search/Search_B-09_seach_gjz_select/M8X_Tag_Button_w319.png" labelText: qsTr("其他") + applinkControl.qsEmptyString labelSize : 30 onClicked: { ScreenManager.replace(Layout.APPLINK,WindowsList.APP_OTHER_SETTING) } } HMIListView { id: listView x: 58 y: 241-160 width: 842 height: 80*5 snapMode:ListView.SnapToItem model:modelData currentIndex:0 delegate:delegate_List boundsBehavior: Flickable.StopAtBounds } Component{ id: delegate_List Item { width: 842 height: 80 HMIButton{ id:listPushed btnImg:listPushed.pressed?imagePath+"Navi/common/M8X_list_78_p.png":imagePath+"Navi/common/M8X_list_78.png" Image{ id:listChoose x:758 source: switch(index) { case 0: bList1VoiceGuideStatus == true?imagePath+"Navi/common/M8X_choice_box_check.png":imagePath+"Navi/common/M8X_choice_box.png" break; case 1: bList2EEyeStatus == true?imagePath+"Navi/common/M8X_choice_box_check.png":imagePath+"Navi/common/M8X_choice_box.png" break; case 2: bList3MagViewStatus == true?imagePath+"Navi/common/M8X_choice_box_check.png":imagePath+"Navi/common/M8X_choice_box.png" break; case 3: bList4ShowTMCStatus == true?imagePath+"Navi/common/M8X_choice_box_check.png":imagePath+"Navi/common/M8X_choice_box.png" break; case 4: bList5TMCAvoidStatus == true?imagePath+"Navi/common/M8X_choice_box_check.png":imagePath+"Navi/common/M8X_choice_box.png" break; default: break; } } HMILabel{ id:listText x:84 width:parent.width height:parent.height horizontalAlignment: Label.AlignLeft font.pixelSize: 30 text: switch(index) { case 0: qsTr("导航声音") + applinkControl.qsEmptyString break; case 1: qsTr("电子眼提示") + applinkControl.qsEmptyString break; case 2: qsTr("交叉点扩大图") + applinkControl.qsEmptyString break; case 3: qsTr("实时路况显示") + applinkControl.qsEmptyString break; case 4: qsTr("实时路况规避") + applinkControl.qsEmptyString break; default: break; } } onClicked: { switch(index) { case 0: bList1VoiceGuideStatus = !bList1VoiceGuideStatus break; case 1: bList2EEyeStatus = !bList2EEyeStatus break; case 2: bList3MagViewStatus = !bList3MagViewStatus break; case 3: if(bList4ShowTMCStatus) { bList4ShowTMCStatus = !bList4ShowTMCStatus } else { applinkControl.QML_NIF_Tmcpay_RequestAuthcode(applinkControl.QML_GetTmcPayGetStr()) } break; case 4: bList5TMCAvoidStatus = !bList5TMCAvoidStatus break; default: break; } } } } } Item{ id:item_select x:58 y:482 width: 844 height: 80 Image{ id: checktext width: 654 height: 78 source: imagePath+"Navi/Type_P_BaiduMusic/P_02_BaiduMusic_Search/M8X_list_78_w654.png" HMILabel{ anchors.left: parent.left anchors.leftMargin: 84 width: 570 height: 78 elide: Text.ElideRight font.pixelSize: 30 text: qsTr("实时路况有效期") + applinkControl.qsEmptyString horizontalAlignment: Text.AlignLeft color: "white" clip:true } } HMIButton{ id: checkbtn anchors.top: checktext.top anchors.left: checktext.left anchors.leftMargin: 658 width: 186 height: 78 btnImg: imagePath+"Navi/Type_P_BaiduMusic/P_02_BaiduMusic_Search/M8X_Settings_Button.png" btnImgOnPressed: imagePath+"Navi/Type_P_BaiduMusic/P_02_BaiduMusic_Search/M8X_Settings_Button_p.png" labelText: qsTr("查询") + applinkControl.qsEmptyString labelSize: 30 elideMode: Text.ElideRight onClicked: { applinkControl.QML_NIF_Tmcpay_ExpireDate(applinkControl.QML_GetTmcPayGetStr()) bGetExpiredate = false wait_timer.start() } } } App_Com_TMC_Pay{ id:pay aPayVisible:false } App_Com_Newspopup{ id:popMsg_NoService labelCount: 2 newspopText1: qsTr("您尚未开通实时路况服务,请联系客服人员!") + applinkControl.qsEmptyString newspopText2: qsTr("客服电话:") + applinkControl.qsEmptyString visible:false bIsTouchClear:false //backgroundImage : "" yOffset : -75 bHasButton: true newspopText1Height:applinkControl.getLanguageType()?34:68 yOffset2 : applinkControl.getLanguageType()?0:20 } App_Com_Newspopup{ id:popMsg_ExpireDate labelCount: 2 newspopText1: qsTr("付费账号 ") + applinkControl.qsEmptyString newspopText2: qsTr("您的实时路况服务有效期至 ") + applinkControl.qsEmptyString visible:false bIsTouchClear:false //backgroundImage : "" yOffset : -75 bHasButton: true newspopText2Height:applinkControl.getLanguageType()?34:70 yOffset2 : applinkControl.getLanguageType()?0:-10 } App_Com_Newspopup{ id:popMsg_tmcCheck labelCount: 2 newspopText1: qsTr("暂时无法查询实时路况服务有效期") + applinkControl.qsEmptyString newspopText2: qsTr("请打开\“实时路况显示\”开关后再进行尝试 ") + applinkControl.qsEmptyString visible:false bIsTouchClear:false //backgroundImage : "" yOffset : -75 bHasButton: true newspopText2Height:applinkControl.getLanguageType()?34:70 yOffset2 : applinkControl.getLanguageType()?0:-10 } ListModel{ id:modelData ListElement{ name: "导航声音" } ListElement{ name: "电子眼提示" } ListElement{ name: "交叉点扩大图" } ListElement{ name: "实时路况显示" } ListElement{ name: "实时路况规避" } } HMIListViewBar{ id: listViewBar listView:listView scrollBarX:779 scrollBarY:118 scrollBarHeight: 290 visible: false clip:true } App_Com_Newspopup{ id:msg_PopUp labelCount:1 newspopText1: qsTr(applinkControl.QML_getMessageString(iMsgType)) + applinkControl.qsEmptyString bIsTouchClear:applinkControl.QML_getMessageTouchClearFlag(iMsgType) } Timer{ id:msg_timer interval: applinkControl.QML_getMessageTime(iMsgType) onTriggered: { iMsgType = 0 msg_PopUp.visible = false } } Timer{ id:wait_timer interval: 10000 onTriggered: { if (!bGetExpiredate) { popMsg_tmcCheck.visible = true } } } Connections{ target:applinkControl onSignalLanguageChanged:{ if(visible){ bLanguageType = applinkControl.getLanguageType() } } onSignal_TMC_Net_Error:{ if(visible){ bGetExpiredate = true msg_PopUp.visible = true iMsgType = 26 msg_timer.restart() } } onSignal_TMC_Auth_Success:{ if(visible){ applinkControl.QML_NIF_Tmc_SetTermToken(authcode) bList4ShowTMCStatus = !bList4ShowTMCStatus //applinkControl.QML_NIF_Tmcpay_SetPayInfo(applinkControl.QML_GetTmcPaySetStr()) } } onSignal_TMC_Need_Pay:{ if(visible){ applinkControl.QML_SetTmcPayQrStr() pay.aPayVisible = true } } onSignal_TMC_Auth_Fail:{ if(visible){ popMsg_NoService.newspopText2 = qsTr("客服电话:") + applinkControl.QML_GetTmcSupportTel() + applinkControl.qsEmptyString popMsg_NoService.visible = true } } onSignal_TMC_Get_Support:{ if(visible){ bGetExpiredate = true } } onSignal_TMC_Get_Expiredate:{ if(visible){ bGetExpiredate = true popMsg_ExpireDate.newspopText1 = qsTr("付费账号 ") + id + applinkControl.qsEmptyString popMsg_ExpireDate.newspopText2 = qsTr("您的实时路况服务有效期至 ") + date + applinkControl.qsEmptyString popMsg_ExpireDate.visible = true } } } }