diff options
author | dpope <daniel.pope@nokia.com> | 2012-05-01 18:27:01 +1000 |
---|---|---|
committer | dpope <daniel.pope@nokia.com> | 2012-05-01 18:27:01 +1000 |
commit | 8d64333f51b3d4cbbbdda5ec784f67d88d0ff581 (patch) | |
tree | f79097c9cf2be98e6d845051e7fff123061d297f /demos | |
parent | 41f15122654d3cb2862b6676671720fb2b120b17 (diff) | |
parent | 92a74083f71f3b86589fa24e60d5f5bd6d0b12ad (diff) |
Merge remote branch 'gerrit/1_0_RC1'
Resolved Conflicts:
demos/quick3d/flickr3d/flickr3d.pro
demos/quick3d/flickr3d/main.cpp
demos/quick3d/flickr3d/qml/Flickr3d.qml
demos/quick3d/flickr3d/qml/RssModel.qml
demos/quick3d/flickr3d/qtquick3d.ico
demos/quick3d/model_viewer/qtquick3d.ico
demos/quick3d/qmlres.h
demos/quick3d/quick3d.pro
demos/quick3d/robo_bounce/main.cpp
demos/quick3d/robo_bounce/robo_bounce.pro
demos/quick3d/robo_bounce/robo_bounce.qrc
demos/quick3d/tea_service/main.cpp
doc/src/examples/basket.qdoc
doc/src/examples/cube.qdoc
doc/src/examples/lander.qdoc
doc/src/examples/monkeygod.qdoc
doc/src/qline3d-math.qdoc
doc/src/qt3d-building.qdoc
doc/src/qt3d-examples.qdoc
doc/src/qt3d.qdoc
doc/src/tutorials/sceneformat.qdoc
doc/src/tutorials/simpleobject.qdoc
examples/qt3d/basket/basket.pro
modules/qt_qt3dquick.pri
qt3d.pro
src/imports/shapes/capsulemesh_p.h
src/imports/shapes/cylindermesh_p.h
src/imports/shapes/shapes.pro
src/imports/threed/threed.pro
src/plugins/sceneformats/assimp/ai_plugin.h
src/plugins/sceneformats/assimp/assimp.pro
src/plugins/sceneformats/assimp/qaiscene.cpp
src/plugins/sceneformats/assimp/qaiscenehandler.cpp
src/plugins/sceneformats/bezier/bezier.pro
src/plugins/sceneformats/obj/obj.pro
src/quick3d/qquickeffect.cpp
src/quick3d/qquickitem3d.cpp
src/quick3d/qquickmesh.cpp
src/quick3d/quick3d.pro
src/threed/materials/qglmaterial.cpp
src/threed/scene/qglrenderorder.cpp
src/threed/scene/qglsceneformatplugin.cpp
src/threed/textures/qgltexture2d.cpp
src/threed/viewing/qglmockview_p.h
tests/auto/auto.pro
tests/manual/animations/animations.pro
tests/manual/displaymodel/displaymodel.pro
tests/manual/model3ds/model3ds.pro
tests/manual/navigation1/navigation1.pro
tests/manual/qrc/qrc.pro
tests/manual/rotation/rotation.pro
tests/manual/scaling/scaling.pro
tests/manual/shapes/info.json
tests/manual/shapes/shapes.pro
tests/manual/submesh/submesh.pro
tests/manual/transformations/transformations.pro
tests/manual/translation/translation.pro
tutorials/quick3d/shaders/meshes/teapot.bez
tutorials/quick3d/shaders/shader-tutorial-1-textures.qml
tutorials/quick3d/shaders/shader-tutorial-2-vertex-shader.qml
tutorials/quick3d/shaders/shader-tutorial-3-transformed-coordinates.qml
tutorials/quick3d/shaders/shader-tutorial-lighting.qml
tutorials/quick3d/shaders/shader-tutorial-varying.qml
tutorials/quick3d/shaders/shader-tutorial.qml
tutorials/quick3d/shadertut/main.cpp
tutorials/quick3d/shadertut/qml/ShaderTutorial.qml
tutorials/quick3d/shadertut/qml/meshes/teapot.bez
tutorials/quick3d/shadertut/qml/shader-tutorial-1-textures.qml
tutorials/quick3d/shadertut/qml/shader-tutorial-2-vertex-shader.qml
tutorials/quick3d/shadertut/qml/shader-tutorial-3-transformed-coordinates.qml
tutorials/quick3d/shadertut/qml/shader-tutorial-lighting.qml
tutorials/quick3d/shadertut/qml/shader-tutorial-varying.qml
tutorials/quick3d/shadertut/shader-tutorial-1-textures.qml
tutorials/quick3d/shadertut/shader-tutorial-2-vertex-shader.qml
tutorials/quick3d/shadertut/shader-tutorial-3-transformed-coordinates.qml
tutorials/quick3d/shadertut/shader-tutorial-lighting.qml
tutorials/quick3d/shadertut/shader-tutorial-varying.qml
tutorials/quick3d/shadertut/shader-tutorial.qml
tutorials/quick3d/shadertut/shaders.pro
tutorials/quick3d/shadertut/shadertut.pro
tutorials/quick3d/shadertut/shadertut.rc
tutorials/quick3d/teapot_bounce_qml/qml/meshes/teapot.bez
tutorials/quick3d/teapot_bounce_qml/teapot_bounce_qml.pro
tutorials/quick3d/teapot_qml/qtquick3d.ico
tutorials/quick3d/teapot_qml/teapot_qml.pro
Change-Id: Ia247e1f9c8364393b142eb4f5f7ddab766c70557
Diffstat (limited to 'demos')
-rw-r--r-- | demos/quick3d/flickr3d/flickr3d.pro | 6 | ||||
-rw-r--r-- | demos/quick3d/flickr3d/qml/Flickr3d.qml | 54 | ||||
-rw-r--r-- | demos/quick3d/flickr3d/qml/RssModel.qml | 67 | ||||
-rw-r--r-- | demos/quick3d/tea_service/tea_service.pro | 3 |
4 files changed, 119 insertions, 11 deletions
diff --git a/demos/quick3d/flickr3d/flickr3d.pro b/demos/quick3d/flickr3d/flickr3d.pro index 15348a2e2..823cbbf41 100644 --- a/demos/quick3d/flickr3d/flickr3d.pro +++ b/demos/quick3d/flickr3d/flickr3d.pro @@ -8,7 +8,8 @@ ICON_FILE = ../icon.png QML_FILES = \ qml/Flickr3d.qml \ - qml/desktop.qml + qml/desktop.qml \ + qml/RssModel.qml QML_INFRA_FILES = \ $$QML_FILES \ @@ -18,7 +19,8 @@ QML_INFRA_FILES = \ qml/default_sky_up.png \ qml/default_sky_east.png \ qml/default_sky_south.png \ - qml/default_sky_west.png + qml/default_sky_west.png \ + CATEGORY = demos include(../../../pkg.pri) diff --git a/demos/quick3d/flickr3d/qml/Flickr3d.qml b/demos/quick3d/flickr3d/qml/Flickr3d.qml index 35993cd1a..7d077f863 100644 --- a/demos/quick3d/flickr3d/qml/Flickr3d.qml +++ b/demos/quick3d/flickr3d/qml/Flickr3d.qml @@ -60,21 +60,57 @@ Viewport { loops: Animation.Infinite } + RssModel { id: rssModel } + + Item3D { + transform: [ + Rotation3D { axis: Qt.vector3d(1, 0, 0); angle: 90 }, + Translation3D { translate: Qt.vector3d(0, 1, 0) } + ] + + Cylinder { + levelOfDetail: 1 + length: 2.0 + radius: 2.8 + effect: Effect { + color: "#ccccdd" + } + } + } + Skybox { source: "./" } - Cube { - effect: Effect { - color: "#aaca00" - texture: "qtlogo.png" - decal: true + Component { + id: octoDisplayDelegate + Item3D { + transform: [ + Translation3D { translate: Qt.vector3d(0, 0, 2.6) }, + // index is a special variable that comes from model instancing + Rotation3D { axis: Qt.vector3d(0, 1, 0); angle: (360 / 16) * (index * 2 + 1) } + ] + Item3D { + enabled: index > -1 && index < 9 + transform: [ + Rotation3D { axis: Qt.vector3d(1, 0, 0); angle: 90 } + ] + Quad { + effect: Effect { + //The current texture downloading does not operate as network URLs are unsupported + //in qt 5. + //texture: model.imagePath + texture: "qtlogo.png" + blending: true + } + } + } } } - MouseArea { - anchors.fill: parent - //this mousearea simply stops users from trying to move the viewpoint in - //what is meant to be a fixed scene. + Repeater { + delegate: octoDisplayDelegate + model: rssModel } } + diff --git a/demos/quick3d/flickr3d/qml/RssModel.qml b/demos/quick3d/flickr3d/qml/RssModel.qml new file mode 100644 index 000000000..b5b9d78b9 --- /dev/null +++ b/demos/quick3d/flickr3d/qml/RssModel.qml @@ -0,0 +1,67 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the Qt3D examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** GNU Lesser General Public License Usage +** This file may be used under the terms of the GNU Lesser General Public +** License version 2.1 as published by the Free Software Foundation and +** appearing in the file LICENSE.LGPL included in the packaging of this +** file. Please review the following information to ensure the GNU Lesser +** General Public License version 2.1 requirements will be met: +** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** GNU General Public License Usage +** Alternatively, this file may be used under the terms of the GNU General +** Public License version 3.0 as published by the Free Software Foundation +** and appearing in the file LICENSE.GPL included in the packaging of this +** file. Please review the following information to ensure the GNU General +** Public License version 3.0 requirements will be met: +** http://www.gnu.org/copyleft/gpl.html. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms and +** conditions contained in a signed written agreement between you and Nokia. +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import QtQuick.XmlListModel 2.0 + +XmlListModel { + property string tags : "" + + 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/\";" + + XmlRole { name: "title"; query: "title/string()" } + XmlRole { name: "imagePath"; query: "media:thumbnail/@url/string()" } + XmlRole { name: "url"; query: "media:content/@url/string()" } + XmlRole { name: "description"; query: "description/string()" } + XmlRole { name: "tags"; query: "media:category/string()" } + XmlRole { name: "photoWidth"; query: "media:content/@width/string()" } + XmlRole { name: "photoHeight"; query: "media:content/@height/string()" } + XmlRole { name: "photoType"; query: "media:content/@type/string()" } + XmlRole { name: "photoAuthor"; query: "author/string()" } + XmlRole { name: "photoDate"; query: "pubDate/string()" } +} diff --git a/demos/quick3d/tea_service/tea_service.pro b/demos/quick3d/tea_service/tea_service.pro index d3ef30fa1..a6440ef39 100644 --- a/demos/quick3d/tea_service/tea_service.pro +++ b/demos/quick3d/tea_service/tea_service.pro @@ -28,4 +28,7 @@ OTHER_FILES += \ $$QML_INFRA_FILES \ tea_service.rc +INSTALL_DIRS = qml +mt: INSTALL_FILES = mt.qml + RC_FILE = tea_service.rc |