summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2011-02-03 22:52:18 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2011-02-03 22:52:18 (GMT)
commitbd3d16fcebdeaf1948e33af9fbf54871aadc5fc5 (patch)
treede8277a0de1bdd74a0ed240596fe1bde735c8f10 /demos
parenta6c9422dc2103ee439696b24932149c5b08f2db8 (diff)
parentd87e2627cbc3f818e23c9c80b03cc665e5f3d444 (diff)
downloadQt-bd3d16fcebdeaf1948e33af9fbf54871aadc5fc5.zip
Qt-bd3d16fcebdeaf1948e33af9fbf54871aadc5fc5.tar.gz
Qt-bd3d16fcebdeaf1948e33af9fbf54871aadc5fc5.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (172 commits) Don't accept input methods when a TextEdit or TextInput is read only. Correct error message On windows xp using a higher port makes the declarativedebug* tests work Correct assert Update QDeclarative DEF files for Symbian Export QDeclarativeRefCount so that symbian compiles. Make Flickable's wheel handling more like QAbstractScrollArea. Changing header or footer failed to delete the previous. Avoid index-out-of bounds related crash in Grid Move Qt.application docs into Qt global object page Add initial size to ListView in FolderListModel example update What's New for QtQuick 1.1 and AnimatedImage docs Improve docs on Item::visible and Item::opacity Make sure we update Loader size if item size changes after creation. Froze two more symbols and fixed compilation error (QtQuick11). PinchArea sometimes failed. Froze Symbian def files for QtQuick11. Clarify that IntValidator performs locale specific validation. Add a mouseSelectionMode property to TextEdit and TextInput. Add missing versioning tests for new QtQuick 1.1 properties/methods. ...
Diffstat (limited to 'demos')
-rw-r--r--demos/declarative/calculator/calculator.qml22
-rw-r--r--demos/declarative/flickr/flickr.qml2
-rw-r--r--demos/declarative/minehunt/minehunt.qml2
-rw-r--r--demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml8
-rw-r--r--demos/declarative/samegame/SamegameCore/BoomBlock.qml2
-rw-r--r--demos/declarative/samegame/SamegameCore/Button.qml2
-rw-r--r--demos/declarative/samegame/SamegameCore/Dialog.qml2
-rwxr-xr-xdemos/declarative/samegame/SamegameCore/samegame.js11
-rw-r--r--demos/declarative/samegame/samegame.qml2
-rw-r--r--demos/declarative/snake/snake.qml2
-rw-r--r--demos/declarative/webbrowser/content/FlickableWebView.qml2
11 files changed, 31 insertions, 26 deletions
diff --git a/demos/declarative/calculator/calculator.qml b/demos/declarative/calculator/calculator.qml
index 13f228d..441bfb9 100644
--- a/demos/declarative/calculator/calculator.qml
+++ b/demos/declarative/calculator/calculator.qml
@@ -46,7 +46,7 @@ import "Core/calculator.js" as CalcEngine
Rectangle {
id: window
- width: 480; height: 360
+ width: 360; height: 480
color: "#282828"
property string rotateLeft: "\u2939"
@@ -63,7 +63,15 @@ Rectangle {
id: main
state: "orientation " + runtime.orientation
- width: parent.width; height: parent.height; anchors.centerIn: parent
+ property bool landscapeWindow: window.width > window.height
+ property real baseWidth: landscapeWindow ? window.height : window.width
+ property real baseHeight: landscapeWindow ? window.width : window.height
+ property real rotationDelta: landscapeWindow ? -90 : 0
+
+ rotation: rotationDelta
+ width: main.baseWidth
+ height: main.baseHeight
+ anchors.centerIn: parent
Column {
id: box; spacing: 8
@@ -132,24 +140,20 @@ Rectangle {
states: [
State {
name: "orientation " + Orientation.Landscape
- PropertyChanges { target: main; rotation: 90; width: window.height; height: window.width }
- PropertyChanges { target: rotateButton; operation: rotateLeft }
+ PropertyChanges { target: main; rotation: 90 + rotationDelta; width: main.baseHeight; height: main.baseWidth }
},
State {
name: "orientation " + Orientation.PortraitInverted
- PropertyChanges { target: main; rotation: 180; }
- PropertyChanges { target: rotateButton; operation: rotateRight }
+ PropertyChanges { target: main; rotation: 180 + rotationDelta; }
},
State {
name: "orientation " + Orientation.LandscapeInverted
- PropertyChanges { target: main; rotation: 270; width: window.height; height: window.width }
- PropertyChanges { target: rotateButton; operation: rotateLeft }
+ PropertyChanges { target: main; rotation: 270 + rotationDelta; width: main.baseHeight; height: main.baseWidth }
}
]
transitions: Transition {
SequentialAnimation {
- PropertyAction { target: rotateButton; property: "operation" }
RotationAnimation { direction: RotationAnimation.Shortest; duration: 300; easing.type: Easing.InOutQuint }
NumberAnimation { properties: "x,y,width,height"; duration: 300; easing.type: Easing.InOutQuint }
}
diff --git a/demos/declarative/flickr/flickr.qml b/demos/declarative/flickr/flickr.qml
index 11470a8..e0af466 100644
--- a/demos/declarative/flickr/flickr.qml
+++ b/demos/declarative/flickr/flickr.qml
@@ -62,7 +62,7 @@ Item {
GridView {
id: photoGridView; model: rssModel; delegate: Mobile.GridDelegate {}
- cacheBuffer: 100
+ cacheBuffer: 1000
cellWidth: (parent.width-2)/4; cellHeight: cellWidth; width: parent.width; height: parent.height
}
diff --git a/demos/declarative/minehunt/minehunt.qml b/demos/declarative/minehunt/minehunt.qml
index 1a69c95..026689b 100644
--- a/demos/declarative/minehunt/minehunt.qml
+++ b/demos/declarative/minehunt/minehunt.qml
@@ -104,7 +104,7 @@ Item {
anchors.centerIn: parent; width: parent.width - 20
horizontalAlignment: Text.AlignHCenter
wrapMode: Text.WordWrap
- text: "Minehunt will not run properly if the C++ plugin is not compiled.\n\nPlease see README."
+ text: "Minehunt demo has to be compiled to run.\n\nPlease see README."
color: "white"; font.bold: true; font.pixelSize: 14
visible: tiles == undefined
}
diff --git a/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml b/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml
index 73b8fa7..dcb1112 100644
--- a/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml
+++ b/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import QtQuick 1.0
+import QtQuick 1.1
import "script/script.js" as Script
Package {
@@ -61,7 +61,7 @@ Package {
BorderImage {
anchors {
- fill: border.visible ? border : placeHolder
+ fill: originalImage.status == Image.Ready ? border : placeHolder
leftMargin: -6; topMargin: -6; rightMargin: -8; bottomMargin: -8
}
source: 'images/box-shadow.png'; smooth: true
@@ -88,11 +88,11 @@ Package {
}
BusyIndicator { anchors.centerIn: parent; on: originalImage.status != Image.Ready }
Image {
- id: originalImage; smooth: true; source: "http://" + Script.getImagePath(content)
+ id: originalImage; smooth: true; source: "http://" + Script.getImagePath(content); cache: false
fillMode: Image.PreserveAspectFit; width: photoWrapper.width; height: photoWrapper.height
}
Image {
- id: hqImage; smooth: true; source: ""; visible: false
+ id: hqImage; smooth: true; source: ""; visible: false; cache: false
fillMode: Image.PreserveAspectFit; width: photoWrapper.width; height: photoWrapper.height
}
Binding {
diff --git a/demos/declarative/samegame/SamegameCore/BoomBlock.qml b/demos/declarative/samegame/SamegameCore/BoomBlock.qml
index da51230..009aeca 100644
--- a/demos/declarative/samegame/SamegameCore/BoomBlock.qml
+++ b/demos/declarative/samegame/SamegameCore/BoomBlock.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import QtQuick 1.0
+import QtQuick 1.1
import Qt.labs.particles 1.0
Item {
diff --git a/demos/declarative/samegame/SamegameCore/Button.qml b/demos/declarative/samegame/SamegameCore/Button.qml
index aea4e53..b2b232c 100644
--- a/demos/declarative/samegame/SamegameCore/Button.qml
+++ b/demos/declarative/samegame/SamegameCore/Button.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import QtQuick 1.0
+import QtQuick 1.1
Rectangle {
id: container
diff --git a/demos/declarative/samegame/SamegameCore/Dialog.qml b/demos/declarative/samegame/SamegameCore/Dialog.qml
index b11c65c..ecac475 100644
--- a/demos/declarative/samegame/SamegameCore/Dialog.qml
+++ b/demos/declarative/samegame/SamegameCore/Dialog.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import QtQuick 1.0
+import QtQuick 1.1
Rectangle {
id: page
diff --git a/demos/declarative/samegame/SamegameCore/samegame.js b/demos/declarative/samegame/SamegameCore/samegame.js
index 9266767..b838790 100755
--- a/demos/declarative/samegame/SamegameCore/samegame.js
+++ b/demos/declarative/samegame/SamegameCore/samegame.js
@@ -177,18 +177,19 @@ function createBlock(column,row){
// not be ready immediately. There is a statusChanged signal on the
// component you could use if you want to wait to load remote files.
if(component.status == Component.Ready){
- var dynamicObject = component.createObject(gameCanvas);
+ var dynamicObject = component.createObject(gameCanvas,
+ {"type": Math.floor(Math.random() * 3),
+ "x": column*gameCanvas.blockSize,
+ "width": gameCanvas.blockSize,
+ "height": gameCanvas.blockSize});
if(dynamicObject == null){
console.log("error creating block");
console.log(component.errorString());
return false;
}
- dynamicObject.type = Math.floor(Math.random() * 3);
- dynamicObject.x = column*gameCanvas.blockSize;
dynamicObject.y = row*gameCanvas.blockSize;
- dynamicObject.width = gameCanvas.blockSize;
- dynamicObject.height = gameCanvas.blockSize;
dynamicObject.spawned = true;
+
board[index(column,row)] = dynamicObject;
}else{
console.log("error loading block component");
diff --git a/demos/declarative/samegame/samegame.qml b/demos/declarative/samegame/samegame.qml
index ebb8e4a..ab64156 100644
--- a/demos/declarative/samegame/samegame.qml
+++ b/demos/declarative/samegame/samegame.qml
@@ -39,7 +39,7 @@
**
****************************************************************************/
-import QtQuick 1.0
+import QtQuick 1.1
import "SamegameCore"
import "SamegameCore/samegame.js" as Logic
diff --git a/demos/declarative/snake/snake.qml b/demos/declarative/snake/snake.qml
index e8b7da2..7dac9ef 100644
--- a/demos/declarative/snake/snake.qml
+++ b/demos/declarative/snake/snake.qml
@@ -105,7 +105,7 @@ Rectangle {
source: "content/pics/pause.png"
anchors.centerIn: parent;
//opacity is deliberately not animated
- opacity: activeGame && !runtime.isActiveWindow
+ opacity: activeGame && !Qt.application.active
}
Image {
diff --git a/demos/declarative/webbrowser/content/FlickableWebView.qml b/demos/declarative/webbrowser/content/FlickableWebView.qml
index 737d11f..947b843 100644
--- a/demos/declarative/webbrowser/content/FlickableWebView.qml
+++ b/demos/declarative/webbrowser/content/FlickableWebView.qml
@@ -128,7 +128,7 @@ Flickable {
if (!heuristicZoom(clickX,clickY,2.5)) {
var zf = flickable.width / contentsSize.width
if (zf >= contentsScale)
- zf = 2.0/zoomFactor // zoom in (else zooming out)
+ zf = 2.0*contentsScale // zoom in (else zooming out)
doZoom(zf,clickX*zf,clickY*zf)
}
}