gave the slide a black to put in front of loading videos
This commit is contained in:
parent
62e1b07ec1
commit
e52d44f937
10 changed files with 136 additions and 12 deletions
|
@ -109,7 +109,9 @@ Controls.Page {
|
|||
function changeServiceItem(index) {
|
||||
const item = serviceItemModel.getItem(index);
|
||||
|
||||
presentation.stopVideo()
|
||||
presentation.itemType = item.type;
|
||||
print("Time to start changing");
|
||||
|
||||
if (item.backgroundType === "image") {
|
||||
presentation.vidbackground = "";
|
||||
|
|
|
@ -16,7 +16,7 @@ Item {
|
|||
property url imagebackground
|
||||
property url vidbackground
|
||||
|
||||
Component.onCompleted: nextSlideText()
|
||||
Component.onCompleted: nextSlideAction()
|
||||
|
||||
GridLayout {
|
||||
anchors.fill: parent
|
||||
|
@ -122,6 +122,10 @@ Item {
|
|||
previewSlide.loadVideo();
|
||||
}
|
||||
|
||||
function stopVideo() {
|
||||
previewSlide.stopVideo()
|
||||
}
|
||||
|
||||
function nextSlideAction() {
|
||||
if (itemType === "song") {
|
||||
if (textIndex === 0) {
|
||||
|
@ -135,13 +139,17 @@ Item {
|
|||
} else {
|
||||
print("Next slide time");
|
||||
textIndex = 0;
|
||||
previewSlide.text = "";
|
||||
clearText();
|
||||
nextSlide();
|
||||
}
|
||||
} else if (itemType === "video")
|
||||
} else if (itemType === "video") {
|
||||
clearText();
|
||||
nextSlide();
|
||||
else if (itemType === "image")
|
||||
}
|
||||
else if (itemType === "image") {
|
||||
clearText();
|
||||
nextSlide();
|
||||
}
|
||||
}
|
||||
|
||||
function nextSlide() {
|
||||
|
@ -149,4 +157,8 @@ Item {
|
|||
changeServiceItem(currentServiceItem);
|
||||
print(slideItem);
|
||||
}
|
||||
|
||||
function clearText() {
|
||||
previewSlide.text = "";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,8 +72,26 @@ Item {
|
|||
|
||||
Timer {
|
||||
id: mpvLoadingTimer
|
||||
interval: 100
|
||||
onTriggered: mpv.loadFile(videoSource.toString())
|
||||
interval: 2
|
||||
onTriggered: {
|
||||
mpv.loadFile(videoSource.toString());
|
||||
blackTimer.restart();
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
id: blackTimer
|
||||
interval: 400
|
||||
onTriggered: {
|
||||
black.visible = false;
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: black
|
||||
color: "Black"
|
||||
anchors.fill: parent
|
||||
visible: false
|
||||
}
|
||||
|
||||
Image {
|
||||
|
@ -89,7 +107,7 @@ Item {
|
|||
FastBlur {
|
||||
id: imageBlue
|
||||
anchors.fill: parent
|
||||
source: imageSource == "" ? mpv : backgroundImage
|
||||
source: imageSource === "" ? mpv : backgroundImage
|
||||
radius: blurRadius
|
||||
|
||||
Controls.Label {
|
||||
|
@ -126,6 +144,8 @@ Item {
|
|||
}
|
||||
|
||||
function stopVideo() {
|
||||
mpv.stop()
|
||||
mpv.stop();
|
||||
black.visible = true;
|
||||
showPassiveNotification("Black is: " + black.visible);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ Item {
|
|||
|
||||
property string imageBackground
|
||||
property string videoBackground
|
||||
property string textAlignment
|
||||
|
||||
Presenter.Slide {
|
||||
id: representation
|
||||
|
@ -23,4 +24,23 @@ Item {
|
|||
videoSource: videoBackground
|
||||
preview: true
|
||||
}
|
||||
|
||||
Component.onCompleted: updateHAlignment(textAlignment)
|
||||
|
||||
function updateHAlignment(alignment) {
|
||||
switch (alignment) {
|
||||
case "left" :
|
||||
representation.horizontalAlignment = Text.AlignLeft;
|
||||
break;
|
||||
case "center" :
|
||||
representation.horizontalAlignment = Text.AlignHCenter;
|
||||
break;
|
||||
case "right" :
|
||||
representation.horizontalAlignment = Text.AlignRight;
|
||||
break;
|
||||
case "justify" :
|
||||
representation.horizontalAlignment = Text.AlignJustify;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ Item {
|
|||
property string songVorder
|
||||
property string songBackground
|
||||
property string songBackgroundType
|
||||
property string songHAlignment
|
||||
|
||||
GridLayout {
|
||||
id: mainLayout
|
||||
|
@ -50,18 +51,28 @@ Item {
|
|||
model: ["Left", "Center", "Right", "Justify"]
|
||||
implicitWidth: 100
|
||||
hoverEnabled: true
|
||||
onCurrentTextChanged: updateTextAlignment(currentText.toLowerCase());
|
||||
}
|
||||
Controls.ComboBox {
|
||||
model: ["Top", "Center", "Bottom"]
|
||||
implicitWidth: 100
|
||||
hoverEnabled: true
|
||||
onCurrentTextChanged: print(currentText.toLowerCase());
|
||||
}
|
||||
Controls.ToolButton {
|
||||
text: "B"
|
||||
hoverEnabled: true
|
||||
visible: false
|
||||
}
|
||||
Controls.ToolButton {
|
||||
text: "I"
|
||||
hoverEnabled: true
|
||||
visible: false
|
||||
}
|
||||
Controls.ToolButton {
|
||||
text: "U"
|
||||
hoverEnabled: true
|
||||
visible: false
|
||||
}
|
||||
Controls.ToolSeparator {}
|
||||
Item { Layout.fillWidth: true }
|
||||
|
@ -215,6 +226,7 @@ Item {
|
|||
Layout.bottomMargin: 30
|
||||
Layout.rightMargin: 20
|
||||
Layout.leftMargin: 20
|
||||
textAlignment: songHAlignment
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -273,6 +285,7 @@ Item {
|
|||
songVorder = song[5];
|
||||
songBackground = song[6];
|
||||
songBackgroundType = song[7];
|
||||
songHAlignment = song[8];
|
||||
if (songBackgroundType == "image") {
|
||||
slideEditor.videoBackground = "";
|
||||
slideEditor.imageBackground = songBackground;
|
||||
|
@ -313,4 +326,8 @@ Item {
|
|||
songsqlmodel.updateBackgroundType(songIndex, backgroundType);
|
||||
print("changed background");
|
||||
}
|
||||
|
||||
function updateTextAlignment(textAlignment) {
|
||||
songsqlmodel.updateTextAlignment(songIndex, textAlignment)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue