summaryrefstree
path: root/usr/bin/qml/Diag/SettingDisplay/Diag_Setting_Display.qml
blob: 24420eb37420e7065e2dd0b3e61251279e438ed2 (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
568
569
570
571
572
573
574
575
576
577
578
import QtQuick 2.0
import "../../com/neusoft/auto/widgets"
import "../../layoutList.js" as Layout
import "../../windowsList.js" as WindowsList
import "../DiagDefine.js" as DiagDefine
import "../../Setting/Settinglist.js" as Settinglist
import "../"
import "../../eventsList.js" as EventsList

DiagDevelopWindow
{
    id: diag_setting_display

    property string bgImageStyle: systemCtrl.style

    Component.onCompleted:
    {

    }

    onVisibleChanged:
    {
        if (diag_setting_display.visible == true)
        {
            //FOD #126243 2016/11/10 liuming begin
            if (systemCtrl.checkAppCommCodingData(EventsList.HMI_CODING_HUD_DISPLAY) == 0)
            {
                hudBrightness_row.visible = false
                //position_row.visible = false
                //hudangle_row.visible = false
            }
            else if(systemCtrl.checkAppCommCodingData(EventsList.HMI_CODING_HUD_DISPLAY) == 1)
            {
                hudBrightness_row.visible = true
                //position_row.visible = true
                //hudangle_row.visible = true
            }
            switch(iMHUBrightness)
            {
            case 0:
            {
                mhu_Value.text = "-4"
                break;
            }
            case 1:
            {
                mhu_Value.text = "-3"
                break;
            }
            case 2:
            {
                mhu_Value.text = "-2"
                break;
            }
            case 3:
            {
                mhu_Value.text = "-1"
                break;
            }
            case 4:
            {
                mhu_Value.text = "0"
                break;
            }
            case 5:
            {
                mhu_Value.text = "1"
                break;
            }
            case 6:
            {
                mhu_Value.text = "2"
                break;
            }
            case 7:
            {
                mhu_Value.text = "3"
                break;
            }
            case 8:
            {
                mhu_Value.text = "4"
                break;
            }
            default:
            {
                break;
            }
            }

            switch((iIPCBrightness-3))
            {
            case 0:
            {
                ipc_Value.text = "-4"
                break;
            }
            case 1:
            {
                ipc_Value.text = "-3"
                break;
            }
            case 2:
            {
                ipc_Value.text = "-2"
                break;
            }
            case 3:
            {
                ipc_Value.text = "-1"
                break;
            }
            case 4:
            {
                ipc_Value.text = "0"
                break;
            }
            case 5:
            {
                ipc_Value.text = "1"
                break;
            }
            case 6:
            {
                ipc_Value.text = "2"
                break;
            }
            case 7:
            {
                ipc_Value.text = "3"
                break;
            }
            case 8:
            {
                ipc_Value.text = "4"
                break;
            }
            default:
            {
                break;
            }
            }

            switch(iHUDBrightness-3)
            {
            case 0:
            {
                hudBrightness_Value.text = "-4"
                break;
            }
            case 1:
            {
                hudBrightness_Value.text = "-3"
                break;
            }
            case 2:
            {
                hudBrightness_Value.text = "-2"
                break;
            }
            case 3:
            {
                hudBrightness_Value.text = "-1"
                break;
            }
            case 4:
            {
                hudBrightness_Value.text = "0"
                break;
            }
            case 5:
            {
                hudBrightness_Value.text = "1"
                break;
            }
            case 6:
            {
                hudBrightness_Value.text = "2"
                break;
            }
            case 7:
            {
                hudBrightness_Value.text = "3"
                break;
            }
            case 8:
            {
                hudBrightness_Value.text = "4"
                break;
            }
            default:
            {
                break;
            }
            }
            //FOD #126243 2016/11/10 liuming end
        }
        else
        {

        }

    }

    property int iBackground: settingCtrl.iBackground
    property int iBrightness: settingCtrl.iBrightness
    property int iHUDBrightness: settingCtrl.iHUDBrightness
    property int iIPCBrightness: settingCtrl.iIPCBrightness
    property int iMHUBrightness: settingCtrl.iMHUBrightness
    property int iHUDangle: settingCtrl.iHUDangle

    Item
    {
        id:diag_setting_display_title
        x:0
        y:0
        width: 960
        height: 78
        HMILabel
        {
            width: 480//120
            height: 78
            text:qsTr("Diag-Setting-Display") + systemCtrl.emptyString
            font.pixelSize: 30
            color:"#e1e1e1"
            anchors.verticalCenter: parent.verticalCenter
            anchors.horizontalCenter: parent.horizontalCenter
        }
    }

    HMIButton
    {
        id:back_btn
        x:0
        y:165 - diag_setting_display.y
        width: 138
        height: 70
        btnImg: pressed?"qrc:MATERIAL/MATERIAL_M8X_BACK_BUTTON_P" + bgImageStyle:"qrc:MATERIAL/MATERIAL_M8X_BACK_BUTTON" + bgImageStyle

        Image
        {
            id:back_btn_image
            x:20
            anchors.verticalCenter: parent.verticalCenter
            width: 20
            height:34
            source: "qrc:MATERIAL/MATERIAL_M8X_ICON_BACK" + bgImageStyle
        }

        HMILabel
        {
            id:back_btn_label
            x:44
            width: 94//60
            height: 70
            text: qsTr("Back") + systemCtrl.emptyString
            font.pixelSize: 30
            verticalAlignment: Text.AlignVCenter
            horizontalAlignment: Text.AlignLeft
        }
        onClicked:
        {
            //diagCtrl.bInstallMode = false
            ScreenManager.changeForm(Layout.ACT_BACK, WindowsList.DIAG_SETTING_DISPLAY)
        }
    }

    Column
    {
        id:full_screen_bk
        anchors.horizontalCenter: parent.horizontalCenter
        y: 265 - diag_setting_display.y
        width: 842
        anchors.topMargin: 0
        spacing: 2

        Row
        {
            id: brightness_row
            width: full_screen_bk.width
            height: 78

            Item          //for Occupying
            {
                width: 18
                height: 1
            }

            HMILabel
            {
                id: brightness_lable
                width:480//24*20
                height: 78
                text:qsTr("Vehicle" )+ systemCtrl.emptyString
                color:"#e1e1e1"
                //FOD #126243 2016/11/10 liuming begin
                //font.pixelSize: 24
                font.pixelSize: 30
                //FOD #126243 2016/11/10 liuming end
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignLeft
            }
            Item                //for Occupying
            {
                width: 842 - brightness_lable.width - brightness_Value.width - 36
                height: 1
            }

            HMILabel
            {
                id:brightness_Value
                width:full_screen_bk.width-18
                height: 78
                text: iBrightness
                //FOD #126243 2016/11/10 liuming begin
                //font.pixelSize: 24
                font.pixelSize: 30
                //FOD #126243 2016/11/10 liuming end
                color:"#e1e1e1"
                //anchors.verticalCenter: parent.verticalCenter
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignRight
            }
        }

        Row
        {
            id: mhu_row
            width: full_screen_bk.width
            height: 78

            Item              //for Occupying
            {
                width: 18
                height: 1
            }

            HMILabel
            {
                id: mhu_label
                width:480//24*20
                height: 78
                text:qsTr("Media system") + systemCtrl.emptyString
                color:"#e1e1e1"
                font.pixelSize: 30
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignLeft
            }

            Item                //for Occupying
            {
                width: 842 - mhu_label.width - mhu_Value.width - 36
                height: 1
            }

            HMILabel
            {
                id:mhu_Value
                width:full_screen_bk.width - 18
                height: 78
                //FOD #126243 2016/11/10 liuming begin
                //text:iMHUBrightness
                text: ""
                //FOD #126243 2016/11/10 liuming end
                font.pixelSize: 30
                color:"#e1e1e1"
                anchors.verticalCenter: parent.verticalCenter
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignRight
            }
        }

        Row
        {
            id: ipc_row
            width: full_screen_bk.width
            height: 78
            visible: true

            Item              //for Occupying
            {
                width: 18
                height: 1
            }

            HMILabel
            {
                id: ipc_label
                width:480//24*20
                height: 78
                text:qsTr("IPC") + systemCtrl.emptyString
                color:"#e1e1e1"
                font.pixelSize: 30
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignLeft
            }

            Item                //for Occupying
            {
                width: 842 - ipc_label.width - ipc_Value.width - 36
                height: 1
            }

            HMILabel
            {
                id:ipc_Value
                width:full_screen_bk.width - 18
                height: 78
                text: ""//iIPCBrightness
                font.pixelSize: 30
                color:"#e1e1e1"
                anchors.verticalCenter: parent.verticalCenter
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignRight
            }
        }

        Row
        {
            id: hudBrightness_row
            width: full_screen_bk.width
            height: 78
            visible: true

            Item              //for Occupying
            {
                width: 18
                height: 1
            }

            HMILabel
            {
                id: hudBrightness_label
                width:480//24*20
                height: 78
                text:qsTr("HUD") + systemCtrl.emptyString
                color:"#e1e1e1"
                font.pixelSize: 30
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignLeft
            }

            Item                //for Occupying
            {
                width: 842 - hudBrightness_label.width - hudBrightness_Value.width - 36
                height: 1
            }

            HMILabel
            {
                id:hudBrightness_Value
                width:full_screen_bk.width - 18
                height: 78
                text: ""//iMHUBrightness
                font.pixelSize: 30
                color:"#e1e1e1"
                anchors.verticalCenter: parent.verticalCenter
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignRight
            }
        }
        //DEL #126243 2016/11/10 liuming begin
        //        Row
        //        {
        //            id: hudangle_row
        //            width: full_screen_bk.width
        //            height: 78
        //            visible: true

        //            Item              //for Occupying
        //            {
        //                width: 18
        //                height: 1
        //            }

        //            HMILabel
        //            {
        //                id: hudangle_label
        //                width:480//24*20
        //                height: 78
        //                text:qsTr("HUD angle") + systemCtrl.emptyString
        //                color:"#e1e1e1"
        //                font.pixelSize: 30
        //                verticalAlignment: Text.AlignVCenter
        //                horizontalAlignment: Text.AlignLeft
        //            }

        //            Item                //for Occupying
        //            {
        //                width: 842 - hudangle_label.width - hudangle_value.width - 36
        //                height: 1
        //            }

        //            HMILabel
        //            {
        //                id:hudangle_value
        //                width:full_screen_bk.width - 18
        //                height: 78
        //                text: ""//iHUDangle
        //                font.pixelSize: 30
        //                color:"#e1e1e1"
        //                anchors.verticalCenter: parent.verticalCenter
        //                verticalAlignment: Text.AlignVCenter
        //                horizontalAlignment: Text.AlignRight
        //            }
        //        }
        //DEL #126243 2016/11/10 liuming end
        Row
        {
            id: background
            width: full_screen_bk.width
            height: 78

            Item              //for Occupying
            {
                width: 18
                height: 1
            }

            HMILabel
            {
                id: background_text
                width:480//24*20
                height: 78
                text:qsTr("Background")+ systemCtrl.emptyString
                color:"#e1e1e1"
                font.pixelSize: 30
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignLeft
            }

            Item                //for Occupying
            {
                width: 842 - background_text.width - background_text_state.width - 36
                height: 1
            }

            HMILabel
            {
                id:background_text_state
                width:full_screen_bk.width-18
                height: 78
                //FOD #126243 2016/11/10 liuming begin
                //text:(Settinglist.BACKGROUND_ONE==iBackground)?"Name 1":(Settinglist.BACKGROUND_TWO==iBackground)?"Name 2":(Settinglist.BACKGROUND_THREE==iBackground)?"Name of current BG":(Settinglist.BACKGROUND_FOUR==iBackground)?"Name 4":"Name 5"
                text:
                {
                    if (Settinglist.BACKGROUND_DEFAULT == iBackground)
                    {
                        qsTr("Default") + systemCtrl.emptyString
                    }
                    else if (Settinglist.BACKGROUND_ONE == iBackground)
                    {
                        qsTr("Background 1") + systemCtrl.emptyString
                    }
                    else if (Settinglist.BACKGROUND_TWO == iBackground)
                    {
                        qsTr("Background 2") + systemCtrl.emptyString
                    }
                    else if (Settinglist.BACKGROUND_THREE == iBackground)
                    {
                        qsTr("Background 3") + systemCtrl.emptyString
                    }
                    else
                    {
                        qsTr("Default") + systemCtrl.emptyString
                    }
                }

                font.pixelSize: 30
                color:"#e1e1e1"
                //anchors.verticalCenter: parent.verticalCenter
                //FOD #126243 2016/11/10 liuming end
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignRight
            }
        }
    }
}