import QtQuick 2.0 import "../com/neusoft/auto/widgets" import "../windowsList.js" as WindowsList import "ipod_define.js" as StatusList import "../layoutList.js" as Layout Rectangle { id:ipodSearchAndPlayMode HMIButton { id:search_button x: 0 y: 0 width: 106 height: 56 btnImg:search_button.pressed?"qrc:MATERIAL/MATERIAL_M8X_MEDIA_BUTTON_3_P"+bgImageStyle:"qrc:MATERIAL/MATERIAL_M8X_MEDIA_BUTTON_3"+bgImageStyle Image { id: search_button_icon anchors.verticalCenter: search_button.verticalCenter anchors.horizontalCenter: search_button.horizontalCenter source: "qrc:MATERIAL/MATERIAL_M8X_ICON_FOLDER"+bgImageStyle } onClicked: { if((StatusList.DEVICE_IPOD_CONNECT == ipodCtrl.ipod_getDeviceConnectStatus())&&(ipod_scanState ==StatusList.HMI_IPOD_SCAN_FINISH)) { ScreenManager.changeForm(Layout.FM_OPEN_EXTEND_SELF,WindowsList.IPOD_SEARCH) } else { } } } HMIButton { id:playmode_button_shuffle anchors.top: search_button.top anchors.left: search_button.right anchors.leftMargin: -2 width: 106 height: 56 visible:(StatusList.DEVICE_NO_CONNECT == ipodCtrl.ipod_getDeviceConnectStatus())?true:(((ipod_which_apply == 1 )||(ipod_which_apply == 2 )||(ipod_third_apply == 1))?false:true) btnImg:playmode_button_shuffle.pressed?"qrc:MATERIAL/MATERIAL_M8X_MEDIA_BUTTON_3_P"+bgImageStyle:(ipod_shuffelStatus == StatusList.IPOD_RANDOM_ALL)?"qrc:MATERIAL/MATERIAL_M8X_MEDIA_BUTTON_3_C"+bgImageStyle:"qrc:MATERIAL/MATERIAL_M8X_MEDIA_BUTTON_3"+bgImageStyle Image { id: playmode_button_shuffle_icon anchors.verticalCenter: playmode_button_shuffle.verticalCenter anchors.horizontalCenter: playmode_button_shuffle.horizontalCenter source:"qrc:MATERIAL/MATERIAL_M8X_ICON_SHUFFLE"+bgImageStyle } onClicked: { //ipodCtrl.ipod_random_repeat_ModeClick(); if(ipod_shuffelStatus == StatusList.IPOD_RANDOM_ALL) { ipodCtrl.ipod_randomModeClick(StatusList.IPOD_RANDOM_OFF) } else { ipodCtrl.ipod_randomModeClick(StatusList.IPOD_RANDOM_ALL) } } } HMIButton { id:playmode_button_repeat anchors.top: search_button.top anchors.left: playmode_button_shuffle.right anchors.leftMargin: -2 width: 106 height: 56 visible:(StatusList.DEVICE_NO_CONNECT == ipodCtrl.ipod_getDeviceConnectStatus())?true:(((ipod_which_apply == 1 )||(ipod_which_apply == 2 )||(ipod_third_apply == 1))?false:true) btnImg:playmode_button_repeat.pressed?"qrc:MATERIAL/MATERIAL_M8X_MEDIA_BUTTON_3_P"+bgImageStyle:"qrc:MATERIAL/MATERIAL_M8X_MEDIA_BUTTON_3"+bgImageStyle Image { id: playmode_button_repeat_icon anchors.verticalCenter: playmode_button_repeat.verticalCenter anchors.horizontalCenter: playmode_button_repeat.horizontalCenter source:(ipod_repeatStatus == StatusList.IPOD_REPEAT_ONE)? "qrc:MATERIAL/MATERIAL_M8X_ICON_REPEAT-ONE"+bgImageStyle: (ipod_repeatStatus == StatusList.IPOD_REPEAT_ALL)?"qrc:MATERIAL/MATERIAL_M8X_ICON_REPEAT-LIST"+bgImageStyle: "qrc:MATERIAL/MATERIAL_M8X_ICON_ORDER"+bgImageStyle } onClicked: { // ipodCtrl.ipod_random_repeat_ModeClick(); if(ipod_repeatStatus == StatusList.IPOD_REPEAT_ALL) { ipodCtrl.ipod_repeatModeClick(StatusList.IPOD_REPEAT_ONE) } else if(ipod_repeatStatus == StatusList.IPOD_REPEAT_OFF) { ipodCtrl.ipod_repeatModeClick(StatusList.IPOD_REPEAT_ALL) } else if(ipod_repeatStatus == StatusList.IPOD_REPEAT_ONE) { ipodCtrl.ipod_repeatModeClick(StatusList.IPOD_REPEAT_OFF) } } } Connections { target:ipodCtrl onIpod_shuffel_Changed: { ipod_shuffelStatus = ipodCtrl.ipod_shuffel_status if(ipod_shuffelStatus == StatusList.IPOD_RANDOM_ALL) { playmode_button_shuffle.btnImg = "qrc:MATERIAL/MATERIAL_M8X_MEDIA_BUTTON_3_C"+bgImageStyle } else { playmode_button_shuffle.btnImg = "qrc:MATERIAL/MATERIAL_M8X_MEDIA_BUTTON_3"+bgImageStyle } } onIpod_repeat_Changed: { ipod_repeatStatus = ipodCtrl.ipod_repeat_status if(ipod_repeatStatus == StatusList.IPOD_REPEAT_ALL) { playmode_button_repeat_icon.source = "qrc:MATERIAL/MATERIAL_M8X_ICON_REPEAT-LIST"+bgImageStyle } else if(ipod_repeatStatus == StatusList.IPOD_REPEAT_OFF) { playmode_button_repeat_icon.source = "qrc:MATERIAL/MATERIAL_M8X_ICON_ORDER"+bgImageStyle } else if(ipod_repeatStatus == StatusList.IPOD_REPEAT_ONE) { playmode_button_repeat_icon.source = "qrc:MATERIAL/MATERIAL_M8X_ICON_REPEAT-ONE"+bgImageStyle } } onIpod_apply_changed: { if((ipod_which_apply ==1 )||(ipod_which_apply ==2 )||(ipod_third_apply == 1)) { playmode_button_shuffle.visible = false playmode_button_repeat.visible = false } else { playmode_button_shuffle.visible = true playmode_button_repeat.visible = true } } onIpod_disconnect: { if(StatusList.DEVICE_NO_CONNECT == ipodCtrl.ipod_getDeviceConnectStatus()) { playmode_button_shuffle.visible = true playmode_button_repeat.visible = true } } } }