Weather.qml Example File
bannerads/assets/Weather.qml
import bb.cascades 1.0
Container {
horizontalAlignment: HorizontalAlignment.Fill
leftPadding: 30
rightPadding: 30
Container {
horizontalAlignment: HorizontalAlignment.Fill
topPadding: 50
Label {
horizontalAlignment: HorizontalAlignment.Left
text: qsTr("Current Weather")
textStyle {
base: SystemDefaults.TextStyles.BigText
fontWeight: FontWeight.Bold
}
}
Label {
horizontalAlignment: HorizontalAlignment.Right
text: qsTr("Friday, October 5, 2012, 16:19 EDT")
textStyle {
base: SystemDefaults.TextStyles.SmallText
}
}
}
Container {
leftPadding: 100
WeatherIcon {
id: imgTab1
imageSource: "asset:///images/sun.png"
verticalAlignment: VerticalAlignment.Bottom
horizontalAlignment: HorizontalAlignment.Left
scalingMethod: ScalingMethod.AspectFit
}
LabeledLabel {
tag: qsTr("Feels Like: ")
text: qsTr("20")
}
LabeledLabel {
tag: qsTr("Wind: ")
text: qsTr("W 31 km/h")
}
LabeledLabel {
tag: qsTr("Wind Gusts: ")
text: qsTr("52 km/h")
}
LabeledLabel {
tag: qsTr("Sunrise: ")
text: qsTr("7:36")
}
LabeledLabel {
tag: qsTr("Sunset: ")
text: qsTr("18:36")
}
}
}