From 922a96a34deaaf715aee4b4a52678a3200f9364b Mon Sep 17 00:00:00 2001 From: 0xFEEDC0DE64 Date: Sun, 26 Feb 2023 23:10:21 +0100 Subject: [PATCH] Implemented basic animation --- HomePage.qml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/HomePage.qml b/HomePage.qml index 0f462c2..5a48689 100644 --- a/HomePage.qml +++ b/HomePage.qml @@ -45,5 +45,38 @@ Item { } } } + CheckBox { + id: animationCheckbox + text: qsTr('Animation') + } + } + + property int test0 + onTest0Changed: __controller.setPresetSlider(7, test0); + property int test1 + onTest1Changed: __controller.setPresetSlider(15, test1); + property int test2 + onTest2Changed: __controller.setPresetSlider(9, test2); + property int test3 + onTest3Changed: __controller.setPresetSlider(13, test3); + + SequentialAnimation { + loops: Animation.Infinite + running: animationCheckbox.checked + + ParallelAnimation { + NumberAnimation { target: homePage; property: "test0"; duration: 2000; from: 10; to: 255; easing.type: Easing.InQuad } + NumberAnimation { target: homePage; property: "test1"; duration: 2000; from: 255; to: 10; easing.type: Easing.InQuad } // blau + NumberAnimation { target: homePage; property: "test2"; duration: 2000; from: 255; to: 10; easing.type: Easing.InQuad } // blau + NumberAnimation { target: homePage; property: "test3"; duration: 2000; from: 10; to: 255; easing.type: Easing.InQuad } + } + PauseAnimation { duration: 1000 } + ParallelAnimation { + NumberAnimation { target: homePage; property: "test0"; duration: 2000; from: 255; to: 10; easing.type: Easing.InQuad } + NumberAnimation { target: homePage; property: "test1"; duration: 2000; from: 10; to: 255; easing.type: Easing.InQuad } // blau + NumberAnimation { target: homePage; property: "test2"; duration: 2000; from: 10; to: 255; easing.type: Easing.InQuad } // blau + NumberAnimation { target: homePage; property: "test3"; duration: 2000; from: 255; to: 10; easing.type: Easing.InQuad } + } + PauseAnimation { duration: 1000 } } }