blob: e112f6636c82f6a8e5622c63c832b7b9d7c0461d (
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
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
561
562
563
564
565
566
567
|
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_location
width: 960
height: 960
x: 0; y: 0
color:"#00000000"
property int iMsgType:0
property bool bShowCross: false
property bool bShowGuide: false
property bool bHideCrossView: false
property bool bVisibleGuide: false
property bool bVisibleCross: false
property bool bIsCusStatus: false
property string imagePath_navi: "/usr/bin/qml_link/images/AppLink/"
property string sTMCText:""
property bool bFirstBoot: true
onVisibleChanged: {
if(visible){
//init
applinkControl.QML_SSPLink_SetSearchType(0)
location_com.iScale = applinkControl.QML_NIF_Map_GetCurScale(true);
location_com.iDirType = applinkControl.QML_NIF_Map_GetAzimuth(true);
applinkControl.QML_NIF_Map_SetAzimuth(location_com.iDirType, true);
applinkControl.QML_NIF_Map_FollowCarWithScale(location_com.iScale,true);
location_com.sDestName = applinkControl.QML_getInitCurrentName();
bVisibleGuide = applinkControl.QML_NIF_Gid_GetRouteInfoStatus(); //获取路线行程图显示状态
bVisibleCross = applinkControl.QML_NIF_Gid_GetMagViewStatus(); //获取扩大图显示状态
//GetNaviStatus
if(1 === applinkControl.QML_NIF_Gid_iGetNaviStatus()){
bIsCusStatus = true //引导状态flag: true:引导状态; false:非引导状态
if(bVisibleGuide==0){
bShowGuide = false
}
if(bVisibleCross==0){
bShowCross = false
bHideCrossView = false
}
if(bVisibleGuide&&!bHideCrossView){
bShowGuide = true
}
}else{
bIsCusStatus = false
}
applinkControl.QML_GetGuideDataInfo();
location_com.bTMCswitch = applinkControl.QML_NIF_Tmc_GetShowSwitch()
if (!location_com.bLongPress && bIsCusStatus && location_com.bTMCswitch)
{
tmcBar.visible = true
}
else
{
tmcBar.visible = false
}
applinkControl.QML_GetLaneShow()
if(bFirstBoot){
bFirstBoot=false
if(bIsCusStatus){
applinkControl.QML_NIF_Tmc_Get()
}
}
applinkControl.QML_NotifyAppLinkDisplayOK()
applinkControl.QML_ChangeLinkMapShowStatus(1)
if("" == applinkControl.QML_GetTmcSupportTel())
{
applinkControl.QML_NIF_Tmcpay_GetSupport(applinkControl.QML_GetTmcPayGetStr())
}
applinkControl.QML_NotifyFlickForbidFlag(1)
}else{
// ScreenManager.changeForm(Layout.FM_OPACITY_END,WindowsList.APP_LOCATION)
// systemCtrlLink.changWindowlayer(Layout.PHONENAVI_LAYER,Layout.LayerHide)
}
}
//========================event proc============================================//
Connections{
target:applinkControl
onSignal_UpdateGuideData:{
console.log("[aaaaaaaaaa]-----1----UpdateGuideData-----")
if(1 === applinkControl.QML_NIF_Gid_iGetNaviStatus()){
residualInfo.restDistance = qRestDist+qRestType
directionManuver.distanceText = qDistFromCar+qDistType
directionManuver.directMarkImg = applinkControl.strGetNaviDir(iPointKind)
if(iRestTime_h==0){
residualInfo.restTime = iRestTime_m+"m"
}else if(iRestTime_m==0){
residualInfo.restTime = iRestTime_h+"h"
}else{
residualInfo.restTime = iRestTime_h+ "h" + iRestTime_m+"m"
}
console.log("[aaaaaaaaaa]-----2----UpdateGuideData-----distance is "+residualInfo.restDistance + "time is "+residualInfo.restTime)
}
}
onSignal_UpdateCurrPosName:{
if(visible){
location_com.sDestName = qCurrPosName
}
}
onSignal_HideCrossView:{
if((1 === applinkControl.QML_NIF_Gid_iGetNaviStatus())&&bVisibleCross){
bShowCross = false
bHideCrossView = false
if(bVisibleGuide){
bShowGuide = true
}else{
}
}
}
onSignal_ShowCrossView:{
if((1 === applinkControl.QML_NIF_Gid_iGetNaviStatus()) && bVisibleCross && (bHideCrossView==false) && visible ){
bShowGuide = false
bShowCross = true
}
}
onSignal_ChangeGuideStatus:{
if(bIsCusStatus!=bCusStatus){
bIsCusStatus = bCusStatus
if(bCusStatus&&bVisibleGuide){
bShowGuide = true
}else{
bShowGuide = false
bShowCross = false
bHideCrossView = false
}
}
}
onSignal_StartReroute:{
if(visible){
msg_PopUp.visible = true
iMsgType = 17
}
}
onSignal_EndReroute:{
if(visible){
msg_PopUp.visible = false
iMsgType = 0
}
}
onSignal_NaviStart:{
if(visible){
msg_PopUp.visible = true
iMsgType = 20
msg_timer.restart()
}
}
onSignal_NIF_Gid_GuidePointArriveCB:{
if(2 != applinkControl.QML_NIF_Gid_iGetNaviStatus()){
if(iDestType==5){
applinkControl.QML_NIF_Gid_StopGuide()
applinkControl.QML_NIF_Cus_DelVia(1)
applinkControl.QML_NIF_Cus_DelVia(2)
applinkControl.QML_NIF_Cus_DelVia(3)
applinkControl.QML_NIF_Cus_DelDest()
}
applinkControl.QML_NIF_Cus_GetDestAndViaInfo();
}
}
onSignal_TMC_GetRoadBlockInfo:{
if(visible){
sTMCText = applinkControl.getLanguageType()?(beginRoad + " 至 " + endRoad + "路段交通拥堵"):"Traffic jam from "+beginRoad+" to " +endRoad+","
popMenu.visible = true
}
}
onSignal_TMC_Net_Error:{
if(visible){
msg_PopUp.visible = true
iMsgType = 26
msg_timer.restart()
}
}
onSignal_TMC_Auth_Success:{
if(visible){
applinkControl.QML_NIF_Tmc_SetTermToken(authcode)
location_com.bTMCswitch = true
applinkControl.QML_NIF_Tmc_SetShowSwitch(true)
//applinkControl.QML_NIF_Tmcpay_SetPayInfo(applinkControl.QML_GetTmcPaySetStr())
}
}
onSignal_TMC_Need_Pay:{
if(visible){
//applinkControl.QML_NIF_Tmcpay_SetPayInfo(applinkControl.QML_GetTmcPaySetStr())
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){
}
}
onSignal_TMC_Get_Expiredate:{
if(visible){
popMsg_ExpireDate.newspopText2 = qsTr("您的实时路况服务有效期至 ") + date + applinkControl.qsEmptyString
popMsg_ExpireDate.visible = true
}
}
// onSignal_CalcRouteFinish:{
// if(visible){
// if(bIsFinish == true){
// iMsgType = 0
// msg_PopUp.visible = false
// if(applinkControl.QML_NIF_Gid_StartGuide() != -1){
// //applinkControl.QML_NaviStart()
// }
// }else{
// iMsgType = 7
// msg_PopUp.visible = true
// msg_timer.restart()
// }
// }
// }
}
//===========================location_com===========================//
App_LocationComponent{
id:location_com
bVisible_dir : true
bVisible_scale:true
bIsTMCVisible:true
}
//===========================guideInfo===========================//
App_HMIGuideInfo{
id:guideInfo
x:560
y:99
visible: location_com.bLongPress?false:(bIsCusStatus&&bVisibleGuide&&bShowGuide)
}
//===========================App_HMICrossInfo===========================//
App_HMICrossInfo{
id:crossInfo
y:99
anchors.right: parent.right
visible: location_com.bLongPress?false:(bIsCusStatus&&bVisibleCross&&bShowCross)
}
//===========================residualInfo===========================//
App_HMIResidualInfo{
id: residualInfo
visible: location_com.bLongPress?false:(bIsCusStatus?true:false)
x:102
y:5
}
//===========================directionManuver===========================//
App_HMIDirectionManuver{
id: directionManuver
// x:residualInfo.x+15
// y:residualInfo.y+1
visible: location_com.bLongPress?false:(bIsCusStatus?true:false)
}
//===========================locationmenu===========================//
Image{
id:menuBackground
y:881
visible: location_com.bLongPress?false:true
source: imagePath_navi+"M8X_Function_Button_bg.png"
}
App_HMILocationMenu{
id: locationmenu
x:90
y:881
visible: location_com.bLongPress?false:true
}
//===========================roadCamera===========================//
App_HMICamera{
id: roadCamera
visible:location_com.bLongPress?false:(bIsCusStatus?true:false)
x:5//8
y:692//705
}
//===========================soundBtn===========================//
HMIButton{
id: soundBtn
x:862//0
y:5//108
width: 98
height: 80
visible: location_com.bLongPress?false:(bIsCusStatus?true:false)
btnImg: soundBtn.pressed?imagePath_navi+"M8X_Location_Button_p.png":imagePath_navi+"M8X_Location_Button.png"
btnIcon:imagePath_navi+"M8X_Voice_icon.png"
onClicked: {
applinkControl.QML_NIF_Gid_TouchGuide()
}
}
//===========================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_LOCATION)
}
}
//===========================back==============================//
App_HMIReturnBtn{
id:back
x:0//862
y:5//4
visible: location_com.bLongPress?false:true
onClicked: {
ScreenManager.backward(Layout.APPLINK,WindowsList.APP_HOME)
}
}
//===========================hideBtn===========================//
HMIButton{
id: hideBtn
x:862
y:269-160//108
visible: location_com.bLongPress?false:(bIsCusStatus&&(bShowCross||bShowGuide))
btnImg: hideBtn.pressed?imagePath_navi+"M8X_Location_Button_p.png":imagePath_navi+"M8X_Location_Button.png"
Image{
x:901-parent.x
y:289-160-parent.y
source:imagePath_navi+"M8X_Location_Arrow_R.png"
}
onClicked:{
if(bShowCross){
bShowCross = false
bShowGuide = false
bHideCrossView = true
}else if(bShowGuide){
bShowGuide = false
}
//applinkControl.QML_NIF_Map_SetMapMode(1)
}
}
//===========================viewBtn===========================//
HMIButton{
id: viewBtn
x:862
y:269-160//108
visible: location_com.bLongPress?false:(bIsCusStatus?(bHideCrossView||(bVisibleGuide&&(!bShowGuide)&&(!bShowCross))):false)
btnImg: viewBtn.pressed?imagePath_navi+"M8X_Location_Button_p.png":imagePath_navi+"M8X_Location_Button.png"
//btnIcon:imagePath_navi+"M8X_Location_Arrow_L.png"
Image{
x:895-parent.x
y:289-160-parent.y
source:imagePath_navi+"M8X_Location_Arrow_L.png"
}
onClicked:{
if(bHideCrossView){
bShowCross = true
bShowGuide = false
bHideCrossView = false
}else if( bVisibleGuide && (bShowGuide==false) ){
bShowGuide = true
}
//applinkControl.QML_NIF_Map_SetMapMode(2)
}
}
//===========================msg_PopUp===========================//
App_Com_Popup2msg2btn{
id:popMenu
newspopText1: sTMCText
newspopText2: qsTr("是否重新计算路线?") + applinkControl.qsEmptyString
btnTextLeft: qsTr("是") + applinkControl.qsEmptyString
btnTextRight: qsTr("否") + applinkControl.qsEmptyString
onSignal_btnLeftClick:{
popMenu.visible=false
iMsgType = 1
msg_PopUp.visible = true
applinkControl.QML_NIF_Tmc_SetAvoidSwitch(true);
applinkControl.QML_NIF_Cus_StartCalc();
}
}
App_Com_Newspopup{
id:msg_PopUp
labelCount:1
newspopText1: qsTr(applinkControl.QML_getMessageString(iMsgType)) + applinkControl.qsEmptyString
visible:(iMsgType > 0)?true:false
bIsTouchClear:applinkControl.QML_getMessageTouchClearFlag(iMsgType)
}
Timer{
id:msg_timer
interval: applinkControl.QML_getMessageTime(iMsgType)
onTriggered: {
msg_PopUp.visible = false
iMsgType = 0
}
}
App_Com_LaneALL{
id:lane
bCrossOrGuideOut:bShowCross||bShowGuide
bLongPress:location_com.bLongPress
Connections{
target:applinkControl
onSignal_UpdateLaneInfo:
{
if(visible){
lane.bLane = bHasLane
if(lane.bLane == true){
lane.iLaneNum = iLaneCnt
lane.iLane1 = iLaneInfo1
lane.iLane2 = iLaneInfo2
lane.iLane3 = iLaneInfo3
lane.iLane4 = iLaneInfo4
lane.iLane5 = iLaneInfo5
lane.iLane6 = iLaneInfo6
lane.iLane7 = iLaneInfo7
lane.iLane8 = iLaneInfo8
lane.iLane9 = iLaneInfo9
lane.iLane10 = iLaneInfo10
lane.iLane11 = iLaneInfo11
lane.iLane12 = iLaneInfo12
lane.iLane13 = iLaneInfo13
lane.iLane14 = iLaneInfo14
lane.iLane15 = iLaneInfo15
lane.iLane16 = iLaneInfo16
lane.iLaneRecmd = iLaneRecmdInfo
lane.lane1_bLaneOneSimple = applinkControl.QML_getLaneSimpleIndex(1)
lane.lane2_bLaneOneSimple = applinkControl.QML_getLaneSimpleIndex(2)
lane.lane3_bLaneOneSimple = applinkControl.QML_getLaneSimpleIndex(3)
lane.lane4_bLaneOneSimple = applinkControl.QML_getLaneSimpleIndex(4)
lane.lane5_bLaneOneSimple = applinkControl.QML_getLaneSimpleIndex(5)
lane.lane6_bLaneOneSimple = applinkControl.QML_getLaneSimpleIndex(6)
lane.lane7_bLaneOneSimple = applinkControl.QML_getLaneSimpleIndex(7)
lane.lane8_bLaneOneSimple = applinkControl.QML_getLaneSimpleIndex(8)
lane.lane9_bLaneOneSimple = applinkControl.QML_getLaneSimpleIndex(9)
lane.lane10_bLaneOneSimple = applinkControl.QML_getLaneSimpleIndex(10)
lane.lane11_bLaneOneSimple = applinkControl.QML_getLaneSimpleIndex(11)
lane.lane12_bLaneOneSimple = applinkControl.QML_getLaneSimpleIndex(12)
lane.lane13_bLaneOneSimple = applinkControl.QML_getLaneSimpleIndex(13)
lane.lane14_bLaneOneSimple = applinkControl.QML_getLaneSimpleIndex(14)
lane.lane15_bLaneOneSimple = applinkControl.QML_getLaneSimpleIndex(15)
lane.lane16_bLaneOneSimple = applinkControl.QML_getLaneSimpleIndex(16)
lane.lane1_bLaneMoreRecmdIndex = applinkControl.QML_getLaneMoreRecmdIndex(1)
lane.lane2_bLaneMoreRecmdIndex = applinkControl.QML_getLaneMoreRecmdIndex(2)
lane.lane3_bLaneMoreRecmdIndex = applinkControl.QML_getLaneMoreRecmdIndex(3)
lane.lane4_bLaneMoreRecmdIndex = applinkControl.QML_getLaneMoreRecmdIndex(4)
lane.lane5_bLaneMoreRecmdIndex = applinkControl.QML_getLaneMoreRecmdIndex(5)
lane.lane6_bLaneMoreRecmdIndex = applinkControl.QML_getLaneMoreRecmdIndex(6)
lane.lane7_bLaneMoreRecmdIndex = applinkControl.QML_getLaneMoreRecmdIndex(7)
lane.lane8_bLaneMoreRecmdIndex = applinkControl.QML_getLaneMoreRecmdIndex(8)
lane.lane9_bLaneMoreRecmdIndex = applinkControl.QML_getLaneMoreRecmdIndex(9)
lane.lane10_bLaneMoreRecmdIndex = applinkControl.QML_getLaneMoreRecmdIndex(10)
lane.lane11_bLaneMoreRecmdIndex = applinkControl.QML_getLaneMoreRecmdIndex(11)
lane.lane12_bLaneMoreRecmdIndex = applinkControl.QML_getLaneMoreRecmdIndex(12)
lane.lane13_bLaneMoreRecmdIndex = applinkControl.QML_getLaneMoreRecmdIndex(13)
lane.lane14_bLaneMoreRecmdIndex = applinkControl.QML_getLaneMoreRecmdIndex(14)
lane.lane15_bLaneMoreRecmdIndex = applinkControl.QML_getLaneMoreRecmdIndex(15)
lane.lane16_bLaneMoreRecmdIndex = applinkControl.QML_getLaneMoreRecmdIndex(16)
}
}
}
}
}
HMIWindowLine{
}
App_Com_TMC_Pay{
id:pay
aPayVisible:false
}
App_Com_Newspopup{
id:popMsg_NoService
labelCount: 2
newspopText1: qsTr("您尚未开通实时路况服务,请联系客服人员!") + applinkControl.qsEmptyString
//newspopText2: qsTr("客服电话:XXXXXXXXXXXXXX") + 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_TmcBar{
id:tmcBar
visible:location_com.bLongPress?false:(bIsCusStatus ? applinkControl.QML_NIF_Tmc_GetShowSwitch() : false)
Connections{
target:applinkControl
onSignal_TMC_SegmentUpdateDataCB:{
if(visible){
applinkControl.QML_NIF_Tmc_Get()
}
}
onSignal_TMC_GetInfo:{
if(visible){
tmcBar.iCarRunDist = isCarRunDist
tmcBar.iCusDist = isCusDist
}
}
onSignal_TMC_GetData:{
if(visible){
tmcBar.segModel=applinkControl.tmcBarListModel
}
}
onSignal_TMC_SetShowStatus:{
if (!location_com.bLongPress && bIsCusStatus && location_com.bTMCswitch)
{
tmcBar.visible = true
}
else
{
tmcBar.visible = false
}
}
}
}
}
|