blob: 511abd6562e77b7f4ca4a8413020cdb89d8ac812 (
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
|
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
}
}
|