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:
parent
e2e6c7f428
commit
219e2312c7
4 changed files with 68 additions and 25 deletions
|
@ -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(); */
|
||||
|
|
|
@ -336,6 +336,9 @@ FocusScope {
|
|||
previewSlide.playVideo();
|
||||
pauseVideo();
|
||||
}
|
||||
function onRevealNext() {
|
||||
previewSlide.revealNext();
|
||||
}
|
||||
}
|
||||
|
||||
Timer {
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue