add looping for slides

This add looping primarily for videos but I've added in the groundwork
for looping through any kind of slide. This obviously will be
implemented differently for each type of slide, but this way the
groundwork is done already.
This commit is contained in:
Chris Cochrun 2023-03-06 15:06:18 -06:00
parent caded1027c
commit caa2e31d99
15 changed files with 130 additions and 49 deletions

View file

@ -127,6 +127,7 @@ FocusScope {
chosenFont: SlideObject.font
text: SlideObject.text
pdfIndex: SlideObject.pdfIndex
vidLoop: SlideObject.loop
preview: true
}
@ -173,8 +174,8 @@ FocusScope {
Controls.Switch {
id: loopSwitch
text: "Loop"
checked: previewSlide.mpvLoop === "inf" ? true : false
onToggled: mainPage.loopVideo()
checked: SlideObject.loop
onToggled: SlideObject.setLoop(!SlideObject.loop)
Keys.onLeftPressed: previousSlideAction()
Keys.onRightPressed: nextSlideAction()
Keys.onUpPressed: previousSlideAction()