summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-04-09 04:59:30 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-04-09 04:59:30 (GMT)
commit60e0a0b0fb6a2cf7b9fffd4ff2d30838ffa4ac84 (patch)
treef4e5307c96e51273d1c2b9b85b71759b9a23f122 /demos
parent10620af6eb644e76b762c9f834436bebbb80058f (diff)
parentefc80769f3274d31e06308717d06a70a4249cced (diff)
downloadQt-60e0a0b0fb6a2cf7b9fffd4ff2d30838ffa4ac84.zip
Qt-60e0a0b0fb6a2cf7b9fffd4ff2d30838ffa4ac84.tar.gz
Qt-60e0a0b0fb6a2cf7b9fffd4ff2d30838ffa4ac84.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'demos')
-rw-r--r--demos/declarative/flickr/common/Progress.qml2
-rw-r--r--demos/declarative/flickr/common/ScrollBar.qml2
-rw-r--r--demos/declarative/flickr/mobile/ImageDetails.qml4
-rw-r--r--demos/declarative/minehunt/minehunt.qml33
-rw-r--r--demos/declarative/snake/snake.qml2
-rw-r--r--demos/declarative/twitter/TwitterCore/FatDelegate.qml2
-rw-r--r--demos/declarative/twitter/TwitterCore/RssModel.qml2
-rw-r--r--demos/declarative/twitter/TwitterCore/UserModel.qml2
-rw-r--r--demos/declarative/twitter/twitter.qml2
9 files changed, 26 insertions, 25 deletions
diff --git a/demos/declarative/flickr/common/Progress.qml b/demos/declarative/flickr/common/Progress.qml
index 33c6180..f4d25a4 100644
--- a/demos/declarative/flickr/common/Progress.qml
+++ b/demos/declarative/flickr/common/Progress.qml
@@ -1,7 +1,7 @@
import Qt 4.7
Item {
- property var progress: 0
+ property variant progress: 0
Rectangle {
anchors.fill: parent; smooth: true
diff --git a/demos/declarative/flickr/common/ScrollBar.qml b/demos/declarative/flickr/common/ScrollBar.qml
index 4296eca..4022d23 100644
--- a/demos/declarative/flickr/common/ScrollBar.qml
+++ b/demos/declarative/flickr/common/ScrollBar.qml
@@ -3,7 +3,7 @@ import Qt 4.7
Item {
id: container
- property var flickableArea
+ property variant flickableArea
Rectangle {
radius: 5
diff --git a/demos/declarative/flickr/mobile/ImageDetails.qml b/demos/declarative/flickr/mobile/ImageDetails.qml
index d86fd2d..58b0b83 100644
--- a/demos/declarative/flickr/mobile/ImageDetails.qml
+++ b/demos/declarative/flickr/mobile/ImageDetails.qml
@@ -4,7 +4,7 @@ import "../common" as Common
Flipable {
id: container
- property var frontContainer: containerFront
+ property variant frontContainer: containerFront
property string photoTitle: ""
property string photoTags: ""
property int photoWidth
@@ -14,7 +14,7 @@ Flipable {
property string photoDate
property string photoUrl
property int rating: 2
- property var prevScale: 1.0
+ property variant prevScale: 1.0
signal closed
diff --git a/demos/declarative/minehunt/minehunt.qml b/demos/declarative/minehunt/minehunt.qml
index 4e384c0..98955e2 100644
--- a/demos/declarative/minehunt/minehunt.qml
+++ b/demos/declarative/minehunt/minehunt.qml
@@ -86,19 +86,20 @@ Item {
field.clicky = flipable.parent.y
var row = Math.floor(index / 9)
var col = index - (Math.floor(index / 9) * 9)
- if (mouse.button == undefined || mouse.button == Qt.RightButton)
+ if (mouse.button == undefined || mouse.button == Qt.RightButton) {
flag(row, col)
- else
- flip(row, col)
- }
- onPressAndHold: {
- field.clickx = flipable.parent.x
- field.clicky = flipable.parent.y
- var row = Math.floor(index / 9)
- var col = index - (Math.floor(index / 9) * 9)
- flag(row, col)
- }
+ } else {
+ flip(row, col)
}
+ }
+ onPressAndHold: {
+ field.clickx = flipable.parent.x
+ field.clicky = flipable.parent.y
+ var row = Math.floor(index / 9)
+ var col = index - (Math.floor(index / 9) * 9)
+ flag(row, col)
+ }
+ }
}
}
@@ -136,13 +137,13 @@ Item {
Image {
anchors.bottom: field.bottom; anchors.bottomMargin: 15
anchors.right: field.right; anchors.rightMargin: 20
- source: isPlaying ? 'MinehuntCore/pics/face-smile.png'
- : hasWon ? 'MinehuntCore/pics/face-smile-big.png': 'MinehuntCore/pics/face-sad.png'
+ source: isPlaying ? 'MinehuntCore/pics/face-smile.png' :
+ hasWon ? 'MinehuntCore/pics/face-smile-big.png': 'MinehuntCore/pics/face-sad.png'
- MouseArea { anchors.fill: parent; onPressed: reset() }
- }
+ MouseArea { anchors.fill: parent; onPressed: reset() }
+ }
Text {
- anchors.fill: parent; wrap: true
+ anchors.fill: parent; wrapMode: Text.WordWrap
text: "Minehunt will not run properly if the C++ plugin is not compiled.\nPlease see README."
color: "white"; font.bold: true; font.pixelSize: 14
visible: tiles == undefined
diff --git a/demos/declarative/snake/snake.qml b/demos/declarative/snake/snake.qml
index 014f04e..47bced4 100644
--- a/demos/declarative/snake/snake.qml
+++ b/demos/declarative/snake/snake.qml
@@ -24,7 +24,7 @@ Rectangle {
property int direction
property int headDirection
- property var head;
+ property variant head;
Content.HighScoreModel {
id: highScores
diff --git a/demos/declarative/twitter/TwitterCore/FatDelegate.qml b/demos/declarative/twitter/TwitterCore/FatDelegate.qml
index 3eabd9d..e999bb4 100644
--- a/demos/declarative/twitter/TwitterCore/FatDelegate.qml
+++ b/demos/declarative/twitter/TwitterCore/FatDelegate.qml
@@ -37,7 +37,7 @@ Component {
+ '<a href="app://@'+userScreenName+'"><b>'+userScreenName + "</b></a> from " +source
+ "<br /><b>" + addTags(statusText) + "</b></html>";
textFormat: Qt.RichText
- color: "#cccccc"; style: Text.Raised; styleColor: "black"; wrap: true
+ color: "#cccccc"; style: Text.Raised; styleColor: "black"; wrapMode: Text.WordWrap
anchors.left: whiteRect.right; anchors.right: blackRect.right; anchors.leftMargin: 6; anchors.rightMargin: 6
onLinkActivated: handleLink(link)
}
diff --git a/demos/declarative/twitter/TwitterCore/RssModel.qml b/demos/declarative/twitter/TwitterCore/RssModel.qml
index 5015e18..dca8499 100644
--- a/demos/declarative/twitter/TwitterCore/RssModel.qml
+++ b/demos/declarative/twitter/TwitterCore/RssModel.qml
@@ -1,7 +1,7 @@
import Qt 4.7
Item { id: wrapper
- property var model: xmlModel
+ property variant model: xmlModel
property string tags : ""
property string authName : ""
property string authPass : ""
diff --git a/demos/declarative/twitter/TwitterCore/UserModel.qml b/demos/declarative/twitter/TwitterCore/UserModel.qml
index 449e96c..8a8eb7b 100644
--- a/demos/declarative/twitter/TwitterCore/UserModel.qml
+++ b/demos/declarative/twitter/TwitterCore/UserModel.qml
@@ -4,7 +4,7 @@ import Qt 4.7
//Copied from RssModel
Item { id: wrapper
- property var model: xmlModel
+ property variant model: xmlModel
property string user : ""
property int status: xmlModel.status
function reload() { xmlModel.reload(); }
diff --git a/demos/declarative/twitter/twitter.qml b/demos/declarative/twitter/twitter.qml
index c5e5002..84926cd 100644
--- a/demos/declarative/twitter/twitter.qml
+++ b/demos/declarative/twitter/twitter.qml
@@ -4,7 +4,7 @@ import "TwitterCore" 1.0 as Twitter
Item {
id: screen; width: 320; height: 480
property bool userView : false
- property var tmpStr
+ property variant tmpStr
function setMode(m){
screen.userView = m;
if(m == false){