* ready to release new version 1.0.3
[lichviet] / qml / LichViet / About.qml
1 /*
2 Copyright (C) 2011  by Cuong Le <metacuong@gmail.com>
3
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 2 of the License, or
7 (at your option) any later version.
8
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.
13
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/>
16 */
17 import QtQuick 1.1
18
19 import "Themes.js" as Themes
20
21 Item{
22     
23     id: aboutdlg
24     
25     anchors.verticalCenter: parent.verticalCenter
26     width: parent.width; height: parent.height;
27     x:(parent.width * 1.5)
28
29     signal close
30     
31     Loader {
32         id: theme_manager
33         property alias theme: theme_manager.item
34         source: Themes.default_theme()
35         }
36
37     Connections {
38         target: aboutdlg.parent
39         
40         onDialogClose: {
41             aboutdlg.state = "close";
42             aboutdlg.destroy(600);
43             }
44         }
45
46     
47     Rectangle {
48         id: rectangle1
49         anchors.fill: parent; anchors.bottomMargin: 0
50         visible: true
51         opacity:0.8
52         
53         Image {
54             id: image1
55             x: 0
56             y: 43
57             width: 100
58             height: 100
59             anchors.horizontalCenterOffset: 0
60             anchors.horizontalCenter: parent.horizontalCenter
61             source: "qrc:/LichViet.png"
62             
63             Text {
64                 id: text3
65                 x: 10
66                 y: 261
67                 height: 20
68                 text: "Chương trình có tham khảo thuật toán tính <br>Âm Lịch của tác giả Hồ Ngọc Đức.<br><a href='http://www.informatik.uni-leipzig.de/~duc/amlich/'>http://www.informatik.uni-leipzig.de/~duc/amlich/</a>"
69                 anchors.horizontalCenterOffset: 0
70                 anchors.horizontalCenter: parent.horizontalCenter
71                 verticalAlignment: Text.AlignVCenter
72                 horizontalAlignment: Text.AlignHCenter
73                 font.pixelSize: 16
74                 }
75             }
76         
77         Text {
78             id: text1
79             x: 11
80             y: 171
81             height: 20
82             text: "Lịch Âm Việt Nam <br> OS: Maemo 5 (Fremantle)"
83             anchors.horizontalCenterOffset: 1
84             font.bold: true
85             anchors.horizontalCenter: parent.horizontalCenter
86             horizontalAlignment: Text.AlignHCenter
87             verticalAlignment: Text.AlignVCenter
88             font.pixelSize: 23
89             }
90         
91         Text {
92             id: text2
93             x: 10
94             y: 234
95             height: 20
96             text: "Phiên bản : 1.0.2-4 (15/09/2011)<br>\
97 Phát triển bởi : <a href='mailto:metacuong@gmail.com'>metacuong@gmail.com</a>"
98             anchors.horizontalCenterOffset: 0
99             wrapMode: Text.NoWrap
100             verticalAlignment: Text.AlignVCenter
101             horizontalAlignment: Text.AlignHCenter
102             anchors.horizontalCenter: parent.horizontalCenter
103             font.pixelSize: 24
104             }
105         
106         
107         }
108
109     Rectangle {
110         width : aboutdlg.width
111         height: 45
112         color:"white"
113         opacity: 0.5
114         }
115     
116     Text {
117         id: title
118         
119         anchors { horizontalCenter: aboutdlg.horizontalCenter; top: aboutdlg.top; topMargin: 10 }
120         font.pixelSize: 22
121         color: "black"
122         text: qsTr("About")
123         smooth: true
124         font.bold: true
125         }
126     
127     
128     ToolBarSingle {
129         id: toolBar; height: 42;
130         y: parent.height-52
131         width: parent.width;
132         button1Label: "Quay Về"
133         onButton1Clicked:aboutdlg.close()
134         }
135     
136     states: [
137         State {
138             name: "show"
139             AnchorChanges { target: aboutdlg; anchors.right: parent.right }
140             },
141         State {
142             name: "close"
143             AnchorChanges { target: aboutdlg; anchors.right: parent.left }
144             }
145         ]
146     
147     transitions: Transition {
148         AnchorAnimation { easing.type: Easing.OutQuart; duration: 300 }
149         }
150     
151     }