Warning, /plasma/kdeplasma-addons/wallpapers/haenau/contents/ui/RightBackgroundElement.qml is written in an unsupported language. File is not indexed.

0001 /*
0002  *   SPDX-FileCopyrightText: 2012 Marco Martin <mart@kde.org>
0003  *
0004  *   SPDX-License-Identifier: LGPL-2.0-or-later
0005  */
0006 
0007 import QtQuick 2.0
0008 import org.kde.plasma.core as PlasmaCore
0009 import org.kde.ksvg 1.0 as KSvg
0010 
0011 KSvg.SvgItem {
0012     id: root
0013     x: parent.width - width
0014     width: naturalSize.width * (parent.height/naturalSize.height)
0015     height: parent.height
0016     imagePath: wallpaper.wallpaperPath
0017 
0018     signal changeTriggered
0019 
0020     function change() {changeAnimation.running = true}
0021 
0022     // Intentionally not using a standard duration value for these, as this is
0023     // an animated wallpaper so disabling animations doesn't make sense, and the
0024     // duration shouldn't be scaled with the user's preferences because this is
0025     // tuned to create a specific visual effect.
0026     SequentialAnimation {
0027         id: changeAnimation
0028         NumberAnimation {
0029             targets: root
0030             properties: "opacity"
0031             to: 0
0032             duration: 1000
0033             easing.type: Easing.InOutCubic
0034         }
0035 
0036         ScriptAction { script: root.z = Math.floor(Math.random()*7) }
0037 
0038         NumberAnimation {
0039             targets: root
0040             properties: "opacity"
0041             to: Math.random()
0042             duration: 1000
0043             easing.type: Easing.InOutCubic
0044         }
0045     }
0046 }