kdeconnect-kde/plugins/presenter/Presenter.qml
Aleix Pol a40c6e8101 Submitted proof of concept for a presenter plugin
Will show a cursor so we can point at interesting things on the screen during
presentations.
2019-07-05 17:58:46 +02:00

94 lines
2.8 KiB
QML

/**
* Copyright 2019 Aleix Pol Gonzalez <aleixpol@kde.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import QtQuick 2.5
import QtQuick.Window 2.5
import QtQuick.Particles 2.0
Item {
id: root
anchors.fill: parent
property real xPos: 0.5
property real yPos: 0.5
ParticleSystem {
id: particles
width: parent.width/20
height: width
x: root.width * root.xPos - width/2
y: root.height * root.yPos - height/2
ImageParticle {
groups: ["center", "edge"]
anchors.fill: parent
source: "qrc:///particleresources/glowdot.png"
colorVariation: 0.1
color: "#000099FF"
}
Emitter {
anchors.fill: parent
group: "center"
emitRate: 400
lifeSpan: 200
size: 20
sizeVariation: 2
endSize: 0
//! [0]
shape: EllipseShape {fill: false}
velocity: TargetDirection {
targetX: particles.width/2
targetY: particles.height/2
proportionalMagnitude: true
magnitude: 0.5
}
//! [0]
}
Emitter {
anchors.fill: parent
group: "edge"
startTime: 200
emitRate: 200
lifeSpan: 20
size: 28
sizeVariation: 2
endSize: 16
shape: EllipseShape {fill: false}
velocity: TargetDirection {
targetX: particles.width/2
targetY: particles.height/2
proportionalMagnitude: true
magnitude: 0.1
magnitudeVariation: 0.1
}
acceleration: TargetDirection {
targetX: particles.width/2
targetY: particles.height/2
targetVariation: 200
proportionalMagnitude: true
magnitude: 0.1
magnitudeVariation: 0.1
}
}
}
}