import QtQuick 2.0 import Label 2.0 import "../com/neusoft/auto/widgets" import "../layoutList.js" as Layout import "../windowsList.js" as WindowsList Item { property int iYear: settingCtrl.iYear property int iMonth: settingCtrl.iMonth property int iDay: settingCtrl.iDay Item { id:hometodaybar x:797 y:52 width: 140 height: 51 HMILabel { id: date x:-25 y:25//time.y//139-70 //106-70 //FOD #122439 2016/10/19 LIDUO begin width:165 //width: 121 //FOD #122439 2016/10/19 LIDUO end height:26 //ADD F0033 2016/10/12 liduo begin color: "white" font.pixelSize:22 horizontalAlignment: Text.AlignRight Timer { interval: 1000 running: visible repeat: true triggeredOnStart: true onTriggered: { var mouth="" var day="" //update by zlx 2019/3/8 #315774 begin if((iYear > 2017)&&(iYear < 2038)) //update by zlx 2019/3/8 #315774 begin { if(iMonth > 9) { mouth = iMonth; } else { mouth = "0"+iMonth; } if(iDay > 9) { day = iDay; } else { day = "0"+iDay; } parent.text =day+"/"+mouth +"/"+iYear } //add by plc for #321777 else { console.log("@ZLX**text.date*else*TIME**iYear=**"+iYear+"\n") console.log("@ZLX**text.date*else*TIME**iMonth=**"+iMonth+"\n") console.log("@ZLX**text.date*else*TIME**iDay=**"+iDay+"\n") parent.text = "-"+"-"+"/"+"-"+"-"+"/"+"-"+"-"+"-"+"-" } } } } HMILabel { id: week x:-25 y:0//139-70 width: 165 height: 25 color: "white" font.pixelSize: 22 horizontalAlignment: Text.AlignRight Timer { interval: 1000 running: visible?true:false repeat: true triggeredOnStart: true onTriggered: { if(iYear < 2038) { parent.text =systemCtrl.sysGetWeeksName(iYear,iMonth,iDay) } else { parent.text = "" } } } } HMIMouseArea { id:tadaybar_mousearea x:-25 y:0 width: 165 height: 51 onClicked: { settingCtrl.bTimeBackVisible=true; ScreenManager.changeForm(Layout.ACT_HOME,WindowsList.SETTING_TIME_DATE); systemCtrl.setActionFlagForCarPlay(true)//add by menghui for CarPlay 2018/10/12 // console.log("getActionFlagForCarPlay="+systemCtrl.getActionFlagForCarPlay()+"111111111111111")//add menghui } onPressed: { date.color = "#ff7081" week.color = "#ff7081" } onReleased: { date.color = "white" week.color = "white" } onCanceled: { date.color = "white" week.color = "white" } } } }