summaryrefstree
path: root/usr/bin/qml/Bluetooth/BTmessage/BTM_SMS_View.qml
blob: 7c457c6889ea6afbc6f9d41edc1c273f9cb400f6 (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
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 Label 2.0
HMIWindow
{
    id:msg_View_Answer
    //y:128
    property int curTTSIndex: 0
    property bool ttsEnable: true
    property bool phoneOutgoing: false
    property bool savebKeyboardvisible:false
    property bool saveinput_barvisible:false
    property bool saveanswer_btnvisible:false
    property bool saveicon_Sendvisible:false
    property bool savecursorvisible:false
    //ADD #F0042 2016/10/14 wangshuang begin
    property int shengyuzishu:70
    property int duanxingeshu:1
    //ADD #F0042 2016/10/14 wangshuang begin
    Component.onCompleted:
    {
        windowID = WindowsList.BTM_SMS_VIEW
        systemCtrl.setTextInputHandle(answerInput)
    }
    onVisibleChanged:
    {
        bFullWindow = true
        //bKeyboardVisiable = true
        msglist.positionViewAtIndex(msglist.count-1,ListView.End)
        systemCtrl.setTextInputHandle(answerInput)
//        answerInput.text = ""
//        keyBoardItem.visible = false
//        bKeyboardVisiable = false
//        input_bar.visible = false
//        answer_btn.visible = true
//        icon_Send.visible = false
//        if(keyBoardItem.visible == true)
//        {
//            keyBoardItem.visible = false
//        }
//        if(input_bar.visible == true)
//        {
//            input_bar.visible = false
//        }
//        if(icon_Send.visible == true)
//        {
//            icon_Send.visible = false
//        }
//        if(answer_btn.visible == false)
//        {
//            answer_btn.visible = true
//        }
        if(visible == false)
        {
            if(phoneOutgoing == true)
            {

            }
            else
            {
            btCtrl.msgTTSStop()
            //btCtrl.msgDiaNumberClear()
            }
        }
        else
        {
            phoneOutgoing = false
        }
        //ADD #119244 2016/10/19 wangshuang begin
        if(keyBoardItem.visible == false)
        {
            answer_btn.visible = true
        }
        //ADD #119244 2016/10/19 wangshuang end
			//ADD #140033 2016/12/20 wangshuang begin
        else
        {
            answer_btn.visible = false
        }
        //ADD #140033 2016/12/20 wangshuang end
	//ADD #105313 2016/12/07 liduo begin
        if(handWrite.visible==true)
            bhandwritebar=true
        if(keyBoard.visible==true)
            bhandwritebar=false
        if(handWrite.changecanvas==false){
            handWrite.changecanvas=true
        }
	//ADD #105313 2016/12/07 liduo end
    }
    onCloseWindow:
    {
        if (closeType == Layout.CLOSE_BY_CLOSE)
        {
            btCtrl.msgDiaNumberClear()
            btCtrl.btpMsgAnswerSavedState =""
            answerInput.text = ""
            keyBoardItem.visible = false
            bKeyboardVisiable = false
            input_bar.visible = false
            answer_btn.visible = true
            icon_Send.visible = false
            answerInput.cursorVisible = false
        }
        else if (closeType == Layout.CLOSE_BY_OPEN)
        {
            answerInput.text = ""
            keyBoardItem.visible = false
            bKeyboardVisiable = false
            input_bar.visible = false
            answer_btn.visible = true
            icon_Send.visible = false
            answerInput.cursorVisible = false
        }
    }
    Timer{
        id:listtimer
        interval: 1
        repeat : false
        running : true
        triggeredOnStart : false
        onTriggered:
        {
            //msglist.positionViewAtEnd()
            msglist.positionViewAtIndex(msglist.count-1,ListView.End)
        }
    }

    HMILabel
    {
        //Fod #F0002 2016/10/10 wangshuang begin
        id:view_Name
        x:240//304
        y:back_btn_label.y//25
        width:480//307
        height:38//28
        text:btCtrl.btselectmsgname
        color: "white"
        font.pixelSize: 30
        //horizontalAlignment: Label.AlignLeft
        elide: Label.ElideRight
        horizontalAlignment: text.horizontalAlignment
        verticalAlignment: text.verticalAlignment
        //horizontalAlignment: Label.horizontalAlignment
        //Fod #F0002 2016/10/10 wangshuang end
    }



    HMIButton
    {
        id:folderBack_button
        x:0
        y:5
        width:138
        height:70
        btnImg:folderBack_button.pressed?"qrc:MATERIAL/MATERIAL_M8X_BACK_BUTTON_P"+bgImageStyle:"qrc:MATERIAL/MATERIAL_M8X_BACK_BUTTON"+bgImageStyle
        onClicked:
        {
            ScreenManager.changeForm(Layout.FM_CLOSE,WindowsList.BTM_SMS_VIEW)
        }

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

    HMILabel{
        id:back_btn_label
        x:58//50
        //y:23
        //Fod #F0017 2016/10/11 wangshuang begin
        width: 64//60
        //Fod #F0017 2016/10/11 wangshuang end
            height:30
        font.pixelSize: 30
        text: qsTr("Back")+systemCtrl.emptyString
            anchors.verticalCenter:parent.verticalCenter
        }
    }


    Item
    {
        id:readmsg
        x:0
        y:78
        //Fod #F0144 2016/12/22 wangshuang begin
        width:937//950
        //Fod #F0144 2016/12/22 wangshuang end
        height: (input_bar.visible == true)?((keyBoardItem.visible == true)?195:595):800
        HMIListView
        {
            id:msglist
            anchors.fill: parent
            clip:true
           // model: mesrecord
            model:btCtrl.btMsgDiaListModel
            delegate: msg_View
            keyNavigationWraps: true
            orientation: ListView.Vertical
            highlightFollowsCurrentItem: true
            snapMode: ListView.SnapOneItem
            scrollBar:true
            scrollBar_edge:0
            scrollBar_width:8//4
            scrollBar_img:"qrc:MATERIAL/MATERIAL_M8X_SLIDER_BAR"+bgImageStyle
        }
        Component
        {
            id:msg_View
            Item
            {
               width: 960
               height: (114+msgtext.height)<200?200:(128+msgtext.height)
               HMILabel
               {
                   id:msgtime
                   x:348
                   y:-5//6
                   width:260
                   height:30
                   text:col2
                   color: "#545454"
                   font.pixelSize: 26
                   wtitesize:1
                   horizontalAlignment: Label.horizontalAlignment
               }

               Image{
                   id:msgpic
                   x:col1 == "0"?58:238//28:208
                   y:43
                   width: 692
                   height: (msgtext.height+54)<130?130:(msgtext.height+54)
                   source: "qrc:MATERIAL/MATERIAL_M8X_SMS_BK"+bgImageStyle

                   Image{
                       x:(col1 == "0")?-14:692
                       anchors.verticalCenter: msgpic.verticalCenter
                       source:(col1 == "0")?"qrc:MATERIAL/MATERIAL_M8X_SMS_BK_ARROW_LEFT"+bgImageStyle:"qrc:MATERIAL/MATERIAL_M8X_SMS_BK_ARROW_RIGHT"+bgImageStyle
                   }
               }

                Text
                {
                    id:msgtext
                    visible: false
                    x:col1 == "0"?90:265//60:235//89:230
                    y:71
                    width: 637
                    font.family: "Montserrat"//add lqy for 325925
                    font.pixelSize:30
                    text:col0
                    color:"white"
                    wrapMode:Label.WrapAnywhere
                }
                HMILabel
                {
                    id:msgLabel
                    x:msgtext.x
                    y:msgtext.y
                    width: msgtext.width
                    height: msgtext.height+6//*0.860
                    font.pixelSize:30//24
                    text:col0
                    color:"white"
                    wrapMode:Label.Wrap //WordWrap//WrapAnywhere
                    verticalAlignment: Label.AlignTop
                    horizontalAlignment: Label.AlignLeft
                }
                HMIButton
                {
                    id:tts
                    x:col1 == "0"?790:55//////////
//                    y:320-230//284-200-10
                    anchors.verticalCenter: msgpic.verticalCenter
                    width: 88
                    height: 88

                    visible: !sms_Failure.visible
                    enabled: ttsEnable
                    btnImg:tts.pressed?("qrc:MATERIAL/MATERIAL_M8X_TTS_BUTTON_P"+bgImageStyle)
                                      :("qrc:MATERIAL/MATERIAL_M8X_TTS_BUTTON"+bgImageStyle)
                    btnIcon: col1 == 0?"qrc:MATERIAL/MATERIAL_M8X_ICON_TTS_SENT"+bgImageStyle
                                        :"qrc:MATERIAL/MATERIAL_M8X_ICON_TTS_RECEIVE"+bgImageStyle
                    onClicked:
                    {
                        ttsEnable = false
                        tts_click.start()
                        if(curTTSIndex != index)
                        {
                            if(btCtrl.getTTSCurrentStatus() == 2)
                            {
                            curTTSIndex = index
                                btCtrl.msgTTSPlayDifferentIndex(msgtext.text);
//                console.log("000000000000000000000btCtrl.msgTTSPlayDifferentIndex(msgtext.text)")
                            }
                            else
                            {
                                curTTSIndex = index
                            systemCtrl.reqSource(Layout.HMI_SRC_AUDIO_TTS,Layout.HMI_SRC_START,Layout.HMI_SRC_Front);
                            btCtrl.msgTTSPlay(msgtext.text);
//                            console.log("111111111111111111111111111btCtrl.msgTTSPlay(msgtext.text)")
                            }
                        }
                        else
                        {
                            switch(btCtrl.getTTSCurrentStatus())
                            {
                            case 1:
                            case 3:
                                systemCtrl.reqSource(Layout.HMI_SRC_AUDIO_TTS,Layout.HMI_SRC_START,Layout.HMI_SRC_Front);
                                btCtrl.msgTTSPlay(msgtext.text);
                                break;
                            case 2:
                                //systemCtrl.reqSource(Layout.HMI_SRC_AUDIO_TTS,Layout.HMI_SRC_End,Layout.HMI_SRC_Front);
                                tts_stop.start()
                                break;
                            default:
                                break;
                            }
                        }
                    }
                }

                Image
                {
                    id:sms_Failure
                    x:110
                    y:60
                    source: "qrc:MATERIAL/MATERIAL_M8X_ICON_SMS-FALLURE"+bgImageStyle
                    visible: (col1 == "1")&&(col4 == "0")
                    HMILabel
                    {
                        x:-80
                        y:65
                        width:200
                        height:25
                        font.pixelSize:26
                        text:qsTr("SMS failure")+ systemCtrl.emptyString
                    }
                }
            }
        }
    }
    //Add #129445 2016/11/30 wangs begin
    MouseArea
    {
        id:scroolbarcover
        x:915
        y:78
        width:45
        height: (input_bar.visible == true)?((keyBoardItem.visible == true)?195:595):800
    }
    //Add #129445 2016/11/30 wangs end
    Item
    {
        id:input_bar
        x:0
        //Fod #F0015 2016/10/11 wangshuang begin
        y:(keyBoardItem.visible == true)?280:681//680//280:693
        width: 960
        height: 186
        visible: false
        HMILabel
        {
            id:answer
            x:0//75
            y:(keyBoardItem.visible == true)?15:3//6
            width:240//180
            height:30//29
            font.pixelSize: 30
            text:qsTr("Answer")+ systemCtrl.emptyString
            horizontalAlignment: text.AlignLeft
        }

        Image{
            id:msgpic
            x:58
            y:69//56
            width: 842
            height: 130
            source: "qrc:MATERIAL/MATERIAL_M8X_SMS_BK"+bgImageStyle
	    //ADD F0055 2017/1/18 mengyufeng begin
            Rectangle
            {
                width: 842
                height: 130
                color: "#130f0f"
            }
	    //ADD F0055 2017/1/18 mengyufeng end
            Image{
                x:842//900
                anchors.verticalCenter: msgpic.verticalCenter
                source:"qrc:MATERIAL/MATERIAL_M8X_SMS_BK_ARROW_RIGHT"+bgImageStyle
            }
        }
        Flickable
        {
             id: flick
             x:89
             y:87
             width:790//769
             height: 71
//             x:0
//             y:254-90-128-50
//             width: 698
//             height: (keyBoardItem.visible == true)?126:382
             flickableDirection:Flickable.VerticalFlick
             contentWidth: answerInput.paintedWidth
             contentHeight: answerInput.paintedHeight
             clip: true
             interactive:true
             boundsBehavior: Flickable.StopAtBounds
             function ensureVisible(r)
             {
                 if (contentX >= r.x)
                     contentX = r.x;
                 else if (contentX+width <= r.x+r.width)
                     contentX = r.x+r.width-width;
                 if (contentY >= r.y)
                     contentY = r.y;
                 else if (contentY+height <= r.y+r.height)
                     contentY = r.y+r.height-height;
             }
             TextEdit
             {
                 id: answerInput
                 width: 780//698
                 height: answerInput.contentHeight//flick.height
                 focus: true
                 font.pixelSize: 30//24
                 //Fod #F0015 2016/10/11 wangshuang end
		 //ADD F0055 2017/1/18 mengyufeng begin
                 color: "#130f0f"
                 selectedTextColor:"#676767"
                 selectionColor:"#676767"
                 font.family:"Montserrat"
		 //ADD F0055 2017/1/18 mengyufeng end
                 cursorVisible:true
                 wrapMode: TextEdit.Wrap
                 onCursorRectangleChanged: flick.ensureVisible(cursorRectangle)
		 //ADD F0055 2017/1/18 mengyufeng begin
                 cursorDelegate:mCursorDelegate
                 Component
                 {
                     id:mCursorDelegate
                     Rectangle
                     {
                         id:mCursorRectangle
                         color: "white"
                         height: 30//answerInput.cursorRectangle.height
                         width: 1//answerInput.cursorRectangle.width
                         Timer
                         {
                             running: true
                             repeat: true
                             interval: 800
                             onTriggered:
                             {
                                 mCursorRectangle.visible = ! mCursorRectangle.visible
                             }
                         }
                     }
                 }
                 Label
                 {
                     id:answerLable
                     x:0
                     y:2
                     height: 30*5//(newMsgInput.lineCount>1)?(newMsgInput.lineCount+1)*30:30//newMsgLable.height
                     width:780
                     text:answerInput.text
                     font.family:"Montserrat"
                     color: "white"
                     font.pixelSize: 30
                     wrapMode: Label.Wrap
                     horizontalAlignment: Label.AlignLeft
                     verticalAlignment: Label.AlignTop
                 }
		 //ADD F0055 2017/1/18 mengyufeng end
                 onLengthChanged:
                 {
                     if(length > 80)
                     {
//                         console.debug("lengthlengthlengthlengthlengthlengthlengthlength")
                         remove(80, 82)
                     }
                     //ADD #F0042 2016/10/14 wangshuang begin
                     if(length <70)
                     {
                         shengyuzishu=70-length
                         duanxingeshu=1
                     }
                     else{
                         shengyuzishu=70-length%70
                         duanxingeshu=1+length/70
                     }
                     //ADD #F0042 2016/10/14 wangshuang end
                 }
                 onCursorPositionChanged:    //每当光标移动的时候会收到该信号
                 {
                     if(answerInput.text.length == 80)    //判断当前已经输入的字体个数
                     {
//                         console.debug("lengthlengthlengthlengthlengthlengthlengthlength")
                         keyBoard.maximumState=true  //当长度为480的时候将KeyBoard的maximumState设置为true
                     }
                     else if(answerInput.text.length <80)
                     {
                         keyBoard.maximumState=false  //当长度小于480的时候将KeyBoard的maximumState设置为true
                     }
                 }
		 //ADD #105313 2016/12/07 liduo begin
                 HMIMouseArea
                 {
                     anchors.fill: parent
                     //visible: !keyBoardItem.visible
                     onClicked:
                     {

                         answerInput.cursorPosition = answerInput.positionAt(mouseX,mouseY)
                         if(handWrite.visible==true)
                             bhandwritebar=true
                         if(keyBoard.visible==true)
                             bhandwritebar=false
                         if(handWrite.changecanvas==false){
                             handWrite.changecanvas=true
                         }
                         //ADD #145225 2017/01/18 wangs begin
                         systemCtrl.pinyinsreachclear()
                         //ADD #145225 2017/01/18 wangs end
                     }
                 }
		 //ADD #105313 2016/12/07 liduo end
             }
         }
        HMIMouseArea
        {
            anchors.fill: parent
            visible: !keyBoardItem.visible
            onClicked:
            {
                keyBoardItem.visible = true
                bKeyboardVisiable = true
		//ADD #105313 2016/12/07 liduo begin
                if(handWrite.visible==true)
                    bhandwritebar=true
                if(keyBoard.visible==true)
                    bhandwritebar=false
                if(handWrite.changecanvas==false){
                    handWrite.changecanvas=true
                }
		//ADD #105313 2016/12/07 liduo end
            }
        }
    }
    //stbug #88563 start
    Timer{
        id:tts_stop
        interval: 1
        onTriggered: {
//            console.debug("btCtrl.msgTTSStop()")
            btCtrl.msgTTSStop()
//            console.log("[BTM_SMS_View]On Clicked stop"+Qt.formatTime(new Date(),"hh:mm:ss.zzz"))
        }
    }

    Timer{
        id:tts_click
        interval: 200
        onTriggered: {
//            console.debug("```````````````````ttsEnable = true")
            ttsEnable = true
        }
    }
    //stbug #88563 end

    /*---------------------------------------------Key Board Start----------------------------------------*/
    Item
    {
        id:keyBoardItem
        x:1
        y:561
        visible: false
        onVisibleChanged:
        {
            msglist.positionViewAtIndex(msglist.count-1,ListView.End)
        }
        HMIKeyBoard
        {
            id:keyBoard
            iConfirm: true
            visible: true
            newline:true
            onClickspell:
            {
                if(!keyBoard.isPinyin)
                    systemCtrl.setKeyPress(spell)
            }
            onHandwriteborad:
            {
                keyBoard.visible=false
                handWrite.visible=true
		//ADD #105313 2016/12/07 liduo begin
                bhandwritebar=true
		//ADD #105313 2016/12/07 liduo end
            }
            onCloseKeyBoardSignal:
            {
                keyBoardItem.visible=false;
                bKeyboardVisiable = false
		//ADD #105313 2016/12/07 liduo begin
                bhandwritebar=false
		//ADD #105313 2016/12/07 liduo end
            }
            onSearchStart:
            {
                keyBoardItem.visible=false;
                bKeyboardVisiable = false
            }
        }
        HMIHandWrite{
            id:handWrite
            y:0
            iConfirm: true
            visible: false
        newline:true
            onKeyborad:
            {
//                console.log("#############################################")
                keyBoard.iType=itype
                keyBoard.visible=true
                handWrite.visible=false
		//ADD #105313 2016/12/07 liduo begin
                bhandwritebar=false
		//ADD #105313 2016/12/07 liduo end
            }
            onCloseKeyBoardSignal:
            {
                keyBoardItem.visible=false;
                bKeyboardVisiable = false
		//ADD #105313 2016/12/07 liduo begin
                bhandwritebar=false
		//ADD #105313 2016/12/07 liduo end
            }
            onSearchStart:
            {
                keyBoardItem.visible=false;
                bKeyboardVisiable = false
            }
        }
    }
    /*---------------------------------------------Key Board Over----------------------------------------*/
    HMIButton
    {
        id:answer_btn
        x:90
        y:885
        width: 870
        height: 72
        //add ST_Bug #126526 wudm 2016/12/06 begin
        //visible:(btCtrl.btPhoneTypeState==0)?true:false
        enabled:btCtrl.btPhoneTypeState
        //add ST_Bug #126526 wudm 2016/12/06 end
        //labelPixelSize: 18
        //labelText: qsTr("NEW")+ systemCtrl.emptyString
        //enabled: !(ScreenManager.isOverlayShowed(WindowsList.BTM_DOWNLOAD))
        btnImg:answer_btn.pressed?("qrc:MATERIAL/MATERIAL_M8X_FUNCTION_1_BUTTON_NOSWITCH_P"+bgImageStyle)
                                   :("qrc:MATERIAL/MATERIAL_M8X_FUNCTION_1_BUTTON_NOSWITCH"+bgImageStyle)
        Item
        {
            anchors.centerIn: parent
            //add ST_Bug #126526 wudm 2016/12/06 begin
            visible: btCtrl.btPhoneTypeState
            //add ST_Bug #126526 wudm 2016/12/06 end
            Image
            {
                id:answer_image
                x:-18
                y:-25
                width: 32
                height:32
                source: "qrc:MATERIAL/MATERIAL_M8X_ICON_ANSWER"+bgImageStyle
            }
            HMILabel
            {
                x:-77
                y:10
                width: 150
                height: 28
                font.pixelSize: 18
                text:qsTr("Answer")+ systemCtrl.emptyString
                horizontalAlignment: Label.horizontalCenter
            }
        }
        onClicked:
        {
            //fod ST_Bug #126526 wudm 2016/12/06 begin
        if( true == btCtrl.btConnectState &&(btCtrl.btPhoneTypeState==true))
	    //add ST_Bug #126526 wudm 2016/12/06 begin
            {
                keyBoardItem.visible = true
                icon_Send.visible = true
//                console.log("BTM_SMS_VIEW-------------icon_Send.visible2="+icon_Send.visible)
                answer_btn.visible = false
                input_bar.visible = true
                bKeyboardVisiable = true
                answerInput.cursorVisible = true
		//ADD #105313 2016/12/07 liduo begin
                if(handWrite.visible==true)
                    bhandwritebar=true
                if(keyBoard.visible==true)
                    bhandwritebar=false
                if(handWrite.changecanvas==false){
                    handWrite.changecanvas=true
                }
		//ADD #105313 2016/12/07 liduo end
            }
        }
    }

    HMIButton
    {
        id:icon_Send
        x:90
	//FOD #105313 2016/12/07 liduo begin
        y:keyBoardItem.visible?(bhandwritebar==true?723:483):885//482:885
	//FOD #105313 2016/12/07 liduo end
        width: 870
        height: 72
        visible: false
        //labelPixelSize: 18
        //labelText: qsTr("NEW")+ systemCtrl.emptyString
        //enabled: !(ScreenManager.isOverlayShowed(WindowsList.BTM_DOWNLOAD))
        btnImg:icon_Send.pressed?("qrc:MATERIAL/MATERIAL_M8X_FUNCTION_1_BUTTON_NOSWITCH_P"+bgImageStyle)
                                   :("qrc:MATERIAL/MATERIAL_M8X_FUNCTION_1_BUTTON_NOSWITCH"+bgImageStyle)
        Item
        {
            anchors.centerIn: parent
            Image
            {
                id:icon_New_image
                x:-18
                y:-25
                width: 44//32
                height:32
                source: "qrc:MATERIAL/MATERIAL_M8X_ICON_SEND-SMS"+bgImageStyle
            }
            HMILabel
            {
                x:-77
                y:10
                width: 150
                height: 28
                font.pixelSize: 18
                text:qsTr("Send")+ systemCtrl.emptyString
                horizontalAlignment: Label.horizontalCenter
            }
        }
        //ADD #F0042 2016/10/14 wangshuang begin
        HMILabel
        {
            id:zishu_geshu
            x:780
            width:60
            height:35
            visible: btCtrl.btConnectState
            color:"#A0A0A0"
            text:shengyuzishu+"/"+duanxingeshu
            font.pixelSize: 26
            horizontalAlignment: Label.AlignLeft
            anchors.verticalCenter: parent.verticalCenter
        }
        //ADD #F0042 2016/10/14 wangshuang begin
        onClicked:
        {
//            console.log("[BTM_SMS_View]---------icon_Send clicked")
            btCtrl.setBTMsgContent(answerInput.text)
            answerInput.text = ""
            keyBoardItem.visible = false
            bKeyboardVisiable = false
            input_bar.visible = false
            answer_btn.visible = true
            icon_Send.visible = false
        }
    }


    Rectangle
    {
        id:unreadToRead
        color: "#000000"
        opacity: 0.5
        anchors.fill: parent
        visible: !btCtrl.unreadToReadStatus
        HMILabel
        {
            anchors.fill: parent
            anchors.horizontalCenter: Label.horizontalCenter
            anchors.verticalCenter: Label.verticalCenter
            //FOD #F0122 2016/12/05 wangs begin
            text: "Loading..."
            //text: "Loading……"
            //FOD #F0122 2016/12/05 wangs end
        }
        HMIMouseArea
        {
            anchors.fill: parent
           bBeep:false
        }
    }

    Connections
    {
        target: btCtrl
        onBtselectmsgnameChanged:
        {
//            console.debug("[BTM_SMS_View.qml]---------------------------onBtselectmsgnameChanged")
            view_Name.text = btCtrl.getselectmsgname()
        }
        onMsgAnswerSend:
        {
            if(msg_View_Answer.visible == true)
            {
//                console.debug("[BTM_SMS_View.qml]---------------msg_View_Answer.visible == true")
                btCtrl.getBTMsgDiaListData(btCtrl.getMsgAnswerIndex())
                msglist.positionViewAtIndex(msglist.count-1,ListView.End)
//                console.log("onMsgAnswerSend--················``````````````````-@@@@@@@@@@@@")
            }
            else
            {
//                console.debug("[BTM_SMS_View.qml]---------------msg_View_Answer.visible == false")
            }
        }
        onBtConnectStatusChanged:
        {
            if( false == btCtrl.btConnectState )
            {
                icon_Send.visible = false
                keyBoardItem.visible = false
                input_bar.visible = false
                btCtrl.setselectmsgname("")
                answer_btn.visible = true
                systemCtrl.reqSource(Layout.HMI_SRC_AUDIO_TTS,Layout.HMI_SRC_End,Layout.HMI_SRC_Front);
                if(msg_View_Answer.visible == true)
                {
                    ScreenManager.changeForm(Layout.FM_OPEN,WindowsList.BTP_HOME)
                }
            }
        }
        onNewMsgCom:
        {
            msglist.positionViewAtIndex(msglist.count-1,ListView.End)
//            console.log("onNewMsgCom-------------@@@@@@@@@@@@")
        }

        onBtOutGoingCallChanged:
        {
//            console.log("onBtOutGoingCallChanged-------###################")
            phoneOutgoing = true
            btCtrl.btpMsgAnswerSavedState = answerInput.text
            answerInput.text = ""
            savebKeyboardvisible=keyBoardItem.visible
            saveinput_barvisible=input_bar.visible
            saveanswer_btnvisible=answer_btn.visible
            saveicon_Sendvisible=icon_Send.visible
            savecursorvisible=answerInput.cursorVisible
        }
        onBtIncommingCallChanged:
        {
            btCtrl.btpMsgAnswerSavedState = answerInput.text
            answerInput.text = ""
            savebKeyboardvisible=keyBoardItem.visible
            saveinput_barvisible=input_bar.visible
            saveanswer_btnvisible=answer_btn.visible
            saveicon_Sendvisible=icon_Send.visible
            savecursorvisible=answerInput.cursorVisible
        }

    }
    Connections
    {
        target:ScreenManager
//        onBtHungupPageReset://del by lium for screenchange begin
//        {
//            answerInput.text=btCtrl.btpMsgAnswerSavedState
////            keyBoardItem.visible = true
////            bKeyboardVisiable = true
////            input_bar.visible = true
////            answer_btn.visible = false
////            icon_Send.visible = true
////            answerInput.cursorVisible = true
//            keyBoardItem.visible = savebKeyboardvisible
//            bKeyboardVisiable = savebKeyboardvisible
//            input_bar.visible = saveinput_barvisible
//            answer_btn.visible = saveanswer_btnvisible
//            icon_Send.visible = saveicon_Sendvisible
//            answerInput.cursorVisible = savecursorvisible
//            answerInput.cursorPosition = answerInput.text.length

//        }//del by lium for screenchange end
    }
}