Item {
id: screen
- width: 800
- height: 480
+ width: 480
+ height: 800
state:"mainscreen"
Settings.restore_nomodel();
Script.createDateTimeDialog(screen);
Script.datetimedlg.toolbar.connect(show_toolbar);
+ Script.datetimedlg.updatedate.connect(update_date);
Script.amdatetimedlg.toolbar.connect(show_toolbar);
+ Script.amdatetimedlg.updatedate.connect(update_date);
Script.fullmonth.toolbar.connect(show_toolbar);
Script.fullmonth.updatedate.connect(update_date);
maindatemodel.init();
Script.curMonth = month;
Script.curYear = year;
Script.changeDay(day, txtTHU, txtInfo, txtDAYAmLich);
+ Script.fullmonth.m_day=Script.curDay;
+ Script.fullmonth.m_month=Script.curMonth;
+ Script.fullmonth.m_year=Script.curYear;
+ Script.fullmonth.reset();
}
Rectangle {
state:"jumptodate"
- /*Image {
+ Image {
source: theme_manager.theme.background_image; fillMode: Image.Stretch; anchors.fill: parent
opacity: theme_manager.theme.background_opacity
- }*/
+ }
MouseArea {
onDoubleClicked:{
if (Settings.doubleclicked()==1){
- screen.state="datetimedialog";
-
+ screen.state="switchX";
+ Script.datetimedlg.state="show";
}
}
}
text: name
font.bold: true
font.pixelSize: wrapper.PathView.isCurrentItem ? 80 : 40
- color: "black"
+ color: {
+ if (wrapper.PathView.isCurrentItem){
+ var stemp = Script.convertSolar2Lunar(txtDATEpv.currentIndex+1,curMonth,curYear,7);
+ if (Script.is_holiday(txtDATEpv.currentIndex+1,curMonth, stemp[0], stemp[1])){
+ return theme_manager.theme.markdate.holidays;
+ }else{
+ var mark_day = (Script.getLunarDate(txtDATEpv.currentIndex+1,curMonth,curYear).jd+1)%7;
+ if (mark_day === 0) //sunday
+ return theme_manager.theme.markdate.sunday;
+ if (mark_day == 6) //saturday
+ return theme_manager.theme.markdate.saturday;
+ else
+ return theme_manager.theme.markdate.otherday_selected;
+ }
+ }
+ else
+ return "transparent";//theme_manager.theme.markdate.otherday;
+ }
}
}
}
onMovementEnded: {
Script.changeDay(txtDATEpv.currentIndex+1, txtTHU, txtInfo, txtDAYAmLich);
+ Script.fullmonth.m_day=Script.curDay;
+ Script.fullmonth.m_month=Script.curMonth;
+ Script.fullmonth.m_year=Script.curYear;
+ Script.fullmonth.reset();
}
}
}
function menu_item_Clicked(id){
var qmlF = "";
- screen.state="switchX";
+ if (id!=1)
+ screen.state="switchX";
switch(id){
+ case 1: Script.reset_to_default_day(txtTHU, txtInfo, txtDAYAmLich);
+ txtDATEpv.currentIndex = Script.curDay-1;
+ screen.curMonth = Script.curMonth;
+ screen.curYear = Script.curYear;
+ Script.fullmonth.m_day= Script.curDay-1;
+ Script.fullmonth.m_month= Script.curMonth;
+ Script.fullmonth.m_year= Script.curYear;
+ break;
case 2: Script.amdatetimedlg.state="show";break;
case 3: Script.datetimedlg.state="show";break;
case 4: qmlF="XemNgayTotXauHoangDao";break;
Transition { NumberAnimation { properties: "x,y,opacity"; duration: 300; easing.type: Easing.InOutBack } }
]
-
- function reset(){
- /*calculateLunar(initcurDay, initcurMonth, initcurYear)
- LC.reset(initcurDay, initcurMonth, initcurYear)
- screen.state="mainscreen"
- maindatemodel.reset()
- txtDATEpv.currentIndex = initcurDay-1;*/
- }
-
}