diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2011-02-02 05:05:04 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2011-02-02 05:05:04 (GMT) |
commit | 7836b89fbbb29ee16df863aea460c1c34d4321c9 (patch) | |
tree | 085fdad9dafd3b7a3db8157f86976a9b1ea7b510 /demos/declarative | |
parent | 95b17fbe91eb3b1b0fcac92d8a8934769e4cd847 (diff) | |
parent | 13d59acef59952e07d98c2947c25da33418c2465 (diff) | |
download | Qt-7836b89fbbb29ee16df863aea460c1c34d4321c9.zip Qt-7836b89fbbb29ee16df863aea460c1c34d4321c9.tar.gz Qt-7836b89fbbb29ee16df863aea460c1c34d4321c9.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: (165 commits)
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.
Use qobject_cast rather than dynamic_cast.
expect fail for some PinchArea tests on mac
Allow functions to be passed in as values for grouped properties
Fix lineHeight autotests.
Update Docs, Examples and Demos for new CreateObject overloadable
Adding support for group properties in Component::CreateObject()
Update test, versioning is fixed so expect-fail no longer needed
...
Diffstat (limited to 'demos/declarative')
-rw-r--r-- | demos/declarative/calculator/calculator.qml | 22 | ||||
-rw-r--r-- | demos/declarative/flickr/flickr.qml | 2 | ||||
-rw-r--r-- | demos/declarative/minehunt/minehunt.qml | 2 | ||||
-rw-r--r-- | demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml | 8 | ||||
-rw-r--r-- | demos/declarative/samegame/SamegameCore/BoomBlock.qml | 2 | ||||
-rw-r--r-- | demos/declarative/samegame/SamegameCore/Button.qml | 2 | ||||
-rw-r--r-- | demos/declarative/samegame/SamegameCore/Dialog.qml | 2 | ||||
-rwxr-xr-x | demos/declarative/samegame/SamegameCore/samegame.js | 11 | ||||
-rw-r--r-- | demos/declarative/samegame/samegame.qml | 2 | ||||
-rw-r--r-- | demos/declarative/snake/snake.qml | 2 | ||||
-rw-r--r-- | demos/declarative/webbrowser/content/FlickableWebView.qml | 2 |
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) } } |