kwin/kcmkwin/kwineffects/package/contents/ui/Video.qml
Vlad Zahorodnii 1fb9f6f13a Switch to SPDX license markers
The main advantage of SPDX license identifiers over the traditional
license headers is that it's more difficult to overlook inappropriate
licenses for kwin, for example GPL 3. We also don't have to copy a
lot of boilerplate text.

In order to create this change, I ran licensedigger -r -c from the
toplevel source directory.
2020-08-07 19:57:56 +00:00

43 lines
1.4 KiB
QML

/**************************************************************************
* KWin - the KDE window manager *
* This file is part of the KDE project. *
* *
* SPDX-FileCopyrightText: 2013 Antonis Tsiapaliokas <kok3rs@gmail.com> *
* SPDX-FileCopyrightText: 2014 Martin Gräßlin <mgraesslin@kde.org> *
* *
* SPDX-License-Identifier: GPL-2.0-or-later
**************************************************************************/
import QtQuick 2.5
import QtQuick.Controls 2.5 as QQC2
import QtQuick.Layouts 1.1
import QtMultimedia 5.0 as Multimedia
Multimedia.Video {
id: videoItem
autoPlay: true
source: model.VideoRole
width: 400
height: 400
QQC2.BusyIndicator {
anchors.centerIn: parent
visible: videoItem.status == Multimedia.MediaPlayer.Loading
running: true
}
QQC2.Button {
id: replayButton
visible: false
anchors.centerIn: parent
icon.name: "media-playback-start"
onClicked: {
replayButton.visible = false;
videoItem.play();
}
Connections {
target: videoItem
onStopped: {
replayButton.visible = true
}
}
}
}