summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorMichael Brasser <michael.brasser@nokia.com>2009-11-05 22:51:39 (GMT)
committerMichael Brasser <michael.brasser@nokia.com>2009-11-05 22:51:39 (GMT)
commit4266b0616bb5d67244173dbe4d9d417dbf4d302f (patch)
tree4d8320dfafe09657fb0e475bd6b36a50c4d79105 /demos
parentec543f79c7d036961eb6cdcd956b3e8ca28b8e54 (diff)
parent96f3abd4df881789bd2677100a2417c96fd2edb4 (diff)
downloadQt-4266b0616bb5d67244173dbe4d9d417dbf4d302f.zip
Qt-4266b0616bb5d67244173dbe4d9d417dbf4d302f.tar.gz
Qt-4266b0616bb5d67244173dbe4d9d417dbf4d302f.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'demos')
-rw-r--r--demos/declarative/calculator/CalcButton.qml2
-rw-r--r--demos/declarative/calculator/calculator.qml36
-rw-r--r--demos/declarative/minehunt/Explosion.qml7
-rw-r--r--demos/declarative/samegame/content/BoomBlock.qml12
-rw-r--r--demos/declarative/samegame/content/Button.qml2
-rw-r--r--demos/declarative/samegame/samegame.qml2
6 files changed, 27 insertions, 34 deletions
diff --git a/demos/declarative/calculator/CalcButton.qml b/demos/declarative/calculator/CalcButton.qml
index c2e3a81..03ede9c 100644
--- a/demos/declarative/calculator/CalcButton.qml
+++ b/demos/declarative/calculator/CalcButton.qml
@@ -9,7 +9,7 @@ Rectangle {
id: button; width: 50; height: 30
border.color: palette.mid; radius: 6
gradient: Gradient {
- GradientStop { id: G1; position: 0.0; color: palette.lighter(palette.button) }
+ GradientStop { id: G1; position: 0.0; color: Qt.lighter(palette.button) }
GradientStop { id: G2; position: 1.0; color: palette.button }
}
diff --git a/demos/declarative/calculator/calculator.qml b/demos/declarative/calculator/calculator.qml
index 8041025..54af7ad 100644
--- a/demos/declarative/calculator/calculator.qml
+++ b/demos/declarative/calculator/calculator.qml
@@ -3,7 +3,7 @@ import Qt 4.6
Rectangle {
width: 320; height: 270; color: palette.window
- SystemPalette { id: palette; colorGroup: Qt.Active }
+ SystemPalette { id: palette }
Script { source: "calculator.js" }
Column {
@@ -45,7 +45,7 @@ Rectangle {
}
Item {
- width: 320
+ width: 320; height: 160
Item {
id: basicButtons
@@ -106,23 +106,19 @@ Rectangle {
}
}
- states: [
- State {
- name: "Advanced"; when: advancedCheckBox.toggled == true
- PropertyChanges { target: basicButtons; x: 0 }
- PropertyChanges { target: simpleOperations; y: 32 }
- PropertyChanges { target: bksp; opacity: 1 }
- PropertyChanges { target: c; x: 69; width: 67 }
- PropertyChanges { target: ac; x: 138; width: 67 }
- PropertyChanges { target: equals; width: 50 }
- PropertyChanges { target: advancedButtons; x: 210; opacity: 1 }
- }
- ]
+ states: State {
+ name: "Advanced"; when: advancedCheckBox.toggled == true
+ PropertyChanges { target: basicButtons; x: 0 }
+ PropertyChanges { target: simpleOperations; y: 32 }
+ PropertyChanges { target: bksp; opacity: 1 }
+ PropertyChanges { target: c; x: 69; width: 67 }
+ PropertyChanges { target: ac; x: 138; width: 67 }
+ PropertyChanges { target: equals; width: 50 }
+ PropertyChanges { target: advancedButtons; x: 210; opacity: 1 }
+ }
- transitions: [
- Transition {
- NumberAnimation { properties: "x,y,width"; easing: "easeOutBounce"; duration: 500 }
- NumberAnimation { properties: "opacity"; easing: "easeInOutQuad"; duration: 500 }
- }
- ]
+ transitions: Transition {
+ NumberAnimation { properties: "x,y,width"; easing: "easeOutBounce"; duration: 500 }
+ NumberAnimation { properties: "opacity"; easing: "easeInOutQuad"; duration: 500 }
+ }
}
diff --git a/demos/declarative/minehunt/Explosion.qml b/demos/declarative/minehunt/Explosion.qml
index a997048..e337c46 100644
--- a/demos/declarative/minehunt/Explosion.qml
+++ b/demos/declarative/minehunt/Explosion.qml
@@ -16,13 +16,10 @@ Item {
velocity: 100
velocityDeviation: 20
z: 100
- opacity: 0
- streamIn: false
+ opacity: 1
}
states: [ State { name: "exploding"; when: explode == true
- PropertyChanges { target: particles; count: 200 }
- PropertyChanges { target: particles; opacity: 1 }
- PropertyChanges { target: particles; emitting: false } // i.e. emit only once
+ StateChangeScript {script: particles.burst(200); }
}
]
diff --git a/demos/declarative/samegame/content/BoomBlock.qml b/demos/declarative/samegame/content/BoomBlock.qml
index b0c297b..723e62a 100644
--- a/demos/declarative/samegame/content/BoomBlock.qml
+++ b/demos/declarative/samegame/content/BoomBlock.qml
@@ -26,9 +26,11 @@ Item { id:block
}
Particles { id: particles
- width:1; height:1; anchors.centerIn: parent; opacity: 0
- lifeSpan: 700; lifeSpanDeviation: 600; count:0; streamIn: false
- angle: 0; angleDeviation: 360; velocity: 100; velocityDeviation:30
+ width:1; height:1; anchors.centerIn: parent;
+ emissionRate: 0;
+ lifeSpan: 700; lifeSpanDeviation: 600;
+ angle: 0; angleDeviation: 360;
+ velocity: 100; velocityDeviation:30;
source: {
if(type == 0){
"pics/redStar.png";
@@ -45,9 +47,7 @@ Item { id:block
PropertyChanges { target: img; opacity: 1 }
},
State{ name: "DeathState"; when: dying == true
- PropertyChanges { target: particles; count: 50 }
- PropertyChanges { target: particles; opacity: 1 }
- PropertyChanges { target: particles; emitting: false } // i.e. emit only once
+ StateChangeScript { script: particles.burst(50); }
PropertyChanges { target: img; opacity: 0 }
StateChangeScript { script: block.destroy(1000); }
}
diff --git a/demos/declarative/samegame/content/Button.qml b/demos/declarative/samegame/content/Button.qml
index 301124e..63cd555 100644
--- a/demos/declarative/samegame/content/Button.qml
+++ b/demos/declarative/samegame/content/Button.qml
@@ -8,7 +8,7 @@ Rectangle {
color: activePalette.button; smooth: true
width: txtItem.width + 20; height: txtItem.height + 6
- border.width: 1; border.color: activePalette.darker(activePalette.button); radius: 8;
+ border.width: 1; border.color: Qt.darker(activePalette.button); radius: 8;
gradient: Gradient {
GradientStop {
diff --git a/demos/declarative/samegame/samegame.qml b/demos/declarative/samegame/samegame.qml
index 4560b56..19b929f 100644
--- a/demos/declarative/samegame/samegame.qml
+++ b/demos/declarative/samegame/samegame.qml
@@ -5,7 +5,7 @@ Rectangle {
id: screen
width: 490; height: 720
- SystemPalette { id: activePalette; colorGroup: Qt.Active }
+ SystemPalette { id: activePalette }
Item {
width: parent.width; anchors.top: parent.top; anchors.bottom: toolBar.top