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" } } }