import QtQuick 2.0 import "../com/neusoft/auto/widgets" import "../windowsList.js" as WindowsList import "../layoutList.js" as Layout import "mirrorlinkEvent.js" as MirrorEvent import Label 2.0 Item { width: 800 height: 346 property string imagePath: mirrorlinkCtrl.acImagePath property int appCount: mirrorlinkCtrl.appCount property bool intoApp : false property bool appEnable : true GridView{ id : appgrid width: 800 height: 346 model:mirrorlinkCtrl.getApplist() delegate: model_delegate cellHeight: 200 cellWidth: 200 interactive:false } Component{ id: model_delegate Item{ width : 200 height: 180 HMIButton{ id:icon btnImg: icon.pressed? imagePath+model.modelData.appImageNamePush :imagePath+model.modelData.appImageName enabled : appEnable onClicked: { console.log("-----------Mirrorlink_Half----click app ID-------------------------------",model.modelData.uiId); intoApp = true; mirrorlinkCtrl.sendMessageToPhonelink(66, model.modelData.uiId); //ScreenManager.changeForm(Layout.FM_MAXIMIZE,WindowsList.MIRRORLINK_MAIN); appEnable = false; //ADD BY lizhe in 20170825 cancelAppEnableTimer.restart(); } } HMILabel{ //x:24 y:110 width:180 height:26 anchors.horizontalCenter:icon.horizontalCenter text: systemCtrl.iLanguage === 1? model.modelData.appNameCN: model.modelData.appName } } } //ADD BY lizhe in 20170825 start Timer { id : cancelAppEnableTimer interval: 1500 onTriggered: { appEnable = true; } } //ADD BY lizhe in 20170825 end Connections{ target: mirrorlinkCtrl onAppListChanged:{ appgrid.model = mirrorlinkCtrl.getApplist(); } onSigPhonelinkDisplay: { console.log("!!!!!!!!!!!!!!!!!!!!!!!!!!onSigPhonelinkDisplay!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"); //MODIFY BY lizhe in 20170825 start if((ScreenManager.getFormInfo(WindowsList.MIRRORLINK_MAIN) &7) != 0 && (ScreenManager.getFormInfo(WindowsList.MIRRORLINK_MAIN) &7) != 4) { console.log("-[HMI]-[Mirrirlink_Half.qml]-------mirrorlink is show----------------"); ScreenManager.changeForm(Layout.FM_MAXIMIZE,WindowsList.MIRRORLINK_MAIN); appEnable = true; } else { console.log("-[HMI]-[Mirrirlink_Half.qml]-------mirrorlink is hided,need to return mirrorlink home----------------"); mirrorlinkCtrl.sendMessageToPhonelink(51,2); appEnable = true; } //MODIFY BY lizhe in 20170825 end } } }