-
Notifications
You must be signed in to change notification settings - Fork 0
/
WeatherInfo.qml
64 lines (55 loc) · 1.33 KB
/
WeatherInfo.qml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import QtQuick 2.0
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.15
Column {
spacing: 2
property string weatherStatus
property string weatherStatusIconPath
property double temperature
property double humidity
property double windSpeed
property double rain
property int uvIndex
Image {
id: weatherStatusIcon
width: 100; height: 100
anchors.horizontalCenter: parent.horizontalCenter
source: weatherStatusIconPath
scale: 1.8
}
Label {
id: temperatureLabel
anchors.horizontalCenter: parent.horizontalCenter
text: temperature + "°C"
font.pointSize: 42
}
Label {
id: statusLabel
text: "Status: " + weatherStatus
font.pointSize: 14
}
Label {
id: humidityLabel
text: "Humidity: " + humidity + " %"
font.pointSize: 13
font.weight: Font.Light
}
Label {
id: windSpeedLabel
text: "Wind: " + windSpeed + " Km/h"
font.pointSize: 13
font.weight: Font.Light
}
Label {
id: rainLabel
text: "Rain: " + rain + " mm"
font.pointSize: 13
font.weight: Font.Light
}
Label {
id: uvIndexLabel
text: "UV: " + uvIndex
font.pointSize: 13
font.weight: Font.Light
}
}