Add weather routes project progress

This commit is contained in:
2025-04-07 19:40:38 +02:00
parent 8941d84bc8
commit fa5f6b2588
52 changed files with 2027 additions and 0 deletions

View File

@@ -0,0 +1,119 @@
import QtQuick
Rectangle {
id: root
property alias imgSrc: image.source
property alias temperature: tempValue.text
property alias humidity: humidityValue.text
property alias precipitation: precipValue.text
property alias windSpeed: windValue.text
property double rightMargin: root.width * 0.05
Rectangle
{
id: imageRect
width: parent.width * 0.2
height: parent.height
anchors.left: parent.left
anchors.top: parent.top
radius: 15
color: "black"
Image
{
id: image
fillMode: Image.PreserveAspectFit
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
}
}
Rectangle
{
id: tempRect
width: parent.width * 0.4
height: parent.height * 0.5
anchors.left: imageRect.right
anchors.top: parent.top
Text
{
id: tempLabel
text: "Temp (C):"
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
}
Text
{
id: tempValue
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.rightMargin: root.rightMargin
}
}
Rectangle
{
id: humidityRect
width: parent.width * 0.4
height: parent.height * 0.5
anchors.left: tempRect.right
anchors.top: parent.top
Text
{
id: humidityLabel
text: "Humidity (%):"
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
}
Text
{
id: humidityValue
anchors.right: parent.right
anchors.rightMargin: root.rightMargin
anchors.verticalCenter: parent.verticalCenter
}
}
Rectangle
{
id: precipRect
width: parent.width * 0.4
height: parent.height * 0.5
anchors.left: imageRect.right
anchors.top: tempRect.bottom
Text
{
id: precipLabel
text: "Precipitation (mm)"
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
}
Text
{
id: precipValue
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.rightMargin: root.rightMargin
}
}
Rectangle
{
id: windRect
width: parent.width * 0.4
height: parent.height * 0.5
anchors.left: tempRect.right
anchors.top: humidityRect.bottom
Text
{
id: windLabel
text: "Wind (km/h):"
anchors.left: parent.left
anchors.verticalCenter: parent.verticalCenter
}
Text
{
id: windValue
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.rightMargin: root.rightMargin
}
}
}