summaryrefstree
path: root/usr/bin/qml/Diag/SettingDisplay/Diag_Setting_Internet.qml
blob: 3db8da9ee704b15e6cec535b4711dc3b2fc31400 (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
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
import QtQuick 2.0
import "../../com/neusoft/auto/widgets"
import "../../windowsList.js" as WindowsList
import "../../layoutList.js" as Layout
import "../../Setting/Settinglist.js" as Settinglist
import "../../eventsList.js" as EventsList

Item
{
    id:wifi_home
    x: 20
    y: 0
    width: right1.width
    height: right1.height
    property string style: systemCtrl.style
    property int iAutoDis: settingCtrl.disConnUsageSwitch
    property int iMobileData: settingCtrl.mobileDataSwitch
    property string currUsage: settingCtrl.currUsage
    property string totalUsage: settingCtrl.totalUsage
    property string warningUsage: settingCtrl.warningUsage
    property string disConnUsage: settingCtrl.disConnUsage

    property int iWifiSwitchState: settingCtrl.iWifiSwitchState
    property bool currConnState: settingCtrl.currConnState
    property string currConnSSID: settingCtrl.currConnSSID
    property int currConnAuthType: settingCtrl.currConnAuthType
    property int currConnSignalLevel: settingCtrl.currConnSignalLevel
    property int iWifiTotalCount: settingCtrl.iWifiTotalCount


    property int iWifiAPSwitchState: settingCtrl.iWifiAPSwitchState
    property string sWifiAPSSID: settingCtrl.sWifiAPSSID
    property string sWifiAPPasswd: settingCtrl.sWifiAPPasswd
    property int iWifiAPConnCount: settingCtrl.iWifiAPConnCount

    property int iMiwen: settingCtrl.iMiwen
    property int iInternetSelectType: 0//settingCtrl.iInternetSelectType

    //add T0039 2016/11/11 liuming begin
    property int inetworkType: carlinkCtrl.networkType
    property string apPassword:""
    property string apSSID:""
    property string internetDNS: ""//settingCtrl.internetDNS
    property int currWifiSwiState: 0
    property int currAPSwiState: 0
    //add T0039 2016/11/11 liuming end

    onVisibleChanged:
    {
        //FOD T0039 2016/11/11 liuming begin
        if(wifi_home.visible == true)
        {
            apSSID = ""
            apPassword = ""
            if (systemCtrl.checkAppCommCodingData(EventsList.HMI_CODING_TELEMATICS_SYSTEM) == 0)
            {
                mobile_data.visible = false

                internetSelect.visible = false
                internet_usage.visible = false
                internet_warning.visible = false
                auto_disconnect.visible = false

                //connectedDevices.visible = false
                wifi_password.visible = false
                wifi_name.visible = false
                wifi_hotspot.visible = false
            }
            else if(systemCtrl.checkAppCommCodingData(EventsList.HMI_CODING_TELEMATICS_SYSTEM) == 1)
            {
                mobile_data.visible = true
                internetSelect.visible = true
                internet_usage.visible = true
                internet_warning.visible = false
                auto_disconnect.visible = false

                //connectedDevices.visible = true
                wifi_password.visible = true
                wifi_name.visible = true
                wifi_hotspot.visible = true
            }
            else
            {
                mobile_data.visible = true
                internetSelect.visible = true
                internet_usage.visible = true
                internet_warning.visible = false
                auto_disconnect.visible = false

                //connectedDevices.visible = true
                wifi_password.visible = true
                wifi_name.visible = true
                wifi_hotspot.visible = true
            }

            settingCtrl.getWifiSwitchState();
            settingCtrl.getWifiAPSwitchState();

            settingCtrl.getWifiAPSSID();
            settingCtrl.getWifiAPPasswd();

            settingCtrl.getInternetUsage();
            settingCtrl.getEmergencyData();

            settingCtrl.getDisConnSwitch();
            settingCtrl.getMobileSwitch();

            settingCtrl.getInternetDNS()
        }
        else
        {
            if (getWifiListTimer.running == true)
            {
                getWifiListTimer.stop()
            }

            if (getWifiAPListTimer.running == true)
            {
                getWifiAPListTimer.stop()
            }
        }

        //FOD T0039 2016/11/11 liuming end

    }

    Column
    {
        id:right1
        x: 0
        y: 0
        width: 842
        spacing: 2

        Row
        {
            id: mobile_data
            width: right1.width
            height: 78
            Item
            {
                width: 18
                height: 1
            }

            HMILabel
            {
                id: mobile_data_text
                width:280
                height: 78
                text:qsTr("Mobile Data") + systemCtrl.emptyString
                font.pixelSize: 30
                color:"#e1e1e1"
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignLeft
            }
            Item
            {
                width: 842 - mobile_data_text.width - mobile_data_btn.width - 36
                height: 1
            }

            HMILabel
            {
                id:mobile_data_btn
                width: 100
                height: 78
                text:(Settinglist.MOBILE_DATA_CHOICE_CHECKED == iMobileData)?qsTr("ON")+ systemCtrl.emptyString:qsTr("OFF")+ systemCtrl.emptyString
                font.pixelSize: 30
                color:"#e1e1e1"
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignRight
            }
        }
        //add T0039 2016/11/11 liuming begin
        Row
        {
            id: internetSelect
            width: right1.width
            height: 78
            Item
            {
                width: 18
                height: 1
            }

            HMILabel
            {
                id: internetSelect_text
                width:280
                height: 78
                text:qsTr("Internet select") + systemCtrl.emptyString
                font.pixelSize: 30
                color:"#e1e1e1"
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignLeft
            }

            HMILabel
            {
                id:internetSelect_btn
                //width: 842 - internetSelect_text.width -18
                width: 842 - 280 -18 -18
                height: 78
                text:(Settinglist.INTERNET_SELECT_VEHICLE == inetworkType)?qsTr("Vehicle")+ systemCtrl.emptyString:qsTr("Phone")+ systemCtrl.emptyString
                font.pixelSize: 30
                color:"#e1e1e1"
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignRight
            }
        }
        //add T0039 2016/11/11 liuming end

        Row
        {
            id: internet_usage
            x: 0
            y: 0
            width: right1.width
            height: 78
            Item
            {
                width: 18
                height: 1
            }
            HMILabel
            {
                id:internet_usage_text
                width:280
                height:78
                text: qsTr("Internet usage:") + systemCtrl.emptyString
                font.pixelSize: 30
                color:"#e1e1e1"
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignLeft

            }
            Item
            {
                width:842 - internet_usage_text.width - usage_text.width - 36
                height:1
            }
            HMILabel
            {
                id:usage_text
                width:100
                height:78
                text: currUsage
                font.pixelSize: 30
                color:"#e1e1e1"
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignRight
            }
        }

        Row
        {
            id: internet_warning
            width: right1.width
            height: 78
            Item
            {
                width: 18
                height: 1
            }
            HMILabel
            {
                id:internet_warning_text
                width:280
                height:78
                text: qsTr("Internet warning") + systemCtrl.emptyString
                font.pixelSize: 30
                color:"#e1e1e1"
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignLeft
            }

            Item
            {
                width: 842-280-100-100
                height: 1
            }

            HMILabel
            {
                id: internet_warning_input
                width: 100
                height: 78
                text:warningUsage
                font.pixelSize: 30
                color:"#e1e1e1"
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignRight
            }

            //            Item
            //            {
            //                width:5
            //                height:1
            //            }
            HMILabel
            {
                width:70
                height:78
                text:"MB"
                font.pixelSize: 30
                color:"#e1e1e1"
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignHCenter
            }
        }

        Row
        {
            id: auto_disconnect
            width: right1.width
            height: 78
            Item
            {
                width: 18
                height: 1
            }
            HMILabel
            {
                id: auto_disconnect_text
                width:278
                height: 78
                text:qsTr("Auto disconnect") + systemCtrl.emptyString
                font.pixelSize: 30
                color:"#e1e1e1"
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignLeft
            }
            HMILabel
            {
                id: auto_disconnect_input
                width: 350
                height: 78
                text:disConnUsage
                font.pixelSize: 30
                color:"#e1e1e1"
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignRight
            }
            HMILabel
            {
                width:70
                height:78
                text:"MB"
                font.pixelSize: 30
                color:"#e1e1e1"
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignRight
            }
            //fod T0039 2016/11/11 liuming begin
            Item
            {
                //width: 50
                width: 40
                height: 1
            }
            HMILabel
            {
                id:auto_disconnect_btn
                //width: 76
                width: 70
                height: 78
                text: (Settinglist.AUTODISCONNECT_CHOICE_CHECKED == iAutoDis)?qsTr("ON")+ systemCtrl.emptyString:qsTr("OFF")+ systemCtrl.emptyString
                font.pixelSize: 30
                color:"#e1e1e1"
                //anchors.right: parent.right
                verticalAlignment: Text.AlignVCenter
                //horizontalAlignment: Text.AlignLeft
                horizontalAlignment: Text.AlignRight
            }
        }
        //fod T0039 2016/11/11 liuming end

        //add T0039 2016/11/11 liuming end
        Row
        {
            id: internet_dns
            width: right1.width
            height: 78
            visible:((Settinglist.INTERNET_SELECT_VEHICLE == inetworkType)&&(systemCtrl.checkAppCommCodingData(EventsList.HMI_CODING_TELEMATICS_SYSTEM) == 1)) ? true : false

            Item
            {
                width: 18
                height: 1
            }

            HMILabel
            {
                id: dns_text
                width:280
                height: 78
                text:qsTr("DNS") + systemCtrl.emptyString
                font.pixelSize: 30
                color:"#e1e1e1"
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignLeft
            }
            //            Item
            //            {
            //                width:842 - internetSelect_text.width -18- dns_btn.width
            //                height: 1

            //            }
            Item
            {
                width: 842-dns_btn.width - 18 + 280
                height: 1
            }
            Item
            {
                x: 18 + 280
                Item
                {
                    id:dns_btn
                    anchors.right: parent.right
                    Row
                    {
                        x: 36
                        spacing: 72
                        HMILabel
                        {
                            id:internet_dns_1
                            width:60
                            height:78
                            text: settingGetDNS()
                            font.pixelSize: 30
                            color:"#e1e1e1"
                            verticalAlignment: Text.AlignVCenter
                            horizontalAlignment: Text.AlignHCenter
                        }
                        HMILabel
                        {
                            id:internet_dns_2
                            width:60
                            height:78
                            text: settingGetDNS()
                            font.pixelSize: 30
                            color:"#e1e1e1"
                            verticalAlignment: Text.AlignVCenter
                            horizontalAlignment: Text.AlignHCenter //ADD  2016/10/12 BAOJINFENG END
                        }
                        HMILabel
                        {
                            id:internet_dns_3
                            width:60
                            height:78
                            text: settingGetDNS()
                            font.pixelSize: 30
                            color:"#e1e1e1"
                            verticalAlignment: Text.AlignVCenter
                            horizontalAlignment: Text.AlignHCenter //ADD  2016/10/12 BAOJINFENG END
                        }
                        HMILabel
                        {
                            id:internet_dns_4
                            width:60
                            height:78
                            text: settingGetDNS()
                            font.pixelSize: 30
                            color:"#e1e1e1"
                            verticalAlignment: Text.AlignVCenter
                            horizontalAlignment: Text.AlignHCenter
                        }
                    }
                    Image
                    {
                        id: dns_point
                        x: 129
                        y: 48
                        width: 267
                        height: 20
                        source: "qrc:MATERIAL/MATERIAL_M8X_DNS_INPUT-BOX_DOT" + bgImageStyle
                    }
                }
            }
        }
        //add T0039 2016/11/11 liuming end
        Row
        {
            id: wifi
            width: right1.width
            height: 78

            Item
            {
                width: 18
                height: 1
            }

            HMILabel
            {
                id: wifi_text
                width:278
                height: 78
                text:qsTr("WiFi") + systemCtrl.emptyString
                font.pixelSize: 30
                color:"#e1e1e1"
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignLeft
            }

            Item
            {
                width: 842-wifi_text.width-wifi_btn.width- 36
                height: 1
            }

            HMILabel
            {
                id:wifi_btn
                y:18
                width: 100
                height: 28
                visible: true
                //add T0039 2016/11/11 liuming begin
                //text:(iWifiSwitchState == 0)?qsTr("ON")+ systemCtrl.emptyString:qsTr("OFF")+ systemCtrl.emptyString
                text: currWifiSwiState == 0? "ON":"OFF"
                //add T0039 2016/11/11 liuming end
                font.pixelSize: 30
                color:"#e1e1e1"
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignRight
            }
        }

        Image
        {
            id: wifi_choosed_btn
            visible:((currConnState == true) && (iWifiAPSwitchState == 1))?true:false
            width: right1.width
            height: 78
            source: "qrc:MATERIAL/MATERIAL_M8X_LIST_78" + style

            Row
            {
                id: wifi_choosed
                width: right1.width
                height: 78
                visible: (iWifiSwitchState == 0)?true:false
                Item
                {
                    width: 18
                    height: 1
                }
                HMILabel
                {
                    id: wifi_chooselist_text
                    width:230
                    height: 78
                    text:currConnSSID//"col0"
                    font.pixelSize: 30
                    color:"#e1e1e1"
                    verticalAlignment: Text.AlignVCenter
                    horizontalAlignment: Text.AlignLeft
                }

                Image
                {
                    y:30
                    width:6
                    height: 20
                    source:(currConnAuthType == 0)?"":"qrc:MATERIAL/MATERIAL_M8X_ICON_SETTINGS_WIFII_LOCK" + style
                }

                Item
                {
                    width: 160
                    height: 1
                }

                Image
                {
                    y:10
                    width: 40
                    height:40
                    //source:"qrc:MATERIAL/MATERIAL_M8X_ICON_WIFI_5" + style
                    source:
                    {
                        if (currConnSignalLevel == 0)
                        {
                            "qrc:MATERIAL/MATERIAL_M8X_ICON_SETTINGS_WIFI_2" + style
                        }

                        else if (currConnSignalLevel == 1)
                        {
                            "qrc:MATERIAL/MATERIAL_M8X_ICON_SETTINGS_WIFI_3" + style
                        }

                        else if (currConnSignalLevel == 2)
                        {
                            "qrc:MATERIAL/MATERIAL_M8X_ICON_SETTINGS_WIFI_4" + style
                        }
                        else
                        {
                            "qrc:MATERIAL/MATERIAL_M8X_ICON_SETTINGS_WIFI_0" + style
                        }
                    }

                }

                Item
                {
                    width: 140
                    height: 1
                }
            }
        }
        Row
        {
            id: wifi_hotspot
            width: right1.width
            height: 78
            visible: true
            Item
            {
                width: 18
                height: 1
            }
            HMILabel
            {
                id: wifi_hotspot_text
                width:278
                height: 78
                text:qsTr("Wi-Fi Hotspot") + systemCtrl.emptyString
                font.pixelSize: 30
                color:"#e1e1e1"
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignLeft
            }
            Item
            {
                width: 842-wifi_hotspot_text.width-wifihost_btn.width- 36
                height: 1
            }

            HMILabel
            {
                id:wifihost_btn
                width: 100
                height: 78
                visible: true
                //fod T0039 2016/11/11 liuming begin
                //text:(iWifiAPSwitchState == 0)?qsTr("ON")+ systemCtrl.emptyString:qsTr("OFF")+ systemCtrl.emptyString
                text: currAPSwiState == 0? "ON":"OFF"
                //fod T0039 2016/11/11 liuming end
                font.pixelSize: 30
                color:"#e1e1e1"
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignRight
            }
        }

        Row
        {
            id: wifi_name
            width: right1.width
            height: 78
            visible: true
            Item
            {
                width: 18
                height: 1
            }
            HMILabel
            {
                id: wifi_name_text
                width:278
                height: 78
                text:qsTr("Wi-Fi Name") + systemCtrl.emptyString
                font.pixelSize: 30
                color:"#e1e1e1"
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignLeft
            }
            //fod #126237 2016/11/12 liuming begin
            //            Item
            //            {
            //                id: wifi_name_input
            //                width: right1.width - 20
            //                height: 78
            //                anchors.right: parent.right
            //                HMILabel
            //                {
            //                    id: wifi_name_input_text
            //                    width: right1.width - 20
            //                    height: 78
            //                    text: sWifiAPSSID
            //                    font.pixelSize: 30
            //                    color:"#e1e1e1"
            //                    verticalAlignment: Text.AlignVCenter
            //                    horizontalAlignment: Text.AlignRight
            //                }
            //            }
            //fod #126237 2016/11/12 liuming begin
            HMILabel
            {
                id: wifi_name_input_text
                //fod #126237 2016/11/12 liuming begin
                //width: right1.width - 20
                width: 842-18-280-20
                height: 78
                text: sWifiAPSSID
                font.pixelSize: 30
                color:"#e1e1e1"
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignRight
                //fod #126237 2016/11/12 liuming end
            }
        }

        Row
        {
            id: wifi_password
            width: right1.width
            height: 78
            visible: true
            Item
            {
                width: 18
                height: 1
            }
            //fod #126237 2016/11/12 liuming begin
            HMILabel
            {
                id: wifi_password_text
                width:150//278
                height: 78
                text:qsTr("Wi-Fi\nPassword") + systemCtrl.emptyString
                font.pixelSize: 30
                color:"#e1e1e1"
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignLeft
            }
            //            Item
            //            {
            //                id: wifi_password_input
            //                width: right1.width - 20
            //                height: 78
            //                anchors.right:parent.right
            //                HMILabel
            //                {
            //                    id: wifi_password_input_text
            //                    width: right1.width - 20
            //                    height: 78
            //                    text: sWifiAPPasswd
            //                    font.pixelSize: 30
            //                    color:"#e1e1e1"
            //                    verticalAlignment: Text.AlignVCenter
            //                    horizontalAlignment: Text.AlignRight
            //                }
            //            }
            HMILabel
            {
                id: wifi_password_input
                //width: 842-18-278//right1.width - wifi_password_text.width -18
                width: 642//842-18-150//278
                height: 78
                //text: sWifiAPPasswd
                text: apPassword
                font.pixelSize: 30
                color:"#e1e1e1"
                verticalAlignment: Text.AlignVCenter
                horizontalAlignment: Text.AlignRight
            }
            //fod #126237 2016/11/12 liuming end
        }
    }
    //add T0039 2016/11/12 liuming begin
    Timer
    {
        id:getWifiListTimer
        interval: 8000
        running: false
        repeat: true

        onTriggered:
        {
            settingCtrl.getWifiList()
        }
    }

    Timer
    {
        id:getWifiAPListTimer
        interval: 500
        running: false
        repeat: false

        onTriggered:
        {
            settingCtrl.getWifiAPList()
        }
    }

    Connections
    {
        target: settingCtrl

        onWifiSwiChanged:
        {
            if (iWifiSwi === 0)//0 means ON
            {
                settingCtrl.getWifiList()
                getWifiListTimer.start()
                //wifi_choose_text.visible = true

                //wifi_btn.btnImg = "qrc:MATERIAL/MATERIAL_M8X_CHOICE_BOX_CHECK" + style

                currWifiSwiState = 0
            }
            else if (iWifiSwi === 1)//1 means OFF
            {
                //wifilist.visible = false
                //visible = false

                if (getWifiListTimer.running == true)
                {
                    getWifiListTimer.stop()
                }
                //wifi_btn.btnImg = "qrc:MATERIAL/MATERIAL_M8X_CHOICE_BOX" + style

                currWifiSwiState = 1
            }
        }

        onApSwiChanged:
        {
            if (iAPSwitch === 0)//0 means ON
            {
                settingCtrl.getWifiAPList()
                getWifiAPListTimer.start()
                getWifiListTimer.stop()
                //wifilist.visible = false
                //wifihost_btn.btnImg = "qrc:MATERIAL/MATERIAL_M8X_CHOICE_BOX_CHECK" + style

                currAPSwiState = 0
            }
            else
            {
                getWifiAPListTimer.stop()

                //wifihost_btn.btnImg = "qrc:MATERIAL/MATERIAL_M8X_CHOICE_BOX" + style

                currAPSwiState = 1
            }
        }
        onWifiConnectNG:
        {
            if ((wifi_home.visible == true) && (currWifiSwiState == 0))//0 means ON
            {
                settingCtrl.getWifiList()
                getWifiListTimer.start()

                ScreenManager.hideOverlay(WindowsList.SETTING_WIFILOADING)
                ScreenManager.showOverlay(WindowsList.SETTING_WIFIPASSWD_MESSAGE)
            }
            else
            {
                //do nothing
            }
        }

        onSSIDChanged:
        {
            wifi_name_input_text.text = sAPSSID
        }

        onAPPasswordChanged:
        {
            wifi_password_input.text = sAPPasswd
        }

//        onWifiAPSSIDSetFailed:
//        {
//            console.log("Setting_wifi_qml onWifiAPSSIDSetFailed  -->")

//        }

//        onWifiAPPasswdSetFailed:
//        {
//            console.log("Setting_wifi_qml onWifiAPPasswdSetFailed  -->")
//        }

        onUsageError:
        {
            usage_text.text = "--/--"
        }
        onInternetDNSChanged:
        {

            //settingCtrl.getInternetDNS()
            internetDNS = qInternetDNS;
            settingGetDNS()
        }
        function settingGetDNS()

        {
            if(internetDNS == "")
            {
                internet_dns_1.text = "";
                internet_dns_2.text = "";
                internet_dns_3.text = "";
                internet_dns_4.text = "";

            }
            else
            {
                var arr=internetDNS.split(".");
                internet_dns_1.text = arr[0];
                internet_dns_2.text = arr[1];
                internet_dns_3.text = arr[2];
                internet_dns_4.text = arr[3];
            }
        }
    }
    //add #126237 2016/11/12 liuming end
}