summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2010-04-26 11:34:16 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2010-04-26 11:34:16 (GMT)
commit7cfb1403dc66e9151edc5a6c9b723444f2584941 (patch)
tree5884070ffaee8f7b5774dedcce6994437dcb43fe /demos
parent4dba5cc0085482dccfbe70d8c157e094296feed1 (diff)
parent2ee996bb3e8449e9c9d153326a2f55bc07b6b864 (diff)
downloadQt-7cfb1403dc66e9151edc5a6c9b723444f2584941.zip
Qt-7cfb1403dc66e9151edc5a6c9b723444f2584941.tar.gz
Qt-7cfb1403dc66e9151edc5a6c9b723444f2584941.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Conflicts: tools/assistant/tools/assistant/helpviewer.cpp tools/assistant/tools/assistant/helpviewer_qwv.cpp
Diffstat (limited to 'demos')
-rw-r--r--demos/declarative/calculator/calculator.qmlproject16
-rw-r--r--demos/declarative/demos.qmlproject16
-rw-r--r--demos/declarative/flickr/common/LikeOMeter.qml35
-rw-r--r--demos/declarative/flickr/common/Loading.qml8
-rw-r--r--demos/declarative/flickr/common/RssModel.qml7
-rw-r--r--demos/declarative/flickr/common/Star.qml45
-rw-r--r--demos/declarative/flickr/common/pics/background.pngbin60504 -> 0 bytes
-rw-r--r--demos/declarative/flickr/common/pics/button-pressed.pngbin571 -> 0 bytes
-rw-r--r--demos/declarative/flickr/common/pics/button-pressed.sci5
-rw-r--r--demos/declarative/flickr/common/pics/button.pngbin564 -> 0 bytes
-rw-r--r--demos/declarative/flickr/common/pics/button.sci5
-rw-r--r--demos/declarative/flickr/common/pics/ghns_star.pngbin891 -> 0 bytes
-rw-r--r--demos/declarative/flickr/common/pics/loading.pngbin813 -> 0 bytes
-rw-r--r--demos/declarative/flickr/common/pics/reflection.pngbin4839 -> 0 bytes
-rw-r--r--demos/declarative/flickr/common/pics/shadow-bottom.pngbin656 -> 0 bytes
-rw-r--r--demos/declarative/flickr/common/pics/shadow-corner.pngbin405 -> 0 bytes
-rw-r--r--demos/declarative/flickr/common/pics/shadow-right-screen.pngbin227 -> 0 bytes
-rw-r--r--demos/declarative/flickr/common/pics/shadow-right.pngbin635 -> 0 bytes
-rw-r--r--demos/declarative/flickr/flickr.qml4
-rw-r--r--demos/declarative/flickr/flickr.qmlproject16
-rw-r--r--demos/declarative/flickr/mobile/TitleBar.qml1
-rw-r--r--demos/declarative/minehunt/minehunt.cpp2
-rw-r--r--demos/declarative/minehunt/minehunt.qmlproject16
-rw-r--r--demos/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml6
-rw-r--r--demos/declarative/photoviewer/PhotoViewerCore/Button.qml2
-rw-r--r--demos/declarative/photoviewer/PhotoViewerCore/EditableButton.qml2
-rw-r--r--demos/declarative/photoviewer/photoviewer.qmlproject16
-rw-r--r--demos/declarative/samegame/SamegameCore/BoomBlock.qml10
-rw-r--r--demos/declarative/samegame/SamegameCore/Button.qml4
-rw-r--r--demos/declarative/samegame/SamegameCore/Dialog.qml2
-rwxr-xr-xdemos/declarative/samegame/SamegameCore/samegame.js2
-rw-r--r--demos/declarative/samegame/samegame.qml2
-rw-r--r--demos/declarative/samegame/samegame.qmlproject16
-rw-r--r--demos/declarative/snake/content/snake.js4
-rw-r--r--demos/declarative/snake/snake.qmlproject16
-rw-r--r--demos/declarative/twitter/twitter.qmlproject16
-rw-r--r--demos/declarative/webbrowser/content/FlickableWebView.qml4
-rw-r--r--demos/declarative/webbrowser/webbrowser.qmlproject16
-rw-r--r--demos/multimedia/multimedia.pro3
-rw-r--r--demos/multimedia/player/player.cpp33
-rw-r--r--demos/multimedia/player/player.pro9
-rw-r--r--demos/multimedia/player/playercontrols.h2
-rw-r--r--demos/multimedia/player/videowidget.h2
43 files changed, 204 insertions, 139 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
deleted file mode 100644
index 5b37072..0000000
--- a/demos/declarative/flickr/common/pics/background.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/flickr/common/pics/button-pressed.png b/demos/declarative/flickr/common/pics/button-pressed.png
deleted file mode 100644
index e434d32..0000000
--- a/demos/declarative/flickr/common/pics/button-pressed.png
+++ /dev/null
Binary files differ
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
deleted file mode 100644
index 56a63ce..0000000
--- a/demos/declarative/flickr/common/pics/button.png
+++ /dev/null
Binary files differ
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
deleted file mode 100644
index 4ad43cc..0000000
--- a/demos/declarative/flickr/common/pics/ghns_star.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/flickr/common/pics/loading.png b/demos/declarative/flickr/common/pics/loading.png
deleted file mode 100644
index 47a1589..0000000
--- a/demos/declarative/flickr/common/pics/loading.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/flickr/common/pics/reflection.png b/demos/declarative/flickr/common/pics/reflection.png
deleted file mode 100644
index c143a48..0000000
--- a/demos/declarative/flickr/common/pics/reflection.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/flickr/common/pics/shadow-bottom.png b/demos/declarative/flickr/common/pics/shadow-bottom.png
deleted file mode 100644
index 523f6e7..0000000
--- a/demos/declarative/flickr/common/pics/shadow-bottom.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/flickr/common/pics/shadow-corner.png b/demos/declarative/flickr/common/pics/shadow-corner.png
deleted file mode 100644
index ef8c856..0000000
--- a/demos/declarative/flickr/common/pics/shadow-corner.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/flickr/common/pics/shadow-right-screen.png b/demos/declarative/flickr/common/pics/shadow-right-screen.png
deleted file mode 100644
index 9856c4f..0000000
--- a/demos/declarative/flickr/common/pics/shadow-right-screen.png
+++ /dev/null
Binary files differ
diff --git a/demos/declarative/flickr/common/pics/shadow-right.png b/demos/declarative/flickr/common/pics/shadow-right.png
deleted file mode 100644
index f534a35..0000000
--- a/demos/declarative/flickr/common/pics/shadow-right.png
+++ /dev/null
Binary files differ
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 " ]
+}
diff --git a/demos/multimedia/multimedia.pro b/demos/multimedia/multimedia.pro
index 042650f..fa29a12 100644
--- a/demos/multimedia/multimedia.pro
+++ b/demos/multimedia/multimedia.pro
@@ -1,4 +1,3 @@
TEMPLATE = subdirs
-SUBDIRS = player
-
+contains(QT_CONFIG, mediaservices): SUBDIRS = player
diff --git a/demos/multimedia/player/player.cpp b/demos/multimedia/player/player.cpp
index af30a97..bf314ee 100644
--- a/demos/multimedia/player/player.cpp
+++ b/demos/multimedia/player/player.cpp
@@ -45,8 +45,8 @@
#include "playlistmodel.h"
#include "videowidget.h"
-#include <QtMultimedia/qmediaservice.h>
-#include <QtMultimedia/qmediaplaylist.h>
+#include <QtMediaServices/qmediaservice.h>
+#include <QtMediaServices/qmediaplaylist.h>
#include <QtGui>
@@ -171,11 +171,22 @@ Player::Player(QWidget *parent)
metaDataChanged();
- QStringList fileNames = qApp->arguments();
- fileNames.removeAt(0);
- foreach (QString const &fileName, fileNames) {
- if (QFileInfo(fileName).exists())
- playlist->addMedia(QUrl::fromLocalFile(fileName));
+ QStringList arguments = qApp->arguments();
+ arguments.removeAt(0);
+ foreach (QString const &argument, arguments) {
+ QFileInfo fileInfo(argument);
+ if (fileInfo.exists()) {
+ QUrl url = QUrl::fromLocalFile(fileInfo.absoluteFilePath());
+ if (fileInfo.suffix().toLower() == QLatin1String("m3u")) {
+ playlist->load(url);
+ } else
+ playlist->addMedia(url);
+ } else {
+ QUrl url(argument);
+ if (url.isValid()) {
+ playlist->addMedia(url);
+ }
+ }
}
}
@@ -204,14 +215,14 @@ void Player::positionChanged(qint64 progress)
void Player::metaDataChanged()
{
- //qDebug() << "update metadata" << player->metaData(QtMultimedia::Title).toString();
+ //qDebug() << "update metadata" << player->metaData(QtMediaServices::Title).toString();
if (player->isMetaDataAvailable()) {
setTrackInfo(QString("%1 - %2")
- .arg(player->metaData(QtMultimedia::AlbumArtist).toString())
- .arg(player->metaData(QtMultimedia::Title).toString()));
+ .arg(player->metaData(QtMediaServices::AlbumArtist).toString())
+ .arg(player->metaData(QtMediaServices::Title).toString()));
if (coverLabel) {
- QUrl url = player->metaData(QtMultimedia::CoverArtUrlLarge).value<QUrl>();
+ QUrl url = player->metaData(QtMediaServices::CoverArtUrlLarge).value<QUrl>();
coverLabel->setPixmap(!url.isEmpty()
? QPixmap(url.toString())
diff --git a/demos/multimedia/player/player.pro b/demos/multimedia/player/player.pro
index 929f3cd..0b868bd 100644
--- a/demos/multimedia/player/player.pro
+++ b/demos/multimedia/player/player.pro
@@ -1,5 +1,7 @@
+TEMPLATE = app
+TARGET = player
-QT += multimedia
+QT += gui mediaservices
HEADERS = \
player.h \
@@ -15,9 +17,8 @@ SOURCES = \
videowidget.cpp
target.path = $$[QT_INSTALL_DEMOS]/multimedia/player
-
-sources.files = $$SOURCES $$HEADERS
-sources.path = $$[QT_INSTALL_DEMOS]/multimedia/player player.pro
+sources.files = $$SOURCES $$HEADERS *.pro
+sources.path = $$[QT_INSTALL_DEMOS]/multimedia/player
INSTALLS += target sources
diff --git a/demos/multimedia/player/playercontrols.h b/demos/multimedia/player/playercontrols.h
index 99894ff..d2229bd 100644
--- a/demos/multimedia/player/playercontrols.h
+++ b/demos/multimedia/player/playercontrols.h
@@ -42,7 +42,7 @@
#ifndef PLAYERCONTROLS_H
#define PLAYERCONTROLS_H
-#include <QtMultimedia/qmediaplayer.h>
+#include <QtMediaServices/qmediaplayer.h>
#include <QtGui/qwidget.h>
diff --git a/demos/multimedia/player/videowidget.h b/demos/multimedia/player/videowidget.h
index 543e1e0..b5bf581 100644
--- a/demos/multimedia/player/videowidget.h
+++ b/demos/multimedia/player/videowidget.h
@@ -41,7 +41,7 @@
#ifndef VIDEOWIDGET_H
#define VIDEOWIDGET_H
-#include <QtMultimedia/qvideowidget.h>
+#include <QtMediaServices/qvideowidget.h>
QT_BEGIN_HEADER