* debian/* cleanup and update
[lichviet-widget] / qml / lichvietwidget / main.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 3 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
18 import QtQuick 1.0
19 import "main.js" as Main
20
21 Item {
22     id: lichvietwidget
23
24     width: 344
25     height: 200
26
27     Rectangle {
28         id: lvwidgetrec
29         color: "#272020"
30         radius: 8
31         opacity: 0.7
32         anchors.fill: parent
33
34         Text {
35             id: txt_title
36             x: 133
37             y: 169
38             color: "#ffffff"
39             text: "Lịch Việt"
40             style: Text.Raised
41             font.bold: true
42             wrapMode: Text.WrapAnywhere
43             verticalAlignment: Text.AlignVCenter
44             horizontalAlignment: Text.AlignHCenter
45             font.pixelSize: 18
46             font.family: "Tahoma"
47         }
48     }
49
50     Rectangle {
51         id: rectangle1
52         x: 5
53         y: 5
54         width: 336
55         height: 157
56         anchors.fill: parent
57         radius: 8
58         gradient: Gradient {
59             GradientStop {
60                 position: 0
61                 color: "#000000"
62             }
63
64             GradientStop {
65                 position: 0.03
66                 color: "#f0eef7"
67             }
68         }
69         clip: true
70         smooth: true
71         z: 0
72         anchors.rightMargin: 5
73         anchors.bottomMargin: 40
74         anchors.leftMargin: 5
75         anchors.topMargin: 5
76         border.color: "#6382c6"
77         border.width: 1
78         opacity: 0.9
79
80         Image {
81             id: day_left_img
82             x: -5
83             y: -1
84             width: 100
85             height: 100
86             source: "imgs/1.png"
87             visible:false
88         }
89
90         Image {
91             id: day_right_img
92             x: 74
93             y: -1
94             width: 100
95             height: 100
96             visible: false
97             source: "imgs/4.png"
98         }
99
100         Image {
101             id: day_center_img
102             x: 33
103             y: -1
104             width: 100
105             height: 100
106             source: "imgs/4.png"
107             visible: false
108         }
109
110         Image {
111             id: month_right_img
112             x: 245
113             y: 5
114             width: 50
115             height: 47
116         }
117
118         Image {
119             id: month_left_img
120             x: 206
121             y: 5
122             width: 50
123             height: 47
124         }
125
126         Image {
127             id: year_1_img
128             x: 167
129             y: 45
130             width: 50
131             height: 47
132         }
133
134         Image {
135             id: year_2_img
136             x: 206
137             y: 45
138             width: 50
139             height: 47
140         }
141
142         Image {
143             id: year_3_img
144             x: 245
145             y: 45
146             width: 50
147             height: 47
148         }
149
150         Image {
151             id: year_4_img
152             x: 284
153             y: 45
154             width: 50
155             height: 47
156         }
157
158         Text {
159             id: txt_detail
160             x: 62
161             y: 99
162             width: 205
163             color: "#1a1d20"
164             text: ""
165             verticalAlignment: Text.AlignVCenter
166             wrapMode: Text.NoWrap
167             style: Text.Normal
168             font.family: "Tahoma"
169             horizontalAlignment: Text.AlignHCenter
170             font.pixelSize: 20
171         }
172     }
173
174     Timer {
175         interval: 1000; running: true; repeat: true
176         onTriggered: Main.refresh(day_center_img, day_left_img, day_right_img, month_left_img, month_right_img, year_1_img, year_2_img,year_3_img,year_4_img, txt_detail)
177     }
178
179 }