diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-23 03:09:51 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-04-23 03:09:51 (GMT) |
commit | 6c4a1d0664f74fc9fe0533ca245d75355695e5be (patch) | |
tree | a055210a51704f4454398b64d6a77e4608210369 /demos/declarative | |
parent | 4894e6dd57c31e0196c6fdae4d1b2fb16b9f1b16 (diff) | |
parent | e24aa4af60718e17405871fb3776107adc0b36f1 (diff) | |
download | Qt-6c4a1d0664f74fc9fe0533ca245d75355695e5be.zip Qt-6c4a1d0664f74fc9fe0533ca245d75355695e5be.tar.gz Qt-6c4a1d0664f74fc9fe0533ca245d75355695e5be.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: (144 commits)
Don't crash if Connections::target is changed by one of its signal handlers
Update visual tests after some painter updates.
Add missing Q_DISABLE_COPYs.
Use Q_DECLARE_PRIVATE for private slot.
Workaround no longer needed.
Rename QDeclarativeExpression::value() to evaluate().
Continue to register base type.
Doc.
Remove the deprecated wrap property.
Do not treat images in qml examples differently.
Replace Flickable overshoot property with boundsBehavior
Autotests and doc
Give error on attempt to import types from too-early version number.
Remove (undocumented) QML bindings for effects.
De-straighten them lines.
Doc: fix QStringList model doc (really).
Doc: fix QStringList model docs
Change return type to match value().
Add duration and easing properties to AnchorAnimation.
Autotest
...
Diffstat (limited to 'demos/declarative')
38 files changed, 174 insertions, 120 deletions
diff --git a/demos/declarative/calculator/calculator.qmlproject b/demos/declarative/calculator/calculator.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/demos/declarative/calculator/calculator.qmlproject @@ -0,0 +1,16 @@ +import QmlProject 1.0 + +Project { + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ " ../exampleplugin " ] +} diff --git a/demos/declarative/demos.qmlproject b/demos/declarative/demos.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/demos/declarative/demos.qmlproject @@ -0,0 +1,16 @@ +import QmlProject 1.0 + +Project { + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ " ../exampleplugin " ] +} diff --git a/demos/declarative/flickr/common/LikeOMeter.qml b/demos/declarative/flickr/common/LikeOMeter.qml deleted file mode 100644 index 17e3998..0000000 --- a/demos/declarative/flickr/common/LikeOMeter.qml +++ /dev/null @@ -1,35 +0,0 @@ -import Qt 4.7 - -Item { - id: container - - property int rating: 2 - - Row { - Star { - rating: 0 - onClicked: { container.rating = rating } - on: container.rating >= 0 - } - Star { - rating: 1 - onClicked: { container.rating = rating } - on: container.rating >= 1 - } - Star { - rating: 2 - onClicked: { container.rating = rating } - on: container.rating >= 2 - } - Star { - rating: 3 - onClicked: { container.rating = rating } - on: container.rating >= 3 - } - Star { - rating: 4 - onClicked: { container.rating = rating } - on: container.rating >= 4 - } - } -} diff --git a/demos/declarative/flickr/common/Loading.qml b/demos/declarative/flickr/common/Loading.qml deleted file mode 100644 index 8daed48..0000000 --- a/demos/declarative/flickr/common/Loading.qml +++ /dev/null @@ -1,8 +0,0 @@ -import Qt 4.7 - -Image { - id: loading; source: "pics/loading.png" - NumberAnimation on rotation { - from: 0; to: 360; running: loading.visible == true; loops: Animation.Infinite; duration: 900 - } -} diff --git a/demos/declarative/flickr/common/RssModel.qml b/demos/declarative/flickr/common/RssModel.qml index d0960db..415a9e9 100644 --- a/demos/declarative/flickr/common/RssModel.qml +++ b/demos/declarative/flickr/common/RssModel.qml @@ -3,7 +3,12 @@ import Qt 4.7 XmlListModel { property string tags : "" - source: "http://api.flickr.com/services/feeds/photos_public.gne?"+(tags ? "tags="+tags+"&" : "")+"format=rss2" + function commasep(x) + { + return x.replace(' ',','); + } + + source: "http://api.flickr.com/services/feeds/photos_public.gne?"+(tags ? "tags="+commasep(tags)+"&" : "")+"format=rss2" query: "/rss/channel/item" namespaceDeclarations: "declare namespace media=\"http://search.yahoo.com/mrss/\";" diff --git a/demos/declarative/flickr/common/Star.qml b/demos/declarative/flickr/common/Star.qml deleted file mode 100644 index fcca742..0000000 --- a/demos/declarative/flickr/common/Star.qml +++ /dev/null @@ -1,45 +0,0 @@ -import Qt 4.7 - -Item { - id: container - width: 24 - height: 24 - - property int rating - property bool on - signal clicked - - Image { - id: starImage - source: "pics/ghns_star.png" - x: 6 - y: 7 - opacity: 0.4 - scale: 0.5 - } - MouseArea { - anchors.fill: container - onClicked: { container.clicked() } - } - states: [ - State { - name: "on" - when: container.on == true - PropertyChanges { - target: starImage - opacity: 1 - scale: 1 - x: 1 - y: 0 - } - } - ] - transitions: [ - Transition { - NumberAnimation { - properties: "opacity,scale,x,y" - easing.type: "OutBounce" - } - } - ] -} diff --git a/demos/declarative/flickr/common/pics/background.png b/demos/declarative/flickr/common/pics/background.png Binary files differdeleted file mode 100644 index 5b37072..0000000 --- a/demos/declarative/flickr/common/pics/background.png +++ /dev/null diff --git a/demos/declarative/flickr/common/pics/button-pressed.png b/demos/declarative/flickr/common/pics/button-pressed.png Binary files differdeleted file mode 100644 index e434d32..0000000 --- a/demos/declarative/flickr/common/pics/button-pressed.png +++ /dev/null diff --git a/demos/declarative/flickr/common/pics/button-pressed.sci b/demos/declarative/flickr/common/pics/button-pressed.sci deleted file mode 100644 index b8db272..0000000 --- a/demos/declarative/flickr/common/pics/button-pressed.sci +++ /dev/null @@ -1,5 +0,0 @@ -border.left: 8 -border.top: 4 -border.bottom: 4 -border.right: 8 -source: button.png diff --git a/demos/declarative/flickr/common/pics/button.png b/demos/declarative/flickr/common/pics/button.png Binary files differdeleted file mode 100644 index 56a63ce..0000000 --- a/demos/declarative/flickr/common/pics/button.png +++ /dev/null diff --git a/demos/declarative/flickr/common/pics/button.sci b/demos/declarative/flickr/common/pics/button.sci deleted file mode 100644 index b8db272..0000000 --- a/demos/declarative/flickr/common/pics/button.sci +++ /dev/null @@ -1,5 +0,0 @@ -border.left: 8 -border.top: 4 -border.bottom: 4 -border.right: 8 -source: button.png diff --git a/demos/declarative/flickr/common/pics/ghns_star.png b/demos/declarative/flickr/common/pics/ghns_star.png Binary files differdeleted file mode 100644 index 4ad43cc..0000000 --- a/demos/declarative/flickr/common/pics/ghns_star.png +++ /dev/null diff --git a/demos/declarative/flickr/common/pics/loading.png b/demos/declarative/flickr/common/pics/loading.png Binary files differdeleted file mode 100644 index 47a1589..0000000 --- a/demos/declarative/flickr/common/pics/loading.png +++ /dev/null diff --git a/demos/declarative/flickr/common/pics/reflection.png b/demos/declarative/flickr/common/pics/reflection.png Binary files differdeleted file mode 100644 index c143a48..0000000 --- a/demos/declarative/flickr/common/pics/reflection.png +++ /dev/null diff --git a/demos/declarative/flickr/common/pics/shadow-bottom.png b/demos/declarative/flickr/common/pics/shadow-bottom.png Binary files differdeleted file mode 100644 index 523f6e7..0000000 --- a/demos/declarative/flickr/common/pics/shadow-bottom.png +++ /dev/null diff --git a/demos/declarative/flickr/common/pics/shadow-corner.png b/demos/declarative/flickr/common/pics/shadow-corner.png Binary files differdeleted file mode 100644 index ef8c856..0000000 --- a/demos/declarative/flickr/common/pics/shadow-corner.png +++ /dev/null diff --git a/demos/declarative/flickr/common/pics/shadow-right-screen.png b/demos/declarative/flickr/common/pics/shadow-right-screen.png Binary files differdeleted file mode 100644 index 9856c4f..0000000 --- a/demos/declarative/flickr/common/pics/shadow-right-screen.png +++ /dev/null diff --git a/demos/declarative/flickr/common/pics/shadow-right.png b/demos/declarative/flickr/common/pics/shadow-right.png Binary files differdeleted file mode 100644 index f534a35..0000000 --- a/demos/declarative/flickr/common/pics/shadow-right.png +++ /dev/null diff --git a/demos/declarative/flickr/flickr.qml b/demos/declarative/flickr/flickr.qml index aa550d2..8b73beb 100644 --- a/demos/declarative/flickr/flickr.qml +++ b/demos/declarative/flickr/flickr.qml @@ -13,7 +13,6 @@ Item { Image { source: "mobile/images/stripes.png"; fillMode: Image.Tile; anchors.fill: parent; opacity: 0.3 } Common.RssModel { id: rssModel } - Common.Loading { anchors.centerIn: parent; visible: rssModel.status == 2 } Item { id: views @@ -22,8 +21,9 @@ Item { Mobile.GridDelegate { id: gridDelegate } GridView { + x: (width/4-79)/2; y: x id: photoGridView; model: rssModel; delegate: gridDelegate; cacheBuffer: 100 - cellWidth: 79; cellHeight: 79; width: parent.width; height: parent.height - 1; z: 6 + cellWidth: (parent.width-2)/4; cellHeight: cellWidth; width: parent.width; height: parent.height - 1; z: 6 } Mobile.ListDelegate { id: listDelegate } diff --git a/demos/declarative/flickr/flickr.qmlproject b/demos/declarative/flickr/flickr.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/demos/declarative/flickr/flickr.qmlproject @@ -0,0 +1,16 @@ +import QmlProject 1.0 + +Project { + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ " ../exampleplugin " ] +} diff --git a/demos/declarative/flickr/mobile/TitleBar.qml b/demos/declarative/flickr/mobile/TitleBar.qml index 72b779f..71d9385 100644 --- a/demos/declarative/flickr/mobile/TitleBar.qml +++ b/demos/declarative/flickr/mobile/TitleBar.qml @@ -12,6 +12,7 @@ Item { width: (parent.width * 2) - 55 ; height: parent.height function accept() { + imageDetails.closed() titleBar.state = "" background.state = "" rssModel.tags = editor.text diff --git a/demos/declarative/minehunt/minehunt.cpp b/demos/declarative/minehunt/minehunt.cpp index d4b0039..93cd1c1 100644 --- a/demos/declarative/minehunt/minehunt.cpp +++ b/demos/declarative/minehunt/minehunt.cpp @@ -305,8 +305,6 @@ bool MinehuntGame::flag(int row, int col) return true; } -QML_DECLARE_TYPE(TileData); - class MinehuntExtensionPlugin : public QDeclarativeExtensionPlugin { Q_OBJECT diff --git a/demos/declarative/minehunt/minehunt.qmlproject b/demos/declarative/minehunt/minehunt.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/demos/declarative/minehunt/minehunt.qmlproject @@ -0,0 +1,16 @@ +import QmlProject 1.0 + +Project { + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ " ../exampleplugin " ] +} diff --git a/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml b/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml index cd9ecbc..d39b7bc 100644 --- a/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml +++ b/demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml @@ -77,10 +77,12 @@ Component { } ] - GridView.onAdd: NumberAnimation { target: albumWrapper; properties: "scale"; from: 0.0; to: 1.0 } + GridView.onAdd: NumberAnimation { + target: albumWrapper; properties: "scale"; from: 0.0; to: 1.0; easing.type: "OutQuad" + } GridView.onRemove: SequentialAnimation { PropertyAction { target: albumWrapper; property: "GridView.delayRemove"; value: true } - NumberAnimation { target: albumWrapper; property: "scale"; from: 1.0; to: 0.0 } + NumberAnimation { target: albumWrapper; property: "scale"; from: 1.0; to: 0.0; easing.type: "OutQuad" } PropertyAction { target: albumWrapper; property: "GridView.delayRemove"; value: false } } diff --git a/demos/declarative/photoviewer/PhotoViewerCore/Button.qml b/demos/declarative/photoviewer/PhotoViewerCore/Button.qml index fd1fae9..c681064 100644 --- a/demos/declarative/photoviewer/PhotoViewerCore/Button.qml +++ b/demos/declarative/photoviewer/PhotoViewerCore/Button.qml @@ -4,7 +4,7 @@ Item { id: container property alias label: labelText.text - property string tint: "" + property color tint: "#FFFFFFFF" signal clicked width: labelText.width + 70 ; height: labelText.height + 18 diff --git a/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml b/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml index e435425..ccfda02 100644 --- a/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml +++ b/demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml @@ -4,7 +4,7 @@ Item { id: container property string label - property string tint: "" + property color tint: "#FFFFFFFF" signal clicked signal labelChanged(string label) diff --git a/demos/declarative/photoviewer/photoviewer.qmlproject b/demos/declarative/photoviewer/photoviewer.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/demos/declarative/photoviewer/photoviewer.qmlproject @@ -0,0 +1,16 @@ +import QmlProject 1.0 + +Project { + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ " ../exampleplugin " ] +} diff --git a/demos/declarative/samegame/SamegameCore/BoomBlock.qml b/demos/declarative/samegame/SamegameCore/BoomBlock.qml index bad1bf4..47f43c2 100644 --- a/demos/declarative/samegame/SamegameCore/BoomBlock.qml +++ b/demos/declarative/samegame/SamegameCore/BoomBlock.qml @@ -1,7 +1,8 @@ import Qt 4.7 import Qt.labs.particles 1.0 -Item { id:block +Item { + id: block property bool dying: false property bool spawned: false property int type: 0 @@ -11,7 +12,8 @@ Item { id:block SpringFollow on x { enabled: spawned; to: targetX; spring: 2; damping: 0.2 } SpringFollow on y { to: targetY; spring: 2; damping: 0.2 } - Image { id: img + Image { + id: img source: { if(type == 0){ "pics/redStone.png"; @@ -26,10 +28,10 @@ Item { id:block anchors.fill: parent } - Particles { + Particles { id: particles - width: 1; height: 1 + width: 1; height: 1 anchors.centerIn: parent emissionRate: 0 diff --git a/demos/declarative/samegame/SamegameCore/Button.qml b/demos/declarative/samegame/SamegameCore/Button.qml index 0faabc9..6d5d75d 100644 --- a/demos/declarative/samegame/SamegameCore/Button.qml +++ b/demos/declarative/samegame/SamegameCore/Button.qml @@ -17,9 +17,9 @@ Rectangle { GradientStop { position: 0.0 color: { - if (mouseArea.pressed) + if (mouseArea.pressed) return activePalette.dark - else + else return activePalette.light } } diff --git a/demos/declarative/samegame/SamegameCore/Dialog.qml b/demos/declarative/samegame/SamegameCore/Dialog.qml index 8784348..d4f188c 100644 --- a/demos/declarative/samegame/SamegameCore/Dialog.qml +++ b/demos/declarative/samegame/SamegameCore/Dialog.qml @@ -22,7 +22,7 @@ Rectangle { border.width: 1 opacity: 0 - Behavior on opacity { + Behavior on opacity { NumberAnimation { duration: 1000 } } diff --git a/demos/declarative/samegame/SamegameCore/samegame.js b/demos/declarative/samegame/SamegameCore/samegame.js index 3888381..aafbfdf 100755 --- a/demos/declarative/samegame/SamegameCore/samegame.js +++ b/demos/declarative/samegame/SamegameCore/samegame.js @@ -8,7 +8,7 @@ var blockSrc = "SamegameCore/BoomBlock.qml"; var scoresURL = "http://qtfx-nokia.trolltech.com.au/samegame/scores.php"; var scoresURL = ""; var gameDuration; -var component = createComponent(blockSrc); +var component = Qt.createComponent(blockSrc); //Index function used instead of a 2D array function index(column,row) { diff --git a/demos/declarative/samegame/samegame.qml b/demos/declarative/samegame/samegame.qml index 92201f5..f1b41c9 100644 --- a/demos/declarative/samegame/samegame.qml +++ b/demos/declarative/samegame/samegame.qml @@ -38,7 +38,7 @@ Rectangle { Dialog { id: nameInputDialog - + property int initialWidth: 0 anchors.centerIn: parent diff --git a/demos/declarative/samegame/samegame.qmlproject b/demos/declarative/samegame/samegame.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/demos/declarative/samegame/samegame.qmlproject @@ -0,0 +1,16 @@ +import QmlProject 1.0 + +Project { + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ " ../exampleplugin " ] +} diff --git a/demos/declarative/snake/content/snake.js b/demos/declarative/snake/content/snake.js index 12176c7..2457fbd 100644 --- a/demos/declarative/snake/content/snake.js +++ b/demos/declarative/snake/content/snake.js @@ -5,8 +5,8 @@ var links = new Array; var scheduledDirections = new Array; var numRows = 1; var numColumns = 1; -var linkComponent = createComponent("content/Link.qml"); // XXX should resolve relative to script, not component -var cookieComponent = createComponent("content/Cookie.qml"); +var linkComponent = Qt.createComponent("content/Link.qml"); // XXX should resolve relative to script, not component +var cookieComponent = Qt.createComponent("content/Cookie.qml"); var cookie; var linksToGrow = 0; var linksToDie = 0; diff --git a/demos/declarative/snake/snake.qmlproject b/demos/declarative/snake/snake.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/demos/declarative/snake/snake.qmlproject @@ -0,0 +1,16 @@ +import QmlProject 1.0 + +Project { + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ " ../exampleplugin " ] +} diff --git a/demos/declarative/twitter/twitter.qmlproject b/demos/declarative/twitter/twitter.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/demos/declarative/twitter/twitter.qmlproject @@ -0,0 +1,16 @@ +import QmlProject 1.0 + +Project { + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ " ../exampleplugin " ] +} diff --git a/demos/declarative/webbrowser/content/FlickableWebView.qml b/demos/declarative/webbrowser/content/FlickableWebView.qml index 81904c6..46f45e0 100644 --- a/demos/declarative/webbrowser/content/FlickableWebView.qml +++ b/demos/declarative/webbrowser/content/FlickableWebView.qml @@ -45,7 +45,7 @@ Flickable { smoothCache: true // We do want smooth rendering fillColor: "white" focus: true - zoomFactor: 4 + zoomFactor: 1 onAlert: console.log(message) @@ -73,7 +73,7 @@ Flickable { contentsScale: 1/zoomFactor onContentsSizeChanged: { // zoom out - contentsScale = Math.min(0.25,flickable.width / contentsSize.width) + contentsScale = Math.min(1,flickable.width / contentsSize.width) } onUrlChanged: { // got to topleft diff --git a/demos/declarative/webbrowser/webbrowser.qmlproject b/demos/declarative/webbrowser/webbrowser.qmlproject new file mode 100644 index 0000000..d4909f8 --- /dev/null +++ b/demos/declarative/webbrowser/webbrowser.qmlproject @@ -0,0 +1,16 @@ +import QmlProject 1.0 + +Project { + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } + /* List of plugin directories passed to QML runtime */ + // importPaths: [ " ../exampleplugin " ] +} |