blob: 0e05896d35a6290d3ed7d7b119b708c288dbd03b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
|
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
}
}
}
|