Warning, /utilities/kweather/src/qml/backgrounds/components/Cloud.qml is written in an unsupported language. File is not indexed.
0001 /* 0002 * SPDX-FileCopyrightText: 2020 Han Young <hanyoung@protonmail.com> 0003 * SPDX-FileCopyrightText: 2020 Devin Lin <espidev@gmail.com> 0004 * 0005 * SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 import QtQuick 0008 import QtQuick.Controls 0009 import QtQuick.Layouts 0010 import QtQuick.Shapes 0011 import org.kde.kirigami as Kirigami 0012 0013 Item { 0014 id: rootShape 0015 anchors.fill: parent 0016 0017 property double maxRadiusChange 0018 property double maxCoordChange 0019 property double minRadius 0020 property double minX 0021 property double minY 0022 property double radius: minRadius 0023 property double centerX: minX 0024 property double centerY: minY 0025 property color color 0026 0027 NumberAnimation on radius { 0028 duration: 4000 0029 running: true 0030 easing.type: Easing.InOutQuad 0031 onFinished: { 0032 to = minRadius + Math.random() * maxRadiusChange; 0033 restart(); 0034 } 0035 } 0036 0037 NumberAnimation on centerX { 0038 duration: 2600 0039 running: true 0040 easing.type: Easing.InOutQuad 0041 onFinished: { 0042 to = minX + Math.random() * maxCoordChange; 0043 restart(); 0044 } 0045 } 0046 0047 NumberAnimation on centerY { 0048 duration: 3400 0049 running: true 0050 easing.type: Easing.InOutQuad 0051 onFinished: { 0052 to = minY + Math.random() * maxCoordChange; 0053 restart(); 0054 } 0055 } 0056 0057 Rectangle { 0058 radius: width / 2 0059 color: rootShape.color 0060 width: rootShape.radius * 2 0061 height: width 0062 x: centerX - width / 2 0063 y: centerY - width / 2 0064 } 0065 }