blob: 7dfc2fe4f6d232aea953cb96e05ac5bd249d1c02 (
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
|
import QtQuick 2.0
import "../AppLink/Com"
import "../windowsList.js" as WindowsList
import "../AppLink/settingLib.js" as SettingsType
import "../layoutList.js" as Layout
HMIWindow
{
id: himalayan_Search
title:qsTr("搜索") + applinkControl.qsEmptyString
property bool bLoading : true
property bool bAlbumsBrowseLoadFailed: false
//windowImgSource:imagePath + "M8X_full-screen_bk.png"
bWithTitle: false
property bool noFileLabel: false
property int playmode: 0
property double playprogress: 0
property int albumsid: 0
property bool bPlayFailed: false
Component.onCompleted:
{
bLoading = true
windowID = WindowsList.APP_HIMALAYAN_SEARCHSOUNDBROADCASTPLAYER
}
onVisibleChanged: {
if(visible)
{
}
}
onSignal_returnClick: {
applinkControl.QML_NIF_NET_CancelRequest()
ScreenManager.backward(Layout.APPLINK)
}
HMILabel{
id:text1
x:150
y:470-160
font.pixelSize:30
height:30+4
width:660
text:""
verticalAlignment: Text.AlignTop
elide:Text.ElideRight
}
HMILabel{
id:text2
x:150
y:512-160
font.pixelSize:20
height:20+4
width:660
text:""
verticalAlignment: Text.AlignTop
elide:Text.ElideRight
}
HMILabel{
id:text3
x:150
y:512-160+12+20
font.pixelSize:20
height:20+4
width:660
text:""
verticalAlignment: Text.AlignTop
elide:Text.ElideRight
}
HMILabel{
id:playtimelabel
x:28//13
y:840-160
font.pixelSize:26
height:26+2
width:115//130
text:"00:00"
verticalAlignment: Text.AlignTop
horizontalAlignment: Text.AlignLeft
}
HMILabel{
id:totaltimelabel
x:817
y:840-160
font.pixelSize:26
height:26+2
width:115//130
text:"00:00"
verticalAlignment: Text.AlignTop
horizontalAlignment: Text.AlignRight
}
// Image{
// x:10
// y:369 - 160
// source:imagePath + "M8X_frequency-spectrum_line.png"
// }
// Image{
// x:0
// y:169
// source:imagePath + "M8X_frequency-spectrum_1.png"
// }
// Image{
// x:0
// y:177
// source:imagePath + "M8X_frequency-spectrum_2.png"
// }
// Image{
// x:0
// y:173
// source:imagePath + "M8X_frequency-spectrum_3.png"
// }
HMIRoundBar_big{
id:main_processbar_big
progress:playprogress
}
// HMIRoundCover
// {
// id: music_Picture_big
// x:328
// y:187
// width:304
// height:304
// border:0
// visible: true
// source:imagePath + "M8X_music_Albums_default_304.png"
// }
HMITrackPlayCtrlButton
{
id:pausebtn
imagePath:himalayan_Search.imagePath
}
HMIButton
{
id:search_button
x:22
y:884-160
btnIcon:imagePath + "M8X_icon_Folder.png"
btnImg:imagePath + "M8X_Media_Button.png"
btnImgOnPressed: imagePath + "M8X_Media_Button_p.png"
onClicked: {
if(!bLoading&&!bAlbumsBrowseLoadFailed){
ScreenManager.forward(Layout.APPLINK,WindowsList.APP_HIMALAYAN_SEARCHSOUNDBROWSELIST)
}
}
}
HMIButton
{
id:playmode_button
x:826
y:443-160
btnIcon:{
var icon
if(playmode == 0){
icon = "M8X_icon_repeat-list.png"
}else if(playmode == 1){
icon = "M8X_icon_repeat-one.png"
}else{
icon = "M8X_icon_shuffle.png"
}
return imagePath + icon
}
btnImg:imagePath + "M8X_Media_Button.png"
btnImgOnPressed: imagePath + "M8X_Media_Button_p.png"
onClicked: {
if(2 != applinkControl.QML_GetSourceCtrlType()){
playmode = playmode + 1;
if(playmode > 2){
playmode = 0
}
applinkControl.QML_NIF_XM_RequestSetTrackPlayMode(playmode)
}
}
}
App_HMILoadFailed{
id:appLoadingFailed
visible:bAlbumsBrowseLoadFailed||bPlayFailed
imagePath: himalayan_Search.imagePath
showBg: true
onSignal_refreshClick:{
bLoading = true
if(bAlbumsBrowseLoadFailed){
bAlbumsBrowseLoadFailed = false
applinkControl.QML_NIF_XM_RequestAlbumsBrowseList(albumsid,1,20)
}
else if(bPlayFailed)
{
bPlayFailed = false
applinkControl.QML_NIF_XM_RequestTrackPlay(applinkControl.QML_GetTrackPlayIndex(), 0)
}
}
}
HMILabel{
id:noResult
visible:noFileLabel
anchors.horizontalCenter:parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 425
font.pixelSize:30
width:200
height: 35
text: qsTr("无文件") + applinkControl.qsEmptyString
color: "white"
clip:true
}
App_Loading{
id:loadingIcon
loadingPath: imagePath+"Common/Loading_60/"
surname: "M8X_Loading_60_"
anchors.horizontalCenter:parent.horizontalCenter
anchors.top: parent.top
anchors.topMargin: 450
visible:bLoading
}
Connections{
target:applinkControl
// onSignal_AlbumsBrowseListEnd:{
// if(visible){
// bLoading = false
// noFileLabel = false
// applinkControl.QML_NIF_XM_RequestTrackPlay(0)
// if(iRslt != 0){//判断是否失败
// bAlbumsBrowseLoadFailed = true//弹出重试msg
// }else{
// if(!data_cnt){
// noFileLabel = true
// }
// }
// }
// }
onSignal_TrackProcessPlugInEnd:{
if(visible){
playtimelabel.text = playtime
playprogress = percentage
bPlayFailed = false
}
}
onSignal_StartPlayTrackInfoEnd:{
//if(visible){
bLoading = false
text1.text = title
text2.text = ((tag!="null") ? tag : "")
text3.text = ((intro!="null") ? intro : "")
totaltimelabel.text = duration
applinkControl.QML_NIF_XM_GetTrackPlayStatus()
//applinkControl.QML_NIF_XM_RequestPlayTrackIcon()
//}
}
onSignal_ImageSaveFinishedForPlayer:{
if(visible){
//music_Picture_big.source = strFileName
}
}
onSignal_XM_PlayFailed:{
if(visible){
bLoading = false
bPlayFailed = true
}
}
onSignal_TrackStatusInfoEnd:{
if (0 == status)
{
pausebtn.istatus = 1
}
else
{
pausebtn.istatus = 0
playtimelabel.text = applinkControl.QML_GetTrackPlayTime()
playprogress = applinkControl.QML_GetPercentage()
}
}
onSignal_GetPlayStatus:{
if(visible)
{
applinkControl.QML_NIF_XM_GetTrackPlayStatus()
}
}
}
//底部功能栏
Row{
id: functionArea
y:1041-160
HMIButton{
id: quitBtn
btnImgOnPressed: imagePath +"M8X_Function_close_Button_p.png"
btnImg: imagePath+"M8X_Function_close_Button.png"
btnIcon: imagePath+"M8X_icon_close.png"
onClicked:{
applinkControl.QML_CloseAppLink()
//ScreenManager.changeForm(Layout.FM_CLOSE,windowID);
}
}
HMIButton{
id: nosw
enabled: false
btnImgOnPressed: imagePath +"M8X_Function_1_Button_NoSwitch_p.png"
btnImg: imagePath+"M8X_Function_1_Button_NoSwitch.png"
}
}
}
|