From d51e31dbbef822f8d48e4d2c4a7c7c03766c5cc7 Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Mon, 26 Oct 2009 14:39:34 +1000 Subject: use enums rather than strings in examples --- examples/declarative/animation/color-animation.qml | 6 +++--- examples/declarative/animation/property-animation.qml | 2 +- examples/declarative/progressbar/ProgressBar.qml | 2 +- examples/declarative/snow/ImageBatch.qml | 2 +- examples/declarative/snow/Loading.qml | 2 +- examples/declarative/tutorials/helloworld/tutorial3.qml | 2 +- src/declarative/fx/qfxitem.cpp | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/examples/declarative/animation/color-animation.qml b/examples/declarative/animation/color-animation.qml index 0cf8a44..edb0659 100644 --- a/examples/declarative/animation/color-animation.qml +++ b/examples/declarative/animation/color-animation.qml @@ -30,18 +30,18 @@ Item { // the sun, moon, and stars Item { width: parent.width; height: 2 * parent.height - transformOrigin: "Center" + transformOrigin: Item.Center rotation: SequentialAnimation { running: true; repeat: true NumberAnimation { from: 0; to: 360; duration: 10000 } } Image { source: "images/sun.png"; y: 10; anchors.horizontalCenter: parent.horizontalCenter - transformOrigin: "Center"; rotation: -3 * parent.rotation + transformOrigin: Item.Center; rotation: -3 * parent.rotation } Image { source: "images/moon.png"; y: parent.height - 74; anchors.horizontalCenter: parent.horizontalCenter - transformOrigin: "Center"; rotation: -parent.rotation + transformOrigin: Item.Center; rotation: -parent.rotation } Particles { x: 0; y: parent.height/2; width: parent.width; height: parent.height/2 diff --git a/examples/declarative/animation/property-animation.qml b/examples/declarative/animation/property-animation.qml index 4e0f6f4..0256137 100644 --- a/examples/declarative/animation/property-animation.qml +++ b/examples/declarative/animation/property-animation.qml @@ -26,7 +26,7 @@ Item { Image { anchors.horizontalCenter: parent.horizontalCenter source: "images/shadow.png"; y: smiley.minHeight + 58 - transformOrigin: "Center" + transformOrigin: Item.Center // The scale property depends on the y position of the smiley face. scale: smiley.y * 0.5 / (smiley.minHeight - smiley.maxHeight) diff --git a/examples/declarative/progressbar/ProgressBar.qml b/examples/declarative/progressbar/ProgressBar.qml index 48346ac..302caa9 100644 --- a/examples/declarative/progressbar/ProgressBar.qml +++ b/examples/declarative/progressbar/ProgressBar.qml @@ -21,7 +21,7 @@ Item { id: highlight; radius: 2 anchors.left: parent.left; anchors.top: parent.top; anchors.bottom: parent.bottom anchors.leftMargin: 3; anchors.topMargin: 3; anchors.bottomMargin: 3 - width: EaseFollow { source: highlight.widthDest; duration: 100 } + width: EaseFollow { source: highlight.widthDest; duration: 1000 } gradient: Gradient { GradientStop { id: g1; position: 0.0 } GradientStop { id: g2; position: 1.0 } diff --git a/examples/declarative/snow/ImageBatch.qml b/examples/declarative/snow/ImageBatch.qml index 3945087..dfe2a46 100644 --- a/examples/declarative/snow/ImageBatch.qml +++ b/examples/declarative/snow/ImageBatch.qml @@ -38,7 +38,7 @@ GridView { delegate: Item { id: root property bool isSelected: GridView.isCurrentItem && grid.isSelected - transformOrigin: "Center" + transformOrigin: Item.Center width: grid.imageWidth; height: grid.imageHeight; Image { id: flickrImage; source: url; fillMode: "PreserveAspectFit"; smooth: true; anchors.fill: parent; diff --git a/examples/declarative/snow/Loading.qml b/examples/declarative/snow/Loading.qml index 054656a..238d9c7 100644 --- a/examples/declarative/snow/Loading.qml +++ b/examples/declarative/snow/Loading.qml @@ -1,7 +1,7 @@ import Qt 4.6 Image { - id: loading; source: "pics/loading.png"; transformOrigin: "Center" + id: loading; source: "pics/loading.png"; transformOrigin: Item.Center rotation: NumberAnimation { id: rotationAnimation; from: 0; to: 360; running: loading.visible == true; repeat: true; duration: 900 } diff --git a/examples/declarative/tutorials/helloworld/tutorial3.qml b/examples/declarative/tutorials/helloworld/tutorial3.qml index d641eba..534d663 100644 --- a/examples/declarative/tutorials/helloworld/tutorial3.qml +++ b/examples/declarative/tutorials/helloworld/tutorial3.qml @@ -11,7 +11,7 @@ Rectangle { text: "Hello world!" font.pointSize: 24; font.bold: true y: 30; anchors.horizontalCenter: page.horizontalCenter - transformOrigin: "Center" + transformOrigin: Item.Center //![1] MouseRegion { id: mouseRegion; anchors.fill: parent } diff --git a/src/declarative/fx/qfxitem.cpp b/src/declarative/fx/qfxitem.cpp index 51575cc..9c668ac 100644 --- a/src/declarative/fx/qfxitem.cpp +++ b/src/declarative/fx/qfxitem.cpp @@ -1377,7 +1377,7 @@ QFxItem::~QFxItem() \qml Image { source: "myimage.png" - transformOrigin: "Center" + transformOrigin: Item.Center scale: 4 } \endqml -- cgit v0.12