summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-07-31 02:34:31 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-07-31 02:34:31 (GMT)
commit9e7796e63a412efa0cbbba518523c163a097cd48 (patch)
treed6bc3448229820f20e149c1460311fe6c583f1af /demos
parent355649ce9d4f320ed4ebb0a31d86427ade43f2ce (diff)
parentd603edf69f49336bc832b6ee4bb12fbd99d2e50f (diff)
downloadQt-9e7796e63a412efa0cbbba518523c163a097cd48.zip
Qt-9e7796e63a412efa0cbbba518523c163a097cd48.tar.gz
Qt-9e7796e63a412efa0cbbba518523c163a097cd48.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.qml2
-rw-r--r--demos/declarative/contacts/contacts.qml18
-rw-r--r--demos/declarative/flickr/content/ImageDetails.qml8
-rw-r--r--demos/declarative/flickr/content/MediaButton.qml2
-rw-r--r--demos/declarative/flickr/content/MediaLineEdit.qml2
-rw-r--r--demos/declarative/flickr/content/Progress.qml2
-rw-r--r--demos/declarative/flickr/content/ScrollBar.qml4
-rw-r--r--demos/declarative/flickr/content/Slider.qml2
-rw-r--r--demos/declarative/flickr/flickr.qml2
-rw-r--r--demos/declarative/samegame/SameGame.qml15
-rw-r--r--demos/declarative/samegame/content/BoomBlock.qml2
-rw-r--r--demos/declarative/samegame/content/Button.qml4
-rw-r--r--demos/declarative/samegame/content/Dialog.qml4
-rwxr-xr-xdemos/declarative/samegame/content/samegame.js4
-rw-r--r--demos/declarative/webbrowser/webbrowser.qml2
16 files changed, 36 insertions, 39 deletions
diff --git a/demos/declarative/calculator/CalcButton.qml b/demos/declarative/calculator/CalcButton.qml
index db8ae7c..5eb7fe1 100644
--- a/demos/declarative/calculator/CalcButton.qml
+++ b/demos/declarative/calculator/CalcButton.qml
@@ -37,7 +37,7 @@ Item {
}
Text {
- anchors.centeredIn: Image
+ anchors.centerIn: Image
text: Button.operation
color: "white"
font.bold: true
diff --git a/demos/declarative/calculator/calculator.qml b/demos/declarative/calculator/calculator.qml
index 1cc8fa8..576fea9 100644
--- a/demos/declarative/calculator/calculator.qml
+++ b/demos/declarative/calculator/calculator.qml
@@ -12,7 +12,7 @@ Rect {
Rect {
id: Container
width: 316; height: 60; z: 2
- pen.color: "white"; color: "#343434"
+ border.color: "white"; color: "#343434"
Text {
id: CurNum
diff --git a/demos/declarative/contacts/contacts.qml b/demos/declarative/contacts/contacts.qml
index 189a5d7..ecafd20 100644
--- a/demos/declarative/contacts/contacts.qml
+++ b/demos/declarative/contacts/contacts.qml
@@ -42,7 +42,7 @@ Rect {
MouseRegion {
anchors.fill: parent
onClicked: {
- Details.qml = 'Contact.qml';
+ Details.source = 'Contact.qml';
wrapper.state ='opened';
contacts.mode = 'edit';
}
@@ -67,27 +67,27 @@ Rect {
}
]
}
- Item {
+ Loader {
id: Details
anchors.fill: wrapper
opacity: 0
Bind {
- target: Details.qmlItem
+ target: Details.item
property: "contactId"
value: model.recid
}
Bind {
- target: Details.qmlItem
+ target: Details.item
property: "label"
value: model.label
}
Bind {
- target: Details.qmlItem
+ target: Details.item
property: "phone"
value: model.phone
}
Bind {
- target: Details.qmlItem
+ target: Details.item
property: "email"
value: model.email
}
@@ -130,7 +130,7 @@ Rect {
signal: "clicked()"
script: {
if (wrapper.state == 'opened' && !contacts.mouseGrabbed) {
- Details.qmlItem.update();
+ Details.item.update();
wrapper.state = '';
contacts.mode = 'list';
contactList.exec();
@@ -154,7 +154,7 @@ Rect {
signal: "confirmed()"
script: {
if (wrapper.state == 'opened' && !contacts.mouseGrabbed) {
- Details.qmlItem.remove();
+ Details.item.remove();
wrapper.state = '';
contacts.mode = 'list';
contactList.exec();
@@ -213,7 +213,7 @@ Rect {
highlight: [
Rect {
id: contactHighlight
- pen.width: 0
+ border.width: 0
color: 'white'
opacity: contacts.mode == 'list' ? 1 : 0
opacity: Behavior {
diff --git a/demos/declarative/flickr/content/ImageDetails.qml b/demos/declarative/flickr/content/ImageDetails.qml
index 26bac32..9d5f069 100644
--- a/demos/declarative/flickr/content/ImageDetails.qml
+++ b/demos/declarative/flickr/content/ImageDetails.qml
@@ -30,7 +30,7 @@ Flipable {
Rect {
anchors.fill: parent
color: "black"; opacity: 0.4
- pen.color: "white"; pen.width: 2
+ border.color: "white"; border.width: 2
}
MediaButton {
@@ -77,9 +77,9 @@ Flipable {
back: Item {
anchors.fill: Container
- Rect { anchors.fill: parent; color: "black"; opacity: 0.4; pen.color: "white"; pen.width: 2 }
+ Rect { anchors.fill: parent; color: "black"; opacity: 0.4; border.color: "white"; border.width: 2 }
- Progress { anchors.centeredIn: parent; width: 200; height: 18; progress: BigImage.progress; visible: BigImage.status }
+ Progress { anchors.centerIn: parent; width: 200; height: 18; progress: BigImage.progress; visible: BigImage.status }
Flickable {
id: Flick; width: Container.width - 10; height: Container.height - 10
x: 5; y: 5; clip: true;
@@ -114,7 +114,7 @@ Flipable {
Text {
text: "Image Unavailable"
visible: BigImage.status == 'Error'
- anchors.centeredIn: parent; color: "white"; font.bold: true
+ anchors.centerIn: parent; color: "white"; font.bold: true
}
Slider {
diff --git a/demos/declarative/flickr/content/MediaButton.qml b/demos/declarative/flickr/content/MediaButton.qml
index cbe4265..2a6dbae 100644
--- a/demos/declarative/flickr/content/MediaButton.qml
+++ b/demos/declarative/flickr/content/MediaButton.qml
@@ -24,7 +24,7 @@ Item {
Text {
font.bold: true
color: "white"
- anchors.centeredIn: Image
+ anchors.centerIn: Image
text: Container.text
}
width: Image.width
diff --git a/demos/declarative/flickr/content/MediaLineEdit.qml b/demos/declarative/flickr/content/MediaLineEdit.qml
index a02f92d..b8d30ce 100644
--- a/demos/declarative/flickr/content/MediaLineEdit.qml
+++ b/demos/declarative/flickr/content/MediaLineEdit.qml
@@ -104,6 +104,6 @@ Item {
}
KeyActions {
id: ReturnKey
- return: "Container.state = ''"
+ keyReturn: "Container.state = ''"
}
}
diff --git a/demos/declarative/flickr/content/Progress.qml b/demos/declarative/flickr/content/Progress.qml
index 4b092ca..ae6bb18 100644
--- a/demos/declarative/flickr/content/Progress.qml
+++ b/demos/declarative/flickr/content/Progress.qml
@@ -7,7 +7,7 @@ Item {
Rect {
id: Container; anchors.fill: parent
- pen.color: "white"; pen.width: 0; radius: height/2 - 2
+ border.color: "white"; border.width: 0; radius: height/2 - 2
gradient: Gradient {
GradientStop { position: 0; color: "#66343434" }
GradientStop { position: 1.0; color: "#66000000" }
diff --git a/demos/declarative/flickr/content/ScrollBar.qml b/demos/declarative/flickr/content/ScrollBar.qml
index 25dca98..e9a461c 100644
--- a/demos/declarative/flickr/content/ScrollBar.qml
+++ b/demos/declarative/flickr/content/ScrollBar.qml
@@ -9,8 +9,8 @@ Item {
radius: 5
color: "black"
opacity: 0.3
- pen.color: "white"
- pen.width: 2
+ border.color: "white"
+ border.width: 2
x: 0
y: flickableArea.pageYPosition * Container.height
width: parent.width
diff --git a/demos/declarative/flickr/content/Slider.qml b/demos/declarative/flickr/content/Slider.qml
index 4e88c1e..0c15ec6 100644
--- a/demos/declarative/flickr/content/Slider.qml
+++ b/demos/declarative/flickr/content/Slider.qml
@@ -12,7 +12,7 @@ Item {
Rect {
id: Container; anchors.fill: parent
- pen.color: "white"; pen.width: 0; radius: 8
+ border.color: "white"; border.width: 0; radius: 8
gradient: Gradient {
GradientStop { position: 0.0; color: "#66343434" }
GradientStop { position: 1.0; color: "#66000000" }
diff --git a/demos/declarative/flickr/flickr.qml b/demos/declarative/flickr/flickr.qml
index eba65c0..21ac284 100644
--- a/demos/declarative/flickr/flickr.qml
+++ b/demos/declarative/flickr/flickr.qml
@@ -124,7 +124,7 @@ Item {
Image { source: "content/pics/background.png"; anchors.fill: parent }
- Loading { anchors.centeredIn: parent; visible: FeedModel.status != 0 }
+ Loading { anchors.centerIn: parent; visible: FeedModel.status != 0 }
GridView {
id: PhotoGridView; model: FeedModel; delegate: PhotoDelegate; cacheBuffer: 100
diff --git a/demos/declarative/samegame/SameGame.qml b/demos/declarative/samegame/SameGame.qml
index 3b80692..e74646d 100644
--- a/demos/declarative/samegame/SameGame.qml
+++ b/demos/declarative/samegame/SameGame.qml
@@ -9,7 +9,9 @@ Rect {
Rect {
id: gameCanvas
property int score: 0
- z:20; y:20; width:400; height:600; color: "white"; pen.width: 1
+ z:20; y:20; color: "white"; border.width: 1
+ width:parent.width - tileSize - (parent.width % tileSize);
+ height:parent.height - tileSize - (parent.height % tileSize);
anchors.horizontalCenter: parent.horizontalCenter
Image { id:background;
source: "content/pics/background.png"
@@ -20,7 +22,7 @@ Rect {
}
}
- Dialog { id: dialog; anchors.centeredIn: parent; z: 21}
+ Dialog { id: dialog; anchors.centerIn: parent; z: 21}
Button {
id: btnA; text: "New Game"; onClicked: {initBoard();}
anchors.top: gameCanvas.bottom; anchors.topMargin: 4; anchors.left: gameCanvas.left;
@@ -29,13 +31,4 @@ Rect {
text: "Score: " + gameCanvas.score; width:100; font.size:14
anchors.top: gameCanvas.bottom; anchors.topMargin: 4; anchors.right: gameCanvas.right;
}
- Text {
- text: "Just over 300 lines of QML/JS code!"
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.bottom: parent.bottom; anchors.bottomMargin: 16;
- opacity: SequentialAnimation{ running: true; repeat: true;
- NumberAnimation { from: 0; to: 1; duration: 1000; easing: "easeInQuad" }
- NumberAnimation { from: 1; to: 0; duration: 1000; easing: "easeInQuad" }
- }
- }
}
diff --git a/demos/declarative/samegame/content/BoomBlock.qml b/demos/declarative/samegame/content/BoomBlock.qml
index a4f4fe9..8a505da 100644
--- a/demos/declarative/samegame/content/BoomBlock.qml
+++ b/demos/declarative/samegame/content/BoomBlock.qml
@@ -26,7 +26,7 @@ Item { id:block
}
Particles { id: particles
- width:1; height:1; anchors.centeredIn: parent; opacity: 0
+ 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
source: {
diff --git a/demos/declarative/samegame/content/Button.qml b/demos/declarative/samegame/content/Button.qml
index 2f38a52..c7a49f1 100644
--- a/demos/declarative/samegame/content/Button.qml
+++ b/demos/declarative/samegame/content/Button.qml
@@ -2,7 +2,7 @@ import Qt 4.6
Rect {
id: page; color: activePalette.button; width: txtItem.width+20; height: txtItem.height+4
- pen.width: 1; pen.color: activePalette.mid; radius: 10;
+ border.width: 1; border.color: activePalette.mid; radius: 10;
signal clicked
property string text: "Button"
gradient: Gradient {
@@ -12,7 +12,7 @@ Rect {
}
MouseRegion { id:mr; anchors.fill: parent; onClicked: page.clicked() }
Text {
- id: txtItem; text: page.text; anchors.centeredIn: page; color: activePalette.buttonText
+ id: txtItem; text: page.text; anchors.centerIn: page; color: activePalette.buttonText
font.size: 14;
}
}
diff --git a/demos/declarative/samegame/content/Dialog.qml b/demos/declarative/samegame/content/Dialog.qml
index 6d12b48..7326d73 100644
--- a/demos/declarative/samegame/content/Dialog.qml
+++ b/demos/declarative/samegame/content/Dialog.qml
@@ -2,7 +2,7 @@ import Qt 4.6
Rect {
id: page
- color: "white"; pen.width: 1; width: 200; height: 60;
+ color: "white"; border.width: 1; width: 200; height: 60;
property string text: "Hello World!"
opacity: 0
opacity: Behavior {
@@ -11,5 +11,5 @@ Rect {
NumberAnimation {property: "opacity"; to: 0; duration: 1500 }
}
}
- Text { anchors.centeredIn: parent; text: parent.text }
+ Text { anchors.centerIn: parent; text: parent.text }
}
diff --git a/demos/declarative/samegame/content/samegame.js b/demos/declarative/samegame/content/samegame.js
index a7dd82b..f04fb4c 100755
--- a/demos/declarative/samegame/content/samegame.js
+++ b/demos/declarative/samegame/content/samegame.js
@@ -21,6 +21,10 @@ function initBoard()
board[i].destroy();
}
+ maxX = Math.floor(gameCanvas.width/tileSize);
+ maxY = Math.floor(gameCanvas.height/tileSize);
+ maxIndex = maxY*maxX;
+
//Initialize Board
board = new Array(maxIndex);
gameCanvas.score = 0;
diff --git a/demos/declarative/webbrowser/webbrowser.qml b/demos/declarative/webbrowser/webbrowser.qml
index d3a65db..28e5f16 100644
--- a/demos/declarative/webbrowser/webbrowser.qml
+++ b/demos/declarative/webbrowser/webbrowser.qml
@@ -126,7 +126,7 @@ Item {
}
KeyActions {
id: keyActions
- return: "WebBrowser.url = EditUrl.text; proxy.focus=false;"
+ keyReturn: "WebBrowser.url = EditUrl.text; proxy.focus=false;"
}
*/
TextEdit {