updates to fix qml
This commit is contained in:
parent
7b82202c51
commit
66f313675b
21 changed files with 211 additions and 229 deletions
|
@ -1,5 +1,4 @@
|
|||
import QtQuick
|
||||
/* import QtQuick.Dialogs */
|
||||
import QtQuick.Controls as Controls
|
||||
import Qt.labs.platform as Labs
|
||||
import QtQuick.Window
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import QtQuick 2.13
|
||||
import QtQuick.Dialogs 1.0
|
||||
import QtQuick.Controls 2.15 as Controls
|
||||
import QtQuick.Window 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import QtQuick 2.13
|
||||
import QtQuick.Dialogs 1.0
|
||||
import QtQuick.Controls 2.15 as Controls
|
||||
import QtQuick.Window 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15 as Controls
|
||||
import QtQuick.Dialogs 1.3
|
||||
import QtQuick.Layouts 1.15
|
||||
import org.kde.kirigami 2.13 as Kirigami
|
||||
import "./" as Presenter
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import QtQuick 2.13
|
||||
/* import QtQuick.Dialogs 1.0 */
|
||||
import QtQuick.Controls 2.0 as Controls
|
||||
/* import QtQuick.Window 2.15 */
|
||||
import QtQuick.Layouts 1.15
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15 as Controls
|
||||
import QtQuick.Layouts 1.15
|
||||
import QtGraphicalEffects 1.15
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import org.kde.kirigami 2.13 as Kirigami
|
||||
import "./" as Presenter
|
||||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import QtQuick 2.15
|
||||
import QtQuick.Dialogs 1.0
|
||||
import QtQuick.Controls 2.15 as Controls
|
||||
import QtQuick.Window 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
|
@ -176,13 +175,13 @@ Controls.Page {
|
|||
/* id: pWindow */
|
||||
/* } */
|
||||
|
||||
SongProxyModel { id: songProxyModel }
|
||||
ImageProxyModel { id: imageProxyModel }
|
||||
PresentationProxyModel { id: presProxyModel }
|
||||
VideoProxyModel { id: videoProxyModel }
|
||||
/* ServiceThing { id: serviceThing } */
|
||||
/* SongProxyModel { id: songProxyModel } */
|
||||
/* ImageProxyModel { id: imageProxyModel } */
|
||||
/* PresentationProxyModel { id: presProxyModel } */
|
||||
/* VideoProxyModel { id: videoProxyModel } */
|
||||
ServiceThing { id: serviceThing }
|
||||
FileHelper { id: fileHelper }
|
||||
SlideHelper { id: slideHelper }
|
||||
/* SlideHelper { id: slideHelper } */
|
||||
SongEditor {
|
||||
id: songEditorModel
|
||||
/* songModel: songProxyModel.songModel() */
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15 as Controls
|
||||
import QtQuick.Dialogs 1.3
|
||||
import QtQuick.Layouts 1.15
|
||||
import QtGraphicalEffects 1.15
|
||||
import org.kde.kirigami 2.13 as Kirigami
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
import QtQuick 2.15
|
||||
import QtQuick.Dialogs 1.0
|
||||
import QtQuick.Controls 2.15 as Controls
|
||||
import QtQuick.Window 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
import QtMultimedia
|
||||
/* import QtAudioEngine 1.15 */
|
||||
import org.kde.kirigami 2.13 as Kirigami
|
||||
import "./" as Presenter
|
||||
import org.presenter 1.0
|
||||
import mpv 1.0
|
||||
|
||||
FocusScope {
|
||||
id: root
|
||||
|
@ -454,13 +453,12 @@ FocusScope {
|
|||
onTriggered: root.visible ? keyHandler.forceActiveFocus() : null
|
||||
}
|
||||
|
||||
MpvObject {
|
||||
MediaPlayer {
|
||||
id: audio
|
||||
useHwdec: true
|
||||
enableAudio: true
|
||||
audioOutput: AudioOutput {}
|
||||
// embeded mpv allows to set commandline propertys using the options/<name>
|
||||
// syntax. This could be abstracted later, but for now this works.
|
||||
Component.onCompleted: audio.setProperty("options/audio-display", "no");
|
||||
/* Component.onCompleted: audio.setProperty("options/audio-display", "no"); */
|
||||
}
|
||||
|
||||
function pauseVideo() {
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15 as Controls
|
||||
import QtQuick.Dialogs 1.3
|
||||
import QtQuick.Layouts 1.15
|
||||
import QtWebEngine 1.10
|
||||
import org.kde.kirigami 2.13 as Kirigami
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import QtQuick 2.15
|
||||
import QtQuick.Dialogs 1.0
|
||||
import QtQuick.Controls 2.15 as Controls
|
||||
import QtQuick.Window 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
|
|
|
@ -3,7 +3,7 @@ import QtQuick.Controls 2.15 as Controls
|
|||
import QtQuick.Layouts 1.15
|
||||
import QtMultimedia 5.15
|
||||
/* import QtAudioEngine 1.15 */
|
||||
import QtGraphicalEffects 1.15
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import org.kde.kirigami 2.13 as Kirigami
|
||||
import "./" as Presenter
|
||||
import org.presenter 1.0
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import QtQuick 2.13
|
||||
/* import QtQuick.Dialogs 1.0 */
|
||||
import QtQuick.Controls 2.12 as Controls
|
||||
/* import QtQuick.Window 2.15 */
|
||||
import QtQuick.Layouts 1.15
|
||||
|
@ -8,7 +7,7 @@ import QtQml.Models 2.15
|
|||
/* import QtQml.Models 2.12 */
|
||||
/* import QtMultimedia 5.15 */
|
||||
/* import QtAudioEngine 1.15 */
|
||||
import QtGraphicalEffects 1.15
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import org.kde.kirigami 2.13 as Kirigami
|
||||
import "./" as Presenter
|
||||
import org.presenter 1.0
|
||||
|
@ -78,206 +77,220 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: delegate
|
||||
Kirigami.AbstractListItem {
|
||||
id: serviceListItem
|
||||
implicitWidth: serviceItemList.width
|
||||
height: Kirigami.Units.gridUnit * 2
|
||||
Item {
|
||||
id: serviceListItem
|
||||
implicitWidth: serviceItemList.width
|
||||
height: Kirigami.Units.gridUnit * 2
|
||||
|
||||
property var selectedItems
|
||||
property var selectedItems
|
||||
|
||||
DropArea {
|
||||
id: serviceDrop
|
||||
anchors.fill: parent
|
||||
DropArea {
|
||||
id: serviceDrop
|
||||
anchors.fill: parent
|
||||
|
||||
onEntered: (drag) => {
|
||||
if (drag.keys[0] === "library") {
|
||||
dropHighlightLine.visible = true;
|
||||
dropHighlightLine.y = serviceDrop.mapToItem(
|
||||
serviceItemList,0,0).y - 2;
|
||||
onEntered: (drag) => {
|
||||
if (drag.keys[0] === "library") {
|
||||
dropHighlightLine.visible = true;
|
||||
dropHighlightLine.y = serviceDrop.mapToItem(
|
||||
serviceItemList,0,0).y - 2;
|
||||
}
|
||||
}
|
||||
|
||||
onDropped: (drag) => {
|
||||
loadingItem.visible = true;
|
||||
console.log("DROPPED IN ITEM AREA: " + drag.keys);
|
||||
console.log(dragItemIndex + " " + index);
|
||||
const hlIndex = serviceItemList.currentIndex;
|
||||
if (drag.keys[0] === "library") {
|
||||
addItem(index,
|
||||
dragItemType,
|
||||
dragItemIndex);
|
||||
} else if (drag.keys[0] === "serviceitem") {
|
||||
/* ServiceItemModel.moveRows(serviceItemList.indexDragged, */
|
||||
/* serviceItemList.moveToIndex, 1); */
|
||||
/* serviceItemList.currentIndex = moveToIndex; */
|
||||
}
|
||||
dropHighlightLine.visible = false;
|
||||
loadingItem.visible = false;
|
||||
}
|
||||
|
||||
keys: ["library","serviceitem"]
|
||||
|
||||
Rectangle {
|
||||
id: visServiceItem
|
||||
width: serviceDrop.width
|
||||
height: serviceDrop.height
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
verticalCenter: parent.verticalCenter
|
||||
}
|
||||
color: {
|
||||
if (active)
|
||||
Kirigami.Theme.highlightColor;
|
||||
else if (selected)
|
||||
Kirigami.Theme.focusColor;
|
||||
else if (mouseHandler.containsMouse)
|
||||
Kirigami.Theme.hoverColor;
|
||||
else
|
||||
Kirigami.Theme.backgroundColor;
|
||||
}
|
||||
|
||||
Controls.Label {
|
||||
id: label
|
||||
anchors.left: dragHandle.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.leftMargin: 5
|
||||
text: name
|
||||
elide: Text.ElideRight
|
||||
width: parent.width - trailing.width - dragHandle.width - 25
|
||||
color: {
|
||||
if (selected ||
|
||||
mouseHandler.containsMouse || active)
|
||||
Kirigami.Theme.highlightedTextColor;
|
||||
else
|
||||
Kirigami.Theme.textColor;
|
||||
}
|
||||
}
|
||||
|
||||
onDropped: (drag) => {
|
||||
loadingItem.visible = true;
|
||||
console.log("DROPPED IN ITEM AREA: " + drag.keys);
|
||||
console.log(dragItemIndex + " " + index);
|
||||
const hlIndex = serviceItemList.currentIndex;
|
||||
if (drag.keys[0] === "library") {
|
||||
addItem(index,
|
||||
dragItemType,
|
||||
dragItemIndex);
|
||||
} else if (drag.keys[0] === "serviceitem") {
|
||||
/* ServiceItemModel.moveRows(serviceItemList.indexDragged, */
|
||||
/* serviceItemList.moveToIndex, 1); */
|
||||
/* serviceItemList.currentIndex = moveToIndex; */
|
||||
}
|
||||
dropHighlightLine.visible = false;
|
||||
loadingItem.visible = false;
|
||||
}
|
||||
|
||||
keys: ["library","serviceitem"]
|
||||
|
||||
Rectangle {
|
||||
id: visServiceItem
|
||||
width: serviceDrop.width
|
||||
height: serviceDrop.height
|
||||
anchors {
|
||||
horizontalCenter: parent.horizontalCenter
|
||||
verticalCenter: parent.verticalCenter
|
||||
Kirigami.Icon {
|
||||
id: trailing
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.rightMargin: 5
|
||||
implicitWidth: Kirigami.Units.gridUnit
|
||||
source: {
|
||||
switch (type) {
|
||||
case 'image': return "folder-pictures-symbolic";
|
||||
case 'video': return "folder-videos-symbolic";
|
||||
case 'song': return "folder-music-symbolic";
|
||||
case 'presentation': return "x-office-presentation-symbolic";
|
||||
default: return "slideshow-plugin";
|
||||
}
|
||||
}
|
||||
color: {
|
||||
if (active)
|
||||
Kirigami.Theme.highlightColor;
|
||||
else if (selected)
|
||||
Kirigami.Theme.focusColor;
|
||||
else if (mouseHandler.containsMouse)
|
||||
Kirigami.Theme.hoverColor;
|
||||
if (selected ||
|
||||
mouseHandler.containsMouse || active)
|
||||
Kirigami.Theme.highlightedTextColor;
|
||||
else
|
||||
Kirigami.Theme.backgroundColor;
|
||||
Kirigami.Theme.textColor;
|
||||
}
|
||||
}
|
||||
|
||||
Controls.Label {
|
||||
id: label
|
||||
anchors.left: dragHandle.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.leftMargin: 5
|
||||
text: name
|
||||
elide: Text.ElideRight
|
||||
width: parent.width - trailing.width - dragHandle.width - 25
|
||||
color: {
|
||||
if (selected ||
|
||||
mouseHandler.containsMouse || active)
|
||||
Kirigami.Theme.highlightedTextColor;
|
||||
else
|
||||
Kirigami.Theme.textColor;
|
||||
/* onYChanged: serviceItemList.updateDrag(Math.round(y)); */
|
||||
|
||||
states: [
|
||||
State {
|
||||
when: mouseHandler.drag.active
|
||||
ParentChange {
|
||||
target: visServiceItem
|
||||
parent: serviceItemList
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: visServiceItem
|
||||
/* backgroundColor: Kirigami.Theme.backgroundColor */
|
||||
/* textColor: Kirigami.Theme.textColor */
|
||||
anchors.verticalCenter: undefined
|
||||
anchors.horizontalCenter: undefined
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
Kirigami.Icon {
|
||||
id: trailing
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.rightMargin: 5
|
||||
implicitWidth: Kirigami.Units.gridUnit
|
||||
source: {
|
||||
switch (type) {
|
||||
case 'image': return "folder-pictures-symbolic";
|
||||
case 'video': return "folder-videos-symbolic";
|
||||
case 'song': return "folder-music-symbolic";
|
||||
case 'presentation': return "x-office-presentation-symbolic";
|
||||
default: return "slideshow-plugin";
|
||||
}
|
||||
}
|
||||
color: {
|
||||
if (selected ||
|
||||
mouseHandler.containsMouse || active)
|
||||
Kirigami.Theme.highlightedTextColor;
|
||||
else
|
||||
Kirigami.Theme.textColor;
|
||||
}
|
||||
/* Drag.dragType: Drag.Automatic */
|
||||
/* Drag.active: mouseHandler.drag.active */
|
||||
/* Drag.hotSpot.x: width / 2 */
|
||||
/* Drag.hotSpot.y: height / 2 */
|
||||
/* Drag.keys: ["serviceitem"] */
|
||||
|
||||
MouseArea {
|
||||
id: mouseHandler
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
|
||||
/* drag { */
|
||||
/* target: visServiceItem */
|
||||
/* axis: Drag.YAxis */
|
||||
/* /\* minimumY: root.y *\/ */
|
||||
/* /\* maximumY: serviceItemList.height - serviceDrop.height *\/ */
|
||||
/* smoothed: false */
|
||||
/* } */
|
||||
|
||||
/* drag.onActiveChanged: { */
|
||||
/* if (mouseHandler.drag.active) { */
|
||||
/* serviceItemList.indexDragged = index; */
|
||||
/* } */
|
||||
/* } */
|
||||
|
||||
/* onPositionChanged: { */
|
||||
/* if (!pressed) { */
|
||||
/* return; */
|
||||
/* } */
|
||||
/* mouseArea.arrangeItem(); */
|
||||
/* } */
|
||||
|
||||
onPressed: {
|
||||
serviceItemList.interactive = false;
|
||||
}
|
||||
|
||||
/* onYChanged: serviceItemList.updateDrag(Math.round(y)); */
|
||||
|
||||
states: [
|
||||
State {
|
||||
when: mouseHandler.drag.active
|
||||
ParentChange {
|
||||
target: visServiceItem
|
||||
parent: serviceItemList
|
||||
}
|
||||
|
||||
PropertyChanges {
|
||||
target: visServiceItem
|
||||
/* backgroundColor: Kirigami.Theme.backgroundColor */
|
||||
/* textColor: Kirigami.Theme.textColor */
|
||||
anchors.verticalCenter: undefined
|
||||
anchors.horizontalCenter: undefined
|
||||
}
|
||||
}
|
||||
]
|
||||
|
||||
/* Drag.dragType: Drag.Automatic */
|
||||
/* Drag.active: mouseHandler.drag.active */
|
||||
/* Drag.hotSpot.x: width / 2 */
|
||||
/* Drag.hotSpot.y: height / 2 */
|
||||
/* Drag.keys: ["serviceitem"] */
|
||||
|
||||
MouseArea {
|
||||
id: mouseHandler
|
||||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
|
||||
/* drag { */
|
||||
/* target: visServiceItem */
|
||||
/* axis: Drag.YAxis */
|
||||
/* /\* minimumY: root.y *\/ */
|
||||
/* /\* maximumY: serviceItemList.height - serviceDrop.height *\/ */
|
||||
/* smoothed: false */
|
||||
/* } */
|
||||
|
||||
/* drag.onActiveChanged: { */
|
||||
/* if (mouseHandler.drag.active) { */
|
||||
/* serviceItemList.indexDragged = index; */
|
||||
/* } */
|
||||
/* } */
|
||||
|
||||
/* onPositionChanged: { */
|
||||
/* if (!pressed) { */
|
||||
/* return; */
|
||||
/* } */
|
||||
/* mouseArea.arrangeItem(); */
|
||||
/* } */
|
||||
|
||||
onPressed: {
|
||||
serviceItemList.interactive = false;
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
if (mouse.button === Qt.RightButton) {
|
||||
if (!selected) {
|
||||
serviceItemList.currentIndex = index;
|
||||
ServiceItemModel.select(index);
|
||||
}
|
||||
rightClickMenu.popup(mouse);
|
||||
}
|
||||
else if ((mouse.button === Qt.LeftButton) &&
|
||||
(mouse.modifiers === Qt.ShiftModifier)) {
|
||||
ServiceItemModel.selectItems(index);
|
||||
} else {
|
||||
onClicked: {
|
||||
if (mouse.button === Qt.RightButton) {
|
||||
if (!selected) {
|
||||
serviceItemList.currentIndex = index;
|
||||
ServiceItemModel.select(index);
|
||||
}
|
||||
refocusPresentation();
|
||||
rightClickMenu.popup(mouse);
|
||||
}
|
||||
|
||||
onDoubleClicked: {
|
||||
changeServiceItem(index);
|
||||
}
|
||||
|
||||
onReleased: {
|
||||
console.log("should drop");
|
||||
visServiceItem.Drag.drop();
|
||||
else if ((mouse.button === Qt.LeftButton) &&
|
||||
(mouse.modifiers === Qt.ShiftModifier)) {
|
||||
ServiceItemModel.selectItems(index);
|
||||
} else {
|
||||
serviceItemList.currentIndex = index;
|
||||
ServiceItemModel.select(index);
|
||||
}
|
||||
refocusPresentation();
|
||||
}
|
||||
|
||||
Presenter.DragHandle {
|
||||
id: dragHandle
|
||||
anchors.left: parent.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.leftMargin: 5
|
||||
/* width: 20 */
|
||||
listItem: serviceListItem
|
||||
listView: serviceItemList
|
||||
onMoveRequested: ServiceItemModel.moveRows(oldIndex,
|
||||
newIndex,
|
||||
1)
|
||||
onDoubleClicked: {
|
||||
changeServiceItem(index);
|
||||
}
|
||||
|
||||
onReleased: {
|
||||
console.log("should drop");
|
||||
visServiceItem.Drag.drop();
|
||||
}
|
||||
}
|
||||
|
||||
Presenter.DragHandle {
|
||||
id: dragHandle
|
||||
anchors.left: parent.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.leftMargin: 5
|
||||
/* width: 20 */
|
||||
listItem: serviceListItem
|
||||
listView: serviceItemList
|
||||
onMoveRequested: ServiceItemModel.moveRows(oldIndex,
|
||||
newIndex,
|
||||
1)
|
||||
}
|
||||
|
||||
}
|
||||
Controls.Menu {
|
||||
id: rightClickMenu
|
||||
Kirigami.Action {
|
||||
text: "Copy"
|
||||
}
|
||||
Kirigami.Action {
|
||||
text: "Paste"
|
||||
}
|
||||
Kirigami.Action {
|
||||
text: "Delete"
|
||||
onTriggered: removeItem(index)
|
||||
}
|
||||
|
||||
Controls.MenuSeparator {}
|
||||
|
||||
|
||||
Controls.Menu {
|
||||
id: rightClickMenu
|
||||
Kirigami.Action {
|
||||
|
@ -307,9 +320,9 @@ Item {
|
|||
ObsModel.setScene(modelData);
|
||||
}
|
||||
}
|
||||
onObjectAdded: obsMenu.insertAction(index, object)
|
||||
onObjectRemoved: obsMenu.removeAction(object)
|
||||
}
|
||||
onObjectAdded: obsMenu.insertAction(index, object)
|
||||
onObjectRemoved: obsMenu.removeAction(object)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -345,11 +358,7 @@ Item {
|
|||
|
||||
model: ServiceItemModel
|
||||
|
||||
delegate: Kirigami.DelegateRecycler {
|
||||
width: serviceItemList.width
|
||||
height: Kirigami.Units.gridUnit * 2
|
||||
sourceComponent: delegate
|
||||
}
|
||||
delegate: serviceListItem
|
||||
Kirigami.WheelHandler {
|
||||
id: wheelHandler
|
||||
target: serviceItemList
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import QtQuick 2.13
|
||||
import QtQuick.Dialogs 1.0
|
||||
import QtQuick.Controls 2.15 as Controls
|
||||
import QtQuick.Layouts 1.15
|
||||
import org.kde.kirigami 2.13 as Kirigami
|
||||
|
|
|
@ -4,11 +4,10 @@ import QtQuick.Layouts 1.15
|
|||
import QtMultimedia
|
||||
/* import QtAudioEngine 1.15 */
|
||||
import QtWebEngine 1.10
|
||||
import QtGraphicalEffects 1.15
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import org.kde.kirigami 2.13 as Kirigami
|
||||
import "./" as Presenter
|
||||
import org.presenter 1.0
|
||||
import mpv 1.0
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
|
||||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15 as Controls
|
||||
import QtQuick.Dialogs 1.3
|
||||
import QtQuick.Layouts 1.15
|
||||
import QtWebEngine 1.10
|
||||
import org.kde.kirigami 2.13 as Kirigami
|
||||
|
|
|
@ -3,7 +3,6 @@ import QtQuick.Controls 2.15 as Controls
|
|||
import org.kde.kirigami 2.13 as Kirigami
|
||||
import "./" as Presenter
|
||||
import org.presenter 1.0
|
||||
import mpv 1.0
|
||||
|
||||
ListView {
|
||||
// The active items X value from root
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
import QtQuick 2.13
|
||||
import QtQuick.Controls 2.15 as Controls
|
||||
import Qt.labs.platform 1.1 as Labs
|
||||
import QtQuick.Dialogs 1.3
|
||||
import QtQuick.Layouts 1.15
|
||||
import org.kde.kirigami 2.13 as Kirigami
|
||||
import "./" as Presenter
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import QtQuick 2.15
|
||||
import QtQuick.Dialogs 1.0
|
||||
import QtQuick.Controls 2.15 as Controls
|
||||
import QtQuick.Window 2.15
|
||||
import QtQuick.Layouts 1.15
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import QtQuick 2.13
|
||||
import QtGraphicalEffects 1.15
|
||||
import QtQuick
|
||||
import Qt5Compat.GraphicalEffects
|
||||
import org.kde.kirigami 2.13 as Kirigami
|
||||
|
||||
Item {
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
import QtQuick 2.15
|
||||
import QtQuick.Controls 2.15 as Controls
|
||||
import QtQuick.Dialogs 1.3
|
||||
import QtQuick.Layouts 1.15
|
||||
import org.kde.kirigami 2.13 as Kirigami
|
||||
import QtMultimedia
|
||||
import "./" as Presenter
|
||||
import mpv 1.0
|
||||
import org.presenter 1.0
|
||||
|
||||
Item {
|
||||
|
@ -90,19 +89,10 @@ Item {
|
|||
Layout.leftMargin: Kirigami.Units.largeSpacing
|
||||
Layout.rightMargin: Kirigami.Units.largeSpacing
|
||||
|
||||
MpvObject {
|
||||
Video {
|
||||
id: videoPreview
|
||||
width: parent.width
|
||||
height: parent.height
|
||||
objectName: "mpv"
|
||||
useHwdec: true
|
||||
enableAudio: audioOn
|
||||
Component.onCompleted: mpvLoadingTimer.start()
|
||||
onPositionChanged: videoSlider.value = position
|
||||
onFileLoaded: {
|
||||
/* showPassiveNotification(video.title + " has been loaded"); */
|
||||
videoPreview.pause();
|
||||
}
|
||||
}
|
||||
|
||||
RowLayout {
|
||||
|
@ -111,7 +101,7 @@ Item {
|
|||
height: videoTitleField.height
|
||||
spacing: 2
|
||||
Kirigami.Icon {
|
||||
source: videoPreview.isPlaying ? "media-pause" : "media-play"
|
||||
source: videoPreview.playbackState == MediaPlayer.PlayingState ? "media-pause" : "media-play"
|
||||
Layout.preferredWidth: 25
|
||||
Layout.preferredHeight: 25
|
||||
color: Kirigami.Theme.textColor
|
||||
|
@ -127,7 +117,7 @@ Item {
|
|||
Layout.preferredHeight: 25
|
||||
from: 0
|
||||
to: videoPreview.duration
|
||||
/* value: videoPreview.postion */
|
||||
value: videoPreview.postion
|
||||
live: true
|
||||
onMoved: videoPreview.seek(value);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue