summaryrefslogtreecommitdiffstats
path: root/src/controls
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@digia.com>2013-03-25 10:57:59 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-28 09:35:31 +0100
commit31970f7f988264ddcba07a15b620ea34f9a6b2c0 (patch)
tree0b0f3c9dfd76ae9af072863ef53cd9f35fabdd83 /src/controls
parent7e2ec122bd44aa6a50c310392edb8d2f22d6e12c (diff)
PageStack: rename PageAnimation to StackViewTransition
Change-Id: I38698118b469bfbb64d16d562a4c67f5b27a761a Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src/controls')
-rw-r--r--src/controls/PageStack.qml14
-rw-r--r--src/controls/StackViewTransition.qml (renamed from src/controls/PageAnimation.qml)0
-rw-r--r--src/controls/controls.pro2
-rw-r--r--src/controls/qmldir2
4 files changed, 9 insertions, 9 deletions
diff --git a/src/controls/PageStack.qml b/src/controls/PageStack.qml
index a6b41ea1f..eeb3d8882 100644
--- a/src/controls/PageStack.qml
+++ b/src/controls/PageStack.qml
@@ -383,16 +383,16 @@ import "Private/PageStack.js" as JSArray
You can override this function for your transition if you need extra logic to decide which
animation to run. You could for example introspect the pages, and return different animations
depending on the their internal state. PageStack will expect you to return a Component that
- contains a PageAnimation, or a PageAnimation directly. The former is easier, as PageStack will
+ contains a StackViewTransition, or a StackViewTransition directly. The former is easier, as PageStack will
then create the animation and later destroy it when it's done, while avoiding any sideeffects
- caused by the animation being alive long after it ran. Returning a PageAnimation directly
+ caused by the animation being alive long after it ran. Returning a StackViewTransition directly
can be useful if you need to write some sort of animation caching for performance reasons.
As an optimization, you can also return \c null to signal that you just want to show/hide the pages
immediately without creating or running any animations.
- \c properties contains the same properties that will be assigned to the PageAnimation object by
- PageStack. In fact, you can add more properties to this object during the call
- if you need to initialize additional properties of your custom PageAnimation when the returned
+ \c properties contains the properties that will be assigned to the StackViewTransition before
+ it runs. In fact, you can add more properties to this object during the call
+ if you need to initialize additional properties of your custom StackViewTransition when the returned
component is instanciated.
The following example shows how you can decide run-time which animation to use:
@@ -410,7 +410,7 @@ import "Private/PageStack.js" as JSArray
properties.exitPage.y = 0
}
- property Component horizontalAnimation: PageAnimation {
+ property Component horizontalAnimation: StackViewTransition {
PropertyAnimation {
target: enterPage
property: "x"
@@ -427,7 +427,7 @@ import "Private/PageStack.js" as JSArray
}
}
- property Component verticalAnimation: PageAnimation {
+ property Component verticalAnimation: StackViewTransition {
PropertyAnimation {
target: enterPage
property: "y"
diff --git a/src/controls/PageAnimation.qml b/src/controls/StackViewTransition.qml
index 2e9c3f0f7..2e9c3f0f7 100644
--- a/src/controls/PageAnimation.qml
+++ b/src/controls/StackViewTransition.qml
diff --git a/src/controls/controls.pro b/src/controls/controls.pro
index 3e1b70ce1..d395afa3f 100644
--- a/src/controls/controls.pro
+++ b/src/controls/controls.pro
@@ -14,7 +14,6 @@ QML_FILES = \
Label.qml \
MenuBar.qml \
Menu.qml \
- PageAnimation.qml \
PageStack.qml \
ProgressBar.qml \
RadioButton.qml \
@@ -23,6 +22,7 @@ QML_FILES = \
SpinBox.qml \
SplitView.qml \
StackViewDelegate.qml \
+ StackViewTransition.qml \
StatusBar.qml \
Tab.qml \
TabView.qml \
diff --git a/src/controls/qmldir b/src/controls/qmldir
index 2cd2db5a5..04c17f561 100644
--- a/src/controls/qmldir
+++ b/src/controls/qmldir
@@ -8,7 +8,6 @@ GroupBox 1.0 GroupBox.qml
Label 1.0 Label.qml
MenuBar 1.0 MenuBar.qml
Menu 1.0 Menu.qml
-PageAnimation 1.0 PageAnimation.qml
PageStack 1.0 PageStack.qml
ProgressBar 1.0 ProgressBar.qml
RadioButton 1.0 RadioButton.qml
@@ -17,6 +16,7 @@ Slider 1.0 Slider.qml
SpinBox 1.0 SpinBox.qml
SplitView 1.0 SplitView.qml
StackViewDelegate 1.0 StackViewDelegate.qml
+StackViewTransition 1.0 StackViewTransition.qml
StatusBar 1.0 StatusBar.qml
Tab 1.0 Tab.qml
TabView 1.0 TabView.qml