import QtQuick 2.0 import "../AppLink/Com" import "../windowsList.js" as WindowsList import "../layoutList.js" as Layout import "../eventsList.js" as EventsList Rectangle { id:app_OpenMapSec width: 960 height: 960 color:"#00000000" property int iSrchType:0 property int iScaleLevel:2 property int iAzimuth:0 //NIF_AZIMUTH_NORTH property int iFalseCount: 0 property string sCurrentName:"" property string sCurrentAdd:"" property string sCurrentTel:"" property string imagePath_navi: "/usr/bin/qml_link/images/AppLink/" onVisibleChanged: { if(visible){ iFalseCount = 0 applinkControl.QML_NIF_Map_SetMapMode(1) if(applinkControl.QML_NIF_Map_SetScale(iScaleLevel, false)==0){ location_com.iScale = iScaleLevel } applinkControl.QML_NIF_Map_SetAzimuth(iAzimuth,false); iSrchType = applinkControl.QML_SSPLink_GetSearchType();//srchType:0-srch,1-via,2-dest,3-fun,4-mark,5-history scrollMenu.iAddType = iSrchType applinkControl.QML_changeIndexOpenMap(0,iSrchType,false); }else{ msg_PopUp.visible = false; scrollMenu.iMsgType = 0; if(1 === applinkControl.QML_GetCusStatus()){ //calculating status applinkControl.QML_NIF_Cus_CancelRoute() } } } //===========================location_com===========================// App_LocationComponent{ id:location_com } Image{ id:menuBackground y:881 visible: location_com.bLongPress?false:true source: imagePath_navi+"M8X_Function_Button_bg.png" } //===========================scrollMenu===========================// App_HMIScrollMenu{ id: scrollMenu x:0 y:0 visible: location_com.bLongPress?false:true bEnabled_aro:false bShutSearch:(iAddType == 0 || iAddType == 4 || iAddType == 5)?true:false bShutDest:(iAddType==1||iAddType==6||iAddType==7||iAddType==8)?true:false bShutVia:(iAddType==2)?true:false bEnabled_home:(iAddType==3)?false:true } //===========================back_home===========================// HMIButton{ id: back_home y:881 visible: location_com.bLongPress?false:true btnImgOnPressed: imagePath_navi +"M8X_Function_close_Button_p.png" btnImg: imagePath_navi+"M8X_Function_close_Button.png" btnIcon: imagePath_navi+"M8X_icon_close.png" onClicked:{ applinkControl.QML_CloseAppLink() //ScreenManager.changeForm(Layout.FM_CLOSE,WindowsList.APP_OPEN_MAP_SEC) } } //===========================back===========================// App_HMIReturnBtn{ id:back x:0//862 y:5//4 visible: location_com.bLongPress?false:true onClicked: { ScreenManager.backward(Layout.APPLINK) } } //===========================pageUp===========================// Item{ id:pageUp_item x:0 y:400 width: pageUp.width height: pageUp.height visible: location_com.bLongPress?false:true MouseArea{ anchors.fill: parent } HMIButton{ id: pageUp btnImg:imagePath_navi+"M8X_Location_Button.png" btnImgOnPressed:imagePath_navi+"M8X_Location_Button_p.png" Image{ x:33-0 y:581-561 source:imagePath_navi+"M8X_Location_Arrow_L.png" } onClicked: { applinkControl.QML_changeIndexOpenMap(1,iSrchType,false) current_List.contentY = 0 location_com.bMapMove = false } } } //===========================pageDown===========================// Item{ id:pageDown_item x:862 y:400 width:pageDown.width height: pageDown.height visible: location_com.bLongPress?false:true MouseArea{ anchors.fill: parent } HMIButton{ id: pageDown btnImg:imagePath_navi+"M8X_Location_Button.png" btnImgOnPressed:imagePath_navi+"M8X_Location_Button_p.png" Image{ x:901-862 y:581-561 source:imagePath_navi+"M8X_Location_Arrow_R.png" } onClicked:{ applinkControl.QML_changeIndexOpenMap(2,iSrchType,false) current_List.contentY = 0 location_com.bMapMove = false } } } //===========================current===========================// Image{ id:current x:180 y:362-160//201 visible: location_com.bLongPress?false:location_com.bIsVisibleCurr source:imagePath_navi+"M8X_Location-information_bg.png" MouseArea { id: mapMouseArea anchors.fill: parent } HMIListView { id: current_List x: 0 y: 25 width: 600 height: 166 snapMode:ListView.SnapToItem enabled: current_List.count<=3?false:true currentIndex:0 model:applinkControl.openMapListModel boundsBehavior: Flickable.StopAtBounds delegate:Item{ id:currentInfo x:45 y:20 width: 510 height: 68 HMILabel{ anchors.left: parent.left anchors.top: parent.top width: 78 height: 30 // elide:Text.ElideRight font.pixelSize:30 text:col0 horizontalAlignment: Text.AlignLeft } HMILabel{ anchors.left: parent.left anchors.leftMargin: 78 anchors.top: parent.top width: 420 height: 30 //elide:Text.ElideRight font.pixelSize:30 text:col1 horizontalAlignment: Text.AlignLeft } } } HMIListViewBar{ id: listViewBar listView:current_List scrollBarX:555 scrollBarY:25 scrollBarHeight: 166 visible: current_List.count<=3?false:true clip:true } } HMIWindowLine{ } Connections{ target:applinkControl onSignal_sspLinksrchresultup:{ if(visible){ location_com.bIsVisibleCurr = true pageUp.enabled = bIsUpEnable; pageDown.enabled = bIsDownEnable; location_com.sDestName = applinkControl.QML_getcomTitle(); } } onSignal_CalcRouteFinish:{ if(visible){ if(bIsFinish){ applinkControl.QML_SetCurrentType(iFalseCount) iFalseCount = 0 msg_PopUp.visible = false; scrollMenu.iMsgType = 0 ScreenManager.forward(Layout.APPLINK,WindowsList.APP_NAVI_VIEWROUTE) applinkControl.QML_NIF_Cus_GetCusStatus(); }else{ if(++iFalseCount === 4 ){ iFalseCount = 0 scrollMenu.iMsgType = 7 msg_PopUp.visible = true msg_timer.restart() } } } } } //===========================msg_PopUp===========================// App_Com_Newspopup{ id:msg_PopUp labelCount:1 newspopText1: qsTr(applinkControl.QML_getMessageString(scrollMenu.iMsgType)) + applinkControl.qsEmptyString visible:(scrollMenu.iMsgType > 0)?true:false bIsTouchClear:applinkControl.QML_getMessageTouchClearFlag(scrollMenu.iMsgType) } Timer{ id:msg_timer interval: applinkControl.QML_getMessageTime(scrollMenu.iMsgType) onTriggered: { msg_PopUp.visible = false scrollMenu.iMsgType = 0 } } }