summaryrefstree
path: root/usr/bin/qml/Bluetooth/BTsetting/BTS_Pair.qml
blob: 9b6b3d760c2620d781805a0e4d6a5d119e464bb0 (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
import QtQuick 2.0
import "../../eventsList.js" as EventsList
import "../../com/neusoft/auto/widgets"
import "../../layoutList.js" as Layout
import "../../windowsList.js" as WindowsList
import "../../Setting/Settinglist.js" as Settinglist
import Label 2.0

HMIMask
{
    id:pairConfirm_pop
    widowsType:Layout.POP_TYPE
    formId:WindowsList.BTS_PAIR
    property string bgImageStyle: systemCtrl.style
    property int iLanguage: systemCtrl.iLanguage //ADD #173489 2017/05/12 wangs
    property bool pairOKstatus: true
    onVisibleChanged:
    {
    	console.log("pairConfirm_pop visiblechange" + btCtrl.getBtDevListCount())
        if (true == visible)
        {
            if (btCtrl.getBtDevListCount() >= 8)
            {
                pairOKstatus = false
            }
            else
            {
                pairOKstatus = true
            }
        }
    }

    Image
    {
        id:pairImg
        //Fod #F0065 2016/10/26 wangshuang begin
	//FOD 2018/10/10 by wyc begin
        x:0//58
        y:317//419
        width:960//844
        height:556//352
        //anchors.centerIn: parent
        //Fod #F0065 2016/10/26 wangshuang end
        //source:  "qrc:MATERIAL/MATERIAL_M8X_POPUP_BG_WARNING"+bgImageStyle
        source:"qrc:MATERIAL/MATERIAL_POPUP_BG_H556"+bgImageStyle
	//FOD 2018/10/10 by wyc end
    }
    /* //DEL #173489 2017/05/12 wangs begin
    HMILabel
    {
        id:pair_popup
        //Fod #F185  2017/02/06 wangshuang begin
        //Fod #F0148 2017/1/7 wangshuang begin
        //Fod #F0004 2016/10/10 wangshuang begin
        y:492//pairImg.y+73//pairImg.y+47//pairImg.y+64//40
        //Fod #F0004 2016/10/10 wangshuang end
        //Fod #F185  2017/02/06 wangshaung end
        width:720
        height:38
        text:  "\""+ btCtrl.btPairName + "\"" +(qsTr(":")+ systemCtrl.emptyString)
        elide:Text.ElideRight
        font.pixelSize: 30//24
        //Fod #F0148 2017/1/7 wangshuang end
        anchors.horizontalCenter: pairImg.horizontalCenter
        visible: pair_popup.contentWidth > pair_popup.width? false:true
        //ADD F0202 2017/02/17 wangs begin
        wtitesize:2
        //ADD F0202 2017/02/17 wangs end
    }
    HMILabel
    {
        //Fod #F185 2017/02/06 wangshuang begin
        x:128//pairImg.x+70
        //Fod #F185 2017/02/06 wangshuang end
        //Fod #F0148 2017/1/7 wangshuang begin
        //Fod #F0004 2016/10/10 wangshuang begin
        y:492//pairImg.y+64//40
        //Fod #F0004 2016/10/10 wangshuang end
        width:570
        height:38
        text:  "\""+ btCtrl.btPairName
        elide:Text.ElideRight
        font.pixelSize: 30
        visible: pair_popup.contentWidth > pair_popup.width? true:false
        //ADD F0202 2017/02/17 wangs begin
        wtitesize:2
        //ADD F0202 2017/02/17 wangs end
    }
    HMILabel
    {
        //Fod #F185 2017/02/06 wangshuang begin
        x:683//pairImg.x+70+555
        //Fod #F185 2017/02/06 wangshuang end
        //Fod #F0148 2017/1/7 wangshuang begin
        //Fod #F0004 2016/10/10 wangshuang begin
        y:492//pairImg.y+64//40
        //Fod #F0004 2016/10/10 wangshuang end
        //Fod #F0148 2017/1/7 wangshuang end
        width:150
        height:38
        text:  "\"" +(qsTr(":")+ systemCtrl.emptyString)
        //elide:Text.ElideRight
        font.pixelSize: 30
        visible: pair_popup.contentWidth > pair_popup.width? true:false
    }
    //DEL #173489 2017/05/12 wangs end */
    //ADD #173489 2017/05/12 wangs begin
    Item
    {
        id:englishItem
        visible: (iLanguage == Settinglist.LANGUAGE_ENGLISH)&&pairOKstatus? true:false
        HMILabel
        {
            x: 120
            y: 472//502//492
            width:720
            height:38
            text:"\""+ btCtrl.btPairName + "\""+systemCtrl.emptyString
            font.pixelSize: 30
            visible: label_name_english.contentWidth <= label_name_english.width? true:false
            wtitesize:2
        }
        Row
        {
            x:120
            y:472//502//492
            width:720
            height:38
            visible: label_name_english.contentWidth <= label_name_english.width? false:true
            HMILabel
            {
                width:30
                height:38
                text: "\""
                font.pixelSize: 30
            }
            HMILabel
            {
                id:label_name_english
                width:630
                height: 38
                text: btCtrl.btPairName
                font.pixelSize: 30
                elide: Text.ElideRight
                wtitesize:2
            }
            HMILabel
            {
                width:60
                height:38
                text: "\""+systemCtrl.emptyString
                font.pixelSize: 30
            }
        }
    }
    //ADD 2019/01/18 by cy for ST#317587 begin
    Item
    {
        id:vietnameseItem
        visible: (iLanguage == Settinglist.LANGUAGE_VIETNAM)&&pairOKstatus? true:false
        HMILabel
        {
            x: 120
            y: 472//502//492
            width:720
            height:38
            text:"\""+ btCtrl.btPairName + "\""+systemCtrl.emptyString
            font.pixelSize: 30
            visible: label_name_vietnamese.contentWidth <= label_name_vietnamese.width? true:false
            wtitesize:2
        }
        Row
        {
            x:120
            y:472//502//492
            width:720
            height:38
            visible: label_name_vietnamese.contentWidth <= label_name_vietnamese.width? false:true
            HMILabel
            {
                width:30
                height:38
                text: "\""
                font.pixelSize: 30
            }
            HMILabel
            {
                id:label_name_vietnamese
                width:630
                height: 38
                text: btCtrl.btPairName
                font.pixelSize: 30
                elide: Text.ElideRight
                wtitesize:2
            }
            HMILabel
            {
                width:60
                height:38
                text: "\""+systemCtrl.emptyString
                font.pixelSize: 30
            }
        }
    }
    Item
    {
        id:russianItem
        visible: (iLanguage == Settinglist.LANGUAGE_RUSSIA)&&pairOKstatus? true:false
        HMILabel
        {
            x: 120
            y: 472//502//492
            width:720
            height:38
            text:"\""+ btCtrl.btPairName + "\""+systemCtrl.emptyString
            font.pixelSize: 30
            visible: label_name_russian.contentWidth <= label_name_russian.width? true:false
            wtitesize:2
        }
        Row
        {
            x:120
            y:472//502//492
            width:720
            height:38
            visible: label_name_russian.contentWidth <= label_name_russian.width? false:true
            HMILabel
            {
                width:30
                height:38
                text: "\""
                font.pixelSize: 30
            }
            HMILabel
            {
                id:label_name_russian
                width:630
                height: 38
                text: btCtrl.btPairName
                font.pixelSize: 30
                elide: Text.ElideRight
                wtitesize:2
            }
            HMILabel
            {
                width:60
                height:38
                text: "\""+systemCtrl.emptyString
                font.pixelSize: 30
            }
        }
    }
    //ADD 2019/01/18 by cy for ST#317587 end
    Item
    {
        id:chineseItem
        visible: iLanguage == Settinglist.LANGUAGE_CHINESE? true:false
        HMILabel
        {
            x: 120
            y: 472//502//612//492
            width:720
            height:38
            font.pixelSize: 30
            text: "\“" + btCtrl.btPairName + "\”" + "的电话:"
            visible: label_name_chinese.contentWidth <= label_name_chinese.width? true:false
            wtitesize:2
        }
        Row
        {
            x: 120
            y: 472//502//492
            width:720
            height:38
            visible: label_name_chinese.contentWidth <= label_name_chinese.width? false:true
            HMILabel
            {
                width:30
                height:38
                text: "\“"
                font.pixelSize: 30
            }
            HMILabel
            {
                id:label_name_chinese
                width:540
                height: 38
                text: btCtrl.btPairName
                font.pixelSize: 30
                elide: Text.ElideRight
                wtitesize:2
            }
            HMILabel
            {
                width:150
                height:38
                text: "\”" + "的电话:"
                font.pixelSize: 30
            }
        }
    }
    //ADD #173489 2017/05/12 wangs end
    HMILabel
    {
        //Fod #F185 2017/02/06 wangshuang begin
	//FOD 2018/10/10 by wyc begin
        x:120//212//pairImg.x+80+74
        //Fod #F185 2017/02/06 wangshuang end
        //Fod #F0148 2017/1/7 wangshuang begin
        //Fod #F0004 2016/10/10 wangshuang begin
        y:532//562//544//pairImg.y+114//80
        //Fod #F0004 2016/10/10 wangshuang end
        width:720//520
	//FOD 2018/10/10 by wyc end
        height:35
	visible:pairOKstatus
        text: qsTr("Do you want to connect the phone?")+systemCtrl.emptyString
        font.pixelSize: 30//28
        //Fod #F0148 2017/1/7 wangshuang end
        //Del #F185 2017/02/06 wangshuang  begin
        //horizontalAlignment: Text.horizontalAlignment
        //verticalAlignment: Text.verticalAlignment
        //Del #F185 2017/02/06 wangshuang  end
    }
    HMIButton
    {
        id:icon_No
        //Fod #F185 2017/02/06 wangshuang begin
	//FOD 2018/10/10 by wyc begin
        x:537//549//pairImg.x+491//pairImg.x+80+330
        y:652//647//pairImg.y+228//pairImg.y+342-207
        //Fod #F185 2017/02/06 wangshuang end
        width:248//186//160
        height:98//78//56
	//FOD 2018/10/10 by wyc end
        labelSize: 30//24
        labelText: qsTr("Cancel")+ systemCtrl.emptyString
	visible:pairOKstatus
	//FOD 2018/10/10 by wyc begin
        //btnImg: icon_No.pressed?("qrc:MATERIAL/MATERIAL_M8X_POPUP_BUTTON_P"+bgImageStyle)
         //                      :("qrc:MATERIAL/MATERIAL_M8X_POPUP_BUTTON"+bgImageStyle)
        //("qrc:MATERIAL/MATERIAL_M8X_SETTINGS_BUTTON_PUSHED"+bgImageStyle)
        //:("qrc:MATERIAL/MATERIAL_M8X_SETTINGS_BUTTON"+bgImageStyle)
        btnImg: icon_No.pressed?("qrc:MATERIAL/MATERIAL_POPUP_BUTTON_P"+bgImageStyle)
                               :("qrc:MATERIAL/MATERIAL_POPUP_BUTTON"+bgImageStyle)
        //FOD 2018/10/10 by wyc end
        onClicked:
        {
            //device_Pair_Confirm.visible = false
            ScreenManager.hideOverlay(WindowsList.BTS_PAIR)
        }
    }

    HMIButton
    {
        id:icon_Yes
        //Fod #F185 2017/02/06 wangshuang begin
	//FOD 2018/10/10 by wyc begin
        x:175//225//pairImg.x+167//pairImg.x+80+140
        y:652//647//pairImg.y+228//pairImg.y+342-207
        //Fod #F185 2017/02/06 wangshuang begin
        width:248//186//160
        height:98//78//56
	//FOD 2018/10/10 by wyc end
	visible:pairOKstatus
        labelSize: 30//24
        labelText: qsTr("Confirm")+ systemCtrl.emptyString
	//FOD 2018/10/10 by wyc begin
        //btnImg: icon_Yes.pressed?("qrc:MATERIAL/MATERIAL_M8X_POPUP_BUTTON_P"+bgImageStyle)
         //                       :("qrc:MATERIAL/MATERIAL_M8X_POPUP_BUTTON"+bgImageStyle)
        //("qrc:MATERIAL/MATERIAL_M8X_SETTINGS_BUTTON_PUSHED"+bgImageStyle)
        //:("qrc:MATERIAL/MATERIAL_M8X_SETTINGS_BUTTON"+bgImageStyle)
        btnImg: icon_Yes.pressed?("qrc:MATERIAL/MATERIAL_POPUP_BUTTON_P"+bgImageStyle)
                                :("qrc:MATERIAL/MATERIAL_POPUP_BUTTON"+bgImageStyle)
        //FOD 2018/10/10 by wyc end
        onClicked:
        {
            btCtrl.setSearchListItemPair(btCtrl.getSearchListIndex())
            // device_Pair_Confirm.visible = false
            ScreenManager.hideOverlay(WindowsList.BTS_PAIR)
            //                console.log("qml:***********************btCtrl.setSearchListItemPair"+iChoseIndex)
        }

    }

    //FOD 2018/12/17 by cy begin
    Item {
        id: conPop
        visible: !pairOKstatus

    HMILabel
    {
        x:120
        y:472//502
        width:720
        height:125
        text: qsTr("Max. 8 devices. Continue pairing will remove the last device in the list.")+systemCtrl.emptyString
        font.pixelSize: 30
        //visible: btCtrl.getBtDevListCount >= 8?true:false
    }
    HMIButton
    {
        //Fod #321632 sxd 2019/03/11 start
        id:conConnect
        //Fod #321632 sxd 2019/03/11 end
        x:175
        y:652
        width:248
        height:98
        labelSize: 30
        labelText: qsTr("Pair")+ systemCtrl.emptyString
        //visible: btCtrl.getBtDevListCount >= 8?true:false
        //Fod #321632 sxd 2019/03/11 start
        btnImg: conConnect.pressed?("qrc:MATERIAL/MATERIAL_POPUP_BUTTON_P"+bgImageStyle)
                               :("qrc:MATERIAL/MATERIAL_POPUP_BUTTON"+bgImageStyle)
        //Fod #321632 sxd 2019/03/11 end
        onClicked:
        {
            pairOKstatus = true;
        }
        }
        HMIButton
        {
            //Fod #321632 sxd 2019/03/11 start
            id:canconnect
            //Fod #321632 sxd 2019/03/11 end
            x:537
            y:652
            width:248
            height:98
            labelSize: 30
            labelText: qsTr("Cancel")+ systemCtrl.emptyString
            //visible: btCtrl.getBtDevListCount >= 8?true:false
            //Fod #321632 sxd 2019/03/11 start
            btnImg: canconnect.pressed?("qrc:MATERIAL/MATERIAL_POPUP_BUTTON_P"+bgImageStyle)
                                   :("qrc:MATERIAL/MATERIAL_POPUP_BUTTON"+bgImageStyle)
            //Fod #321632 sxd 2019/03/11 end
            onClicked:
            {
                ScreenManager.hideOverlay(WindowsList.BTS_PAIR)
            }
        }
        }
    //FOD 2018/12/17 by cy end
}