adding backgrounds to preview and changing from left dock
This commit is contained in:
parent
61273e5390
commit
1fa5aa8a0a
5 changed files with 48 additions and 14 deletions
|
@ -107,6 +107,7 @@ ColumnLayout {
|
|||
onClicked: {
|
||||
serviceItemList.currentIndex = index;
|
||||
showPassiveNotification(serviceItemList.currentIndex);
|
||||
changeSlideBackground(background, backgroundType);
|
||||
changeSlideText(text);
|
||||
}
|
||||
}
|
||||
|
@ -142,15 +143,22 @@ ColumnLayout {
|
|||
name: "10,000 Reason"
|
||||
type: "song"
|
||||
text: "YIP YIP!"
|
||||
backgroundType: "image"
|
||||
background: "file:/home/chris/nextcloud/tfc/openlp/CMG - Nature King 21.jpg"
|
||||
}
|
||||
ListElement {
|
||||
name: "Marvelous Light"
|
||||
type: "song"
|
||||
text: "YIP YIP!"
|
||||
text: "HALLELUJAH!"
|
||||
backgroundType: "video"
|
||||
background: "file:/home/chris/nextcloud/tfc/openlp/Fire Embers_Loop.mp4"
|
||||
}
|
||||
ListElement {
|
||||
name: "10,000 Reason"
|
||||
type: "song"
|
||||
name: "Test"
|
||||
type: "video"
|
||||
text: ""
|
||||
backgroundType: "video"
|
||||
background: "file:/home/chris/nextcloud/tfc/openlp/videos/test.mp4"
|
||||
}
|
||||
ListElement {
|
||||
name: "Marvelous Light"
|
||||
|
|
|
@ -62,8 +62,8 @@ Controls.Page {
|
|||
id: mainPageArea
|
||||
Controls.SplitView.fillHeight: true
|
||||
Controls.SplitView.fillWidth: true
|
||||
Controls.SplitView.preferredWidth: 700
|
||||
Controls.SplitView.minimumWidth: 500
|
||||
Controls.SplitView.preferredWidth: 500
|
||||
Controls.SplitView.minimumWidth: 200
|
||||
initialItem: Presenter.Presentation { id: presentation }
|
||||
}
|
||||
|
||||
|
@ -152,11 +152,25 @@ Controls.Page {
|
|||
}
|
||||
|
||||
function changeSlideText(text) {
|
||||
showPassiveNotification("used to be: " + presentation.text);
|
||||
/* showPassiveNotification("used to be: " + presentation.text); */
|
||||
presentation.text = text;
|
||||
showPassiveNotification("next");
|
||||
/* showPassiveNotification("next"); */
|
||||
presentationSlide.text = text;
|
||||
showPassiveNotification("last");
|
||||
/* showPassiveNotification("last"); */
|
||||
}
|
||||
|
||||
function changeSlideBackground(background, type) {
|
||||
showPassiveNotification("starting background change..");
|
||||
showPassiveNotification(background);
|
||||
showPassiveNotification(type);
|
||||
if (type == "image") {
|
||||
presentation.vidbackground = "";
|
||||
presentation.imagebackground = background;
|
||||
} else {
|
||||
presentation.imagebackground = "";
|
||||
presentation.vidbackground = background;
|
||||
presentation.loadVideo()
|
||||
}
|
||||
}
|
||||
|
||||
function editSwitch(edit) {
|
||||
|
|
|
@ -10,7 +10,9 @@ import "./" as Presenter
|
|||
Item {
|
||||
id: root
|
||||
|
||||
property string text: "GOOD"
|
||||
property string text
|
||||
property url imagebackground
|
||||
property url vidbackground
|
||||
|
||||
GridLayout {
|
||||
anchors.fill: parent
|
||||
|
@ -61,22 +63,25 @@ Item {
|
|||
|
||||
Kirigami.Icon {
|
||||
source: "arrow-left"
|
||||
Layout.preferredWidth: 200
|
||||
Layout.preferredWidth: 100
|
||||
Layout.preferredHeight: 200
|
||||
Layout.alignment: Qt.AlignRight
|
||||
}
|
||||
|
||||
Presenter.Slide {
|
||||
id: previewSlide
|
||||
Layout.preferredWidth: 900
|
||||
Layout.preferredHeight: width / 16 * 9
|
||||
Layout.alignment: Qt.AlignCenter
|
||||
textSize: width / 15
|
||||
text: root.text
|
||||
imageSource: imagebackground
|
||||
videoSource: vidbackground
|
||||
}
|
||||
|
||||
Kirigami.Icon {
|
||||
source: "arrow-right"
|
||||
Layout.preferredWidth: 200
|
||||
Layout.preferredWidth: 100
|
||||
Layout.preferredHeight: 200
|
||||
Layout.alignment: Qt.AlignLeft
|
||||
}
|
||||
|
@ -89,4 +94,8 @@ Item {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
function loadVideo() {
|
||||
previewSlide.loadVideo();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -39,7 +39,8 @@ Item {
|
|||
Component.onCompleted: mpvLoadingTimer.start()
|
||||
onFileLoaded: {
|
||||
print(videoSource + " has been loaded");
|
||||
mpv.setProperty("loop", "inf");
|
||||
if (itemType == "song")
|
||||
mpv.setProperty("loop", "inf");
|
||||
print(mpv.getProperty("loop"));
|
||||
}
|
||||
|
||||
|
@ -108,4 +109,8 @@ Item {
|
|||
function changeText(text) {
|
||||
lyrics.text = text
|
||||
}
|
||||
|
||||
function loadVideo() {
|
||||
mpvLoadingTimer.restart()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue