import QtQuick 2.0 import Label 2.0 import "../com/neusoft/auto/widgets" import "../eventsList.js" as EventsList import "../layoutList.js" as Layout import "../windowsList.js" as WindowsList import "./Func.js" as VrFunc Item { id:chat_main property string chat_content_text: "" property int fontsize: VrFunc.FONT_SIZE property string userCmd: vrCtrl.vrSttText property int titlex: 30 property int titley: 50 Item{ id:phone_common /* 显示:标题信息 */ HMILabel{ x:titlex y:titley width:540 height:30 text:"闲聊" font.pixelSize:30 verticalAlignment: Label.AlignVCenter horizontalAlignment: Text.AlignHCenter color: "white" } } Item { Image{ y:titley+60 width:570 height:720 source:"qrc:MATERIAL/MATERIAL_M8X_LIST_78_W558_BG"+ bgImageStyle } Item { id:user_cmd x:titlex y:titley+120 width: 528 height: 74 Text { id:fake_text font.pixelSize: 30 visible:false text: userCmd } Image{ x:fake_text.width>480? 0:(480-fake_text.width) width: fake_text.width>480? 528:(fake_text.width+48) height: 74 source: userCmd != ""?"qrc:MATERIAL/MATERIAL_M8X_USER_BG"+bgImageStyle:"" HMILabel { anchors.fill: parent text:userCmd color:"white" font.pixelSize:30 //elide: Label.ElideRight wrapMode: Label.Wrap } } } } Item { id:chat_content y:titley+250 width: 570 height:528 HMILabel { x:titlex+15 y:12 width:480 height:fake_cont.height > 484 ? 484:fake_cont.height //height:300 text:chat_content_text wrapMode: Label.Wrap horizontalAlignment: Label.AlignLeft verticalAlignment: Label.AlignVCenter color:"white" font.pixelSize:30 } Image{ id:uu x:20 y:0 source: chat_content_text != ""?"qrc:MATERIAL/MATERIAL_M8X_SPEECH_LIST_BG_U"+bgImageStyle:"" } Image{ id:aa x:20 y:12 source: chat_content_text != ""?"qrc:MATERIAL/MATERIAL_M8X_SPEECH_LIST_BG_A"+bgImageStyle:"" } Image{ id:cc x:20 y:42 height: fake_cont.height > 484 ? (484-30):(fake_cont.height-30) //height: 270 source: chat_content_text != ""?"qrc:MATERIAL/MATERIAL_M8X_SPEECH_LIST_BG_C"+bgImageStyle:"" } Image{ x:20 y:cc.y+cc.height source: chat_content_text != ""?"qrc:MATERIAL/MATERIAL_M8X_SPEECH_LIST_BG_D"+bgImageStyle:"" } Text { id:fake_cont font.pixelSize: 30 width:480 wrapMode: Text.Wrap visible:false text: chat_content_text } } function chatExitVr() { //console.debug("############dVR_CHAT chatExitVr11111111111 ") systemCtrl.reqSource(Layout.HMI_SRC_VR,Layout.HMI_SRC_End,Layout.HMI_SRC_Front) } /*----------------------------------------------------------------------------*/ /*----------------- JavaScript Function Declaration Section ------------------*/ /*----------------------------------------------------------------------------*/ function chatInfo(result1,result2) { vrCtrl.ttsSpeak(vrCtrl.vrSecondResult, VrFunc.LIBTTS_PB_MODE_REPLACE) chat_content_text=qsTr(vrCtrl.vrFirstResult)+systemCtrl.emptyString } }