Warning, /plasma/kdeplasma-addons/wallpapers/haenau/contents/ui/main.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 import org.kde.plasma.plasmoid 2.0
0011 
0012 WallpaperItem {
0013     id: wallpaper
0014 
0015     //FIXME: Svg doesn't support relative paths
0016     readonly property string wallpaperPath: String(Qt.resolvedUrl("wallpaper.svgz")).substring(7)
0017 
0018     KSvg.SvgItem {
0019         anchors.fill: parent
0020 
0021         elementId: "background"
0022 
0023         BackgroundElement {
0024             id: centerLayer0
0025             elementId: "center-layer0"
0026         }
0027         BackgroundElement {
0028             id: centerLayer1
0029             elementId: "center-layer1"
0030         }
0031 
0032         BackgroundElement {
0033             id: leftLayer0
0034             elementId: "left-layer0"
0035         }
0036 
0037         BackgroundElement {
0038             id: leftLayer1
0039             elementId: "left-layer1"
0040 
0041             BackgroundElement {
0042                 id: leftLayer2
0043                 elementId: "left-layer2"
0044             }
0045             BackgroundElement {
0046                 id: leftLayer3
0047                 elementId: "left-layer3"
0048             }
0049             BackgroundElement {
0050                 id: leftLayer4
0051                 elementId: "left-layer4"
0052             }
0053         }
0054 
0055         BottomBackgroundElement {
0056             id: bottomLayer0
0057             elementId: "bottom-layer0"
0058 
0059             BottomBackgroundElement {
0060                 id: bottomLayer1
0061                 elementId: "bottom-layer1"
0062             }
0063             BottomBackgroundElement {
0064                 id: bottomLayer2
0065                 elementId: "bottom-layer2"
0066             }
0067         }
0068 
0069         RightBackgroundElement {
0070             id: rightLayer0
0071             elementId: "right-layer0"
0072         }
0073 
0074         RightBackgroundElement {
0075             id: rightLayer1
0076             elementId: "right-layer1"
0077 
0078             RightBackgroundElement {
0079                 id: rightLayer2
0080                 elementId: "right-layer2"
0081             }
0082             RightBackgroundElement {
0083                 id: rightLayer3
0084                 elementId: "right-layer3"
0085             }
0086             RightBackgroundElement {
0087                 id: rightLayer4
0088                 elementId: "right-layer4"
0089             }
0090         }
0091 
0092         Timer {
0093             property int lastLayer: 0
0094             property variant layers: [centerLayer0, centerLayer1, leftLayer0, leftLayer1, bottomLayer0, rightLayer0, rightLayer1]
0095             running: true
0096             repeat: true
0097             interval: 30000
0098             onTriggered: {
0099                 layers[lastLayer].change()
0100                 lastLayer = (lastLayer + 1) % 7
0101             }
0102         }
0103 
0104     }
0105 }