From 14fa7b91a07a942e70fc211c7a789754a7111ac1 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Thu, 19 May 2011 08:28:01 +0200 Subject: Rotated launchers and some fixes to tutorial --- Qt/labs/presentation/Presentation.qml | 8 ++++++-- examples/animatedbackground/SlideDeckRotated.qml | 15 +++++++++++++++ examples/customtransition/SlideDeckRotated.qml | 15 +++++++++++++++ examples/tutorial/SlideDeck.qml | 17 +++++------------ examples/tutorial/SlideDeckRotated.qml | 15 +++++++++++++++ 5 files changed, 56 insertions(+), 14 deletions(-) create mode 100644 examples/animatedbackground/SlideDeckRotated.qml create mode 100644 examples/customtransition/SlideDeckRotated.qml create mode 100644 examples/tutorial/SlideDeckRotated.qml diff --git a/Qt/labs/presentation/Presentation.qml b/Qt/labs/presentation/Presentation.qml index b985880..24863e3 100644 --- a/Qt/labs/presentation/Presentation.qml +++ b/Qt/labs/presentation/Presentation.qml @@ -39,8 +39,10 @@ Item { if (root.currentSlide + 1 < root.slides.length) { var from = slides[currentSlide] var to = slides[currentSlide + 1] - if (switchSlides(from, to)) + if (switchSlides(from, to)) { currentSlide = currentSlide + 1; + root.focus = true; + } } } @@ -50,8 +52,10 @@ Item { if (root.currentSlide - 1 >= 0) { var from = slides[currentSlide] var to = slides[currentSlide - 1] - if (switchSlides(from, to)) + if (switchSlides(from, to)) { currentSlide = currentSlide - 1; + root.focus = true; + } } } diff --git a/examples/animatedbackground/SlideDeckRotated.qml b/examples/animatedbackground/SlideDeckRotated.qml new file mode 100644 index 0000000..a688fc9 --- /dev/null +++ b/examples/animatedbackground/SlideDeckRotated.qml @@ -0,0 +1,15 @@ +import QtQuick 2.0 + +Item +{ + height: 640 + width: 360 + Item { + rotation: 90 + SlideDeck { + y: -360 + width: 640 + height: 360 + } + } +} diff --git a/examples/customtransition/SlideDeckRotated.qml b/examples/customtransition/SlideDeckRotated.qml new file mode 100644 index 0000000..a688fc9 --- /dev/null +++ b/examples/customtransition/SlideDeckRotated.qml @@ -0,0 +1,15 @@ +import QtQuick 2.0 + +Item +{ + height: 640 + width: 360 + Item { + rotation: 90 + SlideDeck { + y: -360 + width: 640 + height: 360 + } + } +} diff --git a/examples/tutorial/SlideDeck.qml b/examples/tutorial/SlideDeck.qml index f592751..b41a0da 100644 --- a/examples/tutorial/SlideDeck.qml +++ b/examples/tutorial/SlideDeck.qml @@ -20,32 +20,25 @@ Presentation ] CodeSection { - text: " -import Prezo 1.0 - -Presentation + text: "Presentation { width: 640 height: 360 - // Define a background... - // Default is white.. + // Define a background color... Rectangle { - id: backgroundColor anchors.fill: parent - color: \"blue\" + color: \"white\" } - // Set text color - property color textColor: \"white\" + property color textColor: \"black\" // Then define slide elements Slide { ... } Slide { ... } Slide { ... } ... -} - " +}" } } diff --git a/examples/tutorial/SlideDeckRotated.qml b/examples/tutorial/SlideDeckRotated.qml new file mode 100644 index 0000000..a688fc9 --- /dev/null +++ b/examples/tutorial/SlideDeckRotated.qml @@ -0,0 +1,15 @@ +import QtQuick 2.0 + +Item +{ + height: 640 + width: 360 + Item { + rotation: 90 + SlideDeck { + y: -360 + width: 640 + height: 360 + } + } +} -- cgit v1.2.3