Warning, /network/kdeconnect-kde/plugins/presenter/Presenter.qml is written in an unsupported language. File is not indexed.

0001 /**
0002  * SPDX-FileCopyrightText: 2019 Aleix Pol Gonzalez <aleixpol@kde.org>
0003  *
0004  * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0005  */
0006 
0007 import QtQuick 2.5
0008 import QtQuick.Window 2.5
0009 import QtQuick.Particles 2.0
0010 
0011 Item {
0012     id: root
0013     anchors.fill: parent
0014 
0015     property real xPos: 0.5
0016     property real yPos: 0.5
0017 
0018     property real devicePixelRatio: Window.window != null && Window.window.screen != null ? Window.window.screen.devicePixelRatio : 1.0
0019 
0020     ParticleSystem {
0021         id: particles
0022         width: parent.width/20
0023         height: width
0024 
0025         x: root.width * root.xPos - width/2
0026         y: root.height * root.yPos - height/2
0027 
0028         ImageParticle {
0029             groups: ["center"]
0030             anchors.fill: parent
0031             source: "qrc:///particleresources/glowdot.png"
0032             colorVariation: 0.1
0033             color: "#FF9999FF"
0034         }
0035         ImageParticle {
0036             groups: ["edge"]
0037             anchors.fill: parent
0038             source: "qrc:///particleresources/glowdot.png"
0039             colorVariation: 0.1
0040             color: "#000099FF"
0041         }
0042 
0043         Emitter {
0044             anchors.fill: parent
0045             group: "center"
0046             emitRate: 900
0047             lifeSpan: 200
0048             size: 20 * devicePixelRatio
0049             sizeVariation: 2
0050             endSize: 0
0051             //! [0]
0052             shape: EllipseShape {fill: false}
0053             velocity: TargetDirection {
0054                 targetX: particles.width/2
0055                 targetY: particles.height/2
0056                 proportionalMagnitude: true
0057                 magnitude: 0.5
0058             }
0059             //! [0]
0060         }
0061 
0062         Emitter {
0063             anchors.fill: parent
0064             group: "edge"
0065             startTime: 200
0066             emitRate: 2000
0067             lifeSpan: 20
0068             size: 28 * devicePixelRatio
0069             sizeVariation: 2 * devicePixelRatio
0070             endSize: 16 * devicePixelRatio
0071             shape: EllipseShape {fill: false}
0072             velocity: TargetDirection {
0073                 targetX: particles.width/2
0074                 targetY: particles.height/2
0075                 proportionalMagnitude: true
0076                 magnitude: 0.1
0077                 magnitudeVariation: 0.1
0078             }
0079             acceleration: TargetDirection {
0080                 targetX: particles.width
0081                 targetY: particles.height
0082                 targetVariation: 200
0083                 proportionalMagnitude: true
0084                 magnitude: 0.1
0085                 magnitudeVariation: 0.1
0086             }
0087         }
0088     }
0089 }