summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Alpert <aalpert@blackberry.com>2013-10-17 10:34:16 -0700
committerAlan Alpert <aalpert@blackberry.com>2013-10-21 22:22:20 +0200
commitd00dd05de4ea18f6aba30c4d4e23531769961b8c (patch)
tree36c733c77669bd3107c6ca74deb4d5b904c02901
parent171c7228d39e5fcb7d034f3f6bbb82ad61a33eb8 (diff)
Add a point-by-point reveal option
Change-Id: I9addb0ee7685b5e583315432b4f3c7c25a6904d0 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
-rw-r--r--src/Presentation.qml5
-rw-r--r--src/Slide.qml14
-rw-r--r--tools/printslides/slideview.cpp1
3 files changed, 20 insertions, 0 deletions
diff --git a/src/Presentation.qml b/src/Presentation.qml
index e988354..086e907 100644
--- a/src/Presentation.qml
+++ b/src/Presentation.qml
@@ -50,6 +50,7 @@ Item {
property int currentSlide;
property bool showNotes: false;
+ property bool allowDelay: true;
property color titleColor: textColor;
property color textColor: "black"
@@ -90,6 +91,10 @@ Item {
root._userNum = 0
if (_faded)
return
+ if (root.slides[currentSlide].delayPoints) {
+ if (root.slides[currentSlide]._advance())
+ return;
+ }
if (root.currentSlide + 1 < root.slides.length) {
var from = slides[currentSlide]
var to = slides[currentSlide + 1]
diff --git a/src/Slide.qml b/src/Slide.qml
index eff235c..c440cfb 100644
--- a/src/Slide.qml
+++ b/src/Slide.qml
@@ -52,6 +52,19 @@ Item {
property bool isSlide: true;
+ property bool delayPoints: false;
+ property int _pointCounter: 0;
+ function _advance() {
+ if (!parent.allowDelay)
+ return false;
+
+ _pointCounter = _pointCounter + 1;
+ if (_pointCounter < content.length)
+ return true;
+ _pointCounter = 0;
+ return false;
+ }
+
property string title;
property variant content: []
property string centeredText
@@ -149,6 +162,7 @@ Item {
height: text.height + (nextIndentLevel == 0 ? 1 : 0.3) * slide.baseFontSize * slide.bulletSpacing
x: slide.baseFontSize * indentLevel
+ visible: (!slide.parent.allowDelay || !delayPoints) || index <= _pointCounter
Rectangle {
id: dot
diff --git a/tools/printslides/slideview.cpp b/tools/printslides/slideview.cpp
index 66ba760..e7dc3aa 100644
--- a/tools/printslides/slideview.cpp
+++ b/tools/printslides/slideview.cpp
@@ -63,6 +63,7 @@ void SlideView::updateStatus(QQuickView::Status status) {
}
else qDebug() << "Found qml Presentation as rootObject";
+ ri->setProperty("allowDelay", QVariant(false));//Disable partial reveals on slide pages
QList<QVariant> slides = ri->property("slides").toList();
m_slidesLeft = slides.size();
qDebug() << "SlideCount: " << m_slidesLeft;