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: baidumusic_MusicPlayer title:qsTr("分类") + applinkControl.qsEmptyString property bool bLoading : true property bool bPlayFailed: 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 Component.onCompleted: { bLoading = true windowID = WindowsList.APP_BAIDUMUSIC_MUSICPLAYER } onSignal_returnClick: { //applinkControl.QML_NIF_XM_SetIsNeedShowLoading(false) 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" // } HMIBaiduMusicPlayCtrlButton { id:baiductlbtn bReply: !bLoading imagePath:baidumusic_MusicPlayer.imagePath } HMIButton { id:search_button x:22 y:884-160 btnIcon:imagePath + "Navi/Type_P_BaiduMusic/P_03_BaiduMusic_Playing/M8X_icon_baidu_playlist.png" btnImg:imagePath + "M8X_Media_Button.png" btnImgOnPressed: imagePath + "M8X_Media_Button_p.png" onClicked: { //if(!bLoading){ ScreenManager.forward(Layout.APPLINK,WindowsList.APP_BAIDUMUSIC_SEARCHMUSICBROWSELIST) //} } } HMIButton { id:playmode_button x:826 y:443-160 visible: false 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: { playmode = playmode + 1; if(playmode > 2){ playmode = 0 } //applinkControl.QML_NIF_XM_RequestSetTrackPlayMode(playmode) } } App_HMILoadFailed{ id:appLoadingFailed visible:bPlayFailed imagePath: baidumusic_MusicPlayer.imagePath showBg: true onSignal_refreshClick:{ bLoading = true if(bPlayFailed){ bPlayFailed = false applinkControl.QML_NIF_Baidu_PlayItem(applinkControl.QML_Baidu_GetCurIndex(), 1) } } } 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_Baidu_PlayItemSuccess:{ //if(visible){ //music_Picture_big.source = imagePath + "M8X_music_Albums_default_304.png" bLoading = false text1.text = title text2.text = artist totaltimelabel.text = duration playtimelabel.text = applinkControl.QML_Baidu_GetPlayTime() playprogress = applinkControl.QML_Baidu_GetPercentage() applinkControl.QML_NIF_Baidu_GetPlayerStates() if (applinkControl.QML_Baidu_GetUsable() > 0) { //applinkControl.QML_Baidu_RequestPlayIcon() } else { applinkControl.QML_SetBaiduPayQrStr() pay.aPayVisible = true } //} } onSignal_Baidu_PlayItemFailed:{ if(visible){ bLoading = false bPlayFailed = true } } onSignal_Baidu_PlayProgressInfoEnd:{ if (visible) { playtimelabel.text = playtime playprogress = percentage } } onSignal_ImageSaveFinishedForPlayer:{ if(visible){ //music_Picture_big.source = strFileName } } onSignal_MusicStatusInfoEnd:{ if (1 == status) { baiductlbtn.istatus = 1 } else { baiductlbtn.istatus = 0 } } onSignal_GetPlayStatus:{ if(visible) { applinkControl.QML_Baidu_GetPlayBtnStates() } } } //底部功能栏 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() } } HMIButton{ id: nosw enabled: false btnImgOnPressed: imagePath +"M8X_Function_1_Button_NoSwitch_p.png" btnImg: imagePath+"M8X_Function_1_Button_NoSwitch.png" } } App_Com_BaiduMusic_Pay{ id:pay aPayVisible:false } }