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
|
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:help_page_main
/* 变量定义 */
property int help_kind:VrFunc.VR_NONE
property string common_icon:""
property string common_title:""
property int line_height:20
/* 帮助主画面 */
Item{
id:help_main_list
visible:help_kind == VrFunc.VR_NONE ?true:false
/* 显示:您可以这样问我: */
HMILabel{
id:title_open
x:320;y:30
width:400
height:50
text:qsTr("您可以这样问我:")+systemCtrl.emptyString;
verticalAlignment: Label.AlignTop
horizontalAlignment: Label.AlignLeft
font.pixelSize:25
color: "white"
}
Item{
x:328;y:90
width: 444; height: 150
Component {
id: mainListDelegate
Item {
width: mainGrid.cellWidth; height: mainGrid.cellHeight
/* 压下背景 */
Image{
id:btn_push
source: "../images/TypeG_VR/temp33_push.png"
visible: module_Mouse.pressed?true:false
}
/* 压下/抬起 icon */
Image {
x:15;y:15
source: module_Mouse.pressed?icon_sel:icon
}
/* 选项 */
HMILabel{
id:title_open
x:40;y:10
width:150
height:100
text:m_text
verticalAlignment: Label.AlignTop
horizontalAlignment: Label.AlignHCenter
font.pixelSize:25
color: module_Mouse.pressed?"red":"white"
}
MouseArea{
id:module_Mouse
anchors.fill: parent
onClicked: {
//console.log("-----help module click---index:"+index)
help_kind = index
selectHelpModel()
selectHelpIconAndTitle()
}
}
}
}
GridView {
id: mainGrid
anchors.fill: parent
cellWidth: 200; cellHeight: 40
model: mainModel
delegate: mainListDelegate
interactive:false
}
}
ListModel {
id:mainModel
ListElement {
m_text: "电话帮助"
icon: "../images/TypeG_VR/temp28_tel-icon.png"
icon_sel: "../images/TypeG_VR/temp17_icon-tell.png"
}
ListElement {
m_text: "空调帮助"
icon: "../images/TypeG_VR/temp25_A-C.png"
icon_sel: "../images/TypeG_VR/temp17_icon-tell.png"
}
ListElement {
m_text: "收音帮助"
icon: "../images/TypeG_VR/temp32_radio-icon.png"
icon_sel: "../images/TypeG_VR/temp17_icon-tell.png"
}
ListElement {
m_text: "应用帮助"
icon: "../images/TypeG_VR/temp23_app-icon.png"
icon_sel: "../images/TypeG_VR/temp17_icon-tell.png"
}
ListElement {
m_text: "媒体帮助"
icon: "../images/TypeG_VR/temp20_video-icon.png"
icon_sel: "../images/TypeG_VR/temp17_icon-tell.png"
}
ListElement {
m_text: "设置帮助"
icon: "../images/TypeG_VR/temp21_icon-set-help.png"
icon_sel: "../images/TypeG_VR/temp17_icon-tell.png"
}
}
}
/* 各种帮助画面 */
Item{
id:help_common
visible:help_kind != VrFunc.VR_NONE ?true:false
/* icon */
/*Image{
id:commonIcon
x:367;y:80
source: common_icon
}*/
/* title */
HMILabel{
id:help_common_tile
x:423;y:20
width:400
height:40
text:common_title
// verticalAlignment: Label.AlignVCenter
// horizontalAlignment: Label.AlignHCenter
verticalAlignment: Label.AlignTop
horizontalAlignment: Label.AlignLeft
font.pixelSize:24
color: "white"
}
/* list */
Item {
x:423;y:60
width: 400; height: 250
Component {
id: commonDelegate
Item {
width: common_grid.cellWidth; height: common_grid.cellHeight
HMILabel{
id:help_content_line
width:400
height:line_height
text:common_grid.model.line_text(index)
verticalAlignment: Label.AlignTop
horizontalAlignment: Label.AlignLeft
font.pixelSize:15
color: "white"
}
}
}
GridView {
id: common_grid
anchors.fill: parent
cellWidth: 400
cellHeight: line_height
model: selectHelpModel()
delegate: commonDelegate
interactive:false
}
}
}
/* 打电话帮助信息 */
ListModel {
id:phoneModel
ListElement {}
ListElement {}
ListElement {}
ListElement {}
ListElement {}
ListElement {}
ListElement {}
ListElement {}
ListElement {}
function line_text( index) {
if ( line_text[ "text" ] == undefined) {
line_text.text = [
qsTr( "打电话给某某" ) ,
qsTr( "给某某打电话" ) ,
qsTr( "查看某某的号码" ) ,
qsTr( "打电话给移动客服" ) ,
qsTr( "下载电话本" ) ,
qsTr( "打开电话本" ) ,
qsTr( "查看未接电话" ) ,
qsTr( "查看已接电话" ) ,
qsTr( "查看已拨电话" )
]
}
return line_text.text [ index]
}
}
/* 空调帮助信息 */
ListModel {
id:acModel
ListElement {}
ListElement {}
ListElement {}
ListElement {}
ListElement {}
ListElement {}
ListElement {}
ListElement {}
function line_text( index) {
if ( line_text[ "text" ] == undefined) {
line_text.text = [
qsTr( "打开/关闭空调" ) ,
qsTr( "空调制冷/制热" ) ,
qsTr( "空调内循环/外循环" ) ,
qsTr( "空调前窗除雾/后窗加热" ),
qsTr( "空调温度设置为多少度" ),
qsTr( "空调温度调高/调高多少度" ),
qsTr( "空调温度调低/调低多少度" ),
qsTr( "空调吹脚/吹脸/吹头吹脚" )
]
}
return line_text.text [ index]
}
}
/* 收音机帮助信息 */
ListModel {
id:radioModel
ListElement {}
ListElement {}
ListElement {}
ListElement {}
function line_text( index) {
if ( line_text[ "text" ] == undefined) {
line_text.text = [
qsTr( "调频/FM《频率》" ) ,
qsTr( "调幅/AM《频率》" ) ,
qsTr( "扫描/搜索电台" ) ,
qsTr( "向上搜索/向下搜索" )
]
}
return line_text.text [ index]
}
}
/* 应用帮助信息 */
ListModel {
id:appModel
ListElement {}
ListElement {}
ListElement {}
ListElement {}
function line_text( index) {
if ( line_text[ "text" ] == undefined) {
line_text.text = [
qsTr( "调频/FM《频率》" ) ,
qsTr( "调幅/AM《频率》" ) ,
qsTr( "扫描/搜索电台" ) ,
qsTr( "向上搜索/向下搜索" )
]
}
return line_text.text [ index]
}
}
/* 媒体帮助信息 */
ListModel {
id:mediaModel
ListElement {}
ListElement {}
ListElement {}
ListElement {}
ListElement {}
ListElement {}
ListElement {}
function line_text( index) {
if ( line_text[ "text" ] == undefined) {
line_text.text = [
qsTr( "播放视频/图片/音乐" ) ,
qsTr( "快进/快退" ) ,
qsTr( "上一部/张/首,下一部/张/首" ) ,
qsTr( "全屏播放/退出全屏" ) ,
qsTr( "播放《电影名》/《音乐名》" ) ,
qsTr( "翻转/左翻转/右翻转" ) ,
qsTr( "放大/缩小图片" )
]
}
return line_text.text [ index]
}
}
/* 设置帮助信息 */
ListModel {
id:setModel
ListElement {}
ListElement {}
function line_text( index) {
if ( line_text[ "text" ] == undefined) {
line_text.text = [
qsTr( "背光亮度设置" ) ,
qsTr( "《白天/黑夜/自动》" )
]
}
return line_text.text [ index]
}
}
/*----------------------------------------------------------------------------*/
/*--------------------------------- 函数定义 ----------------------------------*/
/*----------------------------------------------------------------------------*/
/* 选择listmode */
function selectHelpModel()
{
switch (help_kind)
{
case VrFunc.VR_PHONE:
return phoneModel
case VrFunc.VR_AC:
return acModel
case VrFunc.VR_RADIO:
return radioModel
case VrFunc.VR_APPLICATION:
return appModel
case VrFunc.VR_MEDIA:
return mediaModel
case VrFunc.VR_SETTING:
return setModel
default:
//console.log("selectHelpModel: the error help_kind="+help_kind)
return phoneModel
}
}
/* 选择icon和Title */
function selectHelpIconAndTitle()
{
switch (help_kind)
{
case VrFunc.VR_PHONE:
common_icon = "../images/TypeG_VR/temp69_tel-icon.png"
common_title = "打电话"
break;
case VrFunc.VR_AC:
common_icon = "../images/TypeG_VR/temp66_A-C.png"
common_title = "空调控制"
break;
case VrFunc.VR_RADIO:
common_icon = "../images/TypeG_VR/temp72_radio.png"
common_title = "收音机"
break;
case VrFunc.VR_APPLICATION:
common_icon = "../images/TypeG_VR/temp75_app-icon.png"
common_title = "应用"
break;
case VrFunc.VR_MEDIA:
common_icon = "../images/TypeG_VR/temp63_video-icon.png"
common_title = "多媒体"
break;
case VrFunc.VR_SETTING:
common_icon = "../images/TypeG_VR/temp78_set-icon.png"
common_title = "设置"
break;
default:
//console.log("selectHelpIconAndTitle: the error help_kind="+help_kind)
common_icon = "../images/TypeG_VR/temp78_set-icon.png"
common_title = "设置"
}
}
}
|