summaryrefslogtreecommitdiffstats
path: root/experimental/qt5-intro-android/presentation/Presentation.qml
diff options
context:
space:
mode:
Diffstat (limited to 'experimental/qt5-intro-android/presentation/Presentation.qml')
-rw-r--r--experimental/qt5-intro-android/presentation/Presentation.qml30
1 files changed, 29 insertions, 1 deletions
diff --git a/experimental/qt5-intro-android/presentation/Presentation.qml b/experimental/qt5-intro-android/presentation/Presentation.qml
index 81e5773..ace4d59 100644
--- a/experimental/qt5-intro-android/presentation/Presentation.qml
+++ b/experimental/qt5-intro-android/presentation/Presentation.qml
@@ -101,6 +101,9 @@ Item {
root.focus = true;
}
}
+ timer.stop()
+ if (slides[currentSlide].shouldTimeout)
+ timer.start()
}
function goToPreviousSlide() {
@@ -116,6 +119,7 @@ Item {
root.focus = true;
}
}
+ timer.stop()
}
function goToUserSlide() {
@@ -132,10 +136,17 @@ Item {
root.focus = true;
}
}
+ timer.stop()
}
- focus: true
+ Timer {
+ id: timer
+ interval: slides[currentSlide].timeout > 0 ? slides[currentSlide].timeout : 7000
+ running: false
+ onTriggered: goToNextSlide()
+ }
+ focus: true
Keys.onSpacePressed: goToNextSlide()
Keys.onRightPressed: goToNextSlide()
@@ -212,4 +223,21 @@ Item {
font.italic: notes == "";
}
}
+
+ Text {
+ id: tapToAdvance
+ color: textColor
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: parent.height * 0.01
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: "[ Tap to advance ]"
+ font.family: fontFamily
+ font.pixelSize: slides[currentSlide].baseFontSize
+ opacity: slides[currentSlide].showTapToAdvance ? 1.0 : 0.0
+ visible: opacity > 0.0
+
+ Behavior on opacity {
+ NumberAnimation { duration: 400 }
+ }
+ }
}