diff options
Diffstat (limited to 'weather-qml/Sunny.qml')
-rw-r--r-- | weather-qml/Sunny.qml | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/weather-qml/Sunny.qml b/weather-qml/Sunny.qml new file mode 100644 index 0000000..046ba6d --- /dev/null +++ b/weather-qml/Sunny.qml @@ -0,0 +1,31 @@ +import Qt 4.6 + +ForecastView { + id: root + + HungItem { + id: sun + x: isDay ? scaledX(120) : scaledX(220) + y: scaledY(-800) + itemX: 0 + itemY: isDay ? 200 : 180 + height: isDay ? 500 : 440 + finalY: isDay ? scaledY(-198) : scaledY(-205) + itemImage: isDay ? "images/sun.png" : "images/moon.png" + lineImage: isDay ? "images/sun_line.png" : "images/moon_line.png" + } + + states : State { + name: "final" + PropertyChanges { target: sun; y: sun.finalY; } + } + + transitions : Transition { + SequentialAnimation { + NumberAnimation { target: sun; properties: "y"; + easing.type: "OutBack"; duration: 500 } + } + } + + onPresent: root.state = "final" +} |