Changeset View
Changeset View
Standalone View
Standalone View
kcmkwin/kwincompositing/qml/Video.qml
Context not available. | |||||
20 | **************************************************************************/ | 20 | **************************************************************************/ | ||
---|---|---|---|---|---|
21 | import QtQuick 2.1 | 21 | import QtQuick 2.1 | ||
22 | import QtQuick.Controls 1.1 | 22 | import QtQuick.Controls 1.1 | ||
23 | import QtQuick.Controls 2.0 as QQC2 | ||||
23 | import QtQuick.Layouts 1.0 | 24 | import QtQuick.Layouts 1.0 | ||
24 | import QtMultimedia 5.0 as Multimedia | 25 | import QtMultimedia 5.0 as Multimedia | ||
25 | import org.kde.kquickcontrolsaddons 2.0 as QtExtra | 26 | import org.kde.kquickcontrolsaddons 2.0 as QtExtra | ||
Context not available. | |||||
41 | source: model.VideoRole | 42 | source: model.VideoRole | ||
42 | width: 400 | 43 | width: 400 | ||
43 | height: 400 | 44 | height: 400 | ||
44 | BusyIndicator { | 45 | QQC2.BusyIndicator { | ||
45 | anchors.centerIn: parent | 46 | anchors.centerIn: parent | ||
46 | visible: videoItem.status == Multimedia.MediaPlayer.Loading | 47 | visible: videoItem.status == Multimedia.MediaPlayer.Loading | ||
47 | running: true | 48 | running: true | ||
48 | } | 49 | } | ||
49 | MouseArea { | 50 | Button { | ||
50 | // it's a mouse area with icon inside to not have an ugly button background | | |||
51 | id: replayButton | 51 | id: replayButton | ||
52 | visible: false | 52 | visible: false | ||
53 | anchors.fill: parent | 53 | anchors.centerIn: parent | ||
54 | iconName: "media-playback-start" | ||||
54 | onClicked: { | 55 | onClicked: { | ||
55 | replayButton.visible = false; | 56 | replayButton.visible = false; | ||
56 | videoItem.play(); | 57 | videoItem.play(); | ||
57 | } | 58 | } | ||
58 | QtExtra.QIconItem { | | |||
59 | id: replayIcon | | |||
60 | anchors.centerIn: parent | | |||
61 | width: 16 | | |||
62 | height: 16 | | |||
63 | icon: "media-playback-start" | | |||
64 | } | | |||
65 | Connections { | 59 | Connections { | ||
66 | target: videoItem | 60 | target: videoItem | ||
67 | onStopped: { | 61 | onStopped: { | ||
Context not available. |