summaryrefslogtreecommitdiffstats
path: root/examples/declarative/snow
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2009-10-06 04:05:40 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2009-10-06 04:05:40 (GMT)
commit43199af242918b3c77bb47bdcc3ec60f8236b0d3 (patch)
tree94293b06614afbd3a2a89004204a23e7228a3d51 /examples/declarative/snow
parentb9663faad39ae02b7dbee9f2cea7dce7d25894f8 (diff)
downloadQt-43199af242918b3c77bb47bdcc3ec60f8236b0d3.zip
Qt-43199af242918b3c77bb47bdcc3ec60f8236b0d3.tar.gz
Qt-43199af242918b3c77bb47bdcc3ec60f8236b0d3.tar.bz2
lowercase ids
Diffstat (limited to 'examples/declarative/snow')
-rw-r--r--examples/declarative/snow/ImageBatch.qml26
-rw-r--r--examples/declarative/snow/Loading.qml4
-rw-r--r--examples/declarative/snow/create.js6
-rw-r--r--examples/declarative/snow/snow.qml24
4 files changed, 30 insertions, 30 deletions
diff --git a/examples/declarative/snow/ImageBatch.qml b/examples/declarative/snow/ImageBatch.qml
index 8980034..62f986c 100644
--- a/examples/declarative/snow/ImageBatch.qml
+++ b/examples/declarative/snow/ImageBatch.qml
@@ -1,7 +1,7 @@
import Qt 4.6
GridView {
- id: MyGrid
+ id: grid
property int offset: 0
property var ref
property bool isSelected: ref.selectedItemColumn >= offset && ref.selectedItemColumn < offset + 5
@@ -17,10 +17,10 @@ GridView {
cellHeight: imageHeight
states: State {
- name: "selected"; when: MyGrid.isSelected
- PropertyChanges { target: MyGrid; z: 150 }
+ name: "selected"; when: grid.isSelected
+ PropertyChanges { target: grid; z: 150 }
}
- transitions: Transition {
+ transitions: Transition {
SequentialAnimation {
PauseAnimation { duration: 150 }
PropertyAction { properties: "z" }
@@ -35,20 +35,20 @@ GridView {
XmlRole { name: "url"; query: "media:content/@url/string()" }
}
- Item {
- id: Root
- property bool isSelected: GridView.isCurrentItem && MyGrid.isSelected
+ Item {
+ id: root
+ property bool isSelected: GridView.isCurrentItem && grid.isSelected
transformOrigin: "Center"
- width: MyGrid.imageWidth; height: MyGrid.imageHeight;
+ width: grid.imageWidth; height: grid.imageHeight;
- Image { id: FlickrImage; source: url; fillMode: "PreserveAspectFit"; smooth: true; anchors.fill: parent;
- opacity: (status == 1)?1:0; opacity: Behavior { NumberAnimation { properties: "opacity" } } }
- Loading { anchors.centerIn: parent; visible: FlickrImage.status!=1 }
+ Image { id: flickrImage; source: url; fillMode: "PreserveAspectFit"; smooth: true; anchors.fill: parent;
+ opacity: (status == 1)?1:0; opacity: Behavior { NumberAnimation { properties: "opacity" } } }
+ Loading { anchors.centerIn: parent; visible: flickrImage.status!=1 }
states: State {
name: "selected"
- when: Root.isSelected
- PropertyChanges { target: Root; scale: 3; z: 100 }
+ when: root.isSelected
+ PropertyChanges { target: root; scale: 3; z: 100 }
}
transitions: [
Transition {
diff --git a/examples/declarative/snow/Loading.qml b/examples/declarative/snow/Loading.qml
index ff2c829..054656a 100644
--- a/examples/declarative/snow/Loading.qml
+++ b/examples/declarative/snow/Loading.qml
@@ -1,8 +1,8 @@
import Qt 4.6
Image {
- id: Loading; source: "pics/loading.png"; transformOrigin: "Center"
+ id: loading; source: "pics/loading.png"; transformOrigin: "Center"
rotation: NumberAnimation {
- id: "RotationAnimation"; from: 0; to: 360; running: Loading.visible == true; repeat: true; duration: 900
+ id: rotationAnimation; from: 0; to: 360; running: loading.visible == true; repeat: true; duration: 900
}
}
diff --git a/examples/declarative/snow/create.js b/examples/declarative/snow/create.js
index 9def7a7..2bdae4a 100644
--- a/examples/declarative/snow/create.js
+++ b/examples/declarative/snow/create.js
@@ -1,12 +1,12 @@
var myComponent = null;
function createNewBlock() {
- if (myComponent == null)
+ if (myComponent == null)
myComponent = createComponent("ImageBatch.qml");
var obj = myComponent.createObject();
- obj.parent = MyLayout;
+ obj.parent = layout;
obj.offset = maximumColumn + 1;
- obj.ref = ImagePanel;
+ obj.ref = imagePanel;
maximumColumn += 5;
}
diff --git a/examples/declarative/snow/snow.qml b/examples/declarative/snow/snow.qml
index 2241c3f..39c9c43 100644
--- a/examples/declarative/snow/snow.qml
+++ b/examples/declarative/snow/snow.qml
@@ -1,7 +1,7 @@
import Qt 4.6
Rectangle {
- id: ImagePanel
+ id: imagePanel
width: 1024
height: 768
color: "black"
@@ -23,7 +23,7 @@ Rectangle {
Item {
anchors.centerIn: parent
Row {
- id: MyLayout
+ id: layout
property real targetX: -(selectedX + imageWidth / 2)
property real targetDeform: 0
@@ -31,19 +31,19 @@ Rectangle {
property real deform: 0
deform: SpringFollow {
- id: "DeformFollow"; source: MyLayout.targetDeform; velocity: MyLayout.slowDeform?0.1:2
- onSyncChanged: if(inSync) { MyLayout.slowDeform = true; MyLayout.targetDeform = 0; }
+ id: deformFollow; source: layout.targetDeform; velocity: layout.slowDeform?0.1:2
+ onSyncChanged: if(inSync) { layout.slowDeform = true; layout.targetDeform = 0; }
}
-
- ImageBatch { offset: 0; ref: ImagePanel }
- x: SpringFollow { source: MyLayout.targetX; velocity: 1000 }
+ ImageBatch { offset: 0; ref: imagePanel }
+
+ x: SpringFollow { source: layout.targetX; velocity: 1000 }
y: SpringFollow { source: -(selectedY + imageHeight / 2); velocity: 500 }
}
transform: Rotation {
axis.y: 1; axis.z: 0
- angle: MyLayout.deform * -100
+ angle: layout.deform * -100
}
}
@@ -51,13 +51,13 @@ Rectangle {
function left() {
if (selectedItemColumn <= 0) return;
selectedItemColumn -= 1;
- MyLayout.slowDeform = false;
- MyLayout.targetDeform = Math.max(Math.min(MyLayout.deform - 0.1, -0.1), -0.4);
+ layout.slowDeform = false;
+ layout.targetDeform = Math.max(Math.min(layout.deform - 0.1, -0.1), -0.4);
}
function right() {
selectedItemColumn += 1;
- MyLayout.slowDeform = false;
- MyLayout.targetDeform = Math.min(Math.max(MyLayout.deform + 0.1, 0.1), 0.4);
+ layout.slowDeform = false;
+ layout.targetDeform = Math.min(Math.max(layout.deform + 0.1, 0.1), 0.4);
}
}