Warning, /utilities/kweather/src/qml/backgrounds/components/Cloudy.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: baseRect
0015     opacity: 0.65
0016     anchors.fill: parent
0017     property color cloudColor: "white"
0018     property double unitSize: width / 100 // 100 is full width of screen
0019     property double heightUnitSize: height / 100
0020     
0021     Cloud {
0022         opacity: 0.2
0023         color: baseRect.cloudColor
0024         maxRadiusChange: unitSize * 3
0025         maxCoordChange: unitSize * 6
0026         minRadius: unitSize * 40
0027         minX: unitSize * 10
0028         minY: heightUnitSize * -3
0029     }
0030     Cloud {
0031         opacity: 0.3
0032         color: baseRect.cloudColor
0033         maxRadiusChange: unitSize * 2
0034         maxCoordChange: unitSize * 5
0035         minRadius: unitSize * 40
0036         minX: unitSize * 40
0037         minY: heightUnitSize * 20
0038     }
0039     Cloud {
0040         opacity: 0.2
0041         color: baseRect.cloudColor
0042         maxRadiusChange: unitSize * 3
0043         maxCoordChange: unitSize * 2
0044         minRadius: unitSize * 23
0045         minX: unitSize * 85
0046         minY: heightUnitSize * 7
0047     }
0048     Cloud {
0049         opacity: 0.2
0050         color: baseRect.cloudColor
0051         maxRadiusChange: unitSize * 2
0052         maxCoordChange: unitSize * 6
0053         minRadius: unitSize * 40
0054         minX: unitSize * 110
0055         minY: heightUnitSize * -6
0056     }
0057     Cloud {
0058         opacity: 0.5
0059         color: baseRect.cloudColor
0060         maxRadiusChange: unitSize * 3
0061         maxCoordChange: unitSize * 2
0062         minRadius: unitSize * 32
0063         minX: unitSize * 32
0064         minY: heightUnitSize * 6
0065     }
0066     Cloud {
0067         opacity: 0.6
0068         color: baseRect.cloudColor
0069         maxRadiusChange: unitSize * 3
0070         maxCoordChange: unitSize * 6
0071         minRadius: unitSize * 24
0072         minX: unitSize * 48
0073         minY: heightUnitSize * 10
0074     }
0075     Cloud {
0076         opacity: 0.5
0077         color: baseRect.cloudColor
0078         maxRadiusChange: unitSize * 5
0079         maxCoordChange: unitSize * 2
0080         minRadius: unitSize * 27
0081         minX: unitSize * 90
0082         minY: heightUnitSize * 17
0083     }
0084 }