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
|
@ -1,6 +1,4 @@
|
||||||
;;; Directory Local Variables
|
;;; Directory Local Variables
|
||||||
;;; For more information see (info "(emacs) Directory Variables")
|
;;; For more information see (info "(emacs) Directory Variables")
|
||||||
;;; Directory Local Variables
|
|
||||||
;;; For more information see (info "(emacs) Directory Variables")
|
|
||||||
|
|
||||||
((nil . ((compile-command . "cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -B build/ . && make --dir build/"))))
|
((nil . ((compile-command . "cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -B build/ . && make --dir build/"))))
|
||||||
|
|
|
@ -107,6 +107,7 @@ ColumnLayout {
|
||||||
onClicked: {
|
onClicked: {
|
||||||
serviceItemList.currentIndex = index;
|
serviceItemList.currentIndex = index;
|
||||||
showPassiveNotification(serviceItemList.currentIndex);
|
showPassiveNotification(serviceItemList.currentIndex);
|
||||||
|
changeSlideBackground(background, backgroundType);
|
||||||
changeSlideText(text);
|
changeSlideText(text);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -142,15 +143,22 @@ ColumnLayout {
|
||||||
name: "10,000 Reason"
|
name: "10,000 Reason"
|
||||||
type: "song"
|
type: "song"
|
||||||
text: "YIP YIP!"
|
text: "YIP YIP!"
|
||||||
|
backgroundType: "image"
|
||||||
|
background: "file:/home/chris/nextcloud/tfc/openlp/CMG - Nature King 21.jpg"
|
||||||
}
|
}
|
||||||
ListElement {
|
ListElement {
|
||||||
name: "Marvelous Light"
|
name: "Marvelous Light"
|
||||||
type: "song"
|
type: "song"
|
||||||
text: "YIP YIP!"
|
text: "HALLELUJAH!"
|
||||||
|
backgroundType: "video"
|
||||||
|
background: "file:/home/chris/nextcloud/tfc/openlp/Fire Embers_Loop.mp4"
|
||||||
}
|
}
|
||||||
ListElement {
|
ListElement {
|
||||||
name: "10,000 Reason"
|
name: "Test"
|
||||||
type: "song"
|
type: "video"
|
||||||
|
text: ""
|
||||||
|
backgroundType: "video"
|
||||||
|
background: "file:/home/chris/nextcloud/tfc/openlp/videos/test.mp4"
|
||||||
}
|
}
|
||||||
ListElement {
|
ListElement {
|
||||||
name: "Marvelous Light"
|
name: "Marvelous Light"
|
||||||
|
|
|
@ -62,8 +62,8 @@ Controls.Page {
|
||||||
id: mainPageArea
|
id: mainPageArea
|
||||||
Controls.SplitView.fillHeight: true
|
Controls.SplitView.fillHeight: true
|
||||||
Controls.SplitView.fillWidth: true
|
Controls.SplitView.fillWidth: true
|
||||||
Controls.SplitView.preferredWidth: 700
|
Controls.SplitView.preferredWidth: 500
|
||||||
Controls.SplitView.minimumWidth: 500
|
Controls.SplitView.minimumWidth: 200
|
||||||
initialItem: Presenter.Presentation { id: presentation }
|
initialItem: Presenter.Presentation { id: presentation }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,11 +152,25 @@ Controls.Page {
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeSlideText(text) {
|
function changeSlideText(text) {
|
||||||
showPassiveNotification("used to be: " + presentation.text);
|
/* showPassiveNotification("used to be: " + presentation.text); */
|
||||||
presentation.text = text;
|
presentation.text = text;
|
||||||
showPassiveNotification("next");
|
/* showPassiveNotification("next"); */
|
||||||
presentationSlide.text = text;
|
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) {
|
function editSwitch(edit) {
|
||||||
|
|
|
@ -10,7 +10,9 @@ import "./" as Presenter
|
||||||
Item {
|
Item {
|
||||||
id: root
|
id: root
|
||||||
|
|
||||||
property string text: "GOOD"
|
property string text
|
||||||
|
property url imagebackground
|
||||||
|
property url vidbackground
|
||||||
|
|
||||||
GridLayout {
|
GridLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -61,22 +63,25 @@ Item {
|
||||||
|
|
||||||
Kirigami.Icon {
|
Kirigami.Icon {
|
||||||
source: "arrow-left"
|
source: "arrow-left"
|
||||||
Layout.preferredWidth: 200
|
Layout.preferredWidth: 100
|
||||||
Layout.preferredHeight: 200
|
Layout.preferredHeight: 200
|
||||||
Layout.alignment: Qt.AlignRight
|
Layout.alignment: Qt.AlignRight
|
||||||
}
|
}
|
||||||
|
|
||||||
Presenter.Slide {
|
Presenter.Slide {
|
||||||
|
id: previewSlide
|
||||||
Layout.preferredWidth: 900
|
Layout.preferredWidth: 900
|
||||||
Layout.preferredHeight: width / 16 * 9
|
Layout.preferredHeight: width / 16 * 9
|
||||||
Layout.alignment: Qt.AlignCenter
|
Layout.alignment: Qt.AlignCenter
|
||||||
textSize: width / 15
|
textSize: width / 15
|
||||||
text: root.text
|
text: root.text
|
||||||
|
imageSource: imagebackground
|
||||||
|
videoSource: vidbackground
|
||||||
}
|
}
|
||||||
|
|
||||||
Kirigami.Icon {
|
Kirigami.Icon {
|
||||||
source: "arrow-right"
|
source: "arrow-right"
|
||||||
Layout.preferredWidth: 200
|
Layout.preferredWidth: 100
|
||||||
Layout.preferredHeight: 200
|
Layout.preferredHeight: 200
|
||||||
Layout.alignment: Qt.AlignLeft
|
Layout.alignment: Qt.AlignLeft
|
||||||
}
|
}
|
||||||
|
@ -89,4 +94,8 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function loadVideo() {
|
||||||
|
previewSlide.loadVideo();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,8 @@ Item {
|
||||||
Component.onCompleted: mpvLoadingTimer.start()
|
Component.onCompleted: mpvLoadingTimer.start()
|
||||||
onFileLoaded: {
|
onFileLoaded: {
|
||||||
print(videoSource + " has been loaded");
|
print(videoSource + " has been loaded");
|
||||||
mpv.setProperty("loop", "inf");
|
if (itemType == "song")
|
||||||
|
mpv.setProperty("loop", "inf");
|
||||||
print(mpv.getProperty("loop"));
|
print(mpv.getProperty("loop"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,4 +109,8 @@ Item {
|
||||||
function changeText(text) {
|
function changeText(text) {
|
||||||
lyrics.text = text
|
lyrics.text = text
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function loadVideo() {
|
||||||
|
mpvLoadingTimer.restart()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue