From 52961bea5423eed07f9cefc16a7a4036f59802f4 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Mon, 11 Apr 2022 17:32:42 -0500 Subject: [PATCH] adding todo and previousSlide and refactor nextSlide --- TODO.org | 2 ++ src/qml/presenter/MainWindow.qml | 1 + src/qml/presenter/Presentation.qml | 22 +++++++++++++++------- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/TODO.org b/TODO.org index 262bb65..28594ca 100644 --- a/TODO.org +++ b/TODO.org @@ -4,6 +4,8 @@ :END: * Inbox +** TODO implement previousSlide and previousAction +[[file:~/dev/church-presenter/src/qml/presenter/Presentation.qml::function nextSlide() {]] ** 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]] diff --git a/src/qml/presenter/MainWindow.qml b/src/qml/presenter/MainWindow.qml index 9fb41e7..9eebae1 100644 --- a/src/qml/presenter/MainWindow.qml +++ b/src/qml/presenter/MainWindow.qml @@ -183,6 +183,7 @@ Controls.Page { videoEditor.visible = false; videoEditor.stop(); songEditor.visible = false; + imageEditor.visible = false; presentation.visible = true; editMode = false; } diff --git a/src/qml/presenter/Presentation.qml b/src/qml/presenter/Presentation.qml index e028bcf..ee6926b 100644 --- a/src/qml/presenter/Presentation.qml +++ b/src/qml/presenter/Presentation.qml @@ -79,7 +79,7 @@ Item { Layout.alignment: Qt.AlignRight MouseArea { anchors.fill: parent - onPressed: changeSlidePrevious() + onPressed: previousSlideAction() cursorShape: Qt.PointingHandCursor } } @@ -152,6 +152,20 @@ Item { } } + function nextSlide() { + changeServiceItem(currentServiceItem++); + print(slideItem); + } + + function previousSlideAction() { + + } + + function previousSlide() { + changeServiceItem(--currentServiceItem); + print(slideItem); + } + function changeSlide() { if (itemType === "song") { previewSlide.text = root.text[textIndex]; @@ -165,12 +179,6 @@ Item { } } - function nextSlide() { - currentServiceItem++; - changeServiceItem(currentServiceItem); - print(slideItem); - } - function clearText() { previewSlide.text = ""; }