import QtQuick 2.0 import Label 2.0 import "../com/neusoft/auto/widgets" import "coordinate.js" as CONFIG import "../layoutList.js" as Layout import "../windowsList.js" as WindowsList Item { property string bgImageStyle: systemCtrl.style property double expantnum:1.25 property bool showborrow: false property alias yearlistshow: yearListView.visible property alias yearlistback: yearBK.visible property alias monthlistback: monthBK.visible property alias monthlistshow:monthListView.visible property string getseldate:"" property string getseldatelunar:"" id:calendar width: 875 height: 800 onVisibleChanged: { mCalendar.goToCurMon(); mCalendar.setSelDate(mCalendar.currentDate); getseldate=CONFIG.getFormatDateString(mCalendar.selectedDate) getseldatelunar=mCalendar.GetSelectedDateLunar(mCalendar.selectedDate) } MouseArea{ anchors.fill: parent onClicked: { yearBK.visible = false; yearListView.visible = false; monthBK.visible = false; monthListView.visible = false; ScreenManager. hideOverlay (WindowsList.RMD_LIST_MASK) } } Connections{ target: mCalendar onCloselistyearandmonthChanged:{ yearBK.visible = false; yearListView.visible = false; monthBK.visible = false; monthListView.visible = false; ScreenManager. hideOverlay (WindowsList.RMD_LIST_MASK) } } Image { id:calendar_line x: 0 y: 75 width: 846 height: 20 source: CONFIG.CALENDAR_LINE_BG+bgImageStyle } Image { id:calendar_line1 x: 0 y: 130 width: 846 height: 20 source: CONFIG.CALENDAR_LINE_BG+bgImageStyle } Image { id:calendar_line2 x: 0 y: 240 width: 846 height: 20 source: CONFIG.CALENDAR_LINE_BG+bgImageStyle } Image { id:calendar_line3 x: 0 y: 350 width: 846 height: 20 source: CONFIG.CALENDAR_LINE_BG+bgImageStyle } Image { id:calendar_line4 x: 0 y: 460 width: 846 height: 20 source: CONFIG.CALENDAR_LINE_BG+bgImageStyle } Image { id:calendar_line5 x: 0 y: 570 width: 846 height: 20 source: CONFIG.CALENDAR_LINE_BG+bgImageStyle } Image { id:calendar_line6 x: 0 y: 680 width: 846 height: 20 source: CONFIG.CALENDAR_LINE_BG+bgImageStyle } Image { id:calendar_line7 x: 0 y: 790 width: 846 height: 20 source: CONFIG.CALENDAR_LINE_BG+bgImageStyle } HMIButton { id: btnYear x:0//CONFIG.LABEL_YAER1_LAY_XY[0] y:0//CONFIG.LABEL_YAER1_LAY_XY[1] btnImg: btnYear.pressed ||btnListYear.pressed ? "qrc:MATERIAL/MATERIAL_M8X_CALENDAR_BUTTON_W158_P" + bgImageStyle: "qrc:MATERIAL/MATERIAL_M8X_CALENDAR_BUTTON_W158"+ bgImageStyle HMILabel { id: year1Label x:25 width: 70 height: parent.height anchors.verticalCenter: parent.verticalCenter text: mCalendar.showingMonFriDay.getFullYear().toString() color:"white"// CONFIG.YEAR_TEXT_FONT_COLOR font.pixelSize: CONFIG.REMINDER_LABEL_FONT_SIZE } onClicked: { console.log("[HMIReminder_Main][btnYear][onClicked]") if(mCalendar.showingMonFriDay.getFullYear()-2-2015>0) { yearListView.positionViewAtIndex(mCalendar.showingMonFriDay.getFullYear()-2-2015, ListView.Beginning) }else { yearListView.positionViewAtIndex(0, ListView.Beginning) } if(yearBK.visible) { yearBK.visible = false; yearListView.visible = false; } else { yearBK.visible = true; yearListView.visible = true; } // if(yearlistshow||yearlistback||monthlistshow||monthlistback) // { // ScreenManager. showOverlay (WindowsList.RMD_LIST_MASK) // }else{ // ScreenManager. hideOverlay (WindowsList.RMD_LIST_MASK) // } } } HMIButton { id: btnListYear x: 112//CONFIG.BTN_YEAR_LAY_XY[0]^ y: 25//CONFIG.BTN_YEAR_LAY_XY[1]v btnImg: yearBK.visible ? CONFIG.BTN_YEAR_PUSHED_IMG+bgImageStyle : CONFIG.BTN_YEAR_IMG+bgImageStyle onClicked: { console.log("[HMIReminder][HMICanlendar][btnListYear][onClicked]yearListView.currentIndex =====>",yearListView.currentIndex) if(mCalendar.showingMonFriDay.getFullYear()-2-2015>0) { yearListView.positionViewAtIndex(mCalendar.showingMonFriDay.getFullYear()-2-2015, ListView.Beginning) }else { yearListView.positionViewAtIndex(0, ListView.Beginning) } if(yearBK.visible) { yearBK.visible = false; yearListView.visible = false; } else { yearBK.visible = true; yearListView.visible = true; } // if(yearlistshow||yearlistback||monthlistshow||monthlistback) // { // ScreenManager. showOverlay (WindowsList.RMD_LIST_MASK) // }else{ // ScreenManager. hideOverlay (WindowsList.RMD_LIST_MASK) // } } } HMIButton { id: btnMonth x: 160//CONFIG.LABEL_MON_LAY_XY[0] y: 0//CONFIG.LABEL_MON_LAY_XY[1] btnImg: btnMonth.pressed ||btnListMonth.pressed ? "qrc:MATERIAL/MATERIAL_M8X_CALENDAR_BUTTON_W158_P" + bgImageStyle : "qrc:MATERIAL/MATERIAL_M8X_CALENDAR_BUTTON_W158"+ bgImageStyle HMILabel { id: month1Label x:25 width: 70 height: parent.height anchors.verticalCenter: parent.verticalCenter text: ((mCalendar.showingMonFriDay.getMonth()+1) >= 10)?(mCalendar.showingMonFriDay.getMonth()+1):("0" + (mCalendar.showingMonFriDay.getMonth()+1)) color: CONFIG.MON_TEXT_FONT_COLOR font.pixelSize: CONFIG.REMINDER_LABEL_FONT_SIZE } onClicked: { // console.log("[HMIReminder_Main][btnMonth][onClicked]") if(mCalendar.showingMonFriDay.getMonth()-2>0) { monthListView.positionViewAtIndex(mCalendar.showingMonFriDay.getMonth()-2, ListView.Beginning) }else { monthListView.positionViewAtIndex(0, ListView.Beginning) } if(monthBK.visible) { monthBK.visible = false; monthListView.visible = false; } else { monthBK.visible = true; monthListView.visible = true; } // if(yearlistshow||yearlistback||monthlistshow||monthlistback) // { // ScreenManager. showOverlay (WindowsList.RMD_LIST_MASK) // }else{ // ScreenManager. hideOverlay (WindowsList.RMD_LIST_MASK) // } } } HMIButton { id: btnListMonth x: 271//CONFIG.BTN_MON_LAY_XY[0] y: 25//CONFIG.BTN_MON_LAY_XY[1] btnImg: monthBK.visible ? CONFIG.BTN_MON_PUSHED_IMG + bgImageStyle : CONFIG.BTN_MON_IMG + bgImageStyle onClicked: { // console.log("[HMIReminder][HMICanlendar][btnListMonth][onClicked]monthListView.currentIndex =====>",monthListView.currentIndex) if(mCalendar.showingMonFriDay.getMonth()-2>0) { monthListView.positionViewAtIndex(mCalendar.showingMonFriDay.getMonth()-2, ListView.Beginning) }else { monthListView.positionViewAtIndex(0, ListView.Beginning) } if(monthBK.visible) { monthBK.visible = false; monthListView.visible = false; } else { monthBK.visible = true; monthListView.visible = true; } // if(yearlistshow||yearlistback||monthlistshow||monthlistback) // { // ScreenManager. showOverlay (WindowsList.RMD_LIST_MASK) // }else{ // ScreenManager. hideOverlay (WindowsList.RMD_LIST_MASK) // } } } HMILabel { id: selectedDateLable x: 338//(218-CONFIG.HMIWINDOW_LAY_XY[0])*expantnum //315 y: 19//(136-CONFIG.HMIWINDOW_LAY_XY[1])*expantnum//0 width: 390//425*expantnum //390 height: 36//36*expantnum //70 font.pixelSize: 26//CONFIG.REMINDER_BTN_FONT_SIZE verticalAlignment: Label.AlignVCenter horizontalAlignment: Label.AlignHCenter text: getseldate +" " + getseldatelunar color:CONFIG.REMINDER_BTN_LABEL_FONT_COLOR } HMIButton { id: btnToday x: 708//(CONFIG.BTN_TODAY_LAY_XY[0]-CONFIG.HMIWINDOW_LAY_XY[0])*expantnum y: 0//(CONFIG.BTN_TODAY_LAY_XY[1]-CONFIG.HMIWINDOW_LAY_XY[1])*expantnum width:138 //76*expantnum height: 70//30*expantnum btnImg: btnToday.pressed ? "qrc:MATERIAL/MATERIAL_M8X_BACK_BUTTON_P" + bgImageStyle : "qrc:MATERIAL/MATERIAL_M8X_BACK_BUTTON" + bgImageStyle HMILabel { id: todayLable width: parent.width height: parent.height anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter font.pixelSize: 30//CONFIG.REMINDER_BTN_FONT_SIZE text:qsTr("Today") + systemCtrl.emptyString color:CONFIG.REMINDER_BTN_LABEL_FONT_COLOR } onClicked: { // console.log("[HMIReminder_Main][btnToday][onClicked]") mCalendar.goToCurMon(); mCalendar.setSelDate(mCalendar.currentDate); yearBK.visible = false; yearListView.visible = false; monthBK.visible = false; monthListView.visible = false; ScreenManager. hideOverlay (WindowsList.RMD_LIST_MASK) } } Row { id:weekLayout x:0 //CONFIG.WEEK_LABEL_LAY_XY[0]*expantnum y: 94//CONFIG.WEEK_LABEL_LAY_XY[1]*expantnum width: 846//CONFIG.WEEK_LABEL_WIDTH*expantnum height: 22//CONFIG.WEEK_LABEL_HEIGHT*expantnum HMILabel { height: parent.height width: 120//100*expantnum anchors.top: parent.top anchors.bottom: parent.bottom text: qsTr("Sun") + systemCtrl.emptyString color: CONFIG.WEEKEND_LABEL_FONT_COLOR wrapMode: Text.AlignHCenter font.pixelSize: 20//CONFIG.WEEK_LABEL_FONT_SIZE } HMILabel { height: parent.height width: 120//100*expantnum anchors.top: parent.top anchors.bottom: parent.bottom text: qsTr("Mon") + systemCtrl.emptyString color: CONFIG.WEEKDAY_LABEL_FONT_COLOR wrapMode: Text.AlignHCenter font.pixelSize: CONFIG.WEEK_LABEL_FONT_SIZE } HMILabel { height: parent.height width: 120 anchors.top: parent.top anchors.bottom: parent.bottom text: qsTr("Tue") + systemCtrl.emptyString color: CONFIG.WEEKDAY_LABEL_FONT_COLOR wrapMode: Text.AlignHCenter font.pixelSize: CONFIG.WEEK_LABEL_FONT_SIZE } HMILabel { height: parent.height width: 120//100*expantnum anchors.top: parent.top anchors.bottom: parent.bottom text: qsTr("Wed") + systemCtrl.emptyString color: CONFIG.WEEKDAY_LABEL_FONT_COLOR wrapMode: Text.AlignHCenter font.pixelSize: CONFIG.WEEK_LABEL_FONT_SIZE } HMILabel { height: parent.height width: 120 anchors.top: parent.top anchors.bottom: parent.bottom text: qsTr("Thu") + systemCtrl.emptyString color: CONFIG.WEEKDAY_LABEL_FONT_COLOR wrapMode: Text.AlignHCenter font.pixelSize: CONFIG.WEEK_LABEL_FONT_SIZE } HMILabel { height: parent.height width: 120 anchors.top: parent.top anchors.bottom: parent.bottom text: qsTr("Fri") + systemCtrl.emptyString color: CONFIG.WEEKDAY_LABEL_FONT_COLOR wrapMode: Text.AlignHCenter font.pixelSize: CONFIG.WEEK_LABEL_FONT_SIZE } HMILabel { height: parent.height width: 120 anchors.top: parent.top anchors.bottom: parent.bottom text: qsTr("Sat") + systemCtrl.emptyString color: CONFIG.WEEKEND_LABEL_FONT_COLOR wrapMode: Text.AlignHCenter font.pixelSize: CONFIG.WEEK_LABEL_FONT_SIZE } } HMISwipeArea { id: swipeArea threshold: 125 x:CONFIG.DATE_LAY_XY[0]*expantnum y:CONFIG.DATE_LAY_XY[1]*expantnum width:CONFIG.DATE_LAY_WIDTH*expantnum height:CONFIG.DATE_LAY_HEIGHT*expantnum onSwipeLeft:{ // console.log("[HMIReminder][HMICanlendar][onSwapeLeft]-->") mCalendar.goToNxtMon(); yearBK.visible = false; yearListView.visible = false; monthBK.visible = false; monthListView.visible = false; } onSwipeRight:{ // console.log("[HMIReminder][HMICanlendar][onSwipeRight]-->") mCalendar.goToPreMon(); yearBK.visible = false; yearListView.visible = false; monthBK.visible = false; monthListView.visible = false; } } Rectangle{ x:0 y:75 width: 846 height: 53 color: "green" opacity: 0 MouseArea{ anchors.fill: parent onClicked: { yearBK.visible = false; yearListView.visible = false; monthBK.visible = false; monthListView.visible = false; ScreenManager. hideOverlay (WindowsList.RMD_LIST_MASK) } } } Item { id:dateLayout x:0//CONFIG.DATE_LAY_XY[0] y:130//CONFIG.DATE_LAY_XY[1] width:875 //CONFIG.DATE_LAY_WIDTH height:665//CONFIG.DATE_LAY_HEIGHT Component { id:dateCmp HMIDateItem { solarLabel:modelData.isDateInShowingMon?true : false lunarLable:modelData.isDateInShowingMon?true : false lunarLable2: ((modelData.lunarTextCount) == 2 && (modelData.isDateInShowingMon))?true:false //ADD FOR DOUBLE LUNAR TEXT 20170720 itemImg: modelData.isSelected || datebuttonpressed ?"qrc:MATERIAL/MATERIAL_M8X_CALENDAR_BUTTON_P"+bgImageStyle:"" Image { id: todayimg visible:modelData.isToday?true:false source: "qrc:MATERIAL/MATERIAL_M8X_CALENDAR_BUTTON_TODAY"+bgImageStyle } hasEvt: modelData.isDateInShowingMon?(modelData.isDateHasEvt?true:false):false isInShowingMon: modelData.isDateInShowingMon?true:false solarLabelSize: 30//CONFIG.DATEITEM_SOLAR_FONT_SIZE lunarLabelSize: 16//CONFIG.DATEITEM_LUNAR_FONT_SIZE lunarLabelSize2:16 //ADD FOR DOUBLE LUNAR TEXT 20170720 solarlabelText: modelData.solarText solarLabelColor: modelData.isDateInShowingMon?(modelData.isToday?CONFIG.DATEITEM_FESTIVAL_FONT_COLOR:CONFIG.DATEITEM_IN_MON_FONT_COLOR ) : CONFIG.DATEITEM_OUT_MON_FONT_COLOR lunarlabelText: modelData.lunarText lunarlabelText2:modelData.lunarText2 //ADD FOR DOUBLE LUNAR TEXT 20170720 lunarLabelColor: modelData.isDateInShowingMon? (modelData.isFestival?CONFIG.DATEITEM_FESTIVAL_FONT_COLOR:CONFIG.DATEITEM_IN_MON_FONT_COLOR) : CONFIG.DATEITEM_OUT_MON_FONT_COLOR lunarLabel2Color:"white" //ADD FOR DOUBLE LUNAR TEXT 20170720 isBeep: modelData.isDateInShowingMon?true:false onClicked: { // console.log("[HMIReminder][HMICanlendar][onClicked]-->[dateItem:",index); if(modelData.isDateInShowingMon) { //wsl 2016.1.8 // console.log("[HMIReminder][HMICanlendar][onClicked]-->reminderCtrl.isMainPageFullScr:",reminderCtrl.isMainPageFullScr); mEvtManage.isEvtListOfShowingClicked = false; mCalendar.setSelDate(modelData.getShowingDate()); yearBK.visible = false; yearListView.visible = false; monthBK.visible = false; monthListView.visible = false; ScreenManager.hideOverlay (WindowsList.RMD_LIST_MASK) }else { yearBK.visible = false; yearListView.visible = false; monthBK.visible = false; monthListView.visible = false; ScreenManager. hideOverlay (WindowsList.RMD_LIST_MASK) } } onPressed: { swipeArea.swipePressed(mouse.x); } onReleased: { swipeArea.swipeReleased(mouse.x); } } } GridView{ id: dateGridView clip: true anchors.fill: parent model: mCalendar.getDateItemList() delegate: dateCmp cellWidth: 120 cellHeight: 110 interactive: false focus: true } } ListModel { id:yearModel // ListElement // { // year:"1910" // } // ListElement // { // year:"1911" // } // ListElement // { // year:"1912" // } // ListElement // { // year:"1913" // } // ListElement // { // year:"1914" // } // ListElement // { // year:"1915" // } // ListElement // { // year:"1916" // } // ListElement // { // year:"1917" // } // ListElement // { // year:"1918" // } // ListElement // { // year:"1919" // } // ListElement // { // year:"1920" // } // ListElement // { // year:"1921" // } // ListElement // { // year:"1922" // } // ListElement // { // year:"1923" // } // ListElement // { // year:"1924" // } // ListElement // { // year:"1925" // } // ListElement // { // year:"1926" // } // ListElement // { // year:"1927" // } // ListElement // { // year:"1928" // } // ListElement // { // year:"1929" // } // ListElement // { // year:"1930" // } // ListElement // { // year:"1931" // } // ListElement // { // year:"1932" // } // ListElement // { // year:"1933" // } // ListElement // { // year:"1934" // } // ListElement // { // year:"1935" // } // ListElement // { // year:"1936" // } // ListElement // { // year:"1937" // } // ListElement // { // year:"1938" // } // ListElement // { // year:"1939" // } // ListElement // { // year:"1940" // } // ListElement // { // year:"1941" // } // ListElement // { // year:"1942" // } // ListElement // { // year:"1943" // } // ListElement // { // year:"1944" // } // ListElement // { // year:"1945" // } // ListElement // { // year:"1946" // } // ListElement // { // year:"1947" // } // ListElement // { // year:"1948" // } // ListElement // { // year:"1949" // } // ListElement // { // year:"1950" // } // ListElement // { // year:"1951" // } // ListElement // { // year:"1952" // } // ListElement // { // year:"1953" // } // ListElement // { // year:"1954" // } // ListElement // { // year:"1955" // } // ListElement // { // year:"1956" // } // ListElement // { // year:"1957" // } // ListElement // { // year:"1958" // } // ListElement // { // year:"1959" // } // ListElement // { // year:"1960" // } // ListElement // { // year:"1961" // } // ListElement // { // year:"1962" // } // ListElement // { // year:"1963" // } // ListElement // { // year:"1964" // } // ListElement // { // year:"1965" // } // ListElement // { // year:"1966" // } // ListElement // { // year:"1967" // } // ListElement // { // year:"1968" // } // ListElement // { // year:"1969" // } // ListElement // { // year:"1970" // } // ListElement // { // year:"1971" // } // ListElement // { // year:"1972" // } // ListElement // { // year:"1973" // } // ListElement // { // year:"1974" // } // ListElement // { // year:"1975" // } // ListElement // { // year:"1976" // } // ListElement // { // year:"1977" // } // ListElement // { // year:"1978" // } // ListElement // { // year:"1979" // } // ListElement // { // year:"1980" // } // ListElement // { // year:"1981" // } // ListElement // { // year:"1982" // } // ListElement // { // year:"1983" // } // ListElement // { // year:"1984" // } // ListElement // { // year:"1985" // } // ListElement // { // year:"1986" // } // ListElement // { // year:"1987" // } // ListElement // { // year:"1988" // } // ListElement // { // year:"1989" // } // ListElement // { // year:"1990" // } // ListElement // { // year:"1991" // } // ListElement // { // year:"1992" // } // ListElement // { // year:"1993" // } // ListElement // { // year:"1994" // } // ListElement // { // year:"1995" // } // ListElement // { // year:"1996" // } // ListElement // { // year:"1997" // } // ListElement // { // year:"1998" // } // ListElement // { // year:"1999" // } // ListElement // { // year:"2000" // } // ListElement // { // year:"2001" // } // ListElement // { // year:"2002" // } // ListElement // { // year:"2003" // } // ListElement // { // year:"2004" // } // ListElement // { // year:"2005" // } // ListElement // { // year:"2006" // } // ListElement // { // year:"2007" // } // ListElement // { // year:"2008" // } // ListElement // { // year:"2009" // } // ListElement // { // year:"2010" // } // ListElement // { // year:"2011" // } // ListElement // { // year:"2012" // } // ListElement // { // year:"2013" // } // ListElement // { // year:"2014" // } ListElement { year:"2015" } ListElement { year:"2016" } ListElement { year:"2017" } ListElement { year:"2018" } ListElement { year:"2019" } ListElement { year:"2020" } ListElement { year:"2021" } ListElement { year:"2022" } ListElement { year:"2023" } ListElement { year:"2024" } ListElement { year:"2025" } ListElement { year:"2026" } ListElement { year:"2027" } ListElement { year:"2028" } ListElement { year:"2029" } ListElement { year:"2030" } ListElement { year:"2031" } ListElement { year:"2032" } ListElement { year:"2033" } ListElement { year:"2034" } ListElement { year:"2035" } ListElement { year:"2036" } ListElement { year:"2037" } ListElement { year:"2038" } ListElement { year:"2039" } ListElement { year:"2040" } ListElement { year:"2041" } ListElement { year:"2042" } ListElement { year:"2043" } ListElement { year:"2044" } ListElement { year:"2045" } ListElement { year:"2046" } ListElement { year:"2047" } ListElement { year:"2048" } ListElement { year:"2049" } ListElement { year:"2050" } ListElement { year:"2051" } ListElement { year:"2052" } ListElement { year:"2053" } ListElement { year:"2054" } ListElement { year:"2055" } ListElement { year:"2056" } ListElement { year:"2057" } ListElement { year:"2058" } ListElement { year:"2059" } ListElement { year:"2060" } ListElement { year:"2061" } ListElement { year:"2062" } ListElement { year:"2063" } ListElement { year:"2064" } ListElement { year:"2065" } ListElement { year:"2066" } ListElement { year:"2067" } ListElement { year:"2068" } ListElement { year:"2069" } ListElement { year:"2070" } ListElement { year:"2071" } ListElement { year:"2072" } ListElement { year:"2073" } ListElement { year:"2074" } ListElement { year:"2075" } ListElement { year:"2076" } ListElement { year:"2077" } // ListElement // { // year:"2078" // } } ListModel { id:monthModel ListElement { month:"01" } ListElement { month:"02" } ListElement { month:"03" } ListElement { month:"04" } ListElement { month:"05" } ListElement { month:"06" } ListElement { month:"07" } ListElement { month:"08" } ListElement { month:"09" } ListElement { month:"10" } ListElement { month:"11" } ListElement { month:"12" } } Item { id: yearItem x:0 y:70 width:158 height:400 Image { id:yearBK width:158 height:400 visible: false source: "qrc:MATERIAL/MATERIAL_M8X_TIME_W158_BG"+bgImageStyle } Component { id:yearCmp HMIButton { id: btnYearList width:158 height:78 btnImg: btnYearList.pressed ? "qrc:MATERIAL/MATERIAL_M8X_TIME_W158_BG_CHECKED" + bgImageStyle : "" HMILabel { id: yLabel text: year width:158 height:78 anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter font.pixelSize: CONFIG.REMINDER_LABEL_FONT_SIZE color:"#e5e5e5" } onClicked: { if(index-2>0) { yearListView.currentIndex=index yearListView.positionViewAtIndex(index-2, ListView.Beginning) // console.log("current index:",index) }else { yearListView.positionViewAtIndex(0, ListView.Beginning) } yearBK.visible = false; yearListView.visible = false; mCalendar.SetYear(index); yearListView.currentIndex = mCalendar.showingMonFriDay.getFullYear()-2015; // console.log("[HMIReminder][HMICanlendar][yLabel][onClicked]index ===> ",index) // if(yearlistshow||yearlistback||monthlistshow||monthlistback) // { // ScreenManager. showOverlay (WindowsList.RMD_LIST_MASK) // }else{ // ScreenManager. hideOverlay (WindowsList.RMD_LIST_MASK) // } } onPressed: { // console.log("*******[HMIReminder]______current index"+index) } } } HMIListView { id: yearListView spacing: 0 clip: true x: 0 y: 0 width:158 height:400 visible:false model: yearModel delegate: yearCmp snapMode: ListView.SnapOneItem focus: true highlightFollowsCurrentItem: true flickableDirection: Flickable.VerticalFlick rightMargin:0 boundsBehavior: Flickable.StopAtBounds } } Item { id: monthItem x:160 y:70 width:158 height:400 Image { id:monthBK width:158 height:400 visible: false source: "qrc:MATERIAL/MATERIAL_M8X_TIME_W158_BG"+bgImageStyle } Component { id:monthCmp HMIButton { id: btnmonthList width:158 height:78 btnImg: btnmonthList.pressed ? "qrc:MATERIAL/MATERIAL_M8X_TIME_W158_BG_CHECKED" + bgImageStyle : "" HMILabel { id: mLabel text: month width:158 height:78 anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter font.pixelSize:CONFIG.REMINDER_LABEL_FONT_SIZE x:0 color:"#e5e5e5" } onClicked: { if(index-2>0) { monthListView.currentIndex=index monthListView.positionViewAtIndex(index-2, ListView.Beginning) // console.log("current index:",index) }else { monthListView.positionViewAtIndex(0, ListView.Beginning) } monthBK.visible = false; monthListView.visible = false; mCalendar.SetMonth(index); monthListView.currentIndex=mCalendar.showingMonFriDay.getMonth(); // console.log("[HMIReminder][HMICanlendar][yLabel][onClicked]index ===> ",index) // if(yearlistshow||yearlistback||monthlistshow||monthlistback) // { // ScreenManager. showOverlay (WindowsList.RMD_LIST_MASK) // }else{ // ScreenManager. hideOverlay (WindowsList.RMD_LIST_MASK) // } } } } HMIListView { id: monthListView spacing: 0 clip: true x: 0 y: 0 width: 158 height:400 visible:false model: monthModel delegate: monthCmp snapMode: ListView.SnapOneItem focus: true flickableDirection: Flickable.VerticalFlick rightMargin:0 boundsBehavior: Flickable.StopAtBounds } } /*========================================Connections Start===========================================*/ Connections { target: mEvtManage onEvtDBChanged: { // console.log("[Reminder_Main][HMICalendar][onEvtDBChanged]-->]----->3") //reminderCtrl.refreshEvtMonthView()//del by yx } } Connections { target: mCalendar onSelDateChanged: { // console.log("[Reminder_Main][HMICalendar][onSelDateChanged]-->]------------>") // selectedDateLable.text = CONFIG.getFormatDateString(mCalendar.selectedDate) +" " + mCalendar.GetSelectedDateLunar(mCalendar.selectedDate); getseldate=CONFIG.getFormatDateString(mCalendar.selectedDate) getseldatelunar=mCalendar.GetSelectedDateLunar(mCalendar.selectedDate) } } //ADD FOR #179095 BY YAOJIAN 20170531 START Connections { target:systemCtrl onPowerNotice: { if (!status) { monthListView.enabled = false yearListView.enabled = false } else { monthListView.enabled = true yearListView.enabled = true } } } //ADD FOR #179095 BY YAOJIAN 20170531 END /*========================================Connections End=============================================*/ /*========================================Function Start==============================================*/ /*========================================Function End================================================*/ }