2 Copyright (C) 2011 by Cuong Le <metacuong@gmail.com>
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>
20 import "amlich-hnd.js" as AmLich
21 import "xemngaytotxau.js" as NTX
28 anchors.rightMargin: 0
31 anchors.fill: parent; anchors.bottomMargin: 16
41 width:rectangle1.width;
45 border.color: "#b57e8f"
48 width:rectangle1.width
51 width:rectangle1.width;
55 Text { x:5;y:50;text:getHD(name,idm) ;textFormat: Text.RichText;wrapMode: Text.WordWrap; font.pixelSize: 20
56 font.family: "Tahoma";width:parent.width;}
59 width:rectangle1.width;
71 lheight:55;idm:0;name: "";
74 lheight:30;idm:-1;name: "";
77 lheight:85;idm:1;name: "<b>Giờ Hoàng Đạo</b>";
80 lheight:55;idm:2;name: "<b>Tiết Khí</b>";
83 lheight:55;idm:3;name: "<b>Nhị Thập Bát Tú</b>";
86 lheight:80;idm:6;name: "<b>Các sao tốt</b>";
89 lheight:80;idm:7;name: "<b>Các sao xấu</b>";
92 lheight:120;idm:5;name: "<b>Ngày Tốt/Xấu</b>";
100 anchors.fill: parent;anchors.topMargin: 0;anchors.leftMargin: 0; anchors.bottomMargin: 16
102 delegate: listDelegate
108 ToolBarSingle { id: toolBar; height: 50;
111 button1Label: "Quay Về"
114 screen.state="mainscreen"
118 function getHD(name,idm){
120 name="<span style='color:blue;'>"+name+"</span><br>";
125 case 0 : return name+AmLich.getTHU(screen.jd)+",ngày <b>"+screen.curDay+"</b> tháng <b>"+screen.curMonth+"</b> năm <b>"+screen.curYear+"</b><br>Ngày <b>"+screen.lunarDay+"</b> tháng <b>"+screen.lunarMonth+"</b> năm <b>"+screen.lunarYear+"</b> (<b>"+screen.lunarYearInt+"</b>)";break;
126 case 1 : return name+screen.lunarGioHoangDao;break;
127 case 2 : return name+screen.lunarTietKhi();break;
128 case 3 : return name+NTX.sao(screen.curYear,AmLich.getLunarDate(screen.curDay,screen.curMonth,screen.curYear).jd - AmLich.getLunarDate(1,1,screen.curYear).jd);break;
129 case 5 : return name+NTX.luangiai(screen.curDay);break;
130 case -1: return name+NTX.truc(screen.lunarMonth, screen.lunarDayCanChi, screen.lunarMonthCanChi);break;//"Là ngày: <b>Thiên Lao Hắc Đạo</b> Trực: <b>Định</b>"
131 case 6: return name+NTX.cacsaotot(screen.lunarMonth, screen.lunarDayCanChi);break;
132 case 7: return name+NTX.cacsaoxau(screen.lunarMonth, screen.lunarDayCanChi);break;
137 Transition { NumberAnimation { properties: "x,y,opacity"; duration: 500; easing.type: Easing.InOutBack } }