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