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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
|
/*
* =====================================================================================
*
* Filename: App_HMIScrollMenu.qml
*
* Description:
*
* Version: 1.0
* Created: 2016-1-5 15:50
* Revision: none
* Compiler: gcc
*
* Author: jliu.neu, jliu.neu@neusoft.com
* Organization: www.neusoft.com
*
* =====================================================================================
*/
import "../../eventsList.js" as EventsList
import "../../windowsList.js" as WindowsList
import "../../layoutList.js" as Layout
import "../search.js" as Search
import QtQuick 2.0
import Label 2.0
Image{
id: scrollMenu
property bool bVisible_pop:false
property bool bEnabled_aro:true
property int iMsgType:0
property bool bIsDestExist:false
property int iAddType:0//srchType:0-srch,1-via,2-dest,3-fun,4-mark,5-history,6-via1,7-via2,8-via3
property bool bShutSearch:false
property bool bShutDest:false
property bool bShutVia:false
property bool bEnabled_home:true
onVisibleChanged: {
if(visible){
bIsDestExist = false
bVisible_pop = false
}
}
Image{
id:scrollmenu
x:90
y:881
width: 870
height: 78
MouseArea{
id: mapMouseArea
anchors.fill: parent
}
Row{
id:scrollMenu_row
spacing: 0
anchors.top: scrollmenu.top
//===========================destBtn===========================//
HMIButton{
id: destBtn
height: 78
visible: !bShutDest//(iAddType==1||iAddType==6||iAddType==7||iAddType==8)?false:true
width:bEnabled_home?(bEnabled_aro?(bShutSearch?218:(bShutVia?290:174)):(bShutVia?435:290)):(bEnabled_aro?174:218)
btnImg:{
switch(destBtn.width){
case 174:
destBtn.pressed?imagePath_navi+"M8X_NAVI_Button_w174_p.png":imagePath_navi+"M8X_NAVI_Button_w174.png"
break;
case 218:
destBtn.pressed?imagePath_navi+"M8X_NAVI_Button_w218_p.png":imagePath_navi+"M8X_NAVI_Button_w218.png"
break;
case 290:
destBtn.pressed?imagePath_navi+"Navi/Type_B_Location/B_03_Location_information_3button/M8X_NAVI_Button_w290_p.png":imagePath_navi+"Navi/Type_B_Location/B_03_Location_information_3button/M8X_NAVI_Button_w290.png"
break;
case 435:
destBtn.pressed?imagePath_navi+"Common/M8X_Function_2_Button_NoSwitch_p.png":imagePath_navi+"Common/M8X_Function_2_Button_NoSwitch.png"
break;
default:
break;
}
}
Image{
id:destBtn_icon
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 13
source:destBtn.enabled?imagePath_navi+"M8X_Icon_Dest.png":imagePath_navi+"M8X_Icon_Dest_D.png"
}
HMILabel{
id:destBtn_Text
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 53
width : parent.width
height: 21
font.pixelSize:18
color:destBtn.enabled?"white":"grey"
text:qsTr("目的地") + applinkControl.qsEmptyString
}
onClicked:{
if(iAddType==0||iAddType==3||iAddType==4||iAddType==5){
if(applinkControl.QML_NIF_Cus_SetDest(location_com.sDestName)==0){
applinkControl.QML_NIF_Cus_StartCalc();
iMsgType = 1;
msg_PopUp.visible = true
}
}else if(iAddType==2){
//if(location_com.bMapMove == false){
//applinkControl.QML_NIF_Cus_SetDest(applinkControl.QML_getcomTitle())
//}else{
applinkControl.QML_NIF_Cus_SetDest(location_com.sDestName)
//}
ScreenManager.backward(Layout.APPLINK,WindowsList.APP_ROUTE_GUIDE)
}
}
}
//===========================viaBtn===========================//
HMIButton{
id: viaBtn
height: 78
visible:!bShutVia//(iAddType==2)?false:true
width:bEnabled_home?(bEnabled_aro?(bShutSearch?218:(bShutDest?290:174)):(bShutDest?435:290)):(bEnabled_aro?174:218)
btnImg:{
switch(viaBtn.width){
case 174:
viaBtn.pressed?imagePath_navi+"M8X_NAVI_Button_w174_p.png":imagePath_navi+"M8X_NAVI_Button_w174.png"
break;
case 218:
viaBtn.pressed?imagePath_navi+"M8X_NAVI_Button_w218_p.png":imagePath_navi+"M8X_NAVI_Button_w218.png"
break;
case 290:
viaBtn.pressed?imagePath_navi+"Navi/Type_B_Location/B_03_Location_information_3button/M8X_NAVI_Button_w290_p.png":imagePath_navi+"Navi/Type_B_Location/B_03_Location_information_3button/M8X_NAVI_Button_w290.png"
break;
case 435:
viaBtn.pressed?imagePath_navi+"Common/M8X_Function_2_Button_NoSwitch_p.png":imagePath_navi+"Common/M8X_Function_2_Button_NoSwitch.png"
break;
default:
break;
}
}
Image{
id:viaBtn_icon
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 15
source:viaBtn.enabled?imagePath_navi+"M8X_Icon_Via.png":imagePath_navi+"M8X_Icon_Via_d.png"
}
HMILabel{
id:viaBtn_Text
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 53
width : parent.width
height: 21
font.pixelSize:18
color:viaBtn.enabled?"white":"grey"
text:qsTr("途经地") + applinkControl.qsEmptyString
}
onClicked:{
if(iAddType==0||iAddType==3||iAddType==4||iAddType==5){
bVisible_pop = !bVisible_pop
if(bVisible_pop){
applinkControl.QML_NIF_Cus_GetDestAndViaInfo();
}
}else if(iAddType==6 || iAddType==7 || iAddType==8){
// if(location_com.bMapMove == false){
// applinkControl.QML_NIF_Cus_SetVia((iAddType-6),applinkControl.QML_getcomTitle())
// }else{
applinkControl.QML_NIF_Cus_SetVia((iAddType-6),location_com.sDestName)
// }
ScreenManager.backward(Layout.APPLINK,WindowsList.APP_ROUTE_GUIDE)
}
}
}
//===========================poiBtn===========================//
HMIButton{
id: poiBtn
height: 78
width:bEnabled_home?(bEnabled_aro?(bShutSearch?218:(bShutDest||bShutVia?290:174)):(bShutDest||bShutVia?435:290)):(bEnabled_aro?174:218)
btnImg:{
switch(poiBtn.width){
case 174:
poiBtn.pressed?imagePath_navi+"M8X_NAVI_Button_w174_p.png":imagePath_navi+"M8X_NAVI_Button_w174.png"
break;
case 218:
poiBtn.pressed?imagePath_navi+"M8X_NAVI_Button_w218_p.png":imagePath_navi+"M8X_NAVI_Button_w218.png"
break;
case 290:
poiBtn.pressed?imagePath_navi+"Navi/Type_B_Location/B_03_Location_information_3button/M8X_NAVI_Button_w290_p.png":imagePath_navi+"Navi/Type_B_Location/B_03_Location_information_3button/M8X_NAVI_Button_w290.png"
break;
case 435:
poiBtn.pressed?imagePath_navi+"Common/M8X_Function_2_Button_NoSwitch_p.png":imagePath_navi+"Common/M8X_Function_2_Button_NoSwitch.png"
break;
default:
break;
}
}
Image{
id:poiBtn_icon
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 14
source:imagePath_navi+"M8X_Icon_POI.png"
}
HMILabel{
id:poiBtn_Text
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 53
width : parent.width
height: 21
font.pixelSize:18
text:qsTr("兴趣点") + applinkControl.qsEmptyString
}
onClicked:{
if(applinkControl.compoiCount<100){
var qMarkName = ""
// if(location_com.bMapMove == false){
// qMarkName = applinkControl.QML_getcomTitle()
// console.log("[aaaaaaaa]-----1----set user mark----name is "+qMarkName)
// }else{
qMarkName = location_com.sDestName
console.log("[applink]---------set user mark----name is "+qMarkName)
// }
if(applinkControl.QML_NIF_Poi_SetMark(qMarkName)==0){
iMsgType = 2;//SUCCESS
msg_PopUp.visible = true
msg_timer.restart()
}else{
iMsgType = 19;//FAIL
msg_PopUp.visible = true
msg_timer.restart()
}
}else{
iMsgType = 18;//full
msg_PopUp.visible = true
msg_timer.restart()
}
}
}
//===========================aroBtn===========================//
HMIButton{
id: aroBtn
height: 78
visible: bEnabled_aro
width:bShutSearch?218:(bShutDest||bShutVia?290:174)
btnImg:{
switch(aroBtn.width){
case 174:
aroBtn.pressed?imagePath_navi+"M8X_NAVI_Button_w174_p.png":imagePath_navi+"M8X_NAVI_Button_w174.png"
break;
case 218:
aroBtn.pressed?imagePath_navi+"M8X_NAVI_Button_w218_p.png":imagePath_navi+"M8X_NAVI_Button_w218.png"
break;
case 290:
aroBtn.pressed?imagePath_navi+"Navi/Type_B_Location/B_03_Location_information_3button/M8X_NAVI_Button_w290_p.png":imagePath_navi+"Navi/Type_B_Location/B_03_Location_information_3button/M8X_NAVI_Button_w290.png"
break;
case 435:
aroBtn.pressed?imagePath_navi+"Common/M8X_Function_2_Button_NoSwitch_p.png":imagePath_navi+"Common/M8X_Function_2_Button_NoSwitch.png"
break;
default:
break;
}
}
Image{
id:aroBtn_icon
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 13
source:imagePath_navi+"M8X_icon_Around.png"
}
HMILabel{
id:aroBtn_Text
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 53
width : parent.width
height: 21
font.pixelSize:18
text:qsTr("周边") + applinkControl.qsEmptyString
}
onClicked:{
applinkControl.QML_NIF_Poi_GetQuickKind()
applinkControl.QML_SSPLink_iSetSrhArdMode(1)
if(ScreenManager.getCurrentFormId()==WindowsList.APP_OPEN_MAP)
{
ScreenManager.forward(Layout.APPLINK,WindowsList.AP_NAVI_SRCHAROUNDMAIN)
}
if(ScreenManager.getCurrentFormId()==WindowsList.APP_LOCATION_MOVE)
{
ScreenManager.forward(Layout.APPLINK,WindowsList.AP_NAVI_SRCHAROUNDMAIN)
}
}
}
//===========================searchBtn===========================//
HMIButton{
id: searchBtn
height: 78
visible:!bShutDest&&!bShutVia&&!bShutSearch && (bEnabled_aro||!bEnabled_home)
width:!bEnabled_aro&&!bEnabled_home?218:174
btnImg:{
switch(searchBtn.width){
case 174:
searchBtn.pressed?imagePath_navi+"M8X_NAVI_Button_w174_p.png":imagePath_navi+"M8X_NAVI_Button_w174.png"
break;
case 218:
searchBtn.pressed?imagePath_navi+"M8X_NAVI_Button_w218_p.png":imagePath_navi+"M8X_NAVI_Button_w218.png"
break;
case 290:
searchBtn.pressed?imagePath_navi+"Navi/Type_B_Location/B_03_Location_information_3button/M8X_NAVI_Button_w290_p.png":imagePath_navi+"Navi/Type_B_Location/B_03_Location_information_3button/M8X_NAVI_Button_w290.png"
break;
case 435:
searchBtn.pressed?imagePath_navi+"Common/M8X_Function_2_Button_NoSwitch_p.png":imagePath_navi+"Common/M8X_Function_2_Button_NoSwitch.png"
break;
default:
break;
}
}
Image{
id:searchBtn_icon
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 13
source:iAddType==3?imagePath_navi+"M8X_icon_Function_home.png":imagePath_navi+"M8X_icon_Search.png"
}
HMILabel{
id:searchBtn_Text
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 53
width : parent.width
height: 21
font.pixelSize:18
color:searchBtn.enabled?"white":"grey"
text:(iAddType==3)?qsTr("家") + applinkControl.qsEmptyString:qsTr("检索") + applinkControl.qsEmptyString
}
onClicked:{
if(iAddType==3){//home
// if(location_com.bMapMove == false){
// applinkControl.QML_NIF_Poi_SetHome(applinkControl.QML_getcomTitle())
// }else{
applinkControl.QML_NIF_Poi_SetHome(location_com.sDestName)
// }
if(Search.FromFunctionMain == applinkControl.QML_SSPLink_iGetToKeyCrossMain())
{
ScreenManager.backward(Layout.APPLINK,WindowsList.APP_FUNCTION_MAIN)
}else if(Search.Fromothersetting == applinkControl.QML_SSPLink_iGetToKeyCrossMain())
{
ScreenManager.backward(Layout.APPLINK,WindowsList.APP_OTHER_SETTING)
}
applinkControl.QML_AddHome()
}else{
ScreenManager.forward(Layout.APPLINK,WindowsList.APP_NAVI_SRCHKEYCROSSMAIN)
}
}
}
}
}
Connections{
target:applinkControl
onSignal_NIF_Cus_GetDestAndViaInforCB:{
if(""===qVia1Name){
qVia1Name = qsTr("未定义") + applinkControl.qsEmptyString
}else{
qVia1Name = applinkControl.QML_cutStringForDisplay(qVia1Name, 5)
}
if((bIsVia1Valid)&&(!bIsVia1Arrived)){
pathWay1_icon.source = imagePath_navi+"Navi/Type_B_Location/B_05_Location_tjd_setting/M8X_Icon_Via-1.png"
}else{
pathWay1_icon.source = imagePath_navi+"Navi/Type_B_Location/B_05_Location_tjd_setting/M8X_Icon_Via-1.png"
}
if(""===qVia2Name){
qVia2Name = qsTr("未定义") + applinkControl.qsEmptyString
}else{
qVia2Name = applinkControl.QML_cutStringForDisplay(qVia2Name, 5)
}
if((bIsVia2Valid)&&(!bIsVia2Arrived)){
pathWay2_icon.source = imagePath_navi+"Navi/Type_B_Location/B_05_Location_tjd_setting/M8X_Icon_Via-2.png"
}else{
pathWay2_icon.source = imagePath_navi+"Navi/Type_B_Location/B_05_Location_tjd_setting/M8X_Icon_Via-2.png"
}
if(""===qVia3Name){
qVia3Name = qsTr("未定义") + applinkControl.qsEmptyString
}else{
qVia3Name = applinkControl.QML_cutStringForDisplay(qVia3Name, 5)
}
if((bIsVia3Valid)&&(!bIsVia3Arrived)){
pathWay3_icon.source = imagePath_navi+"Navi/Type_B_Location/B_05_Location_tjd_setting/M8X_Icon_Via-3.png"
}else{
pathWay3_icon.source = imagePath_navi+"Navi/Type_B_Location/B_05_Location_tjd_setting/M8X_Icon_Via-3.png"
}
if(bIsDestValid && !bIsDestArrived){
bIsDestExist = true
}
pathWay1_info.text = qVia1Name;
pathWay2_info.text = qVia2Name;
pathWay3_info.text = qVia3Name;
}
}
//===========================popList===========================//
Image{
id:popList
x:221
y:835-160
visible: bVisible_pop
source:imagePath_navi+"Navi/Type_B_Location/B_05_Location_tjd_setting/M8X_popup-menu_Button3_bg.png"
Column{
id:column
spacing: 2
anchors.left: parent.left
anchors.leftMargin: 8
anchors.top:parent.top
anchors.topMargin: 8
//===========================pathWay1===========================//
HMIButton{
id: pathWay1
width:240
height: 62
labelPixelSize:24
btnImg: pathWay1.pressed?imagePath_navi+"Navi/Type_B_Location/B_05_Location_tjd_setting/M8X_popup-menu_Button_p.png":imagePath_navi+"Navi/Type_B_Location/B_05_Location_tjd_setting/M8X_popup-menu_Button.png"
onClicked:{
applinkControl.QML_NIF_Cus_SetVia(0,location_com.sDestName)
bVisible_pop = false
if(iAddType==0||iAddType==3||iAddType==4||iAddType==5){
msg_PopUp.visible = true
if(bIsDestExist){
applinkControl.QML_NIF_Cus_StartCalc();
iMsgType = 1;
}else{
iMsgType = 3;
msg_timer.restart()
}
}
}
Image{
id:pathWay1_icon
x:245-231
y:851-843
source:imagePath_navi+"Navi/Type_B_Location/B_05_Location_tjd_setting/M8X_Icon_Via-1.png"
}
HMILabel{
id:pathWay1_info
x:298-231
y:859-843
font.pixelSize: 30
width:150+20
height:30+4
verticalAlignment: Label.AlignTop
horizontalAlignment: Label.AlignLeft
text: qsTr("未定义") + applinkControl.qsEmptyString
}
}
//===========================pathWay2===========================//
HMIButton{
id: pathWay2
width:240
height: 62
btnImg: pathWay2.pressed?imagePath_navi+"Navi/Type_B_Location/B_05_Location_tjd_setting/M8X_popup-menu_Button_p.png":imagePath_navi+"Navi/Type_B_Location/B_05_Location_tjd_setting/M8X_popup-menu_Button.png"
onClicked:{
applinkControl.QML_NIF_Cus_SetVia(1,location_com.sDestName)
bVisible_pop = false
if(iAddType==0||iAddType==3||iAddType==4||iAddType==5){
msg_PopUp.visible = true
if(bIsDestExist){
applinkControl.QML_NIF_Cus_StartCalc();
iMsgType = 1;
}else{
iMsgType = 3;
msg_timer.restart()
}
}
}
Image{
id:pathWay2_icon
x:245-231
y:851-843
source:imagePath_navi+"Navi/Type_B_Location/B_05_Location_tjd_setting/M8X_Icon_Via-2.png"
}
HMILabel{
id:pathWay2_info
x:298-231
y:859-843
font.pixelSize: 30
width:150+20
height:30+4
verticalAlignment: Label.AlignTop
horizontalAlignment: Label.AlignLeft
text: qsTr("未定义") + applinkControl.qsEmptyString
}
}
//===========================pathWay3===========================//
HMIButton{
id: pathWay3
width:240
height: 62
btnImg: pathWay3.pressed?imagePath_navi+"Navi/Type_B_Location/B_05_Location_tjd_setting/M8X_popup-menu_Button_p.png":imagePath_navi+"Navi/Type_B_Location/B_05_Location_tjd_setting/M8X_popup-menu_Button.png"
onClicked:{
applinkControl.QML_NIF_Cus_SetVia(2,location_com.sDestName)
bVisible_pop = false
if(iAddType==0||iAddType==3||iAddType==4||iAddType==5){
msg_PopUp.visible = true
if(bIsDestExist){
applinkControl.QML_NIF_Cus_StartCalc();
iMsgType = 1;
}else{
iMsgType = 3;
msg_timer.restart()
}
}
}
Image{
id:pathWay3_icon
x:245-231
y:851-843
source:imagePath_navi+"Navi/Type_B_Location/B_05_Location_tjd_setting/M8X_Icon_Via-3.png"
}
HMILabel{
id:pathWay3_info
x:298-231
y:859-843
font.pixelSize: 30
width:150+20
height:30+4
verticalAlignment: Label.AlignTop
horizontalAlignment: Label.AlignLeft
text: qsTr("未定义") + applinkControl.qsEmptyString
}
}
}
}
}
|