previous slide actions

This commit is contained in:
Chris Cochrun 2022-04-12 06:39:32 -05:00
parent 52961bea54
commit 86a5bbf93c
3 changed files with 26 additions and 10 deletions

View file

@ -4,8 +4,9 @@
:END:
* Inbox
** TODO implement previousSlide and previousAction
[[file:~/dev/church-presenter/src/qml/presenter/Presentation.qml::function nextSlide() {]]
** TODO bug in changing slides with the arrows
[[file:~/dev/church-presenter/src/qml/presenter/Presentation.qml::function changeSlide() {]]
** TODO Check for edge cases in inputing wrong vorder and lyrics
[[file:~/dev/church-presenter/TODO.org::*Fix broken append when importing River song][Fix broken append when importing River song]]
@ -57,6 +58,9 @@
This was due to the song not having a vorder. Need to protect from edge cases of the user inputing the formatted text that doesn't fit what's expected in code.
** DONE implement previousSlide and previousAction
[[file:~/dev/church-presenter/src/qml/presenter/Presentation.qml::function nextSlide() {]]
** DONE Need to make ListModel capable of bringing in a string list [2/2] [100%]
- [X] Create a Model
- [X] Create a class that we'll make a list of in the model

View file

@ -134,6 +134,7 @@ Controls.Page {
presentation.loadVideo()
}
print(item.text.length)
if (item.text.length === 0) {
presentation.text = [""];
}

View file

@ -55,13 +55,6 @@ Item {
hoverEnabled: true
onClicked: {}
}
Controls.ToolButton {
id: backgroundButton
text: "Background"
icon.name: "fileopen"
hoverEnabled: true
onClicked: backgroundType.open()
}
}
}
@ -127,6 +120,7 @@ Item {
}
function nextSlideAction() {
print(textIndex);
if (itemType === "song") {
if (textIndex === 0) {
previewSlide.text = root.text[textIndex];
@ -158,7 +152,24 @@ Item {
}
function previousSlideAction() {
print(textIndex);
if (itemType === "song") {
if (textIndex === 0) {
clearText();
nextSlide();
} else if (textIndex <= root.text.length) {
previewSlide.text = root.text[textIndex];
print(root.text[textIndex]);
--textIndex
}
} else if (itemType === "video") {
clearText();
previousSlide();
}
else if (itemType === "image") {
clearText();
previousSlide();
}
}
function previousSlide() {