From f391e5db0b0d96856279aec31ad6b1b8c920fda5 Mon Sep 17 00:00:00 2001 From: Matt Ranostay Date: Tue, 3 Apr 2018 20:41:06 -0700 Subject: homescreen: weather: use signal parameters over properties Don't use property from libqtappfw framework but the passed signal parameters Change-Id: Ide967c3b6aec52f54995e8263303e9cbbd8f99fb Signed-off-by: Matt Ranostay --- homescreen/qml/StatusArea.qml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/homescreen/qml/StatusArea.qml b/homescreen/qml/StatusArea.qml index e464980..ab14a23 100644 --- a/homescreen/qml/StatusArea.qml +++ b/homescreen/qml/StatusArea.qml @@ -34,24 +34,23 @@ Item { target: weather onConditionChanged: { - var current_condition = weather.condition var icon = '' - if (current_condition.indexOf("clouds") != -1) { + if (condition.indexOf("clouds") != -1) { icon = "WeatherIcons_Cloudy-01.png" - } else if (current_condition.indexOf("thunderstorm") != -1) { + } else if (condition.indexOf("thunderstorm") != -1) { icon = "WeatherIcons_Thunderstorm-01.png" - } else if (current_condition.indexOf("snow") != -1) { + } else if (condition.indexOf("snow") != -1) { icon = "WeatherIcons_Snow-01.png" - } else if (current_condition.indexOf("rain") != -1) { + } else if (condition.indexOf("rain") != -1) { icon = "WeatherIcons_Rain-01.png" } - condition.source = icon ? './images/Weather/' + icon : '' + condition_item.source = icon ? './images/Weather/' + icon : '' } onTemperatureChanged: { - temperature.text = weather.temperature.split(".")[0] + '°F' + temperature_item.text = temperature.split(".")[0] + '°F' } } @@ -98,11 +97,11 @@ Item { Layout.fillHeight: true Layout.preferredHeight: 20 Image { - id: condition + id: condition_item source: './images/Weather/WeatherIcons_Rain-01.png' } Text { - id: temperature + id: temperature_item text: '64°F' color: 'white' font.family: 'Helvetica' -- cgit 1.2.3-korg