reveal presentations now move forward using signals

Rather than the logic in qml, I've moved it to rust and am using
signals to tell the ui to change.
This commit is contained in:
Chris Cochrun 2023-11-15 09:48:29 -06:00
parent e2e6c7f428
commit 219e2312c7
4 changed files with 68 additions and 25 deletions

View file

@ -217,18 +217,18 @@ Controls.Page {
console.log("text: " + item.text);
console.log("slide_index: " + item.slideIndex);
console.log("slide_count: " + item.imageCount);
if (item.html) {
let index = item.slideIndex;
let count = item.imageCount;
if (index > 0 && index < count - 1) {
console.log("I should advance revealy");
if (isMoveDown)
presentation.revealNext()
else
presentation.revealPrev()
return
}
}
/* if (item.html) { */
/* let index = item.slideIndex; */
/* let count = item.imageCount; */
/* if (index > 0 && index < count - 1) { */
/* console.log("I should advance revealy"); */
/* if (isMoveDown) */
/* presentation.revealNext() */
/* else */
/* presentation.revealPrev() */
/* return */
/* } */
/* } */
/* presentation.stopVideo(); */
/* pWindow.stopVideo(); */

View file

@ -336,6 +336,9 @@ FocusScope {
previewSlide.playVideo();
pauseVideo();
}
function onRevealNext() {
previewSlide.revealNext();
}
}
Timer {

View file

@ -193,6 +193,18 @@ Item {
}
}
Connections {
target: SlideObject
function onRevealNext() {
console.log("revealNext")
web.runJavaScript("Reveal.next()")
}
function onRevealPrev() {
console.log("revealPrev")
web.runJavaScript("Reveal.prev()")
}
}
function changeText(text) {
lyrics.text = text
}