From: Alan Alpert Date: Mon, 20 Feb 2012 00:34:44 +0000 (+1000) Subject: Start of examples refactor X-Git-Tag: qt-v5.0.0-alpha1~316 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9d2b618fa022daeabd45e57aa1596197db883037;p=profile%2Fivi%2Fqtdeclarative.git Start of examples refactor This is the general reorg of the examples directory structure, plus additional guidelines. calculator, animations and accessibility have been updated to the new standards and tested, as an example. Task-number: QTBUG-24133 Change-Id: I76c3b86751d3195ba2a5474ff23afb875765e9a4 Reviewed-by: Alan Alpert --- diff --git a/.gitignore b/.gitignore index e1bf85a..4c8776b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,20 +1,6 @@ # This file is used to ignore files which are generated in the Qt build system # ---------------------------------------------------------------------------- -examples/*/*/* -!examples/*/*/*[.]* -!examples/*/*/README -examples/*/*/*[.]app -!examples/declarative/* -!examples/tutorials/* -!examples/tutorials/*/* -!examples/ja_JP/*/* -demos/*/* -!demos/spectrum/* -demos/spectrum/bin -!demos/*/*[.]* -demos/*/*[.]app -!demos/declarative/* config.tests/*/*/* !config.tests/*/*/*[.]* config.tests/*/*/*[.]app @@ -273,4 +259,4 @@ tests/auto/*/*.o tests/auto/*/*.moc tests/auto/*/*/*.o tests/auto/*/*/*.moc -src/declarative/generated/ \ No newline at end of file +src/declarative/generated/ diff --git a/doc/config/qtquick.qdocconf b/doc/config/qtquick.qdocconf index 69e8609..3f4645a 100644 --- a/doc/config/qtquick.qdocconf +++ b/doc/config/qtquick.qdocconf @@ -19,7 +19,8 @@ headerdirs += ../src \ imagedirs += ../src/images \ sourcedirs += ../src \ - ../../src + ../../src \ + ../../examples #indexes = $QT5DOC/doc/html/qt.index diff --git a/doc/src/examples/examples-groups.qdoc b/doc/src/examples/examples-groups.qdoc index 9a6dafa..a346794 100644 --- a/doc/src/examples/examples-groups.qdoc +++ b/doc/src/examples/examples-groups.qdoc @@ -32,15 +32,6 @@ \brief This is an internationalization example */ /*! - \title QML Examples - Shader Effects - \example declarative/shadereffects - \image qml-shadereffects-example.png - \brief This is a shader effects example - - This example demonstrates a couple of visual effects that you can perform - with shaders in QtQuick 2.0 -*/ -/*! \title QML Examples - Positioners \example declarative/positioners \brief This is a positioners example @@ -49,16 +40,6 @@ This example demonstrates the positioners and some of their animations. */ /*! - \title QML Examples - Animation - \example declarative/animation - \brief This is a collection of QML examples - \image qml-animations-example.png - - This is a collection of small QML examples relating to animation. Each example is - a small QML file, usually containing or emphasizing a particular element or - feature. You can run and observe the behavior of each example. -*/ -/*! \title QML Examples - Image Elements \example declarative/imageelements \brief This is a collection of QML examples diff --git a/doc/src/examples/examples-toys.qdoc b/doc/src/examples/examples-toys.qdoc index f076c1d..7414579 100644 --- a/doc/src/examples/examples-toys.qdoc +++ b/doc/src/examples/examples-toys.qdoc @@ -27,13 +27,6 @@ /*! - \title QML Example - Calculator - \example declarative/calculator - \brief This is an example application written in QML. - \image qml-calculator-demo-small.png -*/ - -/*! \title QML Example - Samegame \example declarative/samegame \brief This example demonstrates creating a game with javascript game logic. diff --git a/examples/HACKING b/examples/HACKING new file mode 100644 index 0000000..a3aa3e9 --- /dev/null +++ b/examples/HACKING @@ -0,0 +1,23 @@ +Some guidelines for QtDeclarative examples + +Snippets +--- +Snippets are snatches of QML code that won't even run on their own. They don't belong here, they belong in doc/src/snippets. They should be contained in files that will compile on their own, for automated syntax validation, but don't have to look like anything. + +Examples +--- + +Examples are large blocks of QML code that demonstrate a feature. You should be able to launch an example and visually see the feature take effect. Examples should be written in a small form, and should automatically activate any features. Ideally, when you run an example, you see the feature demonstrate itself over and over until you get bored and close the application using your platform's close window mechanism. Examples shouldn't contain their own close buttons or start screen, explanatory text should be kept to a minimum (show, not tell), and reserve interaction for demonstrating interactive elements). The code should be held to a high level of quality, and should be understandable by people new to QML. + +Unless the demonstrated feature uses it, assume no interface devices other than a screen that can show a 320x480 rectangle and a generic pointing device (with the shared subset of mouse/touch functionality). + +Groups of similar examples should be placed in one folder with a single launcher application, which uses the QtQuick.Examples module for common components. + +The example, or launcher application in case of groups, should contain a qdoc comment explaining the example. The example or launcher should be buildable as a full C++ application and runnable with the standard qml file launcher. + +Demos +--- + +Demos are examples of creating full applications using QML. They should fit both a desktop and a mobile form factor, they should have their own start screen and method of exiting the application. They should be at a level of quality that you'd be comfortable submitting them to an app store for a platform of the appropriate hardware (screen size, input methods, etc.). The code should be written to a level that is easily understood and modified by a QML expert. + +Demos should have a qdoc file in their directory explaining the demo at a high level. The demo should be buildable as a full C++ application and preferably runnable with the standard qml file launcher. diff --git a/examples/declarative/README b/examples/README similarity index 99% rename from examples/declarative/README rename to examples/README index 56c48d7..aba1e2c 100644 --- a/examples/declarative/README +++ b/examples/README @@ -8,6 +8,5 @@ and loading data models from C++ and interacting with them. Mostof these examples can be viewed directly with the QML viewer utility, without requiring compilation. - Documentation for these examples can be found via the Examples link in the main Qt documentation. diff --git a/examples/declarative/declarative.pro b/examples/declarative/declarative.pro deleted file mode 100644 index 883c0af..0000000 --- a/examples/declarative/declarative.pro +++ /dev/null @@ -1,38 +0,0 @@ -TEMPLATE = subdirs - -# These examples contain some C++ and need to be built -SUBDIRS = \ - cppextensions \ - minehunt \ - modelviews \ - painteditem \ - tutorials \ - script - -# These examples contain no C++ and can simply be copied -sources.files = \ - animation \ - calculator \ - cppextensions \ - flickr \ - i18n \ - imageelements \ - keyinteraction \ - photoviewer \ - positioners \ - rssnews \ - samegame \ - snake \ - sqllocalstorage \ - text \ - threading \ - touchinteraction \ - toys \ - twitter \ - ui-components \ - webbrowser \ - xml - - -sources.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/declarative -INSTALLS += sources diff --git a/examples/declarative/imageelements/borderimage.qml b/examples/declarative/imageelements/borderimage.qml deleted file mode 100644 index 3dd5d1d..0000000 --- a/examples/declarative/imageelements/borderimage.qml +++ /dev/null @@ -1,97 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import "content" - -Rectangle { - id: page - width: 1030; height: 540 - - Grid { - anchors.centerIn: parent; spacing: 20 - - MyBorderImage { - minWidth: 120; maxWidth: 240; minHeight: 120; maxHeight: 240 - source: "content/colors.png"; margin: 30 - } - - MyBorderImage { - minWidth: 120; maxWidth: 240; minHeight: 120; maxHeight: 240 - source: "content/colors.png"; margin: 30 - horizontalMode: BorderImage.Repeat; verticalMode: BorderImage.Repeat - } - - MyBorderImage { - minWidth: 120; maxWidth: 240; minHeight: 120; maxHeight: 240 - source: "content/colors.png"; margin: 30 - horizontalMode: BorderImage.Stretch; verticalMode: BorderImage.Repeat - } - - MyBorderImage { - minWidth: 120; maxWidth: 240; minHeight: 120; maxHeight: 240 - source: "content/colors.png"; margin: 30 - horizontalMode: BorderImage.Round; verticalMode: BorderImage.Round - } - - MyBorderImage { - minWidth: 60; maxWidth: 200; minHeight: 40; maxHeight: 200 - source: "content/bw.png"; margin: 10 - } - - MyBorderImage { - minWidth: 60; maxWidth: 200; minHeight: 40; maxHeight: 200 - source: "content/bw.png"; margin: 10 - horizontalMode: BorderImage.Repeat; verticalMode: BorderImage.Repeat - } - - MyBorderImage { - minWidth: 60; maxWidth: 200; minHeight: 40; maxHeight: 200 - source: "content/bw.png"; margin: 10 - horizontalMode: BorderImage.Stretch; verticalMode: BorderImage.Repeat - } - - MyBorderImage { - minWidth: 60; maxWidth: 200; minHeight: 40; maxHeight: 200 - source: "content/bw.png"; margin: 10 - horizontalMode: BorderImage.Round; verticalMode: BorderImage.Round - } - } -} diff --git a/examples/declarative/imageelements/image.qml b/examples/declarative/imageelements/image.qml deleted file mode 100644 index 4ca26c1..0000000 --- a/examples/declarative/imageelements/image.qml +++ /dev/null @@ -1,67 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the examples of the Qt Toolkit. -** -** $QT_BEGIN_LICENSE:BSD$ -** You may use this file under the terms of the BSD license as follows: -** -** "Redistribution and use in source and binary forms, with or without -** modification, are permitted provided that the following conditions are -** met: -** * Redistributions of source code must retain the above copyright -** notice, this list of conditions and the following disclaimer. -** * Redistributions in binary form must reproduce the above copyright -** notice, this list of conditions and the following disclaimer in -** the documentation and/or other materials provided with the -** distribution. -** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor -** the names of its contributors may be used to endorse or promote -** products derived from this software without specific prior written -** permission. -** -** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." -** -** $QT_END_LICENSE$ -** -****************************************************************************/ - -import QtQuick 2.0 -import "content" - -Rectangle { - width: 490 - height: 285 - - Grid { - property int cellWidth: (width - (spacing * (columns - 1))) / columns - property int cellHeight: (height - (spacing * (rows - 1))) / rows - - anchors.fill: parent - anchors.margins: 30 - - columns: 3 - rows: 2 - spacing: 30 - - ImageCell { mode: Image.Stretch; caption: "Stretch" } - ImageCell { mode: Image.PreserveAspectFit; caption: "PreserveAspectFit" } - ImageCell { mode: Image.PreserveAspectCrop; caption: "PreserveAspectCrop" } - - ImageCell { mode: Image.Tile; caption: "Tile" } - ImageCell { mode: Image.TileHorizontally; caption: "TileHorizontally" } - ImageCell { mode: Image.TileVertically; caption: "TileVertically" } - } -} diff --git a/examples/declarative/shadereffects/shadereffects.qml b/examples/declarative/shadereffects/shadereffects.qml deleted file mode 100644 index 842e42b..0000000 --- a/examples/declarative/shadereffects/shadereffects.qml +++ /dev/null @@ -1,300 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the Declarative module 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 "content" - -Image { - width: 640 - height: 360 - source: "../snake/content/pics/background.png" - - ShaderEffectSource { - id: theSource - sourceItem: theItem - smooth: true - } - - function saturate(x) { - return Math.min(Math.max(x, 0), 1) - } - - function sliderToColor(x) { - return Qt.rgba(saturate(Math.max(2 - 6 * x, 6 * x - 4)), - saturate(Math.min(6 * x, 4 - 6 * x)), - saturate(Math.min(6 * x - 2, 6 - 6 * x))) - } - - Grid { - anchors.centerIn: parent - columns: 3 - - Item { - id: theItem - width: 180 - height: 180 - ListView { - anchors.centerIn: parent - width: 160 - height: 140 - clip: true - snapMode: ListView.SnapOneItem - model: VisualItemModel { - Text { - width: 160 - height: 140 - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - font.pixelSize: 120 - font.family: "Times" - color: "blue" - text: "Qt" - } - Image { - width: 160 - height: 140 - source: "content/qt-logo.png" - smooth: true - } - Image { - width: 160 - height: 140 - source: "content/face-smile.png" - smooth: true - } - } - } - } - ShaderEffect { - width: 180 - height: 180 - property variant source: theSource - property real amplitude: 0.04 * wobbleSlider.value - property real frequency: 20 - property real time: 0 - NumberAnimation on time { loops: Animation.Infinite; from: 0; to: Math.PI * 2; duration: 600 } - fragmentShader: - "uniform lowp float qt_Opacity;" + - "uniform highp float amplitude;" + - "uniform highp float frequency;" + - "uniform highp float time;" + - "uniform sampler2D source;" + - "varying highp vec2 qt_TexCoord0;" + - "void main() {" + - " highp vec2 p = sin(time + frequency * qt_TexCoord0);" + - " gl_FragColor = texture2D(source, qt_TexCoord0 + amplitude * vec2(p.y, -p.x)) * qt_Opacity;" + - "}" - Slider { - id: wobbleSlider - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - height: 40 - } - } - ShaderEffect { - width: 180 - height: 180 - property variant source: theSource - property variant shadow: ShaderEffectSource { - smooth: true - sourceItem: ShaderEffect { - width: theItem.width - height: theItem.height - property variant delta: Qt.size(0.0, 1.0 / height) - property variant source: ShaderEffectSource { - smooth: true - sourceItem: ShaderEffect { - width: theItem.width - height: theItem.height - property variant delta: Qt.size(1.0 / width, 0.0) - property variant source: theSource - fragmentShader: " - uniform lowp float qt_Opacity; - uniform sampler2D source; - uniform highp vec2 delta; - varying highp vec2 qt_TexCoord0; - void main() { - gl_FragColor =(0.0538 * texture2D(source, qt_TexCoord0 - 3.182 * delta) - + 0.3229 * texture2D(source, qt_TexCoord0 - 1.364 * delta) - + 0.2466 * texture2D(source, qt_TexCoord0) - + 0.3229 * texture2D(source, qt_TexCoord0 + 1.364 * delta) - + 0.0538 * texture2D(source, qt_TexCoord0 + 3.182 * delta)) * qt_Opacity; - }" - } - } - fragmentShader: " - uniform lowp float qt_Opacity; - uniform sampler2D source; - uniform highp vec2 delta; - varying highp vec2 qt_TexCoord0; - void main() { - gl_FragColor =(0.0538 * texture2D(source, qt_TexCoord0 - 3.182 * delta) - + 0.3229 * texture2D(source, qt_TexCoord0 - 1.364 * delta) - + 0.2466 * texture2D(source, qt_TexCoord0) - + 0.3229 * texture2D(source, qt_TexCoord0 + 1.364 * delta) - + 0.0538 * texture2D(source, qt_TexCoord0 + 3.182 * delta)) * qt_Opacity; - }" - } - } - property real angle: 0 - property variant offset: Qt.point(15.0 * Math.cos(angle), 15.0 * Math.sin(angle)) - NumberAnimation on angle { loops: Animation.Infinite; from: 0; to: Math.PI * 2; duration: 6000 } - property variant delta: Qt.size(offset.x / width, offset.y / height) - property real darkness: shadowSlider.value - fragmentShader: " - uniform lowp float qt_Opacity; - uniform highp vec2 offset; - uniform sampler2D source; - uniform sampler2D shadow; - uniform highp float darkness; - uniform highp vec2 delta; - varying highp vec2 qt_TexCoord0; - void main() { - lowp vec4 fg = texture2D(source, qt_TexCoord0); - lowp vec4 bg = texture2D(shadow, qt_TexCoord0 + delta); - gl_FragColor = (fg + vec4(0., 0., 0., darkness * bg.a) * (1. - fg.a)) * qt_Opacity; - }" - Slider { - id: shadowSlider - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - height: 40 - } - } - ShaderEffect { - width: 180 - height: 180 - property variant source: theSource - property variant delta: Qt.size(0.5 / width, 0.5 / height) - fragmentShader: " - uniform sampler2D source; - uniform highp vec2 delta; - uniform highp float qt_Opacity; - varying highp vec2 qt_TexCoord0; - void main() { - lowp vec4 tl = texture2D(source, qt_TexCoord0 - delta); - lowp vec4 tr = texture2D(source, qt_TexCoord0 + vec2(delta.x, -delta.y)); - lowp vec4 bl = texture2D(source, qt_TexCoord0 - vec2(delta.x, -delta.y)); - lowp vec4 br = texture2D(source, qt_TexCoord0 + delta); - lowp vec4 gx = (tl + bl) - (tr + br); - lowp vec4 gy = (tl + tr) - (bl + br); - gl_FragColor.xyz = vec3(0.); - gl_FragColor.w = clamp(dot(sqrt(gx * gx + gy * gy), vec4(1.)), 0., 1.) * qt_Opacity; - }" - } - ShaderEffect { - width: 180 - height: 180 - property variant source: theSource - property color tint: sliderToColor(colorizeSlider.value) - fragmentShader: " - uniform sampler2D source; - uniform lowp vec4 tint; - uniform lowp float qt_Opacity; - varying highp vec2 qt_TexCoord0; - void main() { - lowp vec4 c = texture2D(source, qt_TexCoord0); - lowp float lo = min(min(c.x, c.y), c.z); - lowp float hi = max(max(c.x, c.y), c.z); - gl_FragColor = qt_Opacity * vec4(mix(vec3(lo), vec3(hi), tint.xyz), c.w); - }" - Slider { - id: colorizeSlider - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - height: 40 - } - } - ShaderEffect { - width: 180 - height: 180 - mesh: Qt.size(10, 10) - property variant source: theSource - property real bend: 0 - property real minimize: 0 - property real side: genieSlider.value - SequentialAnimation on bend { - loops: Animation.Infinite - NumberAnimation { to: 1; duration: 700; easing.type: Easing.InOutSine } - PauseAnimation { duration: 1600 } - NumberAnimation { to: 0; duration: 700; easing.type: Easing.InOutSine } - PauseAnimation { duration: 1000 } - } - SequentialAnimation on minimize { - loops: Animation.Infinite - PauseAnimation { duration: 300 } - NumberAnimation { to: 1; duration: 700; easing.type: Easing.InOutSine } - PauseAnimation { duration: 1000 } - NumberAnimation { to: 0; duration: 700; easing.type: Easing.InOutSine } - PauseAnimation { duration: 1300 } - } - vertexShader: " - uniform highp mat4 qt_Matrix; - uniform highp float bend; - uniform highp float minimize; - uniform highp float side; - uniform highp float width; - uniform highp float height; - attribute highp vec4 qt_Vertex; - attribute highp vec2 qt_MultiTexCoord0; - varying highp vec2 qt_TexCoord0; - void main() { - qt_TexCoord0 = qt_MultiTexCoord0; - highp vec4 pos = qt_Vertex; - pos.y = mix(qt_Vertex.y, height, minimize); - highp float t = pos.y / height; - t = (3. - 2. * t) * t * t; - pos.x = mix(qt_Vertex.x, side * width, t * bend); - gl_Position = qt_Matrix * pos; - }" - Slider { - id: genieSlider - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - height: 40 - } - } - } -} diff --git a/examples/declarative/tutorials/tutorials.pro b/examples/declarative/tutorials/tutorials.pro deleted file mode 100644 index 0a82c1e..0000000 --- a/examples/declarative/tutorials/tutorials.pro +++ /dev/null @@ -1,5 +0,0 @@ -TEMPLATE = subdirs - -SUBDIRS += \ - extending - diff --git a/examples/declarative/tutorials/tutorials.qmlproject b/examples/declarative/tutorials/tutorials.qmlproject deleted file mode 100644 index 2bb4016..0000000 --- a/examples/declarative/tutorials/tutorials.qmlproject +++ /dev/null @@ -1,14 +0,0 @@ -import QmlProject 1.0 - -Project { - /* Include .qml, .js, and image files from current directory and subdirectories */ - QmlFiles { - directory: "." - } - JavaScriptFiles { - directory: "." - } - ImageFiles { - directory: "." - } -} diff --git a/examples/declarative/calculator/content/Button.qml b/examples/demos/calculator/CalculatorCore/Button.qml similarity index 98% rename from examples/declarative/calculator/content/Button.qml rename to examples/demos/calculator/CalculatorCore/Button.qml index 6b480eb..872fc81 100644 --- a/examples/declarative/calculator/content/Button.qml +++ b/examples/demos/calculator/CalculatorCore/Button.qml @@ -72,7 +72,7 @@ BorderImage { id: mouseArea anchors.fill: parent onClicked: { - doOp(operation) + window.doOp(operation) button.clicked() } } diff --git a/examples/declarative/calculator/content/Display.qml b/examples/demos/calculator/CalculatorCore/Display.qml similarity index 100% rename from examples/declarative/calculator/content/Display.qml rename to examples/demos/calculator/CalculatorCore/Display.qml diff --git a/examples/declarative/calculator/content/calculator.js b/examples/demos/calculator/CalculatorCore/calculator.js similarity index 96% rename from examples/declarative/calculator/content/calculator.js rename to examples/demos/calculator/CalculatorCore/calculator.js index 7c363c7..e2b5692 100644 --- a/examples/declarative/calculator/content/calculator.js +++ b/examples/demos/calculator/CalculatorCore/calculator.js @@ -15,6 +15,10 @@ function disabled(op) { } function doOperation(op) { + if (op == '*')//Keyboard Aliases + op = multiplication; + if (op == '/') + op = division; if (disabled(op)) { return } diff --git a/examples/declarative/calculator/content/images/button-.png b/examples/demos/calculator/CalculatorCore/images/button-.png similarity index 100% rename from examples/declarative/calculator/content/images/button-.png rename to examples/demos/calculator/CalculatorCore/images/button-.png diff --git a/examples/declarative/calculator/content/images/button-blue.png b/examples/demos/calculator/CalculatorCore/images/button-blue.png similarity index 100% rename from examples/declarative/calculator/content/images/button-blue.png rename to examples/demos/calculator/CalculatorCore/images/button-blue.png diff --git a/examples/declarative/calculator/content/images/button-green.png b/examples/demos/calculator/CalculatorCore/images/button-green.png similarity index 100% rename from examples/declarative/calculator/content/images/button-green.png rename to examples/demos/calculator/CalculatorCore/images/button-green.png diff --git a/examples/declarative/calculator/content/images/button-purple.png b/examples/demos/calculator/CalculatorCore/images/button-purple.png similarity index 100% rename from examples/declarative/calculator/content/images/button-purple.png rename to examples/demos/calculator/CalculatorCore/images/button-purple.png diff --git a/examples/declarative/calculator/content/images/button-red.png b/examples/demos/calculator/CalculatorCore/images/button-red.png similarity index 100% rename from examples/declarative/calculator/content/images/button-red.png rename to examples/demos/calculator/CalculatorCore/images/button-red.png diff --git a/examples/declarative/calculator/content/images/display.png b/examples/demos/calculator/CalculatorCore/images/display.png similarity index 100% rename from examples/declarative/calculator/content/images/display.png rename to examples/demos/calculator/CalculatorCore/images/display.png diff --git a/examples/declarative/calculator/content/qmldir b/examples/demos/calculator/CalculatorCore/qmldir similarity index 100% rename from examples/declarative/calculator/content/qmldir rename to examples/demos/calculator/CalculatorCore/qmldir diff --git a/examples/demos/calculator/calculator-desktop.qml b/examples/demos/calculator/calculator-desktop.qml new file mode 100644 index 0000000..7e72f50 --- /dev/null +++ b/examples/demos/calculator/calculator-desktop.qml @@ -0,0 +1,136 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the QtDeclarative module 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.Window 2.0 +import "CalculatorCore" +import "CalculatorCore/calculator.js" as CalcEngine + +Rectangle { + id: window + + width: 640; height: 480 + color: "#282828" + + property string rotateLeft: "\u2939" + property string rotateRight: "\u2935" + property string leftArrow: "\u2190" + property string division : "\u00f7" + property string multiplication : "\u00d7" + property string squareRoot : "\u221a" + property string plusminus : "\u00b1" + + function doOp(operation) { CalcEngine.doOperation(operation) } + focus: true + Keys.onPressed: doOp(event.text); + + Item { + id: main + width: 640 + height: 480 + anchors.centerIn: parent + + Column { + id: box; spacing: 8 + + anchors { fill: parent; topMargin: 6; bottomMargin: 6; leftMargin: 6; rightMargin: 6 } + + Display { + id: display + width: box.width-3 + height: 64 + } + + Column { + id: column; spacing: 6 + + property real h: ((box.height - 72) / 6) - ((spacing * (6 - 1)) / 6) + property real w: (box.width / 4) - ((spacing * (4 - 1)) / 4) + + Row { + spacing: 6 + Button { width: column.w; height: column.h; color: 'purple'; operation: "Off" } + Button { width: column.w; height: column.h; color: 'purple'; operation: leftArrow } + Button { width: column.w; height: column.h; color: 'purple'; operation: "C" } + Button { width: column.w; height: column.h; color: 'purple'; operation: "AC" } + } + + Row { + spacing: 6 + property real w: (box.width / 4) - ((spacing * (4 - 1)) / 4) + + Button { width: column.w; height: column.h; color: 'green'; operation: "mc" } + Button { width: column.w; height: column.h; color: 'green'; operation: "m+" } + Button { width: column.w; height: column.h; color: 'green'; operation: "m-" } + Button { width: column.w; height: column.h; color: 'green'; operation: "mr" } + } + + Grid { + id: grid; rows: 5; columns: 5; spacing: 6 + + property real w: (box.width / columns) - ((spacing * (columns - 1)) / columns) + + Button { width: grid.w; height: column.h; operation: "7"; color: 'blue' } + Button { width: grid.w; height: column.h; operation: "8"; color: 'blue' } + Button { width: grid.w; height: column.h; operation: "9"; color: 'blue' } + Button { width: grid.w; height: column.h; operation: division } + Button { width: grid.w; height: column.h; operation: squareRoot } + Button { width: grid.w; height: column.h; operation: "4"; color: 'blue' } + Button { width: grid.w; height: column.h; operation: "5"; color: 'blue' } + Button { width: grid.w; height: column.h; operation: "6"; color: 'blue' } + Button { width: grid.w; height: column.h; operation: multiplication } + Button { width: grid.w; height: column.h; operation: "x^2" } + Button { width: grid.w; height: column.h; operation: "1"; color: 'blue' } + Button { width: grid.w; height: column.h; operation: "2"; color: 'blue' } + Button { width: grid.w; height: column.h; operation: "3"; color: 'blue' } + Button { width: grid.w; height: column.h; operation: "-" } + Button { width: grid.w; height: column.h; operation: "1/x" } + Button { width: grid.w; height: column.h; operation: "0"; color: 'blue' } + Button { width: grid.w; height: column.h; operation: "." } + Button { width: grid.w; height: column.h; operation: plusminus } + Button { width: grid.w; height: column.h; operation: "+" } + Button { width: grid.w; height: column.h; operation: "="; color: 'red' } + } + } + } + + } +} diff --git a/examples/declarative/calculator/calculator.qml b/examples/demos/calculator/calculator-mobile.qml similarity index 97% rename from examples/declarative/calculator/calculator.qml rename to examples/demos/calculator/calculator-mobile.qml index e2d6679..b4fc372 100644 --- a/examples/declarative/calculator/calculator.qml +++ b/examples/demos/calculator/calculator-mobile.qml @@ -41,13 +41,13 @@ import QtQuick 2.0 import QtQuick.Window 2.0 -import "content" -import "content/calculator.js" as CalcEngine +import "CalculatorCore" +import "CalculatorCore/calculator.js" as CalcEngine Rectangle { id: window - width: 360; height: 480 + width: 320; height: 480 color: "#282828" property string rotateLeft: "\u2939" @@ -64,6 +64,7 @@ Rectangle { id: main state: "orientation " + Screen.orientation + //Note: Assumes a primarily portrait device property bool landscapeWindow: window.width > window.height property real baseWidth: landscapeWindow ? window.height : window.width property real baseHeight: landscapeWindow ? window.width : window.height diff --git a/examples/demos/calculator/calculator.pro b/examples/demos/calculator/calculator.pro new file mode 100644 index 0000000..3bf3b8c --- /dev/null +++ b/examples/demos/calculator/calculator.pro @@ -0,0 +1,9 @@ +TEMPLATE = app + +QT += quick declarative +SOURCES += main.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/demos/calculator +qml.files = calculator-desktop.qml calculator-mobile.qml CalculatorCore +qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/demos/calculator +INSTALLS += target qml diff --git a/examples/demos/calculator/calculator.qdoc b/examples/demos/calculator/calculator.qdoc new file mode 100644 index 0000000..e94bdb4 --- /dev/null +++ b/examples/demos/calculator/calculator.qdoc @@ -0,0 +1,37 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** GNU Free Documentation License +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. +** +** 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$ +** +****************************************************************************/ + +/*! + \title QML Demo - Calculator + \example declarative/calculator + \brief This is an example calculator application written in QML. + \image qml-calculator-demo-small.png + + The Calculator demo implements a simple calculator in QML. It is written for desktop and portrait devices, + although on device it supports orientation changes. +*/ + diff --git a/examples/demos/calculator/main.cpp b/examples/demos/calculator/main.cpp new file mode 100644 index 0000000..c7f9b29 --- /dev/null +++ b/examples/demos/calculator/main.cpp @@ -0,0 +1,66 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include +#include +#include +#include + +void usage() +{ + printf("Pass -desktop to use the Desktop UI"); + exit(0); +} + +int main(int argc, char* argv[]) +{ + QGuiApplication app(argc,argv); + QQuickView view; + QUrl launchFile = QUrl::fromLocalFile(QLatin1String("calculator-mobile.qml")); + if (app.arguments().contains(QLatin1String("-help"))) + usage(); + if (app.arguments().contains(QLatin1String("-desktop"))) + launchFile = QUrl::fromLocalFile(QLatin1String("calculator-desktop.qml")); + view.connect(view.engine(), SIGNAL(quit()), &app, SLOT(quit())); + view.setSource(launchFile); + view.show(); + return app.exec(); +} + diff --git a/examples/declarative/toys/clocks/clocks.qml b/examples/demos/clocks/clocks.qml similarity index 100% rename from examples/declarative/toys/clocks/clocks.qml rename to examples/demos/clocks/clocks.qml diff --git a/examples/declarative/toys/clocks/content/Clock.qml b/examples/demos/clocks/content/Clock.qml similarity index 100% rename from examples/declarative/toys/clocks/content/Clock.qml rename to examples/demos/clocks/content/Clock.qml diff --git a/examples/declarative/ui-components/dialcontrol/content/QuitButton.qml b/examples/demos/clocks/content/QuitButton.qml similarity index 100% rename from examples/declarative/ui-components/dialcontrol/content/QuitButton.qml rename to examples/demos/clocks/content/QuitButton.qml diff --git a/examples/declarative/toys/clocks/content/arrow.png b/examples/demos/clocks/content/arrow.png similarity index 100% rename from examples/declarative/toys/clocks/content/arrow.png rename to examples/demos/clocks/content/arrow.png diff --git a/examples/declarative/toys/clocks/content/background.png b/examples/demos/clocks/content/background.png similarity index 100% rename from examples/declarative/toys/clocks/content/background.png rename to examples/demos/clocks/content/background.png diff --git a/examples/declarative/toys/clocks/content/center.png b/examples/demos/clocks/content/center.png similarity index 100% rename from examples/declarative/toys/clocks/content/center.png rename to examples/demos/clocks/content/center.png diff --git a/examples/declarative/toys/clocks/content/clock-night.png b/examples/demos/clocks/content/clock-night.png similarity index 100% rename from examples/declarative/toys/clocks/content/clock-night.png rename to examples/demos/clocks/content/clock-night.png diff --git a/examples/declarative/toys/clocks/content/clock.png b/examples/demos/clocks/content/clock.png similarity index 100% rename from examples/declarative/toys/clocks/content/clock.png rename to examples/demos/clocks/content/clock.png diff --git a/examples/declarative/toys/clocks/content/hour.png b/examples/demos/clocks/content/hour.png similarity index 100% rename from examples/declarative/toys/clocks/content/hour.png rename to examples/demos/clocks/content/hour.png diff --git a/examples/declarative/toys/clocks/content/minute.png b/examples/demos/clocks/content/minute.png similarity index 100% rename from examples/declarative/toys/clocks/content/minute.png rename to examples/demos/clocks/content/minute.png diff --git a/examples/declarative/ui-components/dialcontrol/content/quit.png b/examples/demos/clocks/content/quit.png similarity index 100% rename from examples/declarative/ui-components/dialcontrol/content/quit.png rename to examples/demos/clocks/content/quit.png diff --git a/examples/declarative/toys/clocks/content/second.png b/examples/demos/clocks/content/second.png similarity index 100% rename from examples/declarative/toys/clocks/content/second.png rename to examples/demos/clocks/content/second.png diff --git a/examples/declarative/toys/corkboards/content/Day.qml b/examples/demos/corkboards/content/Day.qml similarity index 100% rename from examples/declarative/toys/corkboards/content/Day.qml rename to examples/demos/corkboards/content/Day.qml diff --git a/examples/declarative/toys/corkboards/content/cork.jpg b/examples/demos/corkboards/content/cork.jpg similarity index 100% rename from examples/declarative/toys/corkboards/content/cork.jpg rename to examples/demos/corkboards/content/cork.jpg diff --git a/examples/declarative/toys/corkboards/content/note-yellow.png b/examples/demos/corkboards/content/note-yellow.png similarity index 100% rename from examples/declarative/toys/corkboards/content/note-yellow.png rename to examples/demos/corkboards/content/note-yellow.png diff --git a/examples/declarative/toys/corkboards/content/tack.png b/examples/demos/corkboards/content/tack.png similarity index 100% rename from examples/declarative/toys/corkboards/content/tack.png rename to examples/demos/corkboards/content/tack.png diff --git a/examples/declarative/toys/corkboards/corkboards.qml b/examples/demos/corkboards/corkboards.qml similarity index 100% rename from examples/declarative/toys/corkboards/corkboards.qml rename to examples/demos/corkboards/corkboards.qml diff --git a/examples/demos/demos.pro b/examples/demos/demos.pro new file mode 100644 index 0000000..abe718b --- /dev/null +++ b/examples/demos/demos.pro @@ -0,0 +1,2 @@ +TEMPLATE = subdirs +SUBDIRS = calculator diff --git a/examples/declarative/toys/dynamicscene/content/Button.qml b/examples/demos/dynamicscene/content/Button.qml similarity index 100% rename from examples/declarative/toys/dynamicscene/content/Button.qml rename to examples/demos/dynamicscene/content/Button.qml diff --git a/examples/declarative/toys/dynamicscene/content/GenericSceneItem.qml b/examples/demos/dynamicscene/content/GenericSceneItem.qml similarity index 100% rename from examples/declarative/toys/dynamicscene/content/GenericSceneItem.qml rename to examples/demos/dynamicscene/content/GenericSceneItem.qml diff --git a/examples/declarative/toys/dynamicscene/content/PaletteItem.qml b/examples/demos/dynamicscene/content/PaletteItem.qml similarity index 100% rename from examples/declarative/toys/dynamicscene/content/PaletteItem.qml rename to examples/demos/dynamicscene/content/PaletteItem.qml diff --git a/examples/declarative/toys/dynamicscene/content/PerspectiveItem.qml b/examples/demos/dynamicscene/content/PerspectiveItem.qml similarity index 100% rename from examples/declarative/toys/dynamicscene/content/PerspectiveItem.qml rename to examples/demos/dynamicscene/content/PerspectiveItem.qml diff --git a/examples/declarative/toys/dynamicscene/content/Sun.qml b/examples/demos/dynamicscene/content/Sun.qml similarity index 100% rename from examples/declarative/toys/dynamicscene/content/Sun.qml rename to examples/demos/dynamicscene/content/Sun.qml diff --git a/examples/declarative/toys/dynamicscene/content/images/NOTE b/examples/demos/dynamicscene/content/images/NOTE similarity index 100% rename from examples/declarative/toys/dynamicscene/content/images/NOTE rename to examples/demos/dynamicscene/content/images/NOTE diff --git a/examples/declarative/toys/dynamicscene/content/images/face-smile.png b/examples/demos/dynamicscene/content/images/face-smile.png similarity index 100% rename from examples/declarative/toys/dynamicscene/content/images/face-smile.png rename to examples/demos/dynamicscene/content/images/face-smile.png diff --git a/examples/declarative/toys/dynamicscene/content/images/moon.png b/examples/demos/dynamicscene/content/images/moon.png similarity index 100% rename from examples/declarative/toys/dynamicscene/content/images/moon.png rename to examples/demos/dynamicscene/content/images/moon.png diff --git a/examples/declarative/toys/dynamicscene/content/images/rabbit_brown.png b/examples/demos/dynamicscene/content/images/rabbit_brown.png similarity index 100% rename from examples/declarative/toys/dynamicscene/content/images/rabbit_brown.png rename to examples/demos/dynamicscene/content/images/rabbit_brown.png diff --git a/examples/declarative/toys/dynamicscene/content/images/rabbit_bw.png b/examples/demos/dynamicscene/content/images/rabbit_bw.png similarity index 100% rename from examples/declarative/toys/dynamicscene/content/images/rabbit_bw.png rename to examples/demos/dynamicscene/content/images/rabbit_bw.png diff --git a/examples/declarative/toys/dynamicscene/content/images/star.png b/examples/demos/dynamicscene/content/images/star.png similarity index 100% rename from examples/declarative/toys/dynamicscene/content/images/star.png rename to examples/demos/dynamicscene/content/images/star.png diff --git a/examples/declarative/toys/dynamicscene/content/images/sun.png b/examples/demos/dynamicscene/content/images/sun.png similarity index 100% rename from examples/declarative/toys/dynamicscene/content/images/sun.png rename to examples/demos/dynamicscene/content/images/sun.png diff --git a/examples/declarative/toys/dynamicscene/content/images/tree_s.png b/examples/demos/dynamicscene/content/images/tree_s.png similarity index 100% rename from examples/declarative/toys/dynamicscene/content/images/tree_s.png rename to examples/demos/dynamicscene/content/images/tree_s.png diff --git a/examples/declarative/toys/dynamicscene/content/itemCreation.js b/examples/demos/dynamicscene/content/itemCreation.js similarity index 100% rename from examples/declarative/toys/dynamicscene/content/itemCreation.js rename to examples/demos/dynamicscene/content/itemCreation.js diff --git a/examples/declarative/toys/dynamicscene/dynamicscene.qml b/examples/demos/dynamicscene/dynamicscene.qml similarity index 99% rename from examples/declarative/toys/dynamicscene/dynamicscene.qml rename to examples/demos/dynamicscene/dynamicscene.qml index e64eb0f..c64df5c 100644 --- a/examples/declarative/toys/dynamicscene/dynamicscene.qml +++ b/examples/demos/dynamicscene/dynamicscene.qml @@ -48,7 +48,7 @@ Item { property int activeSuns: 0 property int centerOffset: 72 - height: 480; width: 360 + height: 480; width: 320 MouseArea { diff --git a/examples/declarative/flickr/content/Button.qml b/examples/demos/flickr/content/Button.qml similarity index 100% rename from examples/declarative/flickr/content/Button.qml rename to examples/demos/flickr/content/Button.qml diff --git a/examples/declarative/flickr/content/GridDelegate.qml b/examples/demos/flickr/content/GridDelegate.qml similarity index 100% rename from examples/declarative/flickr/content/GridDelegate.qml rename to examples/demos/flickr/content/GridDelegate.qml diff --git a/examples/declarative/flickr/content/ImageDetails.qml b/examples/demos/flickr/content/ImageDetails.qml similarity index 100% rename from examples/declarative/flickr/content/ImageDetails.qml rename to examples/demos/flickr/content/ImageDetails.qml diff --git a/examples/declarative/flickr/content/ListDelegate.qml b/examples/demos/flickr/content/ListDelegate.qml similarity index 100% rename from examples/declarative/flickr/content/ListDelegate.qml rename to examples/demos/flickr/content/ListDelegate.qml diff --git a/examples/declarative/flickr/content/Progress.qml b/examples/demos/flickr/content/Progress.qml similarity index 100% rename from examples/declarative/flickr/content/Progress.qml rename to examples/demos/flickr/content/Progress.qml diff --git a/examples/declarative/flickr/content/RssModel.qml b/examples/demos/flickr/content/RssModel.qml similarity index 100% rename from examples/declarative/flickr/content/RssModel.qml rename to examples/demos/flickr/content/RssModel.qml diff --git a/examples/declarative/flickr/content/ScrollBar.qml b/examples/demos/flickr/content/ScrollBar.qml similarity index 100% rename from examples/declarative/flickr/content/ScrollBar.qml rename to examples/demos/flickr/content/ScrollBar.qml diff --git a/examples/declarative/flickr/content/Slider.qml b/examples/demos/flickr/content/Slider.qml similarity index 100% rename from examples/declarative/flickr/content/Slider.qml rename to examples/demos/flickr/content/Slider.qml diff --git a/examples/declarative/flickr/content/TitleBar.qml b/examples/demos/flickr/content/TitleBar.qml similarity index 100% rename from examples/declarative/flickr/content/TitleBar.qml rename to examples/demos/flickr/content/TitleBar.qml diff --git a/examples/declarative/flickr/content/ToolBar.qml b/examples/demos/flickr/content/ToolBar.qml similarity index 100% rename from examples/declarative/flickr/content/ToolBar.qml rename to examples/demos/flickr/content/ToolBar.qml diff --git a/examples/declarative/flickr/content/UnifiedDelegate.qml b/examples/demos/flickr/content/UnifiedDelegate.qml similarity index 100% rename from examples/declarative/flickr/content/UnifiedDelegate.qml rename to examples/demos/flickr/content/UnifiedDelegate.qml diff --git a/examples/declarative/twitter/TwitterCore/images/gloss.png b/examples/demos/flickr/content/images/gloss.png similarity index 100% rename from examples/declarative/twitter/TwitterCore/images/gloss.png rename to examples/demos/flickr/content/images/gloss.png diff --git a/examples/declarative/twitter/TwitterCore/images/lineedit.png b/examples/demos/flickr/content/images/lineedit.png similarity index 100% rename from examples/declarative/twitter/TwitterCore/images/lineedit.png rename to examples/demos/flickr/content/images/lineedit.png diff --git a/examples/declarative/twitter/TwitterCore/images/lineedit.sci b/examples/demos/flickr/content/images/lineedit.sci similarity index 100% rename from examples/declarative/twitter/TwitterCore/images/lineedit.sci rename to examples/demos/flickr/content/images/lineedit.sci diff --git a/examples/declarative/flickr/content/images/noise.png b/examples/demos/flickr/content/images/noise.png similarity index 100% rename from examples/declarative/flickr/content/images/noise.png rename to examples/demos/flickr/content/images/noise.png diff --git a/examples/declarative/flickr/content/images/particle.png b/examples/demos/flickr/content/images/particle.png similarity index 100% rename from examples/declarative/flickr/content/images/particle.png rename to examples/demos/flickr/content/images/particle.png diff --git a/examples/declarative/twitter/TwitterCore/images/quit.png b/examples/demos/flickr/content/images/quit.png similarity index 100% rename from examples/declarative/twitter/TwitterCore/images/quit.png rename to examples/demos/flickr/content/images/quit.png diff --git a/examples/declarative/flickr/content/images/squareParticle.png b/examples/demos/flickr/content/images/squareParticle.png similarity index 100% rename from examples/declarative/flickr/content/images/squareParticle.png rename to examples/demos/flickr/content/images/squareParticle.png diff --git a/examples/declarative/twitter/TwitterCore/images/stripes.png b/examples/demos/flickr/content/images/stripes.png similarity index 100% rename from examples/declarative/twitter/TwitterCore/images/stripes.png rename to examples/demos/flickr/content/images/stripes.png diff --git a/examples/declarative/twitter/TwitterCore/images/titlebar.png b/examples/demos/flickr/content/images/titlebar.png similarity index 100% rename from examples/declarative/twitter/TwitterCore/images/titlebar.png rename to examples/demos/flickr/content/images/titlebar.png diff --git a/examples/declarative/twitter/TwitterCore/images/titlebar.sci b/examples/demos/flickr/content/images/titlebar.sci similarity index 100% rename from examples/declarative/twitter/TwitterCore/images/titlebar.sci rename to examples/demos/flickr/content/images/titlebar.sci diff --git a/examples/declarative/twitter/TwitterCore/images/toolbutton.png b/examples/demos/flickr/content/images/toolbutton.png similarity index 100% rename from examples/declarative/twitter/TwitterCore/images/toolbutton.png rename to examples/demos/flickr/content/images/toolbutton.png diff --git a/examples/declarative/twitter/TwitterCore/images/toolbutton.sci b/examples/demos/flickr/content/images/toolbutton.sci similarity index 100% rename from examples/declarative/twitter/TwitterCore/images/toolbutton.sci rename to examples/demos/flickr/content/images/toolbutton.sci diff --git a/examples/declarative/flickr/content/qmldir b/examples/demos/flickr/content/qmldir similarity index 100% rename from examples/declarative/flickr/content/qmldir rename to examples/demos/flickr/content/qmldir diff --git a/examples/declarative/flickr/flickr-90.qml b/examples/demos/flickr/flickr-90.qml similarity index 100% rename from examples/declarative/flickr/flickr-90.qml rename to examples/demos/flickr/flickr-90.qml diff --git a/examples/declarative/flickr/flickr.qml b/examples/demos/flickr/flickr.qml similarity index 100% rename from examples/declarative/flickr/flickr.qml rename to examples/demos/flickr/flickr.qml diff --git a/examples/declarative/flickr/flickr.qmlproject b/examples/demos/flickr/flickr.qmlproject similarity index 100% rename from examples/declarative/flickr/flickr.qmlproject rename to examples/demos/flickr/flickr.qmlproject diff --git a/examples/declarative/minehunt/MinehuntCore/Explosion.qml b/examples/demos/minehunt/MinehuntCore/Explosion.qml similarity index 100% rename from examples/declarative/minehunt/MinehuntCore/Explosion.qml rename to examples/demos/minehunt/MinehuntCore/Explosion.qml diff --git a/examples/declarative/minehunt/MinehuntCore/Tile.qml b/examples/demos/minehunt/MinehuntCore/Tile.qml similarity index 100% rename from examples/declarative/minehunt/MinehuntCore/Tile.qml rename to examples/demos/minehunt/MinehuntCore/Tile.qml diff --git a/examples/declarative/minehunt/MinehuntCore/pics/back.png b/examples/demos/minehunt/MinehuntCore/pics/back.png similarity index 100% rename from examples/declarative/minehunt/MinehuntCore/pics/back.png rename to examples/demos/minehunt/MinehuntCore/pics/back.png diff --git a/examples/declarative/samegame/content/pics/background.png b/examples/demos/minehunt/MinehuntCore/pics/background.png similarity index 100% rename from examples/declarative/samegame/content/pics/background.png rename to examples/demos/minehunt/MinehuntCore/pics/background.png diff --git a/examples/declarative/minehunt/MinehuntCore/pics/bomb-color.png b/examples/demos/minehunt/MinehuntCore/pics/bomb-color.png similarity index 100% rename from examples/declarative/minehunt/MinehuntCore/pics/bomb-color.png rename to examples/demos/minehunt/MinehuntCore/pics/bomb-color.png diff --git a/examples/declarative/minehunt/MinehuntCore/pics/bomb.png b/examples/demos/minehunt/MinehuntCore/pics/bomb.png similarity index 100% rename from examples/declarative/minehunt/MinehuntCore/pics/bomb.png rename to examples/demos/minehunt/MinehuntCore/pics/bomb.png diff --git a/examples/declarative/minehunt/MinehuntCore/pics/face-sad.png b/examples/demos/minehunt/MinehuntCore/pics/face-sad.png similarity index 100% rename from examples/declarative/minehunt/MinehuntCore/pics/face-sad.png rename to examples/demos/minehunt/MinehuntCore/pics/face-sad.png diff --git a/examples/declarative/minehunt/MinehuntCore/pics/face-smile-big.png b/examples/demos/minehunt/MinehuntCore/pics/face-smile-big.png similarity index 100% rename from examples/declarative/minehunt/MinehuntCore/pics/face-smile-big.png rename to examples/demos/minehunt/MinehuntCore/pics/face-smile-big.png diff --git a/examples/declarative/shadereffects/content/face-smile.png b/examples/demos/minehunt/MinehuntCore/pics/face-smile.png similarity index 100% rename from examples/declarative/shadereffects/content/face-smile.png rename to examples/demos/minehunt/MinehuntCore/pics/face-smile.png diff --git a/examples/declarative/minehunt/MinehuntCore/pics/flag-color.png b/examples/demos/minehunt/MinehuntCore/pics/flag-color.png similarity index 100% rename from examples/declarative/minehunt/MinehuntCore/pics/flag-color.png rename to examples/demos/minehunt/MinehuntCore/pics/flag-color.png diff --git a/examples/declarative/minehunt/MinehuntCore/pics/flag.png b/examples/demos/minehunt/MinehuntCore/pics/flag.png similarity index 100% rename from examples/declarative/minehunt/MinehuntCore/pics/flag.png rename to examples/demos/minehunt/MinehuntCore/pics/flag.png diff --git a/examples/declarative/minehunt/MinehuntCore/pics/front.png b/examples/demos/minehunt/MinehuntCore/pics/front.png similarity index 100% rename from examples/declarative/minehunt/MinehuntCore/pics/front.png rename to examples/demos/minehunt/MinehuntCore/pics/front.png diff --git a/examples/declarative/toys/clocks/content/quit.png b/examples/demos/minehunt/MinehuntCore/pics/quit.png similarity index 100% rename from examples/declarative/toys/clocks/content/quit.png rename to examples/demos/minehunt/MinehuntCore/pics/quit.png diff --git a/examples/declarative/minehunt/MinehuntCore/pics/star.png b/examples/demos/minehunt/MinehuntCore/pics/star.png similarity index 100% rename from examples/declarative/minehunt/MinehuntCore/pics/star.png rename to examples/demos/minehunt/MinehuntCore/pics/star.png diff --git a/examples/declarative/minehunt/MinehuntCore/qmldir b/examples/demos/minehunt/MinehuntCore/qmldir similarity index 100% rename from examples/declarative/minehunt/MinehuntCore/qmldir rename to examples/demos/minehunt/MinehuntCore/qmldir diff --git a/examples/declarative/minehunt/README b/examples/demos/minehunt/README similarity index 100% rename from examples/declarative/minehunt/README rename to examples/demos/minehunt/README diff --git a/examples/declarative/minehunt/main.cpp b/examples/demos/minehunt/main.cpp similarity index 100% rename from examples/declarative/minehunt/main.cpp rename to examples/demos/minehunt/main.cpp diff --git a/examples/declarative/minehunt/minehunt.cpp b/examples/demos/minehunt/minehunt.cpp similarity index 100% rename from examples/declarative/minehunt/minehunt.cpp rename to examples/demos/minehunt/minehunt.cpp diff --git a/examples/declarative/minehunt/minehunt.h b/examples/demos/minehunt/minehunt.h similarity index 100% rename from examples/declarative/minehunt/minehunt.h rename to examples/demos/minehunt/minehunt.h diff --git a/examples/declarative/minehunt/minehunt.pro b/examples/demos/minehunt/minehunt.pro similarity index 100% rename from examples/declarative/minehunt/minehunt.pro rename to examples/demos/minehunt/minehunt.pro diff --git a/examples/declarative/minehunt/minehunt.qml b/examples/demos/minehunt/minehunt.qml similarity index 100% rename from examples/declarative/minehunt/minehunt.qml rename to examples/demos/minehunt/minehunt.qml diff --git a/examples/declarative/minehunt/minehunt.qmlproject b/examples/demos/minehunt/minehunt.qmlproject similarity index 100% rename from examples/declarative/minehunt/minehunt.qmlproject rename to examples/demos/minehunt/minehunt.qmlproject diff --git a/examples/declarative/minehunt/minehunt.qrc b/examples/demos/minehunt/minehunt.qrc similarity index 100% rename from examples/declarative/minehunt/minehunt.qrc rename to examples/demos/minehunt/minehunt.qrc diff --git a/examples/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml b/examples/demos/photoviewer/PhotoViewerCore/AlbumDelegate.qml similarity index 100% rename from examples/declarative/photoviewer/PhotoViewerCore/AlbumDelegate.qml rename to examples/demos/photoviewer/PhotoViewerCore/AlbumDelegate.qml diff --git a/examples/declarative/photoviewer/PhotoViewerCore/BusyIndicator.qml b/examples/demos/photoviewer/PhotoViewerCore/BusyIndicator.qml similarity index 100% rename from examples/declarative/photoviewer/PhotoViewerCore/BusyIndicator.qml rename to examples/demos/photoviewer/PhotoViewerCore/BusyIndicator.qml diff --git a/examples/declarative/photoviewer/PhotoViewerCore/Button.qml b/examples/demos/photoviewer/PhotoViewerCore/Button.qml similarity index 100% rename from examples/declarative/photoviewer/PhotoViewerCore/Button.qml rename to examples/demos/photoviewer/PhotoViewerCore/Button.qml diff --git a/examples/declarative/photoviewer/PhotoViewerCore/EditableButton.qml b/examples/demos/photoviewer/PhotoViewerCore/EditableButton.qml similarity index 100% rename from examples/declarative/photoviewer/PhotoViewerCore/EditableButton.qml rename to examples/demos/photoviewer/PhotoViewerCore/EditableButton.qml diff --git a/examples/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml b/examples/demos/photoviewer/PhotoViewerCore/PhotoDelegate.qml similarity index 100% rename from examples/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml rename to examples/demos/photoviewer/PhotoViewerCore/PhotoDelegate.qml diff --git a/examples/declarative/photoviewer/PhotoViewerCore/ProgressBar.qml b/examples/demos/photoviewer/PhotoViewerCore/ProgressBar.qml similarity index 100% rename from examples/declarative/photoviewer/PhotoViewerCore/ProgressBar.qml rename to examples/demos/photoviewer/PhotoViewerCore/ProgressBar.qml diff --git a/examples/declarative/photoviewer/PhotoViewerCore/RssModel.qml b/examples/demos/photoviewer/PhotoViewerCore/RssModel.qml similarity index 100% rename from examples/declarative/photoviewer/PhotoViewerCore/RssModel.qml rename to examples/demos/photoviewer/PhotoViewerCore/RssModel.qml diff --git a/examples/declarative/photoviewer/PhotoViewerCore/Tag.qml b/examples/demos/photoviewer/PhotoViewerCore/Tag.qml similarity index 100% rename from examples/declarative/photoviewer/PhotoViewerCore/Tag.qml rename to examples/demos/photoviewer/PhotoViewerCore/Tag.qml diff --git a/examples/declarative/photoviewer/PhotoViewerCore/images/box-shadow.png b/examples/demos/photoviewer/PhotoViewerCore/images/box-shadow.png similarity index 100% rename from examples/declarative/photoviewer/PhotoViewerCore/images/box-shadow.png rename to examples/demos/photoviewer/PhotoViewerCore/images/box-shadow.png diff --git a/examples/declarative/rssnews/content/images/busy.png b/examples/demos/photoviewer/PhotoViewerCore/images/busy.png similarity index 100% rename from examples/declarative/rssnews/content/images/busy.png rename to examples/demos/photoviewer/PhotoViewerCore/images/busy.png diff --git a/examples/declarative/photoviewer/PhotoViewerCore/images/cardboard.png b/examples/demos/photoviewer/PhotoViewerCore/images/cardboard.png similarity index 100% rename from examples/declarative/photoviewer/PhotoViewerCore/images/cardboard.png rename to examples/demos/photoviewer/PhotoViewerCore/images/cardboard.png diff --git a/examples/declarative/photoviewer/PhotoViewerCore/qmldir b/examples/demos/photoviewer/PhotoViewerCore/qmldir similarity index 100% rename from examples/declarative/photoviewer/PhotoViewerCore/qmldir rename to examples/demos/photoviewer/PhotoViewerCore/qmldir diff --git a/examples/declarative/photoviewer/PhotoViewerCore/script/script.js b/examples/demos/photoviewer/PhotoViewerCore/script/script.js similarity index 100% rename from examples/declarative/photoviewer/PhotoViewerCore/script/script.js rename to examples/demos/photoviewer/PhotoViewerCore/script/script.js diff --git a/examples/declarative/photoviewer/i18n/base.ts b/examples/demos/photoviewer/i18n/base.ts similarity index 100% rename from examples/declarative/photoviewer/i18n/base.ts rename to examples/demos/photoviewer/i18n/base.ts diff --git a/examples/declarative/photoviewer/i18n/qml_fr.qm b/examples/demos/photoviewer/i18n/qml_fr.qm similarity index 100% rename from examples/declarative/photoviewer/i18n/qml_fr.qm rename to examples/demos/photoviewer/i18n/qml_fr.qm diff --git a/examples/declarative/photoviewer/i18n/qml_fr.ts b/examples/demos/photoviewer/i18n/qml_fr.ts similarity index 100% rename from examples/declarative/photoviewer/i18n/qml_fr.ts rename to examples/demos/photoviewer/i18n/qml_fr.ts diff --git a/examples/declarative/photoviewer/photoviewer.qml b/examples/demos/photoviewer/photoviewer.qml similarity index 100% rename from examples/declarative/photoviewer/photoviewer.qml rename to examples/demos/photoviewer/photoviewer.qml diff --git a/examples/declarative/photoviewer/photoviewer.qmlproject b/examples/demos/photoviewer/photoviewer.qmlproject similarity index 100% rename from examples/declarative/photoviewer/photoviewer.qmlproject rename to examples/demos/photoviewer/photoviewer.qmlproject diff --git a/examples/declarative/particles/plasmapatrol/PlasmaPatrol.qmlproject b/examples/demos/plasmapatrol/PlasmaPatrol.qmlproject similarity index 100% rename from examples/declarative/particles/plasmapatrol/PlasmaPatrol.qmlproject rename to examples/demos/plasmapatrol/PlasmaPatrol.qmlproject diff --git a/examples/declarative/particles/plasmapatrol/TODO b/examples/demos/plasmapatrol/TODO similarity index 100% rename from examples/declarative/particles/plasmapatrol/TODO rename to examples/demos/plasmapatrol/TODO diff --git a/examples/declarative/particles/plasmapatrol/content/BlasterHardpoint.qml b/examples/demos/plasmapatrol/content/BlasterHardpoint.qml similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/BlasterHardpoint.qml rename to examples/demos/plasmapatrol/content/BlasterHardpoint.qml diff --git a/examples/declarative/particles/plasmapatrol/content/Button.qml b/examples/demos/plasmapatrol/content/Button.qml similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/Button.qml rename to examples/demos/plasmapatrol/content/Button.qml diff --git a/examples/declarative/particles/plasmapatrol/content/CannonHardpoint.qml b/examples/demos/plasmapatrol/content/CannonHardpoint.qml similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/CannonHardpoint.qml rename to examples/demos/plasmapatrol/content/CannonHardpoint.qml diff --git a/examples/declarative/particles/plasmapatrol/content/ChoiceBox.qml b/examples/demos/plasmapatrol/content/ChoiceBox.qml similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/ChoiceBox.qml rename to examples/demos/plasmapatrol/content/ChoiceBox.qml diff --git a/examples/declarative/particles/plasmapatrol/content/Cruiser.qml b/examples/demos/plasmapatrol/content/Cruiser.qml similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/Cruiser.qml rename to examples/demos/plasmapatrol/content/Cruiser.qml diff --git a/examples/declarative/particles/plasmapatrol/content/Frigate.qml b/examples/demos/plasmapatrol/content/Frigate.qml similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/Frigate.qml rename to examples/demos/plasmapatrol/content/Frigate.qml diff --git a/examples/declarative/particles/plasmapatrol/content/Hardpoint.qml b/examples/demos/plasmapatrol/content/Hardpoint.qml similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/Hardpoint.qml rename to examples/demos/plasmapatrol/content/Hardpoint.qml diff --git a/examples/declarative/particles/plasmapatrol/content/HelpScreens.qml b/examples/demos/plasmapatrol/content/HelpScreens.qml similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/HelpScreens.qml rename to examples/demos/plasmapatrol/content/HelpScreens.qml diff --git a/examples/declarative/particles/plasmapatrol/content/LaserHardpoint.qml b/examples/demos/plasmapatrol/content/LaserHardpoint.qml similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/LaserHardpoint.qml rename to examples/demos/plasmapatrol/content/LaserHardpoint.qml diff --git a/examples/declarative/particles/plasmapatrol/content/PlasmaPatrolParticles.qml b/examples/demos/plasmapatrol/content/PlasmaPatrolParticles.qml similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/PlasmaPatrolParticles.qml rename to examples/demos/plasmapatrol/content/PlasmaPatrolParticles.qml diff --git a/examples/declarative/particles/plasmapatrol/content/SequentialLoader.qml b/examples/demos/plasmapatrol/content/SequentialLoader.qml similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/SequentialLoader.qml rename to examples/demos/plasmapatrol/content/SequentialLoader.qml diff --git a/examples/declarative/particles/plasmapatrol/content/Ship.qml b/examples/demos/plasmapatrol/content/Ship.qml similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/Ship.qml rename to examples/demos/plasmapatrol/content/Ship.qml diff --git a/examples/declarative/particles/plasmapatrol/content/Sloop.qml b/examples/demos/plasmapatrol/content/Sloop.qml similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/Sloop.qml rename to examples/demos/plasmapatrol/content/Sloop.qml diff --git a/examples/declarative/particles/plasmapatrol/content/pics/TitleText.png b/examples/demos/plasmapatrol/content/pics/TitleText.png similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/pics/TitleText.png rename to examples/demos/plasmapatrol/content/pics/TitleText.png diff --git a/examples/declarative/particles/plasmapatrol/content/pics/blur-circle2.png b/examples/demos/plasmapatrol/content/pics/blur-circle2.png similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/pics/blur-circle2.png rename to examples/demos/plasmapatrol/content/pics/blur-circle2.png diff --git a/examples/declarative/touchinteraction/multipointtouch/content/blur-circle3.png b/examples/demos/plasmapatrol/content/pics/blur-circle3.png similarity index 100% rename from examples/declarative/touchinteraction/multipointtouch/content/blur-circle3.png rename to examples/demos/plasmapatrol/content/pics/blur-circle3.png diff --git a/examples/declarative/particles/plasmapatrol/content/pics/finalfrontier.png b/examples/demos/plasmapatrol/content/pics/finalfrontier.png similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/pics/finalfrontier.png rename to examples/demos/plasmapatrol/content/pics/finalfrontier.png diff --git a/examples/declarative/particles/plasmapatrol/content/pics/meteor.png b/examples/demos/plasmapatrol/content/pics/meteor.png similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/pics/meteor.png rename to examples/demos/plasmapatrol/content/pics/meteor.png diff --git a/examples/declarative/particles/plasmapatrol/content/pics/meteor_explo.png b/examples/demos/plasmapatrol/content/pics/meteor_explo.png similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/pics/meteor_explo.png rename to examples/demos/plasmapatrol/content/pics/meteor_explo.png diff --git a/examples/declarative/particles/plasmapatrol/content/pics/nullRock.png b/examples/demos/plasmapatrol/content/pics/nullRock.png similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/pics/nullRock.png rename to examples/demos/plasmapatrol/content/pics/nullRock.png diff --git a/examples/declarative/samegame/content/pics/particle.png b/examples/demos/plasmapatrol/content/pics/particle.png similarity index 100% rename from examples/declarative/samegame/content/pics/particle.png rename to examples/demos/plasmapatrol/content/pics/particle.png diff --git a/examples/declarative/particles/plasmapatrol/content/pics/star.png b/examples/demos/plasmapatrol/content/pics/star.png similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/pics/star.png rename to examples/demos/plasmapatrol/content/pics/star.png diff --git a/examples/declarative/particles/plasmapatrol/content/pics/star2.png b/examples/demos/plasmapatrol/content/pics/star2.png similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/pics/star2.png rename to examples/demos/plasmapatrol/content/pics/star2.png diff --git a/examples/declarative/particles/plasmapatrol/content/pics/star3.png b/examples/demos/plasmapatrol/content/pics/star3.png similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/pics/star3.png rename to examples/demos/plasmapatrol/content/pics/star3.png diff --git a/examples/declarative/particles/plasmapatrol/plasmapatrol.qml b/examples/demos/plasmapatrol/plasmapatrol.qml similarity index 100% rename from examples/declarative/particles/plasmapatrol/plasmapatrol.qml rename to examples/demos/plasmapatrol/plasmapatrol.qml diff --git a/examples/declarative/rssnews/content/BusyIndicator.qml b/examples/demos/rssnews/content/BusyIndicator.qml similarity index 100% rename from examples/declarative/rssnews/content/BusyIndicator.qml rename to examples/demos/rssnews/content/BusyIndicator.qml diff --git a/examples/declarative/rssnews/content/CategoryDelegate.qml b/examples/demos/rssnews/content/CategoryDelegate.qml similarity index 100% rename from examples/declarative/rssnews/content/CategoryDelegate.qml rename to examples/demos/rssnews/content/CategoryDelegate.qml diff --git a/examples/declarative/rssnews/content/NewsDelegate.qml b/examples/demos/rssnews/content/NewsDelegate.qml similarity index 100% rename from examples/declarative/rssnews/content/NewsDelegate.qml rename to examples/demos/rssnews/content/NewsDelegate.qml diff --git a/examples/declarative/rssnews/content/RssFeeds.qml b/examples/demos/rssnews/content/RssFeeds.qml similarity index 100% rename from examples/declarative/rssnews/content/RssFeeds.qml rename to examples/demos/rssnews/content/RssFeeds.qml diff --git a/examples/declarative/rssnews/content/ScrollBar.qml b/examples/demos/rssnews/content/ScrollBar.qml similarity index 100% rename from examples/declarative/rssnews/content/ScrollBar.qml rename to examples/demos/rssnews/content/ScrollBar.qml diff --git a/examples/declarative/photoviewer/PhotoViewerCore/images/busy.png b/examples/demos/rssnews/content/images/busy.png similarity index 100% rename from examples/declarative/photoviewer/PhotoViewerCore/images/busy.png rename to examples/demos/rssnews/content/images/busy.png diff --git a/examples/declarative/rssnews/content/images/scrollbar.png b/examples/demos/rssnews/content/images/scrollbar.png similarity index 100% rename from examples/declarative/rssnews/content/images/scrollbar.png rename to examples/demos/rssnews/content/images/scrollbar.png diff --git a/examples/declarative/rssnews/rssnews.qml b/examples/demos/rssnews/rssnews.qml similarity index 100% rename from examples/declarative/rssnews/rssnews.qml rename to examples/demos/rssnews/rssnews.qml diff --git a/examples/declarative/rssnews/rssnews.qmlproject b/examples/demos/rssnews/rssnews.qmlproject similarity index 100% rename from examples/declarative/rssnews/rssnews.qmlproject rename to examples/demos/rssnews/rssnews.qmlproject diff --git a/examples/declarative/samegame/content/BoomBlock.qml b/examples/demos/samegame/content/BoomBlock.qml similarity index 100% rename from examples/declarative/samegame/content/BoomBlock.qml rename to examples/demos/samegame/content/BoomBlock.qml diff --git a/examples/declarative/samegame/content/Button.qml b/examples/demos/samegame/content/Button.qml similarity index 100% rename from examples/declarative/samegame/content/Button.qml rename to examples/demos/samegame/content/Button.qml diff --git a/examples/declarative/samegame/content/Dialog.qml b/examples/demos/samegame/content/Dialog.qml similarity index 100% rename from examples/declarative/samegame/content/Dialog.qml rename to examples/demos/samegame/content/Dialog.qml diff --git a/examples/declarative/samegame/content/GameArea.qml b/examples/demos/samegame/content/GameArea.qml similarity index 100% rename from examples/declarative/samegame/content/GameArea.qml rename to examples/demos/samegame/content/GameArea.qml diff --git a/examples/declarative/samegame/content/NameInputDialog.qml b/examples/demos/samegame/content/NameInputDialog.qml similarity index 100% rename from examples/declarative/samegame/content/NameInputDialog.qml rename to examples/demos/samegame/content/NameInputDialog.qml diff --git a/examples/declarative/minehunt/MinehuntCore/pics/background.png b/examples/demos/samegame/content/pics/background.png similarity index 100% rename from examples/declarative/minehunt/MinehuntCore/pics/background.png rename to examples/demos/samegame/content/pics/background.png diff --git a/examples/declarative/tutorials/samegame/shared/pics/blueStone.png b/examples/demos/samegame/content/pics/blueStone.png similarity index 100% rename from examples/declarative/tutorials/samegame/shared/pics/blueStone.png rename to examples/demos/samegame/content/pics/blueStone.png diff --git a/examples/declarative/tutorials/samegame/shared/pics/greenStone.png b/examples/demos/samegame/content/pics/greenStone.png similarity index 100% rename from examples/declarative/tutorials/samegame/shared/pics/greenStone.png rename to examples/demos/samegame/content/pics/greenStone.png diff --git a/examples/declarative/particles/plasmapatrol/content/pics/particle.png b/examples/demos/samegame/content/pics/particle.png similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/pics/particle.png rename to examples/demos/samegame/content/pics/particle.png diff --git a/examples/declarative/tutorials/samegame/shared/pics/redStone.png b/examples/demos/samegame/content/pics/redStone.png similarity index 100% rename from examples/declarative/tutorials/samegame/shared/pics/redStone.png rename to examples/demos/samegame/content/pics/redStone.png diff --git a/examples/declarative/tutorials/samegame/shared/pics/yellowStone.png b/examples/demos/samegame/content/pics/yellowStone.png similarity index 100% rename from examples/declarative/tutorials/samegame/shared/pics/yellowStone.png rename to examples/demos/samegame/content/pics/yellowStone.png diff --git a/examples/declarative/samegame/content/samegame.js b/examples/demos/samegame/content/samegame.js similarity index 100% rename from examples/declarative/samegame/content/samegame.js rename to examples/demos/samegame/content/samegame.js diff --git a/examples/declarative/samegame/samegame.qml b/examples/demos/samegame/samegame.qml similarity index 100% rename from examples/declarative/samegame/samegame.qml rename to examples/demos/samegame/samegame.qml diff --git a/examples/declarative/samegame/samegame.qmlproject b/examples/demos/samegame/samegame.qmlproject similarity index 100% rename from examples/declarative/samegame/samegame.qmlproject rename to examples/demos/samegame/samegame.qmlproject diff --git a/examples/declarative/snake/content/Button.qml b/examples/demos/snake/content/Button.qml similarity index 100% rename from examples/declarative/snake/content/Button.qml rename to examples/demos/snake/content/Button.qml diff --git a/examples/declarative/snake/content/Cookie.qml b/examples/demos/snake/content/Cookie.qml similarity index 100% rename from examples/declarative/snake/content/Cookie.qml rename to examples/demos/snake/content/Cookie.qml diff --git a/examples/declarative/snake/content/HighScoreModel.qml b/examples/demos/snake/content/HighScoreModel.qml similarity index 100% rename from examples/declarative/snake/content/HighScoreModel.qml rename to examples/demos/snake/content/HighScoreModel.qml diff --git a/examples/declarative/snake/content/Link.qml b/examples/demos/snake/content/Link.qml similarity index 100% rename from examples/declarative/snake/content/Link.qml rename to examples/demos/snake/content/Link.qml diff --git a/examples/declarative/snake/content/Skull.qml b/examples/demos/snake/content/Skull.qml similarity index 87% rename from examples/declarative/snake/content/Skull.qml rename to examples/demos/snake/content/Skull.qml index ce3d108..9026790 100644 --- a/examples/declarative/snake/content/Skull.qml +++ b/examples/demos/snake/content/Skull.qml @@ -48,10 +48,10 @@ Image { property int verticalMovement; property int horizontalMovement; - x: margin + column * gridSize + 2 - y: margin + row * gridSize - 3 - Behavior on x { NumberAnimation { duration: spawned ? halfbeatInterval : 0} } - Behavior on y { NumberAnimation { duration: spawned ? halfbeatInterval : 0 } } + x: screen.margin + column * screen.gridSize + 2 + y: screen.margin + row * screen.gridSize - 3 + Behavior on x { NumberAnimation { duration: spawned ? screen.halfbeatInterval : 0} } + Behavior on y { NumberAnimation { duration: spawned ? screen.halfbeatInterval : 0 } } opacity: spawned ? 1 : 0 Behavior on opacity { NumberAnimation { duration: 200 } } diff --git a/examples/declarative/snake/content/pics/README b/examples/demos/snake/content/pics/README similarity index 100% rename from examples/declarative/snake/content/pics/README rename to examples/demos/snake/content/pics/README diff --git a/examples/declarative/snake/content/pics/background.png b/examples/demos/snake/content/pics/background.png similarity index 100% rename from examples/declarative/snake/content/pics/background.png rename to examples/demos/snake/content/pics/background.png diff --git a/examples/declarative/snake/content/pics/blueStar.png b/examples/demos/snake/content/pics/blueStar.png similarity index 100% rename from examples/declarative/snake/content/pics/blueStar.png rename to examples/demos/snake/content/pics/blueStar.png diff --git a/examples/declarative/snake/content/pics/blueStone.png b/examples/demos/snake/content/pics/blueStone.png similarity index 100% rename from examples/declarative/snake/content/pics/blueStone.png rename to examples/demos/snake/content/pics/blueStone.png diff --git a/examples/declarative/snake/content/pics/cookie.png b/examples/demos/snake/content/pics/cookie.png similarity index 100% rename from examples/declarative/snake/content/pics/cookie.png rename to examples/demos/snake/content/pics/cookie.png diff --git a/examples/declarative/snake/content/pics/eyes.svg b/examples/demos/snake/content/pics/eyes.svg similarity index 100% rename from examples/declarative/snake/content/pics/eyes.svg rename to examples/demos/snake/content/pics/eyes.svg diff --git a/examples/declarative/snake/content/pics/head.png b/examples/demos/snake/content/pics/head.png similarity index 100% rename from examples/declarative/snake/content/pics/head.png rename to examples/demos/snake/content/pics/head.png diff --git a/examples/declarative/snake/content/pics/pause.png b/examples/demos/snake/content/pics/pause.png similarity index 100% rename from examples/declarative/snake/content/pics/pause.png rename to examples/demos/snake/content/pics/pause.png diff --git a/examples/declarative/snake/content/pics/redStar.png b/examples/demos/snake/content/pics/redStar.png similarity index 100% rename from examples/declarative/snake/content/pics/redStar.png rename to examples/demos/snake/content/pics/redStar.png diff --git a/examples/declarative/snake/content/pics/redStone.png b/examples/demos/snake/content/pics/redStone.png similarity index 100% rename from examples/declarative/snake/content/pics/redStone.png rename to examples/demos/snake/content/pics/redStone.png diff --git a/examples/declarative/snake/content/pics/skull.png b/examples/demos/snake/content/pics/skull.png similarity index 100% rename from examples/declarative/snake/content/pics/skull.png rename to examples/demos/snake/content/pics/skull.png diff --git a/examples/declarative/snake/content/pics/snake.jpg b/examples/demos/snake/content/pics/snake.jpg similarity index 100% rename from examples/declarative/snake/content/pics/snake.jpg rename to examples/demos/snake/content/pics/snake.jpg diff --git a/examples/declarative/tutorials/samegame/shared/pics/star.png b/examples/demos/snake/content/pics/star.png similarity index 100% rename from examples/declarative/tutorials/samegame/shared/pics/star.png rename to examples/demos/snake/content/pics/star.png diff --git a/examples/declarative/snake/content/pics/stoneShadow.png b/examples/demos/snake/content/pics/stoneShadow.png similarity index 100% rename from examples/declarative/snake/content/pics/stoneShadow.png rename to examples/demos/snake/content/pics/stoneShadow.png diff --git a/examples/declarative/snake/content/pics/yellowStar.png b/examples/demos/snake/content/pics/yellowStar.png similarity index 100% rename from examples/declarative/snake/content/pics/yellowStar.png rename to examples/demos/snake/content/pics/yellowStar.png diff --git a/examples/declarative/snake/content/pics/yellowStone.png b/examples/demos/snake/content/pics/yellowStone.png similarity index 100% rename from examples/declarative/snake/content/pics/yellowStone.png rename to examples/demos/snake/content/pics/yellowStone.png diff --git a/examples/declarative/snake/content/snake.js b/examples/demos/snake/content/snake.js similarity index 100% rename from examples/declarative/snake/content/snake.js rename to examples/demos/snake/content/snake.js diff --git a/examples/declarative/snake/snake.qml b/examples/demos/snake/snake.qml similarity index 93% rename from examples/declarative/snake/snake.qml rename to examples/demos/snake/snake.qml index f25b626..fca3273 100644 --- a/examples/declarative/snake/snake.qml +++ b/examples/demos/snake/snake.qml @@ -42,7 +42,7 @@ import QtQuick 2.0 import "content" as Content import "content/snake.js" as Logic - +Item{ Rectangle { id: screen; SystemPalette { id: activePalette } @@ -75,14 +75,14 @@ Rectangle { Timer { id: heartbeat; - interval: heartbeatInterval; - running: activeGame + interval: screen.heartbeatInterval; + running: screen.activeGame repeat: true onTriggered: { Logic.move() } } Timer { id: halfbeat; - interval: halfbeatInterval; + interval: screen.halfbeatInterval; repeat: true running: heartbeat.running onTriggered: { Logic.moveSkull() } @@ -96,7 +96,7 @@ Rectangle { Timer { id: startHeartbeatTimer; interval: 1000 ; - onTriggered: { state = "running"; activeGame = true; } + onTriggered: { screen.state = "running"; screen.activeGame = true; } } Image{ @@ -138,7 +138,7 @@ Rectangle { font.pointSize: 24 anchors.horizontalCenter: parent.horizontalCenter; //horizontalAlignment: Text.AlignHCenter - text: "Last Score:\t" + lastScore + "\nHighscore:\t" + highScores.topScore; + text: "Last Score:\t" + screen.lastScore + "\nHighscore:\t" + highScores.topScore; } } } @@ -158,8 +158,8 @@ Rectangle { color: "transparent" anchors.horizontalCenter: parent.horizontalCenter y: (screen.height - 32 - height)/2; - width: numColumnsAvailable * gridSize + 2*margin - height: numRowsAvailable * gridSize + 2*margin + width: screen.numColumnsAvailable * screen.gridSize + 2*screen.margin + height: screen.numRowsAvailable * screen.gridSize + 2*screen.margin Content.Skull { @@ -226,7 +226,7 @@ Rectangle { Text { color: activePalette.text - text: "Score: " + score; font.bold: true + text: "Score: " + screen.score; font.bold: true anchors.right: parent.right; anchors.rightMargin: 3 anchors.verticalCenter: parent.verticalCenter } @@ -270,3 +270,4 @@ Rectangle { ] } +} diff --git a/examples/declarative/snake/snake.qmlproject b/examples/demos/snake/snake.qmlproject similarity index 100% rename from examples/declarative/snake/snake.qmlproject rename to examples/demos/snake/snake.qmlproject diff --git a/examples/declarative/toys/tic-tac-toe/content/Button.qml b/examples/demos/tic-tac-toe/content/Button.qml similarity index 100% rename from examples/declarative/toys/tic-tac-toe/content/Button.qml rename to examples/demos/tic-tac-toe/content/Button.qml diff --git a/examples/declarative/toys/tic-tac-toe/content/TicTac.qml b/examples/demos/tic-tac-toe/content/TicTac.qml similarity index 100% rename from examples/declarative/toys/tic-tac-toe/content/TicTac.qml rename to examples/demos/tic-tac-toe/content/TicTac.qml diff --git a/examples/declarative/toys/tic-tac-toe/content/pics/board.png b/examples/demos/tic-tac-toe/content/pics/board.png similarity index 100% rename from examples/declarative/toys/tic-tac-toe/content/pics/board.png rename to examples/demos/tic-tac-toe/content/pics/board.png diff --git a/examples/declarative/toys/tic-tac-toe/content/pics/o.png b/examples/demos/tic-tac-toe/content/pics/o.png similarity index 100% rename from examples/declarative/toys/tic-tac-toe/content/pics/o.png rename to examples/demos/tic-tac-toe/content/pics/o.png diff --git a/examples/declarative/toys/tic-tac-toe/content/pics/x.png b/examples/demos/tic-tac-toe/content/pics/x.png similarity index 100% rename from examples/declarative/toys/tic-tac-toe/content/pics/x.png rename to examples/demos/tic-tac-toe/content/pics/x.png diff --git a/examples/declarative/toys/tic-tac-toe/content/tic-tac-toe.js b/examples/demos/tic-tac-toe/content/tic-tac-toe.js similarity index 100% rename from examples/declarative/toys/tic-tac-toe/content/tic-tac-toe.js rename to examples/demos/tic-tac-toe/content/tic-tac-toe.js diff --git a/examples/declarative/toys/tic-tac-toe/tic-tac-toe.qml b/examples/demos/tic-tac-toe/tic-tac-toe.qml similarity index 100% rename from examples/declarative/toys/tic-tac-toe/tic-tac-toe.qml rename to examples/demos/tic-tac-toe/tic-tac-toe.qml diff --git a/examples/declarative/toys/tvtennis/tvtennis.qml b/examples/demos/tvtennis/tvtennis.qml similarity index 100% rename from examples/declarative/toys/tvtennis/tvtennis.qml rename to examples/demos/tvtennis/tvtennis.qml diff --git a/examples/declarative/twitter/TwitterCore/Button.qml b/examples/demos/twitter/TwitterCore/Button.qml similarity index 100% rename from examples/declarative/twitter/TwitterCore/Button.qml rename to examples/demos/twitter/TwitterCore/Button.qml diff --git a/examples/declarative/twitter/TwitterCore/FatDelegate.qml b/examples/demos/twitter/TwitterCore/FatDelegate.qml similarity index 100% rename from examples/declarative/twitter/TwitterCore/FatDelegate.qml rename to examples/demos/twitter/TwitterCore/FatDelegate.qml diff --git a/examples/declarative/twitter/TwitterCore/Input.qml b/examples/demos/twitter/TwitterCore/Input.qml similarity index 100% rename from examples/declarative/twitter/TwitterCore/Input.qml rename to examples/demos/twitter/TwitterCore/Input.qml diff --git a/examples/declarative/twitter/TwitterCore/Loading.qml b/examples/demos/twitter/TwitterCore/Loading.qml similarity index 100% rename from examples/declarative/twitter/TwitterCore/Loading.qml rename to examples/demos/twitter/TwitterCore/Loading.qml diff --git a/examples/declarative/twitter/TwitterCore/MultiTitleBar.qml b/examples/demos/twitter/TwitterCore/MultiTitleBar.qml similarity index 100% rename from examples/declarative/twitter/TwitterCore/MultiTitleBar.qml rename to examples/demos/twitter/TwitterCore/MultiTitleBar.qml diff --git a/examples/declarative/twitter/TwitterCore/RssModel.qml b/examples/demos/twitter/TwitterCore/RssModel.qml similarity index 100% rename from examples/declarative/twitter/TwitterCore/RssModel.qml rename to examples/demos/twitter/TwitterCore/RssModel.qml diff --git a/examples/declarative/twitter/TwitterCore/SearchView.qml b/examples/demos/twitter/TwitterCore/SearchView.qml similarity index 100% rename from examples/declarative/twitter/TwitterCore/SearchView.qml rename to examples/demos/twitter/TwitterCore/SearchView.qml diff --git a/examples/declarative/twitter/TwitterCore/TitleBar.qml b/examples/demos/twitter/TwitterCore/TitleBar.qml similarity index 100% rename from examples/declarative/twitter/TwitterCore/TitleBar.qml rename to examples/demos/twitter/TwitterCore/TitleBar.qml diff --git a/examples/declarative/twitter/TwitterCore/ToolBar.qml b/examples/demos/twitter/TwitterCore/ToolBar.qml similarity index 100% rename from examples/declarative/twitter/TwitterCore/ToolBar.qml rename to examples/demos/twitter/TwitterCore/ToolBar.qml diff --git a/examples/declarative/twitter/TwitterCore/UserModel.qml b/examples/demos/twitter/TwitterCore/UserModel.qml similarity index 100% rename from examples/declarative/twitter/TwitterCore/UserModel.qml rename to examples/demos/twitter/TwitterCore/UserModel.qml diff --git a/examples/declarative/flickr/content/images/gloss.png b/examples/demos/twitter/TwitterCore/images/gloss.png similarity index 100% rename from examples/declarative/flickr/content/images/gloss.png rename to examples/demos/twitter/TwitterCore/images/gloss.png diff --git a/examples/declarative/flickr/content/images/lineedit.png b/examples/demos/twitter/TwitterCore/images/lineedit.png similarity index 100% rename from examples/declarative/flickr/content/images/lineedit.png rename to examples/demos/twitter/TwitterCore/images/lineedit.png diff --git a/examples/declarative/flickr/content/images/lineedit.sci b/examples/demos/twitter/TwitterCore/images/lineedit.sci similarity index 100% rename from examples/declarative/flickr/content/images/lineedit.sci rename to examples/demos/twitter/TwitterCore/images/lineedit.sci diff --git a/examples/declarative/twitter/TwitterCore/images/loading.png b/examples/demos/twitter/TwitterCore/images/loading.png similarity index 100% rename from examples/declarative/twitter/TwitterCore/images/loading.png rename to examples/demos/twitter/TwitterCore/images/loading.png diff --git a/examples/declarative/flickr/content/images/quit.png b/examples/demos/twitter/TwitterCore/images/quit.png similarity index 100% rename from examples/declarative/flickr/content/images/quit.png rename to examples/demos/twitter/TwitterCore/images/quit.png diff --git a/examples/declarative/flickr/content/images/stripes.png b/examples/demos/twitter/TwitterCore/images/stripes.png similarity index 100% rename from examples/declarative/flickr/content/images/stripes.png rename to examples/demos/twitter/TwitterCore/images/stripes.png diff --git a/examples/declarative/flickr/content/images/titlebar.png b/examples/demos/twitter/TwitterCore/images/titlebar.png similarity index 100% rename from examples/declarative/flickr/content/images/titlebar.png rename to examples/demos/twitter/TwitterCore/images/titlebar.png diff --git a/examples/declarative/flickr/content/images/titlebar.sci b/examples/demos/twitter/TwitterCore/images/titlebar.sci similarity index 100% rename from examples/declarative/flickr/content/images/titlebar.sci rename to examples/demos/twitter/TwitterCore/images/titlebar.sci diff --git a/examples/declarative/flickr/content/images/toolbutton.png b/examples/demos/twitter/TwitterCore/images/toolbutton.png similarity index 100% rename from examples/declarative/flickr/content/images/toolbutton.png rename to examples/demos/twitter/TwitterCore/images/toolbutton.png diff --git a/examples/declarative/flickr/content/images/toolbutton.sci b/examples/demos/twitter/TwitterCore/images/toolbutton.sci similarity index 100% rename from examples/declarative/flickr/content/images/toolbutton.sci rename to examples/demos/twitter/TwitterCore/images/toolbutton.sci diff --git a/examples/declarative/twitter/TwitterCore/qmldir b/examples/demos/twitter/TwitterCore/qmldir similarity index 100% rename from examples/declarative/twitter/TwitterCore/qmldir rename to examples/demos/twitter/TwitterCore/qmldir diff --git a/examples/declarative/twitter/twitter.qml b/examples/demos/twitter/twitter.qml similarity index 100% rename from examples/declarative/twitter/twitter.qml rename to examples/demos/twitter/twitter.qml diff --git a/examples/declarative/twitter/twitter.qmlproject b/examples/demos/twitter/twitter.qmlproject similarity index 100% rename from examples/declarative/twitter/twitter.qmlproject rename to examples/demos/twitter/twitter.qmlproject diff --git a/examples/embedded/embedded.pro b/examples/embedded/embedded.pro deleted file mode 100644 index 81334fa..0000000 --- a/examples/embedded/embedded.pro +++ /dev/null @@ -1,2 +0,0 @@ -TEMPLATE = subdirs -SUBDIRS += qmleasing qmlflickr qmldialcontrol qmlcalculator qmlphotoviewer qmlclocks qmltwitter diff --git a/examples/embedded/qmlcalculator/deployment.pri b/examples/embedded/qmlcalculator/deployment.pri deleted file mode 100644 index a3627b8..0000000 --- a/examples/embedded/qmlcalculator/deployment.pri +++ /dev/null @@ -1,4 +0,0 @@ -qmlcalculator_src = $$PWD/../../declarative/calculator - -qmlcalculator_files.files = $$qmlcalculator_src/calculator.qml $$qmlcalculator_src/Core -DEPLOYMENT += qmlcalculator_files diff --git a/examples/embedded/qmlcalculator/qmlcalculator.cpp b/examples/embedded/qmlcalculator/qmlcalculator.cpp deleted file mode 100644 index 4be7bc4..0000000 --- a/examples/embedded/qmlcalculator/qmlcalculator.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the demonstration applications 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$ -** -****************************************************************************/ - -#include -#include -#include -#include - -int main(int argc, char *argv[]) -{ - QApplication application(argc, argv); - - const QString mainQmlApp = QLatin1String("calculator.qml"); - QDeclarativeView view; - view.setSource(QUrl(mainQmlApp)); - view.setResizeMode(QDeclarativeView::SizeRootObjectToView); - QObject::connect(view.engine(), SIGNAL(quit()), &application, SLOT(quit())); - -#if defined(QT_KEYPAD_NAVIGATION) - QApplication::setNavigationMode(Qt::NavigationModeCursorAuto); -#endif // QT_KEYPAD_NAVIGATION - - view.show(); - return application.exec(); -} diff --git a/examples/embedded/qmlcalculator/qmlcalculator.pro b/examples/embedded/qmlcalculator/qmlcalculator.pro deleted file mode 100644 index 25c16ca..0000000 --- a/examples/embedded/qmlcalculator/qmlcalculator.pro +++ /dev/null @@ -1,5 +0,0 @@ -!wince*:warning("DEPLOYMENT support required. This project only works on WinCE.") - -QT += declarative -SOURCES += $$PWD/qmlcalculator.cpp -include($$PWD/deployment.pri) diff --git a/examples/embedded/qmlclocks/deployment.pri b/examples/embedded/qmlclocks/deployment.pri deleted file mode 100644 index 771a4db..0000000 --- a/examples/embedded/qmlclocks/deployment.pri +++ /dev/null @@ -1,4 +0,0 @@ -qmlclocks_src = $$PWD/../../../examples/declarative/toys/clocks - -qmlclocks_files.files = $$qmlclocks_src/clocks.qml $$qmlclocks_src/content -DEPLOYMENT += qmlclocks_files diff --git a/examples/embedded/qmlclocks/qmlclocks.cpp b/examples/embedded/qmlclocks/qmlclocks.cpp deleted file mode 100644 index ce42ec7..0000000 --- a/examples/embedded/qmlclocks/qmlclocks.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the demonstration applications 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$ -** -****************************************************************************/ - -#include -#include -#include -#include - -int main(int argc, char *argv[]) -{ - QApplication application(argc, argv); - - const QString mainQmlApp = QLatin1String("clocks.qml"); - QDeclarativeView view; - view.setSource(QUrl(mainQmlApp)); - view.setResizeMode(QDeclarativeView::SizeRootObjectToView); - QObject::connect(view.engine(), SIGNAL(quit()), &application, SLOT(quit())); - -#if defined(QT_KEYPAD_NAVIGATION) - QApplication::setNavigationMode(Qt::NavigationModeCursorAuto); -#endif // QT_KEYPAD_NAVIGATION - - view.show(); - return application.exec(); -} diff --git a/examples/embedded/qmlclocks/qmlclocks.pro b/examples/embedded/qmlclocks/qmlclocks.pro deleted file mode 100644 index 8e9dcdf..0000000 --- a/examples/embedded/qmlclocks/qmlclocks.pro +++ /dev/null @@ -1,5 +0,0 @@ -!wince*:warning("DEPLOYMENT support required. This project only works on WinCE.") - -QT += declarative -SOURCES += $$PWD/qmlclocks.cpp -include($$PWD/deployment.pri) diff --git a/examples/embedded/qmldialcontrol/deployment.pri b/examples/embedded/qmldialcontrol/deployment.pri deleted file mode 100644 index d845120..0000000 --- a/examples/embedded/qmldialcontrol/deployment.pri +++ /dev/null @@ -1,4 +0,0 @@ -qmldialcontrol_src = $$PWD/../../../examples/declarative/ui-components/dialcontrol - -qmldialcontrol_files.files = $$qmldialcontrol_src/dialcontrol.qml $$qmldialcontrol_src/content -DEPLOYMENT += qmldialcontrol_files diff --git a/examples/embedded/qmldialcontrol/qmldialcontrol.cpp b/examples/embedded/qmldialcontrol/qmldialcontrol.cpp deleted file mode 100644 index e66f6f6..0000000 --- a/examples/embedded/qmldialcontrol/qmldialcontrol.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the demonstration applications 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$ -** -****************************************************************************/ - -#include -#include -#include -#include - -int main(int argc, char *argv[]) -{ - QApplication application(argc, argv); - - const QString mainQmlApp = QLatin1String("dialcontrol.qml"); - QDeclarativeView view; - view.setSource(QUrl(mainQmlApp)); - view.setResizeMode(QDeclarativeView::SizeRootObjectToView); - QObject::connect(view.engine(), SIGNAL(quit()), &application, SLOT(quit())); - -#if defined(QT_KEYPAD_NAVIGATION) - QApplication::setNavigationMode(Qt::NavigationModeCursorAuto); -#endif // QT_KEYPAD_NAVIGATION - - view.show(); - return application.exec(); -} diff --git a/examples/embedded/qmldialcontrol/qmldialcontrol.pro b/examples/embedded/qmldialcontrol/qmldialcontrol.pro deleted file mode 100644 index 08f876b..0000000 --- a/examples/embedded/qmldialcontrol/qmldialcontrol.pro +++ /dev/null @@ -1,5 +0,0 @@ -!wince*:warning("DEPLOYMENT support required. This project only works on WinCE.") - -QT += declarative -SOURCES += $$PWD/qmldialcontrol.cpp -include($$PWD/deployment.pri) diff --git a/examples/embedded/qmleasing/deployment.pri b/examples/embedded/qmleasing/deployment.pri deleted file mode 100644 index 7a5d040..0000000 --- a/examples/embedded/qmleasing/deployment.pri +++ /dev/null @@ -1,4 +0,0 @@ -qmleasing_src = $$PWD/../../../examples/declarative/animation/easing - -qmleasing_files.files = $$qmleasing_src/easing.qml $$qmleasing_src/content -DEPLOYMENT += qmleasing_files diff --git a/examples/embedded/qmleasing/qmleasing.cpp b/examples/embedded/qmleasing/qmleasing.cpp deleted file mode 100644 index 8220e03..0000000 --- a/examples/embedded/qmleasing/qmleasing.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the demonstration applications 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$ -** -****************************************************************************/ - -#include -#include -#include -#include - -int main(int argc, char *argv[]) -{ - QApplication application(argc, argv); - - const QString mainQmlApp = QLatin1String("easing.qml"); - QDeclarativeView view; - view.setSource(QUrl(mainQmlApp)); - view.setResizeMode(QDeclarativeView::SizeRootObjectToView); - QObject::connect(view.engine(), SIGNAL(quit()), &application, SLOT(quit())); - -#if defined(QT_KEYPAD_NAVIGATION) - QApplication::setNavigationMode(Qt::NavigationModeCursorAuto); -#endif // QT_KEYPAD_NAVIGATION - - view.show(); - return application.exec(); -} diff --git a/examples/embedded/qmleasing/qmleasing.pro b/examples/embedded/qmleasing/qmleasing.pro deleted file mode 100644 index c9f008d..0000000 --- a/examples/embedded/qmleasing/qmleasing.pro +++ /dev/null @@ -1,5 +0,0 @@ -!wince*:warning("DEPLOYMENT support required. This project only works on WinCE.") - -QT += declarative -SOURCES += $$PWD/qmleasing.cpp -include($$PWD/deployment.pri) diff --git a/examples/embedded/qmlflickr/deployment.pri b/examples/embedded/qmlflickr/deployment.pri deleted file mode 100644 index 0d76ddc..0000000 --- a/examples/embedded/qmlflickr/deployment.pri +++ /dev/null @@ -1,4 +0,0 @@ -qmlflickr_src = $$PWD/../../declarative/flickr - -qmlflickr_files.files = $$qmlflickr_src/flickr.qml $$qmlflickr_src/common $$qmlflickr_src/mobile -DEPLOYMENT += qmlflickr_files diff --git a/examples/embedded/qmlflickr/qmlflickr.cpp b/examples/embedded/qmlflickr/qmlflickr.cpp deleted file mode 100644 index 93b28f7..0000000 --- a/examples/embedded/qmlflickr/qmlflickr.cpp +++ /dev/null @@ -1,104 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the demonstration applications 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$ -** -****************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// Factory to create QNetworkAccessManagers that use the saved network configuration; otherwise -// the system default. -class NetworkAccessManagerFactory : public QDeclarativeNetworkAccessManagerFactory -{ -public: - ~NetworkAccessManagerFactory() { } - - QNetworkAccessManager *create(QObject *parent); -}; - -QNetworkAccessManager *NetworkAccessManagerFactory::create(QObject *parent) -{ - QNetworkAccessManager *accessManager = new QNetworkAccessManager(parent); - - QNetworkConfigurationManager manager; - if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequired) { - // Get saved network configuration - QSettings settings(QSettings::UserScope, QLatin1String("Trolltech")); - settings.beginGroup(QLatin1String("QtNetwork")); - const QString id = settings.value(QLatin1String("DefaultNetworkConfiguration")).toString(); - settings.endGroup(); - - // If the saved network configuration is not currently discovered use the system default - QNetworkConfiguration config = manager.configurationFromIdentifier(id); - if ((config.state() & QNetworkConfiguration::Discovered) != - QNetworkConfiguration::Discovered) { - config = manager.defaultConfiguration(); - } - - accessManager->setConfiguration(config); - } - - return accessManager; -} - -int main(int argc, char *argv[]) -{ - QApplication application(argc, argv); - - NetworkAccessManagerFactory networkAccessManagerFactory; - - const QString mainQmlApp = QLatin1String("flickr.qml"); - QDeclarativeView view; - view.engine()->setNetworkAccessManagerFactory(&networkAccessManagerFactory); - view.setSource(QUrl(mainQmlApp)); - view.setResizeMode(QDeclarativeView::SizeRootObjectToView); - QObject::connect(view.engine(), SIGNAL(quit()), &application, SLOT(quit())); - view.setGeometry(QRect(100, 100, 360, 640)); - view.show(); - return application.exec(); -} - diff --git a/examples/embedded/qmlflickr/qmlflickr.pro b/examples/embedded/qmlflickr/qmlflickr.pro deleted file mode 100644 index 869d651..0000000 --- a/examples/embedded/qmlflickr/qmlflickr.pro +++ /dev/null @@ -1,5 +0,0 @@ -!wince*:warning("DEPLOYMENT support required. This project only works on WinCE.") - -QT += declarative network -SOURCES += $$PWD/qmlflickr.cpp -include($$PWD/deployment.pri) diff --git a/examples/embedded/qmlphotoviewer/deployment.pri b/examples/embedded/qmlphotoviewer/deployment.pri deleted file mode 100644 index 5043739..0000000 --- a/examples/embedded/qmlphotoviewer/deployment.pri +++ /dev/null @@ -1,4 +0,0 @@ -qmlphotoviewer_src = $$PWD/../../declarative/photoviewer - -qmlphotoviewer_files.files = $$qmlphotoviewer_src/photoviewer.qml $$qmlphotoviewer_src/PhotoViewerCore -DEPLOYMENT += qmlphotoviewer_files diff --git a/examples/embedded/qmlphotoviewer/qmlphotoviewer.cpp b/examples/embedded/qmlphotoviewer/qmlphotoviewer.cpp deleted file mode 100644 index 32c9d24..0000000 --- a/examples/embedded/qmlphotoviewer/qmlphotoviewer.cpp +++ /dev/null @@ -1,104 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the demonstration applications 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$ -** -****************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// Factory to create QNetworkAccessManagers that use the saved network configuration; otherwise -// the system default. -class NetworkAccessManagerFactory : public QDeclarativeNetworkAccessManagerFactory -{ -public: - ~NetworkAccessManagerFactory() { } - - QNetworkAccessManager *create(QObject *parent); -}; - -QNetworkAccessManager *NetworkAccessManagerFactory::create(QObject *parent) -{ - QNetworkAccessManager *accessManager = new QNetworkAccessManager(parent); - - QNetworkConfigurationManager manager; - if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequired) { - // Get saved network configuration - QSettings settings(QSettings::UserScope, QLatin1String("Trolltech")); - settings.beginGroup(QLatin1String("QtNetwork")); - const QString id = settings.value(QLatin1String("DefaultNetworkConfiguration")).toString(); - settings.endGroup(); - - // If the saved network configuration is not currently discovered use the system default - QNetworkConfiguration config = manager.configurationFromIdentifier(id); - if ((config.state() & QNetworkConfiguration::Discovered) != - QNetworkConfiguration::Discovered) { - config = manager.defaultConfiguration(); - } - - accessManager->setConfiguration(config); - } - - return accessManager; -} - -int main(int argc, char *argv[]) -{ - QApplication application(argc, argv); - - NetworkAccessManagerFactory networkAccessManagerFactory; - - const QString mainQmlApp = QLatin1String("photoviewer.qml"); - QDeclarativeView view; - view.engine()->setNetworkAccessManagerFactory(&networkAccessManagerFactory); - view.setSource(QUrl(mainQmlApp)); - view.setResizeMode(QDeclarativeView::SizeRootObjectToView); - - QObject::connect(view.engine(), SIGNAL(quit()), &application, SLOT(quit())); - view.setGeometry(QRect(100, 100, 360, 640)); - view.show(); - return application.exec(); -} - diff --git a/examples/embedded/qmlphotoviewer/qmlphotoviewer.pro b/examples/embedded/qmlphotoviewer/qmlphotoviewer.pro deleted file mode 100644 index 9941b2e..0000000 --- a/examples/embedded/qmlphotoviewer/qmlphotoviewer.pro +++ /dev/null @@ -1,5 +0,0 @@ -!wince*:warning("DEPLOYMENT support required. This project only works on WinCE.") - -QT += declarative network -SOURCES += $$PWD/qmlphotoviewer.cpp -include($$PWD/deployment.pri) diff --git a/examples/embedded/qmltwitter/deployment.pri b/examples/embedded/qmltwitter/deployment.pri deleted file mode 100644 index a3c045c..0000000 --- a/examples/embedded/qmltwitter/deployment.pri +++ /dev/null @@ -1,4 +0,0 @@ -qmltwitter_src = $$PWD/../../declarative/twitter - -qmltwitter_files.files = $$qmltwitter_src/twitter.qml $$qmltwitter_src/TwitterCore -DEPLOYMENT += qmltwitter_files diff --git a/examples/embedded/qmltwitter/qmltwitter.cpp b/examples/embedded/qmltwitter/qmltwitter.cpp deleted file mode 100644 index 19b187b..0000000 --- a/examples/embedded/qmltwitter/qmltwitter.cpp +++ /dev/null @@ -1,103 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). -** Contact: http://www.qt-project.org/ -** -** This file is part of the demonstration applications 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$ -** -****************************************************************************/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// Factory to create QNetworkAccessManagers that use the saved network configuration; otherwise -// the system default. -class NetworkAccessManagerFactory : public QDeclarativeNetworkAccessManagerFactory -{ -public: - ~NetworkAccessManagerFactory() { } - - QNetworkAccessManager *create(QObject *parent); -}; - -QNetworkAccessManager *NetworkAccessManagerFactory::create(QObject *parent) -{ - QNetworkAccessManager *accessManager = new QNetworkAccessManager(parent); - - QNetworkConfigurationManager manager; - if (manager.capabilities() & QNetworkConfigurationManager::NetworkSessionRequired) { - // Get saved network configuration - QSettings settings(QSettings::UserScope, QLatin1String("Trolltech")); - settings.beginGroup(QLatin1String("QtNetwork")); - const QString id = settings.value(QLatin1String("DefaultNetworkConfiguration")).toString(); - settings.endGroup(); - - // If the saved network configuration is not currently discovered use the system default - QNetworkConfiguration config = manager.configurationFromIdentifier(id); - if ((config.state() & QNetworkConfiguration::Discovered) != - QNetworkConfiguration::Discovered) { - config = manager.defaultConfiguration(); - } - - accessManager->setConfiguration(config); - } - - return accessManager; -} - -int main(int argc, char *argv[]) -{ - QApplication application(argc, argv); - - NetworkAccessManagerFactory networkAccessManagerFactory; - - const QString mainQmlApp = QLatin1String("twitter.qml"); - QDeclarativeView view; - view.engine()->setNetworkAccessManagerFactory(&networkAccessManagerFactory); - view.setSource(QUrl(mainQmlApp)); - view.setResizeMode(QDeclarativeView::SizeRootObjectToView); - QObject::connect(view.engine(), SIGNAL(quit()), &application, SLOT(quit())); - view.setGeometry(QRect(100, 100, 360, 640)); - view.show(); - return application.exec(); -} - diff --git a/examples/embedded/qmltwitter/qmltwitter.pro b/examples/embedded/qmltwitter/qmltwitter.pro deleted file mode 100644 index ce40cd7..0000000 --- a/examples/embedded/qmltwitter/qmltwitter.pro +++ /dev/null @@ -1,5 +0,0 @@ -!wince*:warning("DEPLOYMENT support required. This project only works on WinCE.") - -QT += declarative network -SOURCES += $$PWD/qmltwitter.cpp -include($$PWD/deployment.pri) diff --git a/examples/examples.pro b/examples/examples.pro index 2c9497d..2b78ed7 100644 --- a/examples/examples.pro +++ b/examples/examples.pro @@ -1,3 +1,3 @@ TEMPLATE = subdirs -SUBDIRS += declarative tutorials +SUBDIRS += demos shared localstorage particles qml qtquick tutorials window contains(QT_CONFIG, qmltest): SUBDIRS += qmltest diff --git a/examples/declarative/sqllocalstorage/hello.qml b/examples/localstorage/hello.qml similarity index 100% rename from examples/declarative/sqllocalstorage/hello.qml rename to examples/localstorage/hello.qml diff --git a/examples/localstorage/localstorage.pro b/examples/localstorage/localstorage.pro new file mode 100644 index 0000000..9671085 --- /dev/null +++ b/examples/localstorage/localstorage.pro @@ -0,0 +1 @@ +TEMPLATE = subdirs diff --git a/examples/declarative/particles/affectors/age.qml b/examples/particles/affectors/age.qml similarity index 100% rename from examples/declarative/particles/affectors/age.qml rename to examples/particles/affectors/age.qml diff --git a/examples/declarative/particles/affectors/attractor.qml b/examples/particles/affectors/attractor.qml similarity index 100% rename from examples/declarative/particles/affectors/attractor.qml rename to examples/particles/affectors/attractor.qml diff --git a/examples/declarative/particles/affectors/customaffector.qml b/examples/particles/affectors/customaffector.qml similarity index 100% rename from examples/declarative/particles/affectors/customaffector.qml rename to examples/particles/affectors/customaffector.qml diff --git a/examples/declarative/particles/affectors/friction.qml b/examples/particles/affectors/friction.qml similarity index 100% rename from examples/declarative/particles/affectors/friction.qml rename to examples/particles/affectors/friction.qml diff --git a/examples/declarative/particles/affectors/gravity.qml b/examples/particles/affectors/gravity.qml similarity index 100% rename from examples/declarative/particles/affectors/gravity.qml rename to examples/particles/affectors/gravity.qml diff --git a/examples/declarative/particles/affectors/groupgoal.qml b/examples/particles/affectors/groupgoal.qml similarity index 100% rename from examples/declarative/particles/affectors/groupgoal.qml rename to examples/particles/affectors/groupgoal.qml diff --git a/examples/declarative/particles/affectors/move.qml b/examples/particles/affectors/move.qml similarity index 100% rename from examples/declarative/particles/affectors/move.qml rename to examples/particles/affectors/move.qml diff --git a/examples/declarative/particles/affectors/spritegoal.qml b/examples/particles/affectors/spritegoal.qml similarity index 100% rename from examples/declarative/particles/affectors/spritegoal.qml rename to examples/particles/affectors/spritegoal.qml diff --git a/examples/declarative/particles/affectors/turbulence.qml b/examples/particles/affectors/turbulence.qml similarity index 100% rename from examples/declarative/particles/affectors/turbulence.qml rename to examples/particles/affectors/turbulence.qml diff --git a/examples/declarative/particles/affectors/wander.qml b/examples/particles/affectors/wander.qml similarity index 100% rename from examples/declarative/particles/affectors/wander.qml rename to examples/particles/affectors/wander.qml diff --git a/examples/declarative/particles/customparticle/blurparticles.qml b/examples/particles/customparticle/blurparticles.qml similarity index 100% rename from examples/declarative/particles/customparticle/blurparticles.qml rename to examples/particles/customparticle/blurparticles.qml diff --git a/examples/declarative/particles/customparticle/fragmentshader.qml b/examples/particles/customparticle/fragmentshader.qml similarity index 100% rename from examples/declarative/particles/customparticle/fragmentshader.qml rename to examples/particles/customparticle/fragmentshader.qml diff --git a/examples/declarative/particles/customparticle/imagecolors.qml b/examples/particles/customparticle/imagecolors.qml similarity index 100% rename from examples/declarative/particles/customparticle/imagecolors.qml rename to examples/particles/customparticle/imagecolors.qml diff --git a/examples/declarative/particles/emitters/burstandpulse.qml b/examples/particles/emitters/burstandpulse.qml similarity index 100% rename from examples/declarative/particles/emitters/burstandpulse.qml rename to examples/particles/emitters/burstandpulse.qml diff --git a/examples/declarative/particles/emitters/customemitter.qml b/examples/particles/emitters/customemitter.qml similarity index 100% rename from examples/declarative/particles/emitters/customemitter.qml rename to examples/particles/emitters/customemitter.qml diff --git a/examples/declarative/particles/emitters/emitmask.qml b/examples/particles/emitters/emitmask.qml similarity index 100% rename from examples/declarative/particles/emitters/emitmask.qml rename to examples/particles/emitters/emitmask.qml diff --git a/examples/declarative/particles/emitters/maximumemitted.qml b/examples/particles/emitters/maximumemitted.qml similarity index 100% rename from examples/declarative/particles/emitters/maximumemitted.qml rename to examples/particles/emitters/maximumemitted.qml diff --git a/examples/declarative/particles/emitters/shapeanddirection.qml b/examples/particles/emitters/shapeanddirection.qml similarity index 100% rename from examples/declarative/particles/emitters/shapeanddirection.qml rename to examples/particles/emitters/shapeanddirection.qml diff --git a/examples/declarative/particles/emitters/timedgroupchanges.qml b/examples/particles/emitters/timedgroupchanges.qml similarity index 100% rename from examples/declarative/particles/emitters/timedgroupchanges.qml rename to examples/particles/emitters/timedgroupchanges.qml diff --git a/examples/declarative/particles/emitters/trailemitter.qml b/examples/particles/emitters/trailemitter.qml similarity index 100% rename from examples/declarative/particles/emitters/trailemitter.qml rename to examples/particles/emitters/trailemitter.qml diff --git a/examples/declarative/particles/emitters/velocityfrommotion.qml b/examples/particles/emitters/velocityfrommotion.qml similarity index 100% rename from examples/declarative/particles/emitters/velocityfrommotion.qml rename to examples/particles/emitters/velocityfrommotion.qml diff --git a/examples/declarative/particles/exampleslauncher/content/Button.qml b/examples/particles/exampleslauncher/content/Button.qml similarity index 100% rename from examples/declarative/particles/exampleslauncher/content/Button.qml rename to examples/particles/exampleslauncher/content/Button.qml diff --git a/examples/declarative/particles/exampleslauncher/content/Shell.qml b/examples/particles/exampleslauncher/content/Shell.qml similarity index 100% rename from examples/declarative/particles/exampleslauncher/content/Shell.qml rename to examples/particles/exampleslauncher/content/Shell.qml diff --git a/examples/declarative/particles/exampleslauncher/content/launcher.js b/examples/particles/exampleslauncher/content/launcher.js similarity index 100% rename from examples/declarative/particles/exampleslauncher/content/launcher.js rename to examples/particles/exampleslauncher/content/launcher.js diff --git a/examples/declarative/particles/exampleslauncher/exampleslauncher.qml b/examples/particles/exampleslauncher/exampleslauncher.qml similarity index 100% rename from examples/declarative/particles/exampleslauncher/exampleslauncher.qml rename to examples/particles/exampleslauncher/exampleslauncher.qml diff --git a/examples/declarative/particles/imageparticle/allatonce.qml b/examples/particles/imageparticle/allatonce.qml similarity index 100% rename from examples/declarative/particles/imageparticle/allatonce.qml rename to examples/particles/imageparticle/allatonce.qml diff --git a/examples/declarative/particles/imageparticle/colored.qml b/examples/particles/imageparticle/colored.qml similarity index 100% rename from examples/declarative/particles/imageparticle/colored.qml rename to examples/particles/imageparticle/colored.qml diff --git a/examples/declarative/particles/imageparticle/colortable.qml b/examples/particles/imageparticle/colortable.qml similarity index 100% rename from examples/declarative/particles/imageparticle/colortable.qml rename to examples/particles/imageparticle/colortable.qml diff --git a/examples/declarative/particles/imageparticle/deformation.qml b/examples/particles/imageparticle/deformation.qml similarity index 100% rename from examples/declarative/particles/imageparticle/deformation.qml rename to examples/particles/imageparticle/deformation.qml diff --git a/examples/declarative/particles/imageparticle/rotation.qml b/examples/particles/imageparticle/rotation.qml similarity index 100% rename from examples/declarative/particles/imageparticle/rotation.qml rename to examples/particles/imageparticle/rotation.qml diff --git a/examples/declarative/particles/imageparticle/sharing.qml b/examples/particles/imageparticle/sharing.qml similarity index 100% rename from examples/declarative/particles/imageparticle/sharing.qml rename to examples/particles/imageparticle/sharing.qml diff --git a/examples/declarative/particles/imageparticle/sprites.qml b/examples/particles/imageparticle/sprites.qml similarity index 100% rename from examples/declarative/particles/imageparticle/sprites.qml rename to examples/particles/imageparticle/sprites.qml diff --git a/examples/declarative/particles/images/_explo.png b/examples/particles/images/_explo.png similarity index 100% rename from examples/declarative/particles/images/_explo.png rename to examples/particles/images/_explo.png diff --git a/examples/declarative/particles/images/backgroundLeaves.jpg b/examples/particles/images/backgroundLeaves.jpg similarity index 100% rename from examples/declarative/particles/images/backgroundLeaves.jpg rename to examples/particles/images/backgroundLeaves.jpg diff --git a/examples/declarative/particles/images/bear_tiles.png b/examples/particles/images/bear_tiles.png similarity index 100% rename from examples/declarative/particles/images/bear_tiles.png rename to examples/particles/images/bear_tiles.png diff --git a/examples/declarative/particles/images/candle.png b/examples/particles/images/candle.png similarity index 100% rename from examples/declarative/particles/images/candle.png rename to examples/particles/images/candle.png diff --git a/examples/declarative/particles/images/colortable.png b/examples/particles/images/colortable.png similarity index 100% rename from examples/declarative/particles/images/colortable.png rename to examples/particles/images/colortable.png diff --git a/examples/declarative/particles/images/finalfrontier.png b/examples/particles/images/finalfrontier.png similarity index 100% rename from examples/declarative/particles/images/finalfrontier.png rename to examples/particles/images/finalfrontier.png diff --git a/examples/declarative/particles/images/flower.png b/examples/particles/images/flower.png similarity index 100% rename from examples/declarative/particles/images/flower.png rename to examples/particles/images/flower.png diff --git a/examples/declarative/particles/images/launcherIcons/allatonce.png b/examples/particles/images/launcherIcons/allatonce.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/allatonce.png rename to examples/particles/images/launcherIcons/allatonce.png diff --git a/examples/declarative/particles/images/launcherIcons/attractor.png b/examples/particles/images/launcherIcons/attractor.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/attractor.png rename to examples/particles/images/launcherIcons/attractor.png diff --git a/examples/declarative/particles/images/launcherIcons/blurparticles.png b/examples/particles/images/launcherIcons/blurparticles.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/blurparticles.png rename to examples/particles/images/launcherIcons/blurparticles.png diff --git a/examples/declarative/particles/images/launcherIcons/close.png b/examples/particles/images/launcherIcons/close.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/close.png rename to examples/particles/images/launcherIcons/close.png diff --git a/examples/declarative/particles/images/launcherIcons/colortable.png b/examples/particles/images/launcherIcons/colortable.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/colortable.png rename to examples/particles/images/launcherIcons/colortable.png diff --git a/examples/declarative/particles/images/launcherIcons/customaffector.png b/examples/particles/images/launcherIcons/customaffector.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/customaffector.png rename to examples/particles/images/launcherIcons/customaffector.png diff --git a/examples/declarative/particles/images/launcherIcons/customemitter.png b/examples/particles/images/launcherIcons/customemitter.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/customemitter.png rename to examples/particles/images/launcherIcons/customemitter.png diff --git a/examples/declarative/particles/images/launcherIcons/deformation.png b/examples/particles/images/launcherIcons/deformation.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/deformation.png rename to examples/particles/images/launcherIcons/deformation.png diff --git a/examples/declarative/particles/images/launcherIcons/delegates.png b/examples/particles/images/launcherIcons/delegates.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/delegates.png rename to examples/particles/images/launcherIcons/delegates.png diff --git a/examples/declarative/particles/images/launcherIcons/dynamicemitters.png b/examples/particles/images/launcherIcons/dynamicemitters.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/dynamicemitters.png rename to examples/particles/images/launcherIcons/dynamicemitters.png diff --git a/examples/declarative/particles/images/launcherIcons/emitmask.png b/examples/particles/images/launcherIcons/emitmask.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/emitmask.png rename to examples/particles/images/launcherIcons/emitmask.png diff --git a/examples/declarative/particles/images/launcherIcons/flickr.png b/examples/particles/images/launcherIcons/flickr.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/flickr.png rename to examples/particles/images/launcherIcons/flickr.png diff --git a/examples/declarative/particles/images/launcherIcons/fragmentshader.png b/examples/particles/images/launcherIcons/fragmentshader.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/fragmentshader.png rename to examples/particles/images/launcherIcons/fragmentshader.png diff --git a/examples/declarative/particles/images/launcherIcons/gridsplosion.png b/examples/particles/images/launcherIcons/gridsplosion.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/gridsplosion.png rename to examples/particles/images/launcherIcons/gridsplosion.png diff --git a/examples/declarative/particles/images/launcherIcons/groupgoal.png b/examples/particles/images/launcherIcons/groupgoal.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/groupgoal.png rename to examples/particles/images/launcherIcons/groupgoal.png diff --git a/examples/declarative/particles/images/launcherIcons/imagecolors.png b/examples/particles/images/launcherIcons/imagecolors.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/imagecolors.png rename to examples/particles/images/launcherIcons/imagecolors.png diff --git a/examples/declarative/particles/images/launcherIcons/list.png b/examples/particles/images/launcherIcons/list.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/list.png rename to examples/particles/images/launcherIcons/list.png diff --git a/examples/declarative/particles/images/launcherIcons/maximumemitted.png b/examples/particles/images/launcherIcons/maximumemitted.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/maximumemitted.png rename to examples/particles/images/launcherIcons/maximumemitted.png diff --git a/examples/declarative/particles/images/launcherIcons/multiplepainters.png b/examples/particles/images/launcherIcons/multiplepainters.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/multiplepainters.png rename to examples/particles/images/launcherIcons/multiplepainters.png diff --git a/examples/declarative/particles/images/launcherIcons/package.png b/examples/particles/images/launcherIcons/package.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/package.png rename to examples/particles/images/launcherIcons/package.png diff --git a/examples/declarative/particles/images/launcherIcons/particleview.png b/examples/particles/images/launcherIcons/particleview.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/particleview.png rename to examples/particles/images/launcherIcons/particleview.png diff --git a/examples/declarative/particles/images/launcherIcons/plasmapatrol.png b/examples/particles/images/launcherIcons/plasmapatrol.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/plasmapatrol.png rename to examples/particles/images/launcherIcons/plasmapatrol.png diff --git a/examples/declarative/particles/images/launcherIcons/remove.png b/examples/particles/images/launcherIcons/remove.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/remove.png rename to examples/particles/images/launcherIcons/remove.png diff --git a/examples/declarative/particles/images/launcherIcons/rotation.png b/examples/particles/images/launcherIcons/rotation.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/rotation.png rename to examples/particles/images/launcherIcons/rotation.png diff --git a/examples/declarative/particles/images/launcherIcons/samegame.png b/examples/particles/images/launcherIcons/samegame.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/samegame.png rename to examples/particles/images/launcherIcons/samegame.png diff --git a/examples/declarative/particles/images/launcherIcons/shapeanddirection.png b/examples/particles/images/launcherIcons/shapeanddirection.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/shapeanddirection.png rename to examples/particles/images/launcherIcons/shapeanddirection.png diff --git a/examples/declarative/particles/images/launcherIcons/spaceexplorer.png b/examples/particles/images/launcherIcons/spaceexplorer.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/spaceexplorer.png rename to examples/particles/images/launcherIcons/spaceexplorer.png diff --git a/examples/declarative/particles/images/launcherIcons/spritegoal.png b/examples/particles/images/launcherIcons/spritegoal.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/spritegoal.png rename to examples/particles/images/launcherIcons/spritegoal.png diff --git a/examples/declarative/particles/images/launcherIcons/sprites.png b/examples/particles/images/launcherIcons/sprites.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/sprites.png rename to examples/particles/images/launcherIcons/sprites.png diff --git a/examples/declarative/particles/images/launcherIcons/spritevariedparticles.png b/examples/particles/images/launcherIcons/spritevariedparticles.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/spritevariedparticles.png rename to examples/particles/images/launcherIcons/spritevariedparticles.png diff --git a/examples/declarative/particles/images/launcherIcons/startstop.png b/examples/particles/images/launcherIcons/startstop.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/startstop.png rename to examples/particles/images/launcherIcons/startstop.png diff --git a/examples/declarative/particles/images/launcherIcons/timedgroupchanges.png b/examples/particles/images/launcherIcons/timedgroupchanges.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/timedgroupchanges.png rename to examples/particles/images/launcherIcons/timedgroupchanges.png diff --git a/examples/declarative/particles/images/launcherIcons/trailemitter.png b/examples/particles/images/launcherIcons/trailemitter.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/trailemitter.png rename to examples/particles/images/launcherIcons/trailemitter.png diff --git a/examples/declarative/particles/images/launcherIcons/trails.png b/examples/particles/images/launcherIcons/trails.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/trails.png rename to examples/particles/images/launcherIcons/trails.png diff --git a/examples/declarative/particles/images/launcherIcons/turbulence.png b/examples/particles/images/launcherIcons/turbulence.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/turbulence.png rename to examples/particles/images/launcherIcons/turbulence.png diff --git a/examples/declarative/particles/images/launcherIcons/velocityfrommotion.png b/examples/particles/images/launcherIcons/velocityfrommotion.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/velocityfrommotion.png rename to examples/particles/images/launcherIcons/velocityfrommotion.png diff --git a/examples/declarative/particles/images/launcherIcons/wander.png b/examples/particles/images/launcherIcons/wander.png similarity index 100% rename from examples/declarative/particles/images/launcherIcons/wander.png rename to examples/particles/images/launcherIcons/wander.png diff --git a/examples/declarative/particles/images/matchmask.png b/examples/particles/images/matchmask.png similarity index 100% rename from examples/declarative/particles/images/matchmask.png rename to examples/particles/images/matchmask.png diff --git a/examples/declarative/particles/images/meteor.png b/examples/particles/images/meteor.png similarity index 100% rename from examples/declarative/particles/images/meteor.png rename to examples/particles/images/meteor.png diff --git a/examples/declarative/particles/images/meteor_explo.png b/examples/particles/images/meteor_explo.png similarity index 100% rename from examples/declarative/particles/images/meteor_explo.png rename to examples/particles/images/meteor_explo.png diff --git a/examples/declarative/particles/images/meteors.png b/examples/particles/images/meteors.png similarity index 100% rename from examples/declarative/particles/images/meteors.png rename to examples/particles/images/meteors.png diff --git a/examples/declarative/particles/images/nullRock.png b/examples/particles/images/nullRock.png similarity index 100% rename from examples/declarative/particles/images/nullRock.png rename to examples/particles/images/nullRock.png diff --git a/examples/declarative/particles/images/particle.png b/examples/particles/images/particle.png similarity index 100% rename from examples/declarative/particles/images/particle.png rename to examples/particles/images/particle.png diff --git a/examples/declarative/particles/images/particle2.png b/examples/particles/images/particle2.png similarity index 100% rename from examples/declarative/particles/images/particle2.png rename to examples/particles/images/particle2.png diff --git a/examples/declarative/particles/images/particle3.png b/examples/particles/images/particle3.png similarity index 100% rename from examples/declarative/particles/images/particle3.png rename to examples/particles/images/particle3.png diff --git a/examples/declarative/particles/images/particle4.png b/examples/particles/images/particle4.png similarity index 100% rename from examples/declarative/particles/images/particle4.png rename to examples/particles/images/particle4.png diff --git a/examples/declarative/particles/images/particleA.png b/examples/particles/images/particleA.png similarity index 100% rename from examples/declarative/particles/images/particleA.png rename to examples/particles/images/particleA.png diff --git a/examples/declarative/particles/images/portal_bg.png b/examples/particles/images/portal_bg.png similarity index 100% rename from examples/declarative/particles/images/portal_bg.png rename to examples/particles/images/portal_bg.png diff --git a/examples/declarative/particles/images/realLeaf1.png b/examples/particles/images/realLeaf1.png similarity index 100% rename from examples/declarative/particles/images/realLeaf1.png rename to examples/particles/images/realLeaf1.png diff --git a/examples/declarative/particles/images/realLeaf2.png b/examples/particles/images/realLeaf2.png similarity index 100% rename from examples/declarative/particles/images/realLeaf2.png rename to examples/particles/images/realLeaf2.png diff --git a/examples/declarative/particles/images/realLeaf3.png b/examples/particles/images/realLeaf3.png similarity index 100% rename from examples/declarative/particles/images/realLeaf3.png rename to examples/particles/images/realLeaf3.png diff --git a/examples/declarative/particles/images/realLeaf4.png b/examples/particles/images/realLeaf4.png similarity index 100% rename from examples/declarative/particles/images/realLeaf4.png rename to examples/particles/images/realLeaf4.png diff --git a/examples/declarative/particles/images/rocket.png b/examples/particles/images/rocket.png similarity index 100% rename from examples/declarative/particles/images/rocket.png rename to examples/particles/images/rocket.png diff --git a/examples/declarative/particles/images/rocket2.png b/examples/particles/images/rocket2.png similarity index 100% rename from examples/declarative/particles/images/rocket2.png rename to examples/particles/images/rocket2.png diff --git a/examples/declarative/particles/images/sizeInOut.png b/examples/particles/images/sizeInOut.png similarity index 100% rename from examples/declarative/particles/images/sizeInOut.png rename to examples/particles/images/sizeInOut.png diff --git a/examples/declarative/particles/images/snowflake.png b/examples/particles/images/snowflake.png similarity index 100% rename from examples/declarative/particles/images/snowflake.png rename to examples/particles/images/snowflake.png diff --git a/examples/declarative/particles/images/sparkleSize.png b/examples/particles/images/sparkleSize.png similarity index 100% rename from examples/declarative/particles/images/sparkleSize.png rename to examples/particles/images/sparkleSize.png diff --git a/examples/declarative/particles/images/star.png b/examples/particles/images/star.png similarity index 100% rename from examples/declarative/particles/images/star.png rename to examples/particles/images/star.png diff --git a/examples/declarative/particles/images/starfish_0.png b/examples/particles/images/starfish_0.png similarity index 100% rename from examples/declarative/particles/images/starfish_0.png rename to examples/particles/images/starfish_0.png diff --git a/examples/declarative/particles/images/starfish_1.png b/examples/particles/images/starfish_1.png similarity index 100% rename from examples/declarative/particles/images/starfish_1.png rename to examples/particles/images/starfish_1.png diff --git a/examples/declarative/particles/images/starfish_2.png b/examples/particles/images/starfish_2.png similarity index 100% rename from examples/declarative/particles/images/starfish_2.png rename to examples/particles/images/starfish_2.png diff --git a/examples/declarative/particles/images/starfish_3.png b/examples/particles/images/starfish_3.png similarity index 100% rename from examples/declarative/particles/images/starfish_3.png rename to examples/particles/images/starfish_3.png diff --git a/examples/declarative/particles/images/starfish_4.png b/examples/particles/images/starfish_4.png similarity index 100% rename from examples/declarative/particles/images/starfish_4.png rename to examples/particles/images/starfish_4.png diff --git a/examples/declarative/particles/images/starfish_mask.png b/examples/particles/images/starfish_mask.png similarity index 100% rename from examples/declarative/particles/images/starfish_mask.png rename to examples/particles/images/starfish_mask.png diff --git a/examples/declarative/particles/itemparticle/content/Delegate.qml b/examples/particles/itemparticle/content/Delegate.qml similarity index 100% rename from examples/declarative/particles/itemparticle/content/Delegate.qml rename to examples/particles/itemparticle/content/Delegate.qml diff --git a/examples/declarative/particles/itemparticle/content/Delegate2.qml b/examples/particles/itemparticle/content/Delegate2.qml similarity index 100% rename from examples/declarative/particles/itemparticle/content/Delegate2.qml rename to examples/particles/itemparticle/content/Delegate2.qml diff --git a/examples/declarative/particles/itemparticle/content/ExpandingDelegate.qml b/examples/particles/itemparticle/content/ExpandingDelegate.qml similarity index 100% rename from examples/declarative/particles/itemparticle/content/ExpandingDelegate.qml rename to examples/particles/itemparticle/content/ExpandingDelegate.qml diff --git a/examples/declarative/particles/itemparticle/content/RssModel.qml b/examples/particles/itemparticle/content/RssModel.qml similarity index 100% rename from examples/declarative/particles/itemparticle/content/RssModel.qml rename to examples/particles/itemparticle/content/RssModel.qml diff --git a/examples/declarative/particles/itemparticle/content/bubble.png b/examples/particles/itemparticle/content/bubble.png similarity index 100% rename from examples/declarative/particles/itemparticle/content/bubble.png rename to examples/particles/itemparticle/content/bubble.png diff --git a/examples/declarative/particles/itemparticle/content/script.js b/examples/particles/itemparticle/content/script.js similarity index 100% rename from examples/declarative/particles/itemparticle/content/script.js rename to examples/particles/itemparticle/content/script.js diff --git a/examples/declarative/particles/itemparticle/delegates.qml b/examples/particles/itemparticle/delegates.qml similarity index 100% rename from examples/declarative/particles/itemparticle/delegates.qml rename to examples/particles/itemparticle/delegates.qml diff --git a/examples/declarative/particles/itemparticle/particleview.qml b/examples/particles/itemparticle/particleview.qml similarity index 100% rename from examples/declarative/particles/itemparticle/particleview.qml rename to examples/particles/itemparticle/particleview.qml diff --git a/examples/particles/particles.pro b/examples/particles/particles.pro new file mode 100644 index 0000000..9671085 --- /dev/null +++ b/examples/particles/particles.pro @@ -0,0 +1 @@ +TEMPLATE = subdirs diff --git a/examples/declarative/particles/simple/dynamiccomparison.qml b/examples/particles/simple/dynamiccomparison.qml similarity index 100% rename from examples/declarative/particles/simple/dynamiccomparison.qml rename to examples/particles/simple/dynamiccomparison.qml diff --git a/examples/declarative/particles/simple/dynamicemitters.qml b/examples/particles/simple/dynamicemitters.qml similarity index 100% rename from examples/declarative/particles/simple/dynamicemitters.qml rename to examples/particles/simple/dynamicemitters.qml diff --git a/examples/declarative/particles/simple/multiplepainters.qml b/examples/particles/simple/multiplepainters.qml similarity index 100% rename from examples/declarative/particles/simple/multiplepainters.qml rename to examples/particles/simple/multiplepainters.qml diff --git a/examples/declarative/particles/simple/startstop.qml b/examples/particles/simple/startstop.qml similarity index 100% rename from examples/declarative/particles/simple/startstop.qml rename to examples/particles/simple/startstop.qml diff --git a/examples/declarative/cppextensions/cppextensions.pro b/examples/qml/cppextensions/cppextensions.pro similarity index 100% rename from examples/declarative/cppextensions/cppextensions.pro rename to examples/qml/cppextensions/cppextensions.pro diff --git a/examples/declarative/cppextensions/cppextensions.qmlproject b/examples/qml/cppextensions/cppextensions.qmlproject similarity index 100% rename from examples/declarative/cppextensions/cppextensions.qmlproject rename to examples/qml/cppextensions/cppextensions.qmlproject diff --git a/examples/declarative/cppextensions/imageprovider/ImageProviderCore/qmldir b/examples/qml/cppextensions/imageprovider/ImageProviderCore/qmldir similarity index 100% rename from examples/declarative/cppextensions/imageprovider/ImageProviderCore/qmldir rename to examples/qml/cppextensions/imageprovider/ImageProviderCore/qmldir diff --git a/examples/declarative/cppextensions/imageprovider/imageprovider-example.qml b/examples/qml/cppextensions/imageprovider/imageprovider-example.qml similarity index 100% rename from examples/declarative/cppextensions/imageprovider/imageprovider-example.qml rename to examples/qml/cppextensions/imageprovider/imageprovider-example.qml diff --git a/examples/declarative/cppextensions/imageprovider/imageprovider.cpp b/examples/qml/cppextensions/imageprovider/imageprovider.cpp similarity index 100% rename from examples/declarative/cppextensions/imageprovider/imageprovider.cpp rename to examples/qml/cppextensions/imageprovider/imageprovider.cpp diff --git a/examples/declarative/cppextensions/imageprovider/imageprovider.pro b/examples/qml/cppextensions/imageprovider/imageprovider.pro similarity index 100% rename from examples/declarative/cppextensions/imageprovider/imageprovider.pro rename to examples/qml/cppextensions/imageprovider/imageprovider.pro diff --git a/examples/declarative/cppextensions/imageprovider/imageprovider.qmlproject b/examples/qml/cppextensions/imageprovider/imageprovider.qmlproject similarity index 100% rename from examples/declarative/cppextensions/imageprovider/imageprovider.qmlproject rename to examples/qml/cppextensions/imageprovider/imageprovider.qmlproject diff --git a/examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp b/examples/qml/cppextensions/networkaccessmanagerfactory/main.cpp similarity index 100% rename from examples/declarative/cppextensions/networkaccessmanagerfactory/main.cpp rename to examples/qml/cppextensions/networkaccessmanagerfactory/main.cpp diff --git a/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro b/examples/qml/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro similarity index 100% rename from examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro rename to examples/qml/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.pro diff --git a/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qmlproject b/examples/qml/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qmlproject similarity index 100% rename from examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qmlproject rename to examples/qml/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qmlproject diff --git a/examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qrc b/examples/qml/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qrc similarity index 100% rename from examples/declarative/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qrc rename to examples/qml/cppextensions/networkaccessmanagerfactory/networkaccessmanagerfactory.qrc diff --git a/examples/declarative/cppextensions/networkaccessmanagerfactory/view.qml b/examples/qml/cppextensions/networkaccessmanagerfactory/view.qml similarity index 100% rename from examples/declarative/cppextensions/networkaccessmanagerfactory/view.qml rename to examples/qml/cppextensions/networkaccessmanagerfactory/view.qml diff --git a/examples/declarative/cppextensions/plugins/README b/examples/qml/cppextensions/plugins/README similarity index 100% rename from examples/declarative/cppextensions/plugins/README rename to examples/qml/cppextensions/plugins/README diff --git a/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/Clock.qml b/examples/qml/cppextensions/plugins/com/nokia/TimeExample/Clock.qml similarity index 100% rename from examples/declarative/cppextensions/plugins/com/nokia/TimeExample/Clock.qml rename to examples/qml/cppextensions/plugins/com/nokia/TimeExample/Clock.qml diff --git a/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/center.png b/examples/qml/cppextensions/plugins/com/nokia/TimeExample/center.png similarity index 100% rename from examples/declarative/cppextensions/plugins/com/nokia/TimeExample/center.png rename to examples/qml/cppextensions/plugins/com/nokia/TimeExample/center.png diff --git a/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/clock.png b/examples/qml/cppextensions/plugins/com/nokia/TimeExample/clock.png similarity index 100% rename from examples/declarative/cppextensions/plugins/com/nokia/TimeExample/clock.png rename to examples/qml/cppextensions/plugins/com/nokia/TimeExample/clock.png diff --git a/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/hour.png b/examples/qml/cppextensions/plugins/com/nokia/TimeExample/hour.png similarity index 100% rename from examples/declarative/cppextensions/plugins/com/nokia/TimeExample/hour.png rename to examples/qml/cppextensions/plugins/com/nokia/TimeExample/hour.png diff --git a/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/minute.png b/examples/qml/cppextensions/plugins/com/nokia/TimeExample/minute.png similarity index 100% rename from examples/declarative/cppextensions/plugins/com/nokia/TimeExample/minute.png rename to examples/qml/cppextensions/plugins/com/nokia/TimeExample/minute.png diff --git a/examples/declarative/cppextensions/plugins/com/nokia/TimeExample/qmldir b/examples/qml/cppextensions/plugins/com/nokia/TimeExample/qmldir similarity index 100% rename from examples/declarative/cppextensions/plugins/com/nokia/TimeExample/qmldir rename to examples/qml/cppextensions/plugins/com/nokia/TimeExample/qmldir diff --git a/examples/declarative/cppextensions/plugins/plugin.cpp b/examples/qml/cppextensions/plugins/plugin.cpp similarity index 100% rename from examples/declarative/cppextensions/plugins/plugin.cpp rename to examples/qml/cppextensions/plugins/plugin.cpp diff --git a/examples/declarative/cppextensions/plugins/plugins.pro b/examples/qml/cppextensions/plugins/plugins.pro similarity index 100% rename from examples/declarative/cppextensions/plugins/plugins.pro rename to examples/qml/cppextensions/plugins/plugins.pro diff --git a/examples/declarative/cppextensions/plugins/plugins.qml b/examples/qml/cppextensions/plugins/plugins.qml similarity index 100% rename from examples/declarative/cppextensions/plugins/plugins.qml rename to examples/qml/cppextensions/plugins/plugins.qml diff --git a/examples/declarative/cppextensions/plugins/plugins.qmlproject b/examples/qml/cppextensions/plugins/plugins.qmlproject similarity index 100% rename from examples/declarative/cppextensions/plugins/plugins.qmlproject rename to examples/qml/cppextensions/plugins/plugins.qmlproject diff --git a/examples/declarative/cppextensions/referenceexamples/adding/adding.pro b/examples/qml/cppextensions/referenceexamples/adding/adding.pro similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/adding/adding.pro rename to examples/qml/cppextensions/referenceexamples/adding/adding.pro diff --git a/examples/declarative/cppextensions/referenceexamples/adding/adding.qrc b/examples/qml/cppextensions/referenceexamples/adding/adding.qrc similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/adding/adding.qrc rename to examples/qml/cppextensions/referenceexamples/adding/adding.qrc diff --git a/examples/declarative/cppextensions/referenceexamples/adding/example.qml b/examples/qml/cppextensions/referenceexamples/adding/example.qml similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/adding/example.qml rename to examples/qml/cppextensions/referenceexamples/adding/example.qml diff --git a/examples/declarative/cppextensions/referenceexamples/adding/main.cpp b/examples/qml/cppextensions/referenceexamples/adding/main.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/adding/main.cpp rename to examples/qml/cppextensions/referenceexamples/adding/main.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/adding/person.cpp b/examples/qml/cppextensions/referenceexamples/adding/person.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/adding/person.cpp rename to examples/qml/cppextensions/referenceexamples/adding/person.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/adding/person.h b/examples/qml/cppextensions/referenceexamples/adding/person.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/adding/person.h rename to examples/qml/cppextensions/referenceexamples/adding/person.h diff --git a/examples/declarative/cppextensions/referenceexamples/attached/attached.pro b/examples/qml/cppextensions/referenceexamples/attached/attached.pro similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/attached/attached.pro rename to examples/qml/cppextensions/referenceexamples/attached/attached.pro diff --git a/examples/declarative/cppextensions/referenceexamples/attached/attached.qrc b/examples/qml/cppextensions/referenceexamples/attached/attached.qrc similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/attached/attached.qrc rename to examples/qml/cppextensions/referenceexamples/attached/attached.qrc diff --git a/examples/declarative/cppextensions/referenceexamples/attached/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/attached/birthdayparty.cpp rename to examples/qml/cppextensions/referenceexamples/attached/birthdayparty.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/attached/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/attached/birthdayparty.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/attached/birthdayparty.h rename to examples/qml/cppextensions/referenceexamples/attached/birthdayparty.h diff --git a/examples/declarative/cppextensions/referenceexamples/attached/example.qml b/examples/qml/cppextensions/referenceexamples/attached/example.qml similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/attached/example.qml rename to examples/qml/cppextensions/referenceexamples/attached/example.qml diff --git a/examples/declarative/cppextensions/referenceexamples/attached/main.cpp b/examples/qml/cppextensions/referenceexamples/attached/main.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/attached/main.cpp rename to examples/qml/cppextensions/referenceexamples/attached/main.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/valuesource/person.cpp b/examples/qml/cppextensions/referenceexamples/attached/person.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/valuesource/person.cpp rename to examples/qml/cppextensions/referenceexamples/attached/person.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/valuesource/person.h b/examples/qml/cppextensions/referenceexamples/attached/person.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/valuesource/person.h rename to examples/qml/cppextensions/referenceexamples/attached/person.h diff --git a/examples/declarative/cppextensions/referenceexamples/binding/binding.pro b/examples/qml/cppextensions/referenceexamples/binding/binding.pro similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/binding/binding.pro rename to examples/qml/cppextensions/referenceexamples/binding/binding.pro diff --git a/examples/declarative/cppextensions/referenceexamples/binding/binding.qrc b/examples/qml/cppextensions/referenceexamples/binding/binding.qrc similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/binding/binding.qrc rename to examples/qml/cppextensions/referenceexamples/binding/binding.qrc diff --git a/examples/declarative/cppextensions/referenceexamples/binding/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/binding/birthdayparty.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/binding/birthdayparty.cpp rename to examples/qml/cppextensions/referenceexamples/binding/birthdayparty.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/binding/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/binding/birthdayparty.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/binding/birthdayparty.h rename to examples/qml/cppextensions/referenceexamples/binding/birthdayparty.h diff --git a/examples/declarative/cppextensions/referenceexamples/binding/example.qml b/examples/qml/cppextensions/referenceexamples/binding/example.qml similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/binding/example.qml rename to examples/qml/cppextensions/referenceexamples/binding/example.qml diff --git a/examples/declarative/cppextensions/referenceexamples/binding/happybirthdaysong.cpp b/examples/qml/cppextensions/referenceexamples/binding/happybirthdaysong.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/binding/happybirthdaysong.cpp rename to examples/qml/cppextensions/referenceexamples/binding/happybirthdaysong.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/binding/happybirthdaysong.h b/examples/qml/cppextensions/referenceexamples/binding/happybirthdaysong.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/binding/happybirthdaysong.h rename to examples/qml/cppextensions/referenceexamples/binding/happybirthdaysong.h diff --git a/examples/declarative/cppextensions/referenceexamples/binding/main.cpp b/examples/qml/cppextensions/referenceexamples/binding/main.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/binding/main.cpp rename to examples/qml/cppextensions/referenceexamples/binding/main.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/binding/person.cpp b/examples/qml/cppextensions/referenceexamples/binding/person.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/binding/person.cpp rename to examples/qml/cppextensions/referenceexamples/binding/person.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/binding/person.h b/examples/qml/cppextensions/referenceexamples/binding/person.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/binding/person.h rename to examples/qml/cppextensions/referenceexamples/binding/person.h diff --git a/examples/declarative/cppextensions/referenceexamples/grouped/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/grouped/birthdayparty.cpp rename to examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/coercion/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/coercion/birthdayparty.h rename to examples/qml/cppextensions/referenceexamples/coercion/birthdayparty.h diff --git a/examples/declarative/cppextensions/referenceexamples/coercion/coercion.pro b/examples/qml/cppextensions/referenceexamples/coercion/coercion.pro similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/coercion/coercion.pro rename to examples/qml/cppextensions/referenceexamples/coercion/coercion.pro diff --git a/examples/declarative/cppextensions/referenceexamples/coercion/coercion.qrc b/examples/qml/cppextensions/referenceexamples/coercion/coercion.qrc similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/coercion/coercion.qrc rename to examples/qml/cppextensions/referenceexamples/coercion/coercion.qrc diff --git a/examples/declarative/cppextensions/referenceexamples/coercion/example.qml b/examples/qml/cppextensions/referenceexamples/coercion/example.qml similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/coercion/example.qml rename to examples/qml/cppextensions/referenceexamples/coercion/example.qml diff --git a/examples/declarative/cppextensions/referenceexamples/coercion/main.cpp b/examples/qml/cppextensions/referenceexamples/coercion/main.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/coercion/main.cpp rename to examples/qml/cppextensions/referenceexamples/coercion/main.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/coercion/person.cpp b/examples/qml/cppextensions/referenceexamples/coercion/person.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/coercion/person.cpp rename to examples/qml/cppextensions/referenceexamples/coercion/person.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/coercion/person.h b/examples/qml/cppextensions/referenceexamples/coercion/person.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/coercion/person.h rename to examples/qml/cppextensions/referenceexamples/coercion/person.h diff --git a/examples/declarative/cppextensions/referenceexamples/default/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/default/birthdayparty.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/default/birthdayparty.cpp rename to examples/qml/cppextensions/referenceexamples/default/birthdayparty.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/default/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/default/birthdayparty.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/default/birthdayparty.h rename to examples/qml/cppextensions/referenceexamples/default/birthdayparty.h diff --git a/examples/declarative/cppextensions/referenceexamples/default/default.pro b/examples/qml/cppextensions/referenceexamples/default/default.pro similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/default/default.pro rename to examples/qml/cppextensions/referenceexamples/default/default.pro diff --git a/examples/declarative/cppextensions/referenceexamples/default/default.qrc b/examples/qml/cppextensions/referenceexamples/default/default.qrc similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/default/default.qrc rename to examples/qml/cppextensions/referenceexamples/default/default.qrc diff --git a/examples/declarative/cppextensions/referenceexamples/default/example.qml b/examples/qml/cppextensions/referenceexamples/default/example.qml similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/default/example.qml rename to examples/qml/cppextensions/referenceexamples/default/example.qml diff --git a/examples/declarative/cppextensions/referenceexamples/default/main.cpp b/examples/qml/cppextensions/referenceexamples/default/main.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/default/main.cpp rename to examples/qml/cppextensions/referenceexamples/default/main.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/default/person.cpp b/examples/qml/cppextensions/referenceexamples/default/person.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/default/person.cpp rename to examples/qml/cppextensions/referenceexamples/default/person.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/default/person.h b/examples/qml/cppextensions/referenceexamples/default/person.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/default/person.h rename to examples/qml/cppextensions/referenceexamples/default/person.h diff --git a/examples/declarative/cppextensions/referenceexamples/extended/example.qml b/examples/qml/cppextensions/referenceexamples/extended/example.qml similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/extended/example.qml rename to examples/qml/cppextensions/referenceexamples/extended/example.qml diff --git a/examples/declarative/cppextensions/referenceexamples/extended/extended.pro b/examples/qml/cppextensions/referenceexamples/extended/extended.pro similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/extended/extended.pro rename to examples/qml/cppextensions/referenceexamples/extended/extended.pro diff --git a/examples/declarative/cppextensions/referenceexamples/extended/extended.qrc b/examples/qml/cppextensions/referenceexamples/extended/extended.qrc similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/extended/extended.qrc rename to examples/qml/cppextensions/referenceexamples/extended/extended.qrc diff --git a/examples/declarative/cppextensions/referenceexamples/extended/lineedit.cpp b/examples/qml/cppextensions/referenceexamples/extended/lineedit.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/extended/lineedit.cpp rename to examples/qml/cppextensions/referenceexamples/extended/lineedit.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/extended/lineedit.h b/examples/qml/cppextensions/referenceexamples/extended/lineedit.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/extended/lineedit.h rename to examples/qml/cppextensions/referenceexamples/extended/lineedit.h diff --git a/examples/declarative/cppextensions/referenceexamples/extended/main.cpp b/examples/qml/cppextensions/referenceexamples/extended/main.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/extended/main.cpp rename to examples/qml/cppextensions/referenceexamples/extended/main.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/coercion/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/grouped/birthdayparty.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/coercion/birthdayparty.cpp rename to examples/qml/cppextensions/referenceexamples/grouped/birthdayparty.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/grouped/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/grouped/birthdayparty.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/grouped/birthdayparty.h rename to examples/qml/cppextensions/referenceexamples/grouped/birthdayparty.h diff --git a/examples/declarative/cppextensions/referenceexamples/grouped/example.qml b/examples/qml/cppextensions/referenceexamples/grouped/example.qml similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/grouped/example.qml rename to examples/qml/cppextensions/referenceexamples/grouped/example.qml diff --git a/examples/declarative/cppextensions/referenceexamples/grouped/grouped.pro b/examples/qml/cppextensions/referenceexamples/grouped/grouped.pro similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/grouped/grouped.pro rename to examples/qml/cppextensions/referenceexamples/grouped/grouped.pro diff --git a/examples/declarative/cppextensions/referenceexamples/grouped/grouped.qrc b/examples/qml/cppextensions/referenceexamples/grouped/grouped.qrc similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/grouped/grouped.qrc rename to examples/qml/cppextensions/referenceexamples/grouped/grouped.qrc diff --git a/examples/declarative/cppextensions/referenceexamples/grouped/main.cpp b/examples/qml/cppextensions/referenceexamples/grouped/main.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/grouped/main.cpp rename to examples/qml/cppextensions/referenceexamples/grouped/main.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/signal/person.cpp b/examples/qml/cppextensions/referenceexamples/grouped/person.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/signal/person.cpp rename to examples/qml/cppextensions/referenceexamples/grouped/person.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/grouped/person.h b/examples/qml/cppextensions/referenceexamples/grouped/person.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/grouped/person.h rename to examples/qml/cppextensions/referenceexamples/grouped/person.h diff --git a/examples/declarative/cppextensions/referenceexamples/methods/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/methods/birthdayparty.cpp rename to examples/qml/cppextensions/referenceexamples/methods/birthdayparty.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/methods/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/methods/birthdayparty.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/methods/birthdayparty.h rename to examples/qml/cppextensions/referenceexamples/methods/birthdayparty.h diff --git a/examples/declarative/cppextensions/referenceexamples/methods/example.qml b/examples/qml/cppextensions/referenceexamples/methods/example.qml similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/methods/example.qml rename to examples/qml/cppextensions/referenceexamples/methods/example.qml diff --git a/examples/declarative/cppextensions/referenceexamples/methods/main.cpp b/examples/qml/cppextensions/referenceexamples/methods/main.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/methods/main.cpp rename to examples/qml/cppextensions/referenceexamples/methods/main.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/methods/methods.pro b/examples/qml/cppextensions/referenceexamples/methods/methods.pro similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/methods/methods.pro rename to examples/qml/cppextensions/referenceexamples/methods/methods.pro diff --git a/examples/declarative/cppextensions/referenceexamples/methods/methods.qrc b/examples/qml/cppextensions/referenceexamples/methods/methods.qrc similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/methods/methods.qrc rename to examples/qml/cppextensions/referenceexamples/methods/methods.qrc diff --git a/examples/declarative/cppextensions/referenceexamples/properties/person.cpp b/examples/qml/cppextensions/referenceexamples/methods/person.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/properties/person.cpp rename to examples/qml/cppextensions/referenceexamples/methods/person.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/properties/person.h b/examples/qml/cppextensions/referenceexamples/methods/person.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/properties/person.h rename to examples/qml/cppextensions/referenceexamples/methods/person.h diff --git a/examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/properties/birthdayparty.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.cpp rename to examples/qml/cppextensions/referenceexamples/properties/birthdayparty.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/properties/birthdayparty.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/properties/birthdayparty.h rename to examples/qml/cppextensions/referenceexamples/properties/birthdayparty.h diff --git a/examples/declarative/cppextensions/referenceexamples/properties/example.qml b/examples/qml/cppextensions/referenceexamples/properties/example.qml similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/properties/example.qml rename to examples/qml/cppextensions/referenceexamples/properties/example.qml diff --git a/examples/declarative/cppextensions/referenceexamples/properties/main.cpp b/examples/qml/cppextensions/referenceexamples/properties/main.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/properties/main.cpp rename to examples/qml/cppextensions/referenceexamples/properties/main.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/methods/person.cpp b/examples/qml/cppextensions/referenceexamples/properties/person.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/methods/person.cpp rename to examples/qml/cppextensions/referenceexamples/properties/person.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/methods/person.h b/examples/qml/cppextensions/referenceexamples/properties/person.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/methods/person.h rename to examples/qml/cppextensions/referenceexamples/properties/person.h diff --git a/examples/declarative/cppextensions/referenceexamples/properties/properties.pro b/examples/qml/cppextensions/referenceexamples/properties/properties.pro similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/properties/properties.pro rename to examples/qml/cppextensions/referenceexamples/properties/properties.pro diff --git a/examples/declarative/cppextensions/referenceexamples/properties/properties.qrc b/examples/qml/cppextensions/referenceexamples/properties/properties.qrc similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/properties/properties.qrc rename to examples/qml/cppextensions/referenceexamples/properties/properties.qrc diff --git a/examples/declarative/cppextensions/referenceexamples/referenceexamples.pro b/examples/qml/cppextensions/referenceexamples/referenceexamples.pro similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/referenceexamples.pro rename to examples/qml/cppextensions/referenceexamples/referenceexamples.pro diff --git a/examples/declarative/cppextensions/referenceexamples/referenceexamples.qmlproject b/examples/qml/cppextensions/referenceexamples/referenceexamples.qmlproject similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/referenceexamples.qmlproject rename to examples/qml/cppextensions/referenceexamples/referenceexamples.qmlproject diff --git a/examples/declarative/cppextensions/referenceexamples/signal/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/signal/birthdayparty.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/signal/birthdayparty.cpp rename to examples/qml/cppextensions/referenceexamples/signal/birthdayparty.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/signal/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/signal/birthdayparty.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/signal/birthdayparty.h rename to examples/qml/cppextensions/referenceexamples/signal/birthdayparty.h diff --git a/examples/declarative/cppextensions/referenceexamples/signal/example.qml b/examples/qml/cppextensions/referenceexamples/signal/example.qml similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/signal/example.qml rename to examples/qml/cppextensions/referenceexamples/signal/example.qml diff --git a/examples/declarative/cppextensions/referenceexamples/signal/main.cpp b/examples/qml/cppextensions/referenceexamples/signal/main.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/signal/main.cpp rename to examples/qml/cppextensions/referenceexamples/signal/main.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/grouped/person.cpp b/examples/qml/cppextensions/referenceexamples/signal/person.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/grouped/person.cpp rename to examples/qml/cppextensions/referenceexamples/signal/person.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/signal/person.h b/examples/qml/cppextensions/referenceexamples/signal/person.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/signal/person.h rename to examples/qml/cppextensions/referenceexamples/signal/person.h diff --git a/examples/declarative/cppextensions/referenceexamples/signal/signal.pro b/examples/qml/cppextensions/referenceexamples/signal/signal.pro similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/signal/signal.pro rename to examples/qml/cppextensions/referenceexamples/signal/signal.pro diff --git a/examples/declarative/cppextensions/referenceexamples/signal/signal.qrc b/examples/qml/cppextensions/referenceexamples/signal/signal.qrc similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/signal/signal.qrc rename to examples/qml/cppextensions/referenceexamples/signal/signal.qrc diff --git a/examples/declarative/cppextensions/referenceexamples/valuesource/birthdayparty.cpp b/examples/qml/cppextensions/referenceexamples/valuesource/birthdayparty.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/valuesource/birthdayparty.cpp rename to examples/qml/cppextensions/referenceexamples/valuesource/birthdayparty.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/valuesource/birthdayparty.h b/examples/qml/cppextensions/referenceexamples/valuesource/birthdayparty.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/valuesource/birthdayparty.h rename to examples/qml/cppextensions/referenceexamples/valuesource/birthdayparty.h diff --git a/examples/declarative/cppextensions/referenceexamples/valuesource/example.qml b/examples/qml/cppextensions/referenceexamples/valuesource/example.qml similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/valuesource/example.qml rename to examples/qml/cppextensions/referenceexamples/valuesource/example.qml diff --git a/examples/declarative/cppextensions/referenceexamples/valuesource/happybirthdaysong.cpp b/examples/qml/cppextensions/referenceexamples/valuesource/happybirthdaysong.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/valuesource/happybirthdaysong.cpp rename to examples/qml/cppextensions/referenceexamples/valuesource/happybirthdaysong.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/valuesource/happybirthdaysong.h b/examples/qml/cppextensions/referenceexamples/valuesource/happybirthdaysong.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/valuesource/happybirthdaysong.h rename to examples/qml/cppextensions/referenceexamples/valuesource/happybirthdaysong.h diff --git a/examples/declarative/cppextensions/referenceexamples/valuesource/main.cpp b/examples/qml/cppextensions/referenceexamples/valuesource/main.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/valuesource/main.cpp rename to examples/qml/cppextensions/referenceexamples/valuesource/main.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/attached/person.cpp b/examples/qml/cppextensions/referenceexamples/valuesource/person.cpp similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/attached/person.cpp rename to examples/qml/cppextensions/referenceexamples/valuesource/person.cpp diff --git a/examples/declarative/cppextensions/referenceexamples/attached/person.h b/examples/qml/cppextensions/referenceexamples/valuesource/person.h similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/attached/person.h rename to examples/qml/cppextensions/referenceexamples/valuesource/person.h diff --git a/examples/declarative/cppextensions/referenceexamples/valuesource/valuesource.pro b/examples/qml/cppextensions/referenceexamples/valuesource/valuesource.pro similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/valuesource/valuesource.pro rename to examples/qml/cppextensions/referenceexamples/valuesource/valuesource.pro diff --git a/examples/declarative/cppextensions/referenceexamples/valuesource/valuesource.qrc b/examples/qml/cppextensions/referenceexamples/valuesource/valuesource.qrc similarity index 100% rename from examples/declarative/cppextensions/referenceexamples/valuesource/valuesource.qrc rename to examples/qml/cppextensions/referenceexamples/valuesource/valuesource.qrc diff --git a/examples/declarative/i18n/i18n.qml b/examples/qml/i18n/i18n.qml similarity index 100% rename from examples/declarative/i18n/i18n.qml rename to examples/qml/i18n/i18n.qml diff --git a/examples/declarative/i18n/i18n/base.ts b/examples/qml/i18n/i18n/base.ts similarity index 100% rename from examples/declarative/i18n/i18n/base.ts rename to examples/qml/i18n/i18n/base.ts diff --git a/examples/declarative/i18n/i18n/qml_en_AU.ts b/examples/qml/i18n/i18n/qml_en_AU.ts similarity index 100% rename from examples/declarative/i18n/i18n/qml_en_AU.ts rename to examples/qml/i18n/i18n/qml_en_AU.ts diff --git a/examples/declarative/i18n/i18n/qml_fr.ts b/examples/qml/i18n/i18n/qml_fr.ts similarity index 100% rename from examples/declarative/i18n/i18n/qml_fr.ts rename to examples/qml/i18n/i18n/qml_fr.ts diff --git a/examples/declarative/locale/locale.qml b/examples/qml/locale/locale.qml similarity index 100% rename from examples/declarative/locale/locale.qml rename to examples/qml/locale/locale.qml diff --git a/examples/qml/qml.pro b/examples/qml/qml.pro new file mode 100644 index 0000000..9671085 --- /dev/null +++ b/examples/qml/qml.pro @@ -0,0 +1 @@ +TEMPLATE = subdirs diff --git a/examples/declarative/script/script.pro b/examples/qml/script/script.pro similarity index 100% rename from examples/declarative/script/script.pro rename to examples/qml/script/script.pro diff --git a/examples/declarative/script/shell/main.cpp b/examples/qml/script/shell/main.cpp similarity index 100% rename from examples/declarative/script/shell/main.cpp rename to examples/qml/script/shell/main.cpp diff --git a/examples/declarative/script/shell/shell.pro b/examples/qml/script/shell/shell.pro similarity index 100% rename from examples/declarative/script/shell/shell.pro rename to examples/qml/script/shell/shell.pro diff --git a/examples/declarative/xml/xmlhttprequest/data.xml b/examples/qml/xmlhttprequest/data.xml similarity index 100% rename from examples/declarative/xml/xmlhttprequest/data.xml rename to examples/qml/xmlhttprequest/data.xml diff --git a/examples/declarative/xml/xmlhttprequest/xmlhttprequest-example.qml b/examples/qml/xmlhttprequest/xmlhttprequest-example.qml similarity index 100% rename from examples/declarative/xml/xmlhttprequest/xmlhttprequest-example.qml rename to examples/qml/xmlhttprequest/xmlhttprequest-example.qml diff --git a/examples/qtquick/accessibility/accessibility.pro b/examples/qtquick/accessibility/accessibility.pro new file mode 100644 index 0000000..20d68e0 --- /dev/null +++ b/examples/qtquick/accessibility/accessibility.pro @@ -0,0 +1,10 @@ +TEMPLATE = app + +QT += quick declarative +SOURCES += main.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qtquick/accessibility +qml.files = accessibility.qml content +qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qtquick/accessibility +INSTALLS += target qml + diff --git a/examples/declarative/accessibility/accessibility.qml b/examples/qtquick/accessibility/accessibility.qml similarity index 91% rename from examples/declarative/accessibility/accessibility.qml rename to examples/qtquick/accessibility/accessibility.qml index 6fdcd38..ff115ab 100644 --- a/examples/declarative/accessibility/accessibility.qml +++ b/examples/qtquick/accessibility/accessibility.qml @@ -40,13 +40,19 @@ ****************************************************************************/ import QtQuick 2.0 -import QtQuick.Window 2.0 -import "widgets" +import "content" + +/*! + \title QtQuick Examples - Accessibility + \example qtquick/accessibility + \brief This example has accessible buttons. + +*/ Rectangle { id: window - width: 360; height: 300 + width: 320; height: 480 color: "white" Column { @@ -70,7 +76,6 @@ Rectangle { Accessible.role: Accessible.StaticText Accessible.name: text text: "Subject:" - width: 50 } Rectangle { id: subjectBorder @@ -79,7 +84,7 @@ Rectangle { border.width: 1 border.color: "black" height: subjectEdit.height - width: 304 + width: 240 TextInput { id: subjectEdit text: "Vacation plans" @@ -92,8 +97,8 @@ Rectangle { property alias text : textEdit.text border.width: 1 border.color: "black" - width: parent.width - height: textEdit.height + width: parent.width - 2 + height: parent.height - (textBorder.y + column.spacing) TextEdit { id: textEdit text: "Hi, we're going to the Dolomites this summer. Weren't you also going to northern Italy? \n\nbest wishes, your friend Luke" diff --git a/examples/qtquick/accessibility/accessibility.qmlproject b/examples/qtquick/accessibility/accessibility.qmlproject new file mode 100644 index 0000000..04a3190 --- /dev/null +++ b/examples/qtquick/accessibility/accessibility.qmlproject @@ -0,0 +1,16 @@ +import QmlProject 1.1 + +Project { + mainFile: "accessibility.qml" + + /* Include .qml, .js, and image files from current directory and subdirectories */ + QmlFiles { + directory: "." + } + JavaScriptFiles { + directory: "." + } + ImageFiles { + directory: "." + } +} diff --git a/examples/declarative/accessibility/widgets/Button.qml b/examples/qtquick/accessibility/content/Button.qml similarity index 98% rename from examples/declarative/accessibility/widgets/Button.qml rename to examples/qtquick/accessibility/content/Button.qml index 4a076fa..33cee80 100644 --- a/examples/declarative/accessibility/widgets/Button.qml +++ b/examples/qtquick/accessibility/content/Button.qml @@ -44,6 +44,7 @@ import QtQuick 2.0 Rectangle { id: button + property bool checked: false property alias text : buttonText.text Accessible.name: text Accessible.description: "This button does " + text diff --git a/examples/qtquick/accessibility/main.cpp b/examples/qtquick/accessibility/main.cpp new file mode 100644 index 0000000..89e23b4 --- /dev/null +++ b/examples/qtquick/accessibility/main.cpp @@ -0,0 +1,41 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include "../../shared/shared.h" +DECLARATIVE_EXAMPLE_MAIN(accessibility) diff --git a/examples/qtquick/animation/animation.pro b/examples/qtquick/animation/animation.pro new file mode 100644 index 0000000..7e4cf9e --- /dev/null +++ b/examples/qtquick/animation/animation.pro @@ -0,0 +1,10 @@ +TEMPLATE = app + +QT += quick declarative +SOURCES += main.cpp + +target.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qtquick/animation +qml.files = animation.qml basics behaviors easing pathanimation pathinterpolator states +qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/qtquick/animation +INSTALLS += target qml + diff --git a/examples/declarative/animation/animation.qml b/examples/qtquick/animation/animation.qml similarity index 69% rename from examples/declarative/animation/animation.qml rename to examples/qtquick/animation/animation.qml index 7c5829e..62a85a9 100644 --- a/examples/declarative/animation/animation.qml +++ b/examples/qtquick/animation/animation.qml @@ -39,19 +39,47 @@ ****************************************************************************/ import QtQuick 2.0 -import "../shared" +import "../../shared" as Examples + +/*! + \title QtQuick Examples - Animation + \example qtquick/animation + \brief This is a collection of QML Animation examples. + \image qml-animations-example.png + + This is a collection of small QML examples relating to animation. Each example is + a small QML file emphasizing a particular element or feature. + + ColorAnimation demonstrates using a color animation to fade a sky from day to night. + + PropertyAnimation demonstrates using a number animation to bounce a circle up and down. + + Behaviors demonstrates using behaviors to animate moving a rectangle to whereever you click. + + Wiggly Text demonstrates using more complex behaviors to animate and wiggle some text around as you drag it. + + Easing Curves shows off all the easing curves available in Qt Quick animations. + + States demonstrates how the properties of an item can vary between states. + + Transitions takes the States example and animates the property changes. + + PathAnimation animates an image along a beizer curve using a PathAnimation. + + PathInterpolator animates an image along the same beizer curve, using a PathInterpolator instead. +*/ Item { height: 480 width: 320 - LauncherList { + Examples.LauncherList { id: ll anchors.fill: parent Component.onCompleted: { addExample("ColorAnimation", "Interpolates between colors", Qt.resolvedUrl("basics/color-animation.qml")); addExample("PropertyAnimation", "Interpolates between numbers", Qt.resolvedUrl("basics/property-animation.qml")); addExample("Behaviors", "Animates procedural movement", Qt.resolvedUrl("behaviors/behavior-example.qml")); - addExample("WigglyText", "Text that wiggles as you drag it", Qt.resolvedUrl("behaviors/wigglytext.qml")); + addExample("Wiggly Text", "Text that wiggles as you drag it", Qt.resolvedUrl("behaviors/wigglytext.qml")); addExample("Easing Curves", "Compare available easing curves", Qt.resolvedUrl("easing/easing.qml")); addExample("States", "Simple states", Qt.resolvedUrl("states/states.qml")); addExample("Transitions", "Simple states with animated transitions", Qt.resolvedUrl("states/transitions.qml")); diff --git a/examples/declarative/animation/animation.qmlproject b/examples/qtquick/animation/animation.qmlproject similarity index 100% rename from examples/declarative/animation/animation.qmlproject rename to examples/qtquick/animation/animation.qmlproject diff --git a/examples/declarative/animation/basics/color-animation.qml b/examples/qtquick/animation/basics/color-animation.qml similarity index 99% rename from examples/declarative/animation/basics/color-animation.qml rename to examples/qtquick/animation/basics/color-animation.qml index a54091d..f1bf40c 100644 --- a/examples/declarative/animation/basics/color-animation.qml +++ b/examples/qtquick/animation/basics/color-animation.qml @@ -43,7 +43,7 @@ import QtQuick.Particles 2.0 Item { id: window - width: 640; height: 480 + width: 320; height: 480 // Let's draw the sky... Rectangle { diff --git a/examples/declarative/modelviews/parallax/content/pics/face-smile.png b/examples/qtquick/animation/basics/images/face-smile.png similarity index 100% rename from examples/declarative/modelviews/parallax/content/pics/face-smile.png rename to examples/qtquick/animation/basics/images/face-smile.png diff --git a/examples/declarative/animation/basics/images/moon.png b/examples/qtquick/animation/basics/images/moon.png similarity index 100% rename from examples/declarative/animation/basics/images/moon.png rename to examples/qtquick/animation/basics/images/moon.png diff --git a/examples/declarative/modelviews/parallax/content/pics/shadow.png b/examples/qtquick/animation/basics/images/shadow.png similarity index 100% rename from examples/declarative/modelviews/parallax/content/pics/shadow.png rename to examples/qtquick/animation/basics/images/shadow.png diff --git a/examples/declarative/animation/basics/images/star.png b/examples/qtquick/animation/basics/images/star.png similarity index 100% rename from examples/declarative/animation/basics/images/star.png rename to examples/qtquick/animation/basics/images/star.png diff --git a/examples/declarative/animation/basics/images/sun.png b/examples/qtquick/animation/basics/images/sun.png similarity index 100% rename from examples/declarative/animation/basics/images/sun.png rename to examples/qtquick/animation/basics/images/sun.png diff --git a/examples/declarative/animation/basics/property-animation.qml b/examples/qtquick/animation/basics/property-animation.qml similarity index 100% rename from examples/declarative/animation/basics/property-animation.qml rename to examples/qtquick/animation/basics/property-animation.qml diff --git a/examples/declarative/animation/behaviors/SideRect.qml b/examples/qtquick/animation/behaviors/SideRect.qml similarity index 100% rename from examples/declarative/animation/behaviors/SideRect.qml rename to examples/qtquick/animation/behaviors/SideRect.qml diff --git a/examples/declarative/animation/behaviors/behavior-example.qml b/examples/qtquick/animation/behaviors/behavior-example.qml similarity index 99% rename from examples/declarative/animation/behaviors/behavior-example.qml rename to examples/qtquick/animation/behaviors/behavior-example.qml index 89fc999..a88d7c8 100644 --- a/examples/declarative/animation/behaviors/behavior-example.qml +++ b/examples/qtquick/animation/behaviors/behavior-example.qml @@ -41,7 +41,7 @@ import QtQuick 2.0 Rectangle { - width: 600; height: 400 + width: 320; height: 480 color: "#343434" Rectangle { diff --git a/examples/declarative/animation/behaviors/wigglytext.qml b/examples/qtquick/animation/behaviors/wigglytext.qml similarity index 97% rename from examples/declarative/animation/behaviors/wigglytext.qml rename to examples/qtquick/animation/behaviors/wigglytext.qml index e2ed472..4bb94da 100644 --- a/examples/declarative/animation/behaviors/wigglytext.qml +++ b/examples/qtquick/animation/behaviors/wigglytext.qml @@ -43,10 +43,10 @@ import QtQuick 2.0 Rectangle { id: container - property string text: "Drag this text..." + property string text: "Drag me!" property bool animated: true - width: 640; height: 480; color: "#474747"; focus: true + width: 320; height: 480; color: "#474747"; focus: true Keys.onPressed: { if (event.key == Qt.Key_Delete || event.key == Qt.Key_Backspace) @@ -86,7 +86,7 @@ Rectangle { id: letter property variant follow - x: follow ? follow.x + follow.width : container.width / 3 + x: follow ? follow.x + follow.width : container.width / 6 y: follow ? follow.y : container.height / 2 font.pixelSize: 40; font.bold: true diff --git a/examples/declarative/toys/clocks/content/QuitButton.qml b/examples/qtquick/animation/easing/content/QuitButton.qml similarity index 100% rename from examples/declarative/toys/clocks/content/QuitButton.qml rename to examples/qtquick/animation/easing/content/QuitButton.qml diff --git a/examples/declarative/minehunt/MinehuntCore/pics/quit.png b/examples/qtquick/animation/easing/content/quit.png similarity index 100% rename from examples/declarative/minehunt/MinehuntCore/pics/quit.png rename to examples/qtquick/animation/easing/content/quit.png diff --git a/examples/declarative/animation/easing/easing.qml b/examples/qtquick/animation/easing/easing.qml similarity index 93% rename from examples/declarative/animation/easing/easing.qml rename to examples/qtquick/animation/easing/easing.qml index 207b653..8977029 100644 --- a/examples/declarative/animation/easing/easing.qml +++ b/examples/qtquick/animation/easing/easing.qml @@ -43,7 +43,7 @@ import "content" Rectangle { id: window - width: 600; height: 460; color: "#232323" + width: 320; height: 480; color: "#232323" property var easingCurve: [ 0.2, 0.2, 0.13, 0.65, 0.2, 0.8, 0.624, 0.98, 0.93, 0.95, 1, 1 ] @@ -141,22 +141,9 @@ Rectangle { Flickable { anchors.fill: parent - contentHeight: layout.height+50 - Rectangle { - id: titlePane - color: "#444444" - height: 35 - anchors { top: parent.top; left: parent.left; right: parent.right } - QuitButton { - id: quitButton - anchors.verticalCenter: parent.verticalCenter - anchors.right: parent.right - anchors.rightMargin: 10 - } - } + contentHeight: layout.height Column { id: layout - anchors { top: titlePane.bottom; topMargin: 10; left: parent.left; right: parent.right } Repeater { model: easingTypes; delegate: delegate } } } diff --git a/examples/qtquick/animation/main.cpp b/examples/qtquick/animation/main.cpp new file mode 100644 index 0000000..799dfd7 --- /dev/null +++ b/examples/qtquick/animation/main.cpp @@ -0,0 +1,41 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include "../../shared/shared.h" +DECLARATIVE_EXAMPLE_MAIN(animation) diff --git a/examples/declarative/animation/pathanimation/pathanimation.qml b/examples/qtquick/animation/pathanimation/pathanimation.qml similarity index 76% rename from examples/declarative/animation/pathanimation/pathanimation.qml rename to examples/qtquick/animation/pathanimation/pathanimation.qml index 4d0a31b..f995218 100644 --- a/examples/declarative/animation/pathanimation/pathanimation.qml +++ b/examples/qtquick/animation/pathanimation/pathanimation.qml @@ -42,8 +42,8 @@ import QtQuick 2.0 Rectangle { id: window - width: 400 - height: 400 + width: 320 + height: 480 Canvas { id: canvas @@ -51,6 +51,7 @@ Rectangle { smooth: true onPaint: { + var context = canvas.getContext("2d") context.clearRect(0, 0, width, height) context.strokeStyle = "black" context.path = pathAnim.path @@ -58,27 +59,33 @@ Rectangle { } } - PathAnimation { - id: pathAnim + SequentialAnimation { + running: true + loops: -1 - duration: 2000 - easing.type: Easing.InQuad + PauseAnimation { duration: 1000 } + PathAnimation { + id: pathAnim - target: box - orientation: PathAnimation.RightFirst - anchorPoint: Qt.point(box.width/2, box.height/2) - path: Path { - startX: 50; startY: 50 + duration: 2000 + easing.type: Easing.InQuad - PathCubic { - x: window.width - 50 - y: window.height - 50 + target: box + orientation: PathAnimation.RightFirst + anchorPoint: Qt.point(box.width/2, box.height/2) + path: Path { + startX: 50; startY: 50 - control1X: x; control1Y: 50 - control2X: 50; control2Y: y - } + PathCubic { + x: window.width - 50 + y: window.height - 50 + + control1X: x; control1Y: 50 + control2X: 50; control2Y: y + } - onChanged: canvas.requestPaint() + onChanged: canvas.requestPaint() + } } } @@ -95,14 +102,4 @@ Rectangle { text: "Box" } } - - MouseArea { - anchors.fill: parent - onClicked: pathAnim.restart() - } - - Text { - text: "Click anywhere to animate along the path" - anchors.horizontalCenter: parent.horizontalCenter - } } diff --git a/examples/declarative/animation/pathinterpolator/pathinterpolator.qml b/examples/qtquick/animation/pathinterpolator/pathinterpolator.qml similarity index 87% rename from examples/declarative/animation/pathinterpolator/pathinterpolator.qml rename to examples/qtquick/animation/pathinterpolator/pathinterpolator.qml index 67a34ce..5a137c7 100644 --- a/examples/declarative/animation/pathinterpolator/pathinterpolator.qml +++ b/examples/qtquick/animation/pathinterpolator/pathinterpolator.qml @@ -42,8 +42,8 @@ import QtQuick 2.0 Rectangle { id: window - width: 400 - height: 400 + width: 320 + height: 480 Canvas { id: canvas @@ -51,6 +51,7 @@ Rectangle { smooth: true onPaint: { + var context = canvas.getContext("2d") context.clearRect(0, 0, width, height) context.strokeStyle = "black" context.path = motionPath.path @@ -75,12 +76,17 @@ Rectangle { onChanged: canvas.requestPaint() } - NumberAnimation on progress { - id: progressAnim - running: false - from: 0; to: 1 - duration: 2000 - easing.type: Easing.InQuad + SequentialAnimation on progress { + running: true + loops: -1 + PauseAnimation { duration: 1000 } + NumberAnimation { + id: progressAnim + running: false + from: 0; to: 1 + duration: 2000 + easing.type: Easing.InQuad + } } } @@ -103,13 +109,4 @@ Rectangle { } } - MouseArea { - anchors.fill: parent - onClicked: progressAnim.restart() - } - - Text { - text: "Click anywhere to animate along the path" - anchors.horizontalCenter: parent.horizontalCenter - } } diff --git a/examples/declarative/keyinteraction/focus/Core/images/qt-logo.png b/examples/qtquick/animation/states/qt-logo.png similarity index 100% rename from examples/declarative/keyinteraction/focus/Core/images/qt-logo.png rename to examples/qtquick/animation/states/qt-logo.png diff --git a/examples/declarative/animation/states/states.qml b/examples/qtquick/animation/states/states.qml similarity index 100% rename from examples/declarative/animation/states/states.qml rename to examples/qtquick/animation/states/states.qml diff --git a/examples/declarative/animation/states/transitions.qml b/examples/qtquick/animation/states/transitions.qml similarity index 100% rename from examples/declarative/animation/states/transitions.qml rename to examples/qtquick/animation/states/transitions.qml diff --git a/examples/declarative/canvas/bezierCurve/bezierCurve.qml b/examples/qtquick/canvas/bezierCurve/bezierCurve.qml similarity index 100% rename from examples/declarative/canvas/bezierCurve/bezierCurve.qml rename to examples/qtquick/canvas/bezierCurve/bezierCurve.qml diff --git a/examples/declarative/canvas/clip/clip.qml b/examples/qtquick/canvas/clip/clip.qml similarity index 100% rename from examples/declarative/canvas/clip/clip.qml rename to examples/qtquick/canvas/clip/clip.qml diff --git a/examples/declarative/canvas/contents/Button.qml b/examples/qtquick/canvas/contents/Button.qml similarity index 100% rename from examples/declarative/canvas/contents/Button.qml rename to examples/qtquick/canvas/contents/Button.qml diff --git a/examples/declarative/canvas/contents/ScrollBar.qml b/examples/qtquick/canvas/contents/ScrollBar.qml similarity index 100% rename from examples/declarative/canvas/contents/ScrollBar.qml rename to examples/qtquick/canvas/contents/ScrollBar.qml diff --git a/examples/declarative/canvas/contents/Slider.qml b/examples/qtquick/canvas/contents/Slider.qml similarity index 100% rename from examples/declarative/canvas/contents/Slider.qml rename to examples/qtquick/canvas/contents/Slider.qml diff --git a/examples/declarative/canvas/contents/Stocks.qml b/examples/qtquick/canvas/contents/Stocks.qml similarity index 100% rename from examples/declarative/canvas/contents/Stocks.qml rename to examples/qtquick/canvas/contents/Stocks.qml diff --git a/examples/declarative/canvas/contents/TitleBar.qml b/examples/qtquick/canvas/contents/TitleBar.qml similarity index 100% rename from examples/declarative/canvas/contents/TitleBar.qml rename to examples/qtquick/canvas/contents/TitleBar.qml diff --git a/examples/declarative/canvas/contents/ToolBar.qml b/examples/qtquick/canvas/contents/ToolBar.qml similarity index 100% rename from examples/declarative/canvas/contents/ToolBar.qml rename to examples/qtquick/canvas/contents/ToolBar.qml diff --git a/examples/declarative/canvas/contents/images/button-pressed.png b/examples/qtquick/canvas/contents/images/button-pressed.png similarity index 100% rename from examples/declarative/canvas/contents/images/button-pressed.png rename to examples/qtquick/canvas/contents/images/button-pressed.png diff --git a/examples/declarative/canvas/contents/images/button.png b/examples/qtquick/canvas/contents/images/button.png similarity index 100% rename from examples/declarative/canvas/contents/images/button.png rename to examples/qtquick/canvas/contents/images/button.png diff --git a/examples/declarative/canvas/contents/images/default.svg b/examples/qtquick/canvas/contents/images/default.svg similarity index 100% rename from examples/declarative/canvas/contents/images/default.svg rename to examples/qtquick/canvas/contents/images/default.svg diff --git a/examples/declarative/canvas/contents/images/gloss.png b/examples/qtquick/canvas/contents/images/gloss.png similarity index 100% rename from examples/declarative/canvas/contents/images/gloss.png rename to examples/qtquick/canvas/contents/images/gloss.png diff --git a/examples/declarative/canvas/contents/images/lineedit.png b/examples/qtquick/canvas/contents/images/lineedit.png similarity index 100% rename from examples/declarative/canvas/contents/images/lineedit.png rename to examples/qtquick/canvas/contents/images/lineedit.png diff --git a/examples/declarative/canvas/contents/images/lineedit.sci b/examples/qtquick/canvas/contents/images/lineedit.sci similarity index 100% rename from examples/declarative/canvas/contents/images/lineedit.sci rename to examples/qtquick/canvas/contents/images/lineedit.sci diff --git a/examples/declarative/canvas/contents/images/quit.png b/examples/qtquick/canvas/contents/images/quit.png similarity index 100% rename from examples/declarative/canvas/contents/images/quit.png rename to examples/qtquick/canvas/contents/images/quit.png diff --git a/examples/declarative/canvas/contents/images/stripes.png b/examples/qtquick/canvas/contents/images/stripes.png similarity index 100% rename from examples/declarative/canvas/contents/images/stripes.png rename to examples/qtquick/canvas/contents/images/stripes.png diff --git a/examples/declarative/canvas/contents/images/titlebar.png b/examples/qtquick/canvas/contents/images/titlebar.png similarity index 100% rename from examples/declarative/canvas/contents/images/titlebar.png rename to examples/qtquick/canvas/contents/images/titlebar.png diff --git a/examples/declarative/canvas/contents/images/titlebar.sci b/examples/qtquick/canvas/contents/images/titlebar.sci similarity index 100% rename from examples/declarative/canvas/contents/images/titlebar.sci rename to examples/qtquick/canvas/contents/images/titlebar.sci diff --git a/examples/declarative/canvas/contents/images/toolbutton.png b/examples/qtquick/canvas/contents/images/toolbutton.png similarity index 100% rename from examples/declarative/canvas/contents/images/toolbutton.png rename to examples/qtquick/canvas/contents/images/toolbutton.png diff --git a/examples/declarative/canvas/contents/images/toolbutton.sci b/examples/qtquick/canvas/contents/images/toolbutton.sci similarity index 100% rename from examples/declarative/canvas/contents/images/toolbutton.sci rename to examples/qtquick/canvas/contents/images/toolbutton.sci diff --git a/examples/declarative/canvas/contents/qt-logo.png b/examples/qtquick/canvas/contents/qt-logo.png similarity index 100% rename from examples/declarative/canvas/contents/qt-logo.png rename to examples/qtquick/canvas/contents/qt-logo.png diff --git a/examples/declarative/canvas/quadraticCurveTo/quadraticCurveTo.qml b/examples/qtquick/canvas/quadraticCurveTo/quadraticCurveTo.qml similarity index 100% rename from examples/declarative/canvas/quadraticCurveTo/quadraticCurveTo.qml rename to examples/qtquick/canvas/quadraticCurveTo/quadraticCurveTo.qml diff --git a/examples/declarative/canvas/roundedrect/roundedrect.qml b/examples/qtquick/canvas/roundedrect/roundedrect.qml similarity index 100% rename from examples/declarative/canvas/roundedrect/roundedrect.qml rename to examples/qtquick/canvas/roundedrect/roundedrect.qml diff --git a/examples/declarative/canvas/smile/smile.qml b/examples/qtquick/canvas/smile/smile.qml similarity index 100% rename from examples/declarative/canvas/smile/smile.qml rename to examples/qtquick/canvas/smile/smile.qml diff --git a/examples/declarative/canvas/squircle/squircle.png b/examples/qtquick/canvas/squircle/squircle.png similarity index 100% rename from examples/declarative/canvas/squircle/squircle.png rename to examples/qtquick/canvas/squircle/squircle.png diff --git a/examples/declarative/canvas/squircle/squircle.qml b/examples/qtquick/canvas/squircle/squircle.qml similarity index 100% rename from examples/declarative/canvas/squircle/squircle.qml rename to examples/qtquick/canvas/squircle/squircle.qml diff --git a/examples/declarative/canvas/stockchart/README b/examples/qtquick/canvas/stockchart/README similarity index 100% rename from examples/declarative/canvas/stockchart/README rename to examples/qtquick/canvas/stockchart/README diff --git a/examples/declarative/canvas/stockchart/com/nokia/StockChartExample/qmldir b/examples/qtquick/canvas/stockchart/com/nokia/StockChartExample/qmldir similarity index 100% rename from examples/declarative/canvas/stockchart/com/nokia/StockChartExample/qmldir rename to examples/qtquick/canvas/stockchart/com/nokia/StockChartExample/qmldir diff --git a/examples/declarative/canvas/stockchart/model.cpp b/examples/qtquick/canvas/stockchart/model.cpp similarity index 100% rename from examples/declarative/canvas/stockchart/model.cpp rename to examples/qtquick/canvas/stockchart/model.cpp diff --git a/examples/declarative/canvas/stockchart/model.h b/examples/qtquick/canvas/stockchart/model.h similarity index 100% rename from examples/declarative/canvas/stockchart/model.h rename to examples/qtquick/canvas/stockchart/model.h diff --git a/examples/declarative/canvas/stockchart/plugin.cpp b/examples/qtquick/canvas/stockchart/plugin.cpp similarity index 100% rename from examples/declarative/canvas/stockchart/plugin.cpp rename to examples/qtquick/canvas/stockchart/plugin.cpp diff --git a/examples/declarative/canvas/stockchart/stock.qml b/examples/qtquick/canvas/stockchart/stock.qml similarity index 100% rename from examples/declarative/canvas/stockchart/stock.qml rename to examples/qtquick/canvas/stockchart/stock.qml diff --git a/examples/declarative/canvas/stockchart/stockchart.pro b/examples/qtquick/canvas/stockchart/stockchart.pro similarity index 100% rename from examples/declarative/canvas/stockchart/stockchart.pro rename to examples/qtquick/canvas/stockchart/stockchart.pro diff --git a/examples/declarative/canvas/tiger/tiger.js b/examples/qtquick/canvas/tiger/tiger.js similarity index 100% rename from examples/declarative/canvas/tiger/tiger.js rename to examples/qtquick/canvas/tiger/tiger.js diff --git a/examples/declarative/canvas/tiger/tiger.qml b/examples/qtquick/canvas/tiger/tiger.qml similarity index 100% rename from examples/declarative/canvas/tiger/tiger.qml rename to examples/qtquick/canvas/tiger/tiger.qml diff --git a/examples/declarative/canvas/twitterfriends/TwitterUser.qml b/examples/qtquick/canvas/twitterfriends/TwitterUser.qml similarity index 100% rename from examples/declarative/canvas/twitterfriends/TwitterUser.qml rename to examples/qtquick/canvas/twitterfriends/TwitterUser.qml diff --git a/examples/declarative/canvas/twitterfriends/cache.js b/examples/qtquick/canvas/twitterfriends/cache.js similarity index 100% rename from examples/declarative/canvas/twitterfriends/cache.js rename to examples/qtquick/canvas/twitterfriends/cache.js diff --git a/examples/declarative/canvas/twitterfriends/twitter.qml b/examples/qtquick/canvas/twitterfriends/twitter.qml similarity index 100% rename from examples/declarative/canvas/twitterfriends/twitter.qml rename to examples/qtquick/canvas/twitterfriends/twitter.qml diff --git a/examples/declarative/draganddrop/dragtarget.qmlproject b/examples/qtquick/draganddrop/dragtarget.qmlproject similarity index 100% rename from examples/declarative/draganddrop/dragtarget.qmlproject rename to examples/qtquick/draganddrop/dragtarget.qmlproject diff --git a/examples/declarative/draganddrop/tiles/DragTile.qml b/examples/qtquick/draganddrop/tiles/DragTile.qml similarity index 100% rename from examples/declarative/draganddrop/tiles/DragTile.qml rename to examples/qtquick/draganddrop/tiles/DragTile.qml diff --git a/examples/declarative/draganddrop/tiles/DropTile.qml b/examples/qtquick/draganddrop/tiles/DropTile.qml similarity index 100% rename from examples/declarative/draganddrop/tiles/DropTile.qml rename to examples/qtquick/draganddrop/tiles/DropTile.qml diff --git a/examples/declarative/draganddrop/tiles/tiles.qml b/examples/qtquick/draganddrop/tiles/tiles.qml similarity index 100% rename from examples/declarative/draganddrop/tiles/tiles.qml rename to examples/qtquick/draganddrop/tiles/tiles.qml diff --git a/examples/declarative/draganddrop/views/gridview.qml b/examples/qtquick/draganddrop/views/gridview.qml similarity index 100% rename from examples/declarative/draganddrop/views/gridview.qml rename to examples/qtquick/draganddrop/views/gridview.qml diff --git a/examples/qtquick/imageelements/borderimage.qml b/examples/qtquick/imageelements/borderimage.qml new file mode 100644 index 0000000..7e13249 --- /dev/null +++ b/examples/qtquick/imageelements/borderimage.qml @@ -0,0 +1,103 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import "content" + +Rectangle { + id: page + width: 320 + height: 480 + + Flickable { + anchors.fill: parent + contentWidth: 1030 + contentHeight: 540 + Grid { + anchors.centerIn: parent; spacing: 20 + + MyBorderImage { + minWidth: 120; maxWidth: 240; minHeight: 120; maxHeight: 240 + source: "content/colors.png"; margin: 30 + } + + MyBorderImage { + minWidth: 120; maxWidth: 240; minHeight: 120; maxHeight: 240 + source: "content/colors.png"; margin: 30 + horizontalMode: BorderImage.Repeat; verticalMode: BorderImage.Repeat + } + + MyBorderImage { + minWidth: 120; maxWidth: 240; minHeight: 120; maxHeight: 240 + source: "content/colors.png"; margin: 30 + horizontalMode: BorderImage.Stretch; verticalMode: BorderImage.Repeat + } + + MyBorderImage { + minWidth: 120; maxWidth: 240; minHeight: 120; maxHeight: 240 + source: "content/colors.png"; margin: 30 + horizontalMode: BorderImage.Round; verticalMode: BorderImage.Round + } + + MyBorderImage { + minWidth: 60; maxWidth: 200; minHeight: 40; maxHeight: 200 + source: "content/bw.png"; margin: 10 + } + + MyBorderImage { + minWidth: 60; maxWidth: 200; minHeight: 40; maxHeight: 200 + source: "content/bw.png"; margin: 10 + horizontalMode: BorderImage.Repeat; verticalMode: BorderImage.Repeat + } + + MyBorderImage { + minWidth: 60; maxWidth: 200; minHeight: 40; maxHeight: 200 + source: "content/bw.png"; margin: 10 + horizontalMode: BorderImage.Stretch; verticalMode: BorderImage.Repeat + } + + MyBorderImage { + minWidth: 60; maxWidth: 200; minHeight: 40; maxHeight: 200 + source: "content/bw.png"; margin: 10 + horizontalMode: BorderImage.Round; verticalMode: BorderImage.Round + } + } + } +} diff --git a/examples/declarative/imageelements/content/BearSheet.png b/examples/qtquick/imageelements/content/BearSheet.png similarity index 100% rename from examples/declarative/imageelements/content/BearSheet.png rename to examples/qtquick/imageelements/content/BearSheet.png diff --git a/examples/declarative/imageelements/content/ImageCell.qml b/examples/qtquick/imageelements/content/ImageCell.qml similarity index 100% rename from examples/declarative/imageelements/content/ImageCell.qml rename to examples/qtquick/imageelements/content/ImageCell.qml diff --git a/examples/declarative/imageelements/content/MyBorderImage.qml b/examples/qtquick/imageelements/content/MyBorderImage.qml similarity index 100% rename from examples/declarative/imageelements/content/MyBorderImage.qml rename to examples/qtquick/imageelements/content/MyBorderImage.qml diff --git a/examples/declarative/imageelements/content/ShadowRectangle.qml b/examples/qtquick/imageelements/content/ShadowRectangle.qml similarity index 100% rename from examples/declarative/imageelements/content/ShadowRectangle.qml rename to examples/qtquick/imageelements/content/ShadowRectangle.qml diff --git a/examples/declarative/imageelements/content/bw.png b/examples/qtquick/imageelements/content/bw.png similarity index 100% rename from examples/declarative/imageelements/content/bw.png rename to examples/qtquick/imageelements/content/bw.png diff --git a/examples/declarative/imageelements/content/colors-round.sci b/examples/qtquick/imageelements/content/colors-round.sci similarity index 100% rename from examples/declarative/imageelements/content/colors-round.sci rename to examples/qtquick/imageelements/content/colors-round.sci diff --git a/examples/declarative/imageelements/content/colors-stretch.sci b/examples/qtquick/imageelements/content/colors-stretch.sci similarity index 100% rename from examples/declarative/imageelements/content/colors-stretch.sci rename to examples/qtquick/imageelements/content/colors-stretch.sci diff --git a/examples/declarative/imageelements/content/colors.png b/examples/qtquick/imageelements/content/colors.png similarity index 100% rename from examples/declarative/imageelements/content/colors.png rename to examples/qtquick/imageelements/content/colors.png diff --git a/examples/declarative/imageelements/content/qt-logo.png b/examples/qtquick/imageelements/content/qt-logo.png similarity index 100% rename from examples/declarative/imageelements/content/qt-logo.png rename to examples/qtquick/imageelements/content/qt-logo.png diff --git a/examples/declarative/imageelements/content/shadow.png b/examples/qtquick/imageelements/content/shadow.png similarity index 100% rename from examples/declarative/imageelements/content/shadow.png rename to examples/qtquick/imageelements/content/shadow.png diff --git a/examples/declarative/imageelements/content/speaker.png b/examples/qtquick/imageelements/content/speaker.png similarity index 100% rename from examples/declarative/imageelements/content/speaker.png rename to examples/qtquick/imageelements/content/speaker.png diff --git a/examples/qtquick/imageelements/image.qml b/examples/qtquick/imageelements/image.qml new file mode 100644 index 0000000..1595589 --- /dev/null +++ b/examples/qtquick/imageelements/image.qml @@ -0,0 +1,72 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +import "content" + +Rectangle { + width: 320 + height: 480 + Flickable { + anchors.fill: parent + contentWidth: 490 + contentHeight: 285 + + Grid { + property int cellWidth: (width - (spacing * (columns - 1))) / columns + property int cellHeight: (height - (spacing * (rows - 1))) / rows + + anchors.fill: parent + anchors.margins: 30 + + columns: 3 + rows: 2 + spacing: 30 + + ImageCell { mode: Image.Stretch; caption: "Stretch" } + ImageCell { mode: Image.PreserveAspectFit; caption: "PreserveAspectFit" } + ImageCell { mode: Image.PreserveAspectCrop; caption: "PreserveAspectCrop" } + + ImageCell { mode: Image.Tile; caption: "Tile" } + ImageCell { mode: Image.TileHorizontally; caption: "TileHorizontally" } + ImageCell { mode: Image.TileVertically; caption: "TileVertically" } + } + } +} diff --git a/examples/declarative/imageelements/imageelements.qml b/examples/qtquick/imageelements/imageelements.qml similarity index 99% rename from examples/declarative/imageelements/imageelements.qml rename to examples/qtquick/imageelements/imageelements.qml index 2ef5154..f4075ec 100644 --- a/examples/declarative/imageelements/imageelements.qml +++ b/examples/qtquick/imageelements/imageelements.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.0 -import "../shared" +import "../../shared" Item { height: 480 diff --git a/examples/declarative/imageelements/imageelements.qmlproject b/examples/qtquick/imageelements/imageelements.qmlproject similarity index 100% rename from examples/declarative/imageelements/imageelements.qmlproject rename to examples/qtquick/imageelements/imageelements.qmlproject diff --git a/examples/declarative/imageelements/shadows.qml b/examples/qtquick/imageelements/shadows.qml similarity index 100% rename from examples/declarative/imageelements/shadows.qml rename to examples/qtquick/imageelements/shadows.qml diff --git a/examples/declarative/imageelements/simplesprite.qml b/examples/qtquick/imageelements/simplesprite.qml similarity index 100% rename from examples/declarative/imageelements/simplesprite.qml rename to examples/qtquick/imageelements/simplesprite.qml diff --git a/examples/declarative/imageelements/spriteimage.qml b/examples/qtquick/imageelements/spriteimage.qml similarity index 100% rename from examples/declarative/imageelements/spriteimage.qml rename to examples/qtquick/imageelements/spriteimage.qml diff --git a/examples/declarative/keyinteraction/focus/Core/ContextMenu.qml b/examples/qtquick/keyinteraction/focus/Core/ContextMenu.qml similarity index 100% rename from examples/declarative/keyinteraction/focus/Core/ContextMenu.qml rename to examples/qtquick/keyinteraction/focus/Core/ContextMenu.qml diff --git a/examples/declarative/keyinteraction/focus/Core/GridMenu.qml b/examples/qtquick/keyinteraction/focus/Core/GridMenu.qml similarity index 100% rename from examples/declarative/keyinteraction/focus/Core/GridMenu.qml rename to examples/qtquick/keyinteraction/focus/Core/GridMenu.qml diff --git a/examples/declarative/keyinteraction/focus/Core/ListMenu.qml b/examples/qtquick/keyinteraction/focus/Core/ListMenu.qml similarity index 100% rename from examples/declarative/keyinteraction/focus/Core/ListMenu.qml rename to examples/qtquick/keyinteraction/focus/Core/ListMenu.qml diff --git a/examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml b/examples/qtquick/keyinteraction/focus/Core/ListViewDelegate.qml similarity index 100% rename from examples/declarative/keyinteraction/focus/Core/ListViewDelegate.qml rename to examples/qtquick/keyinteraction/focus/Core/ListViewDelegate.qml diff --git a/examples/declarative/keyinteraction/focus/Core/images/arrow.png b/examples/qtquick/keyinteraction/focus/Core/images/arrow.png similarity index 100% rename from examples/declarative/keyinteraction/focus/Core/images/arrow.png rename to examples/qtquick/keyinteraction/focus/Core/images/arrow.png diff --git a/examples/declarative/animation/states/qt-logo.png b/examples/qtquick/keyinteraction/focus/Core/images/qt-logo.png similarity index 100% rename from examples/declarative/animation/states/qt-logo.png rename to examples/qtquick/keyinteraction/focus/Core/images/qt-logo.png diff --git a/examples/declarative/keyinteraction/focus/focus.qml b/examples/qtquick/keyinteraction/focus/focus.qml similarity index 100% rename from examples/declarative/keyinteraction/focus/focus.qml rename to examples/qtquick/keyinteraction/focus/focus.qml diff --git a/examples/declarative/modelviews/abstractitemmodel/abstractitemmodel.pro b/examples/qtquick/modelviews/abstractitemmodel/abstractitemmodel.pro similarity index 100% rename from examples/declarative/modelviews/abstractitemmodel/abstractitemmodel.pro rename to examples/qtquick/modelviews/abstractitemmodel/abstractitemmodel.pro diff --git a/examples/declarative/modelviews/abstractitemmodel/abstractitemmodel.qrc b/examples/qtquick/modelviews/abstractitemmodel/abstractitemmodel.qrc similarity index 100% rename from examples/declarative/modelviews/abstractitemmodel/abstractitemmodel.qrc rename to examples/qtquick/modelviews/abstractitemmodel/abstractitemmodel.qrc diff --git a/examples/declarative/modelviews/abstractitemmodel/main.cpp b/examples/qtquick/modelviews/abstractitemmodel/main.cpp similarity index 100% rename from examples/declarative/modelviews/abstractitemmodel/main.cpp rename to examples/qtquick/modelviews/abstractitemmodel/main.cpp diff --git a/examples/declarative/modelviews/abstractitemmodel/model.cpp b/examples/qtquick/modelviews/abstractitemmodel/model.cpp similarity index 100% rename from examples/declarative/modelviews/abstractitemmodel/model.cpp rename to examples/qtquick/modelviews/abstractitemmodel/model.cpp diff --git a/examples/declarative/modelviews/abstractitemmodel/model.h b/examples/qtquick/modelviews/abstractitemmodel/model.h similarity index 100% rename from examples/declarative/modelviews/abstractitemmodel/model.h rename to examples/qtquick/modelviews/abstractitemmodel/model.h diff --git a/examples/declarative/modelviews/abstractitemmodel/view.qml b/examples/qtquick/modelviews/abstractitemmodel/view.qml similarity index 100% rename from examples/declarative/modelviews/abstractitemmodel/view.qml rename to examples/qtquick/modelviews/abstractitemmodel/view.qml diff --git a/examples/declarative/modelviews/gridview/gridview-example.qml b/examples/qtquick/modelviews/gridview/gridview-example.qml similarity index 100% rename from examples/declarative/modelviews/gridview/gridview-example.qml rename to examples/qtquick/modelviews/gridview/gridview-example.qml diff --git a/examples/declarative/modelviews/pathview/pics/AddressBook_48.png b/examples/qtquick/modelviews/gridview/pics/AddressBook_48.png similarity index 100% rename from examples/declarative/modelviews/pathview/pics/AddressBook_48.png rename to examples/qtquick/modelviews/gridview/pics/AddressBook_48.png diff --git a/examples/declarative/modelviews/pathview/pics/AudioPlayer_48.png b/examples/qtquick/modelviews/gridview/pics/AudioPlayer_48.png similarity index 100% rename from examples/declarative/modelviews/pathview/pics/AudioPlayer_48.png rename to examples/qtquick/modelviews/gridview/pics/AudioPlayer_48.png diff --git a/examples/declarative/modelviews/pathview/pics/Camera_48.png b/examples/qtquick/modelviews/gridview/pics/Camera_48.png similarity index 100% rename from examples/declarative/modelviews/pathview/pics/Camera_48.png rename to examples/qtquick/modelviews/gridview/pics/Camera_48.png diff --git a/examples/declarative/modelviews/pathview/pics/DateBook_48.png b/examples/qtquick/modelviews/gridview/pics/DateBook_48.png similarity index 100% rename from examples/declarative/modelviews/pathview/pics/DateBook_48.png rename to examples/qtquick/modelviews/gridview/pics/DateBook_48.png diff --git a/examples/declarative/modelviews/pathview/pics/EMail_48.png b/examples/qtquick/modelviews/gridview/pics/EMail_48.png similarity index 100% rename from examples/declarative/modelviews/pathview/pics/EMail_48.png rename to examples/qtquick/modelviews/gridview/pics/EMail_48.png diff --git a/examples/declarative/modelviews/pathview/pics/TodoList_48.png b/examples/qtquick/modelviews/gridview/pics/TodoList_48.png similarity index 100% rename from examples/declarative/modelviews/pathview/pics/TodoList_48.png rename to examples/qtquick/modelviews/gridview/pics/TodoList_48.png diff --git a/examples/declarative/modelviews/pathview/pics/VideoPlayer_48.png b/examples/qtquick/modelviews/gridview/pics/VideoPlayer_48.png similarity index 100% rename from examples/declarative/modelviews/pathview/pics/VideoPlayer_48.png rename to examples/qtquick/modelviews/gridview/pics/VideoPlayer_48.png diff --git a/examples/declarative/tutorials/dynamicview/dynamicview4/PetsModel.qml b/examples/qtquick/modelviews/listview/content/PetsModel.qml similarity index 100% rename from examples/declarative/tutorials/dynamicview/dynamicview4/PetsModel.qml rename to examples/qtquick/modelviews/listview/content/PetsModel.qml diff --git a/examples/declarative/modelviews/listview/content/PressAndHoldButton.qml b/examples/qtquick/modelviews/listview/content/PressAndHoldButton.qml similarity index 100% rename from examples/declarative/modelviews/listview/content/PressAndHoldButton.qml rename to examples/qtquick/modelviews/listview/content/PressAndHoldButton.qml diff --git a/examples/declarative/modelviews/listview/content/RecipesModel.qml b/examples/qtquick/modelviews/listview/content/RecipesModel.qml similarity index 100% rename from examples/declarative/modelviews/listview/content/RecipesModel.qml rename to examples/qtquick/modelviews/listview/content/RecipesModel.qml diff --git a/examples/declarative/modelviews/listview/content/TextButton.qml b/examples/qtquick/modelviews/listview/content/TextButton.qml similarity index 100% rename from examples/declarative/modelviews/listview/content/TextButton.qml rename to examples/qtquick/modelviews/listview/content/TextButton.qml diff --git a/examples/declarative/modelviews/listview/content/ToggleButton.qml b/examples/qtquick/modelviews/listview/content/ToggleButton.qml similarity index 100% rename from examples/declarative/modelviews/listview/content/ToggleButton.qml rename to examples/qtquick/modelviews/listview/content/ToggleButton.qml diff --git a/examples/declarative/modelviews/listview/content/pics/arrow-down.png b/examples/qtquick/modelviews/listview/content/pics/arrow-down.png similarity index 100% rename from examples/declarative/modelviews/listview/content/pics/arrow-down.png rename to examples/qtquick/modelviews/listview/content/pics/arrow-down.png diff --git a/examples/declarative/modelviews/listview/content/pics/arrow-up.png b/examples/qtquick/modelviews/listview/content/pics/arrow-up.png similarity index 100% rename from examples/declarative/modelviews/listview/content/pics/arrow-up.png rename to examples/qtquick/modelviews/listview/content/pics/arrow-up.png diff --git a/examples/declarative/modelviews/listview/content/pics/fruit-salad.jpg b/examples/qtquick/modelviews/listview/content/pics/fruit-salad.jpg similarity index 100% rename from examples/declarative/modelviews/listview/content/pics/fruit-salad.jpg rename to examples/qtquick/modelviews/listview/content/pics/fruit-salad.jpg diff --git a/examples/declarative/modelviews/listview/content/pics/hamburger.jpg b/examples/qtquick/modelviews/listview/content/pics/hamburger.jpg similarity index 100% rename from examples/declarative/modelviews/listview/content/pics/hamburger.jpg rename to examples/qtquick/modelviews/listview/content/pics/hamburger.jpg diff --git a/examples/declarative/modelviews/listview/content/pics/lemonade.jpg b/examples/qtquick/modelviews/listview/content/pics/lemonade.jpg similarity index 100% rename from examples/declarative/modelviews/listview/content/pics/lemonade.jpg rename to examples/qtquick/modelviews/listview/content/pics/lemonade.jpg diff --git a/examples/declarative/modelviews/listview/content/pics/list-delete.png b/examples/qtquick/modelviews/listview/content/pics/list-delete.png similarity index 100% rename from examples/declarative/modelviews/listview/content/pics/list-delete.png rename to examples/qtquick/modelviews/listview/content/pics/list-delete.png diff --git a/examples/declarative/modelviews/listview/content/pics/minus-sign.png b/examples/qtquick/modelviews/listview/content/pics/minus-sign.png similarity index 100% rename from examples/declarative/modelviews/listview/content/pics/minus-sign.png rename to examples/qtquick/modelviews/listview/content/pics/minus-sign.png diff --git a/examples/declarative/modelviews/listview/content/pics/moreDown.png b/examples/qtquick/modelviews/listview/content/pics/moreDown.png similarity index 100% rename from examples/declarative/modelviews/listview/content/pics/moreDown.png rename to examples/qtquick/modelviews/listview/content/pics/moreDown.png diff --git a/examples/declarative/modelviews/listview/content/pics/moreUp.png b/examples/qtquick/modelviews/listview/content/pics/moreUp.png similarity index 100% rename from examples/declarative/modelviews/listview/content/pics/moreUp.png rename to examples/qtquick/modelviews/listview/content/pics/moreUp.png diff --git a/examples/declarative/modelviews/listview/content/pics/pancakes.jpg b/examples/qtquick/modelviews/listview/content/pics/pancakes.jpg similarity index 100% rename from examples/declarative/modelviews/listview/content/pics/pancakes.jpg rename to examples/qtquick/modelviews/listview/content/pics/pancakes.jpg diff --git a/examples/declarative/modelviews/listview/content/pics/plus-sign.png b/examples/qtquick/modelviews/listview/content/pics/plus-sign.png similarity index 100% rename from examples/declarative/modelviews/listview/content/pics/plus-sign.png rename to examples/qtquick/modelviews/listview/content/pics/plus-sign.png diff --git a/examples/declarative/modelviews/listview/content/pics/vegetable-soup.jpg b/examples/qtquick/modelviews/listview/content/pics/vegetable-soup.jpg similarity index 100% rename from examples/declarative/modelviews/listview/content/pics/vegetable-soup.jpg rename to examples/qtquick/modelviews/listview/content/pics/vegetable-soup.jpg diff --git a/examples/declarative/modelviews/listview/dynamiclist.qml b/examples/qtquick/modelviews/listview/dynamiclist.qml similarity index 100% rename from examples/declarative/modelviews/listview/dynamiclist.qml rename to examples/qtquick/modelviews/listview/dynamiclist.qml diff --git a/examples/declarative/modelviews/listview/expandingdelegates.qml b/examples/qtquick/modelviews/listview/expandingdelegates.qml similarity index 100% rename from examples/declarative/modelviews/listview/expandingdelegates.qml rename to examples/qtquick/modelviews/listview/expandingdelegates.qml diff --git a/examples/declarative/modelviews/listview/highlight.qml b/examples/qtquick/modelviews/listview/highlight.qml similarity index 100% rename from examples/declarative/modelviews/listview/highlight.qml rename to examples/qtquick/modelviews/listview/highlight.qml diff --git a/examples/declarative/modelviews/listview/highlightranges.qml b/examples/qtquick/modelviews/listview/highlightranges.qml similarity index 100% rename from examples/declarative/modelviews/listview/highlightranges.qml rename to examples/qtquick/modelviews/listview/highlightranges.qml diff --git a/examples/declarative/modelviews/listview/sections.qml b/examples/qtquick/modelviews/listview/sections.qml similarity index 100% rename from examples/declarative/modelviews/listview/sections.qml rename to examples/qtquick/modelviews/listview/sections.qml diff --git a/examples/declarative/modelviews/modelviews.pro b/examples/qtquick/modelviews/modelviews.pro similarity index 100% rename from examples/declarative/modelviews/modelviews.pro rename to examples/qtquick/modelviews/modelviews.pro diff --git a/examples/declarative/modelviews/modelviews.qml b/examples/qtquick/modelviews/modelviews.qml similarity index 99% rename from examples/declarative/modelviews/modelviews.qml rename to examples/qtquick/modelviews/modelviews.qml index 86b10ca..f11608b 100644 --- a/examples/declarative/modelviews/modelviews.qml +++ b/examples/qtquick/modelviews/modelviews.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.0 -import "../shared" +import "../../shared" Item { height: 480 diff --git a/examples/declarative/modelviews/modelviews.qmlproject b/examples/qtquick/modelviews/modelviews.qmlproject similarity index 100% rename from examples/declarative/modelviews/modelviews.qmlproject rename to examples/qtquick/modelviews/modelviews.qmlproject diff --git a/examples/declarative/modelviews/objectlistmodel/dataobject.cpp b/examples/qtquick/modelviews/objectlistmodel/dataobject.cpp similarity index 100% rename from examples/declarative/modelviews/objectlistmodel/dataobject.cpp rename to examples/qtquick/modelviews/objectlistmodel/dataobject.cpp diff --git a/examples/declarative/modelviews/objectlistmodel/dataobject.h b/examples/qtquick/modelviews/objectlistmodel/dataobject.h similarity index 100% rename from examples/declarative/modelviews/objectlistmodel/dataobject.h rename to examples/qtquick/modelviews/objectlistmodel/dataobject.h diff --git a/examples/declarative/modelviews/objectlistmodel/main.cpp b/examples/qtquick/modelviews/objectlistmodel/main.cpp similarity index 100% rename from examples/declarative/modelviews/objectlistmodel/main.cpp rename to examples/qtquick/modelviews/objectlistmodel/main.cpp diff --git a/examples/declarative/modelviews/objectlistmodel/objectlistmodel.pro b/examples/qtquick/modelviews/objectlistmodel/objectlistmodel.pro similarity index 100% rename from examples/declarative/modelviews/objectlistmodel/objectlistmodel.pro rename to examples/qtquick/modelviews/objectlistmodel/objectlistmodel.pro diff --git a/examples/declarative/modelviews/objectlistmodel/objectlistmodel.qmlproject b/examples/qtquick/modelviews/objectlistmodel/objectlistmodel.qmlproject similarity index 100% rename from examples/declarative/modelviews/objectlistmodel/objectlistmodel.qmlproject rename to examples/qtquick/modelviews/objectlistmodel/objectlistmodel.qmlproject diff --git a/examples/declarative/modelviews/objectlistmodel/objectlistmodel.qrc b/examples/qtquick/modelviews/objectlistmodel/objectlistmodel.qrc similarity index 100% rename from examples/declarative/modelviews/objectlistmodel/objectlistmodel.qrc rename to examples/qtquick/modelviews/objectlistmodel/objectlistmodel.qrc diff --git a/examples/declarative/modelviews/objectlistmodel/view.qml b/examples/qtquick/modelviews/objectlistmodel/view.qml similarity index 100% rename from examples/declarative/modelviews/objectlistmodel/view.qml rename to examples/qtquick/modelviews/objectlistmodel/view.qml diff --git a/examples/declarative/modelviews/package/Delegate.qml b/examples/qtquick/modelviews/package/Delegate.qml similarity index 100% rename from examples/declarative/modelviews/package/Delegate.qml rename to examples/qtquick/modelviews/package/Delegate.qml diff --git a/examples/declarative/modelviews/package/view.qml b/examples/qtquick/modelviews/package/view.qml similarity index 96% rename from examples/declarative/modelviews/package/view.qml rename to examples/qtquick/modelviews/package/view.qml index 5b2fd94..7ba6664 100644 --- a/examples/declarative/modelviews/package/view.qml +++ b/examples/qtquick/modelviews/package/view.qml @@ -73,4 +73,8 @@ Rectangle { model: visualModel.parts.grid } //![0] + Text { + anchors.bottom: parent.bottom + text: "Tap a delegate to move between views" + } } diff --git a/examples/qtquick/modelviews/parallax/content/Clock.qml b/examples/qtquick/modelviews/parallax/content/Clock.qml new file mode 100644 index 0000000..7f0e8cb --- /dev/null +++ b/examples/qtquick/modelviews/parallax/content/Clock.qml @@ -0,0 +1,143 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Item { + id : clock + width: { + if (ListView.view && ListView.view.width >= 200) + return ListView.view.width / Math.floor(ListView.view.width / 200.0); + else + return 200; + } + + height: { + if (ListView.view && ListView.view.height >= 240) + return ListView.view.height; + else + return 240; + } + + property alias city: cityLabel.text + property int hours + property int minutes + property int seconds + property real shift + property bool night: false + property bool internationalTime: true //Unset for local time + + function timeChanged() { + var date = new Date; + hours = internationalTime ? date.getUTCHours() + Math.floor(clock.shift) : date.getHours() + night = ( hours < 7 || hours > 19 ) + minutes = internationalTime ? date.getUTCMinutes() + ((clock.shift % 1) * 60) : date.getMinutes() + seconds = date.getUTCSeconds(); + } + + Timer { + interval: 100; running: true; repeat: true; + onTriggered: clock.timeChanged() + } + + Item { + anchors.centerIn: parent + width: 200; height: 240 + + Image { id: background; source: "clock.png"; visible: clock.night == false } + Image { source: "clock-night.png"; visible: clock.night == true } + + + Image { + x: 92.5; y: 27 + source: "hour.png" + smooth: true + transform: Rotation { + id: hourRotation + origin.x: 7.5; origin.y: 73; + angle: (clock.hours * 30) + (clock.minutes * 0.5) + Behavior on angle { + SpringAnimation { spring: 2; damping: 0.2; modulus: 360 } + } + } + } + + Image { + x: 93.5; y: 17 + source: "minute.png" + smooth: true + transform: Rotation { + id: minuteRotation + origin.x: 6.5; origin.y: 83; + angle: clock.minutes * 6 + Behavior on angle { + SpringAnimation { spring: 2; damping: 0.2; modulus: 360 } + } + } + } + + Image { + x: 97.5; y: 20 + source: "second.png" + smooth: true + transform: Rotation { + id: secondRotation + origin.x: 2.5; origin.y: 80; + angle: clock.seconds * 6 + Behavior on angle { + SpringAnimation { spring: 2; damping: 0.2; modulus: 360 } + } + } + } + + Image { + anchors.centerIn: background; source: "center.png" + } + + Text { + id: cityLabel + y: 210; anchors.horizontalCenter: parent.horizontalCenter + color: "white" + font.family: "Helvetica" + font.bold: true; font.pixelSize: 16 + style: Text.Raised; styleColor: "black" + } + } +} diff --git a/examples/declarative/modelviews/parallax/content/ParallaxView.qml b/examples/qtquick/modelviews/parallax/content/ParallaxView.qml similarity index 100% rename from examples/declarative/modelviews/parallax/content/ParallaxView.qml rename to examples/qtquick/modelviews/parallax/content/ParallaxView.qml diff --git a/examples/declarative/animation/easing/content/QuitButton.qml b/examples/qtquick/modelviews/parallax/content/QuitButton.qml similarity index 100% rename from examples/declarative/animation/easing/content/QuitButton.qml rename to examples/qtquick/modelviews/parallax/content/QuitButton.qml diff --git a/examples/declarative/modelviews/parallax/content/Smiley.qml b/examples/qtquick/modelviews/parallax/content/Smiley.qml similarity index 100% rename from examples/declarative/modelviews/parallax/content/Smiley.qml rename to examples/qtquick/modelviews/parallax/content/Smiley.qml diff --git a/examples/qtquick/modelviews/parallax/content/background.png b/examples/qtquick/modelviews/parallax/content/background.png new file mode 100644 index 0000000..a885950 Binary files /dev/null and b/examples/qtquick/modelviews/parallax/content/background.png differ diff --git a/examples/qtquick/modelviews/parallax/content/center.png b/examples/qtquick/modelviews/parallax/content/center.png new file mode 100644 index 0000000..7fbd802 Binary files /dev/null and b/examples/qtquick/modelviews/parallax/content/center.png differ diff --git a/examples/qtquick/modelviews/parallax/content/clock-night.png b/examples/qtquick/modelviews/parallax/content/clock-night.png new file mode 100644 index 0000000..cc7151a Binary files /dev/null and b/examples/qtquick/modelviews/parallax/content/clock-night.png differ diff --git a/examples/qtquick/modelviews/parallax/content/clock.png b/examples/qtquick/modelviews/parallax/content/clock.png new file mode 100644 index 0000000..462edac Binary files /dev/null and b/examples/qtquick/modelviews/parallax/content/clock.png differ diff --git a/examples/qtquick/modelviews/parallax/content/hour.png b/examples/qtquick/modelviews/parallax/content/hour.png new file mode 100644 index 0000000..f8061a1 Binary files /dev/null and b/examples/qtquick/modelviews/parallax/content/hour.png differ diff --git a/examples/qtquick/modelviews/parallax/content/minute.png b/examples/qtquick/modelviews/parallax/content/minute.png new file mode 100644 index 0000000..1297ec7 Binary files /dev/null and b/examples/qtquick/modelviews/parallax/content/minute.png differ diff --git a/examples/declarative/modelviews/parallax/content/pics/background.jpg b/examples/qtquick/modelviews/parallax/content/pics/background.jpg similarity index 100% rename from examples/declarative/modelviews/parallax/content/pics/background.jpg rename to examples/qtquick/modelviews/parallax/content/pics/background.jpg diff --git a/examples/declarative/minehunt/MinehuntCore/pics/face-smile.png b/examples/qtquick/modelviews/parallax/content/pics/face-smile.png similarity index 100% rename from examples/declarative/minehunt/MinehuntCore/pics/face-smile.png rename to examples/qtquick/modelviews/parallax/content/pics/face-smile.png diff --git a/examples/declarative/modelviews/parallax/content/pics/home-page.png b/examples/qtquick/modelviews/parallax/content/pics/home-page.png similarity index 100% rename from examples/declarative/modelviews/parallax/content/pics/home-page.png rename to examples/qtquick/modelviews/parallax/content/pics/home-page.png diff --git a/examples/declarative/modelviews/parallax/content/pics/home-page.svg b/examples/qtquick/modelviews/parallax/content/pics/home-page.svg similarity index 100% rename from examples/declarative/modelviews/parallax/content/pics/home-page.svg rename to examples/qtquick/modelviews/parallax/content/pics/home-page.svg diff --git a/examples/declarative/animation/basics/images/shadow.png b/examples/qtquick/modelviews/parallax/content/pics/shadow.png similarity index 100% rename from examples/declarative/animation/basics/images/shadow.png rename to examples/qtquick/modelviews/parallax/content/pics/shadow.png diff --git a/examples/declarative/modelviews/parallax/content/pics/yast-joystick.png b/examples/qtquick/modelviews/parallax/content/pics/yast-joystick.png similarity index 100% rename from examples/declarative/modelviews/parallax/content/pics/yast-joystick.png rename to examples/qtquick/modelviews/parallax/content/pics/yast-joystick.png diff --git a/examples/declarative/modelviews/parallax/content/pics/yast-wol.png b/examples/qtquick/modelviews/parallax/content/pics/yast-wol.png similarity index 100% rename from examples/declarative/modelviews/parallax/content/pics/yast-wol.png rename to examples/qtquick/modelviews/parallax/content/pics/yast-wol.png diff --git a/examples/declarative/animation/easing/content/quit.png b/examples/qtquick/modelviews/parallax/content/quit.png similarity index 100% rename from examples/declarative/animation/easing/content/quit.png rename to examples/qtquick/modelviews/parallax/content/quit.png diff --git a/examples/qtquick/modelviews/parallax/content/second.png b/examples/qtquick/modelviews/parallax/content/second.png new file mode 100644 index 0000000..4aa9fb5 Binary files /dev/null and b/examples/qtquick/modelviews/parallax/content/second.png differ diff --git a/examples/declarative/modelviews/parallax/parallax.qml b/examples/qtquick/modelviews/parallax/parallax.qml similarity index 97% rename from examples/declarative/modelviews/parallax/parallax.qml rename to examples/qtquick/modelviews/parallax/parallax.qml index 6981095..30578e5 100644 --- a/examples/declarative/modelviews/parallax/parallax.qml +++ b/examples/qtquick/modelviews/parallax/parallax.qml @@ -39,7 +39,6 @@ ****************************************************************************/ import QtQuick 2.0 -import "../../toys/clocks/content" // for loading the Clock element import "content" Rectangle { diff --git a/examples/declarative/modelviews/pathview/pathview-example.qml b/examples/qtquick/modelviews/pathview/pathview-example.qml similarity index 100% rename from examples/declarative/modelviews/pathview/pathview-example.qml rename to examples/qtquick/modelviews/pathview/pathview-example.qml diff --git a/examples/declarative/modelviews/gridview/pics/AddressBook_48.png b/examples/qtquick/modelviews/pathview/pics/AddressBook_48.png similarity index 100% rename from examples/declarative/modelviews/gridview/pics/AddressBook_48.png rename to examples/qtquick/modelviews/pathview/pics/AddressBook_48.png diff --git a/examples/declarative/modelviews/gridview/pics/AudioPlayer_48.png b/examples/qtquick/modelviews/pathview/pics/AudioPlayer_48.png similarity index 100% rename from examples/declarative/modelviews/gridview/pics/AudioPlayer_48.png rename to examples/qtquick/modelviews/pathview/pics/AudioPlayer_48.png diff --git a/examples/declarative/modelviews/gridview/pics/Camera_48.png b/examples/qtquick/modelviews/pathview/pics/Camera_48.png similarity index 100% rename from examples/declarative/modelviews/gridview/pics/Camera_48.png rename to examples/qtquick/modelviews/pathview/pics/Camera_48.png diff --git a/examples/declarative/modelviews/gridview/pics/DateBook_48.png b/examples/qtquick/modelviews/pathview/pics/DateBook_48.png similarity index 100% rename from examples/declarative/modelviews/gridview/pics/DateBook_48.png rename to examples/qtquick/modelviews/pathview/pics/DateBook_48.png diff --git a/examples/declarative/modelviews/gridview/pics/EMail_48.png b/examples/qtquick/modelviews/pathview/pics/EMail_48.png similarity index 100% rename from examples/declarative/modelviews/gridview/pics/EMail_48.png rename to examples/qtquick/modelviews/pathview/pics/EMail_48.png diff --git a/examples/declarative/modelviews/gridview/pics/TodoList_48.png b/examples/qtquick/modelviews/pathview/pics/TodoList_48.png similarity index 100% rename from examples/declarative/modelviews/gridview/pics/TodoList_48.png rename to examples/qtquick/modelviews/pathview/pics/TodoList_48.png diff --git a/examples/declarative/modelviews/gridview/pics/VideoPlayer_48.png b/examples/qtquick/modelviews/pathview/pics/VideoPlayer_48.png similarity index 100% rename from examples/declarative/modelviews/gridview/pics/VideoPlayer_48.png rename to examples/qtquick/modelviews/pathview/pics/VideoPlayer_48.png diff --git a/examples/declarative/modelviews/stringlistmodel/main.cpp b/examples/qtquick/modelviews/stringlistmodel/main.cpp similarity index 100% rename from examples/declarative/modelviews/stringlistmodel/main.cpp rename to examples/qtquick/modelviews/stringlistmodel/main.cpp diff --git a/examples/declarative/modelviews/stringlistmodel/stringlistmodel.pro b/examples/qtquick/modelviews/stringlistmodel/stringlistmodel.pro similarity index 100% rename from examples/declarative/modelviews/stringlistmodel/stringlistmodel.pro rename to examples/qtquick/modelviews/stringlistmodel/stringlistmodel.pro diff --git a/examples/declarative/modelviews/stringlistmodel/stringlistmodel.qrc b/examples/qtquick/modelviews/stringlistmodel/stringlistmodel.qrc similarity index 100% rename from examples/declarative/modelviews/stringlistmodel/stringlistmodel.qrc rename to examples/qtquick/modelviews/stringlistmodel/stringlistmodel.qrc diff --git a/examples/declarative/modelviews/stringlistmodel/view.qml b/examples/qtquick/modelviews/stringlistmodel/view.qml similarity index 100% rename from examples/declarative/modelviews/stringlistmodel/view.qml rename to examples/qtquick/modelviews/stringlistmodel/view.qml diff --git a/examples/declarative/modelviews/visualdatamodel/dragselection.qml b/examples/qtquick/modelviews/visualdatamodel/dragselection.qml similarity index 100% rename from examples/declarative/modelviews/visualdatamodel/dragselection.qml rename to examples/qtquick/modelviews/visualdatamodel/dragselection.qml diff --git a/examples/declarative/modelviews/visualdatamodel/slideshow.qml b/examples/qtquick/modelviews/visualdatamodel/slideshow.qml similarity index 100% rename from examples/declarative/modelviews/visualdatamodel/slideshow.qml rename to examples/qtquick/modelviews/visualdatamodel/slideshow.qml diff --git a/examples/declarative/modelviews/visualdatamodel/sortedmodel.qml b/examples/qtquick/modelviews/visualdatamodel/sortedmodel.qml similarity index 100% rename from examples/declarative/modelviews/visualdatamodel/sortedmodel.qml rename to examples/qtquick/modelviews/visualdatamodel/sortedmodel.qml diff --git a/examples/declarative/modelviews/visualdatamodel/visualdatamodel.qmlproject b/examples/qtquick/modelviews/visualdatamodel/visualdatamodel.qmlproject similarity index 100% rename from examples/declarative/modelviews/visualdatamodel/visualdatamodel.qmlproject rename to examples/qtquick/modelviews/visualdatamodel/visualdatamodel.qmlproject diff --git a/examples/declarative/modelviews/visualitemmodel/visualitemmodel.qml b/examples/qtquick/modelviews/visualitemmodel/visualitemmodel.qml similarity index 98% rename from examples/declarative/modelviews/visualitemmodel/visualitemmodel.qml rename to examples/qtquick/modelviews/visualitemmodel/visualitemmodel.qml index 3425150..2e012ad 100644 --- a/examples/declarative/modelviews/visualitemmodel/visualitemmodel.qml +++ b/examples/qtquick/modelviews/visualitemmodel/visualitemmodel.qml @@ -44,9 +44,10 @@ import QtQuick 2.0 Rectangle { + id: root color: "lightgray" - width: 240 - height: 320 + width: 320 + height: 480 property bool printDestruction: false VisualItemModel { @@ -87,7 +88,7 @@ Rectangle { } Rectangle { - width: 240; height: 30 + width: root.width; height: 30 anchors { top: view.bottom; bottom: parent.bottom } color: "gray" diff --git a/examples/declarative/touchinteraction/mousearea/mousearea-example.qml b/examples/qtquick/mousearea/mousearea-example.qml similarity index 100% rename from examples/declarative/touchinteraction/mousearea/mousearea-example.qml rename to examples/qtquick/mousearea/mousearea-example.qml diff --git a/examples/declarative/openglunderqml/main.cpp b/examples/qtquick/openglunderqml/main.cpp similarity index 100% rename from examples/declarative/openglunderqml/main.cpp rename to examples/qtquick/openglunderqml/main.cpp diff --git a/examples/declarative/openglunderqml/main.qml b/examples/qtquick/openglunderqml/main.qml similarity index 100% rename from examples/declarative/openglunderqml/main.qml rename to examples/qtquick/openglunderqml/main.qml diff --git a/examples/declarative/openglunderqml/openglunderqml.pro b/examples/qtquick/openglunderqml/openglunderqml.pro similarity index 100% rename from examples/declarative/openglunderqml/openglunderqml.pro rename to examples/qtquick/openglunderqml/openglunderqml.pro diff --git a/examples/declarative/openglunderqml/squircle.cpp b/examples/qtquick/openglunderqml/squircle.cpp similarity index 100% rename from examples/declarative/openglunderqml/squircle.cpp rename to examples/qtquick/openglunderqml/squircle.cpp diff --git a/examples/declarative/openglunderqml/squircle.h b/examples/qtquick/openglunderqml/squircle.h similarity index 100% rename from examples/declarative/openglunderqml/squircle.h rename to examples/qtquick/openglunderqml/squircle.h diff --git a/examples/declarative/painteditem/painteditem.pro b/examples/qtquick/painteditem/painteditem.pro similarity index 100% rename from examples/declarative/painteditem/painteditem.pro rename to examples/qtquick/painteditem/painteditem.pro diff --git a/examples/declarative/painteditem/smile/main.cpp b/examples/qtquick/painteditem/smile/main.cpp similarity index 100% rename from examples/declarative/painteditem/smile/main.cpp rename to examples/qtquick/painteditem/smile/main.cpp diff --git a/examples/declarative/painteditem/smile/smile.pro b/examples/qtquick/painteditem/smile/smile.pro similarity index 100% rename from examples/declarative/painteditem/smile/smile.pro rename to examples/qtquick/painteditem/smile/smile.pro diff --git a/examples/declarative/painteditem/smile/smile.qml b/examples/qtquick/painteditem/smile/smile.qml similarity index 100% rename from examples/declarative/painteditem/smile/smile.qml rename to examples/qtquick/painteditem/smile/smile.qml diff --git a/examples/declarative/painteditem/textballoons/TextBalloonPlugin/plugin.h b/examples/qtquick/painteditem/textballoons/TextBalloonPlugin/plugin.h similarity index 100% rename from examples/declarative/painteditem/textballoons/TextBalloonPlugin/plugin.h rename to examples/qtquick/painteditem/textballoons/TextBalloonPlugin/plugin.h diff --git a/examples/declarative/painteditem/textballoons/TextBalloonPlugin/qmldir b/examples/qtquick/painteditem/textballoons/TextBalloonPlugin/qmldir similarity index 100% rename from examples/declarative/painteditem/textballoons/TextBalloonPlugin/qmldir rename to examples/qtquick/painteditem/textballoons/TextBalloonPlugin/qmldir diff --git a/examples/declarative/painteditem/textballoons/textballoon.cpp b/examples/qtquick/painteditem/textballoons/textballoon.cpp similarity index 100% rename from examples/declarative/painteditem/textballoons/textballoon.cpp rename to examples/qtquick/painteditem/textballoons/textballoon.cpp diff --git a/examples/declarative/painteditem/textballoons/textballoon.h b/examples/qtquick/painteditem/textballoons/textballoon.h similarity index 100% rename from examples/declarative/painteditem/textballoons/textballoon.h rename to examples/qtquick/painteditem/textballoons/textballoon.h diff --git a/examples/declarative/painteditem/textballoons/textballoons.pro b/examples/qtquick/painteditem/textballoons/textballoons.pro similarity index 100% rename from examples/declarative/painteditem/textballoons/textballoons.pro rename to examples/qtquick/painteditem/textballoons/textballoons.pro diff --git a/examples/declarative/painteditem/textballoons/textballoons.qml b/examples/qtquick/painteditem/textballoons/textballoons.qml similarity index 100% rename from examples/declarative/painteditem/textballoons/textballoons.qml rename to examples/qtquick/painteditem/textballoons/textballoons.qml diff --git a/examples/declarative/positioners/content/Button.qml b/examples/qtquick/positioners/content/Button.qml similarity index 100% rename from examples/declarative/positioners/content/Button.qml rename to examples/qtquick/positioners/content/Button.qml diff --git a/examples/declarative/positioners/content/add.png b/examples/qtquick/positioners/content/add.png similarity index 100% rename from examples/declarative/positioners/content/add.png rename to examples/qtquick/positioners/content/add.png diff --git a/examples/declarative/positioners/content/del.png b/examples/qtquick/positioners/content/del.png similarity index 100% rename from examples/declarative/positioners/content/del.png rename to examples/qtquick/positioners/content/del.png diff --git a/examples/declarative/positioners/positioners-attachedproperties.qml b/examples/qtquick/positioners/positioners-attachedproperties.qml similarity index 100% rename from examples/declarative/positioners/positioners-attachedproperties.qml rename to examples/qtquick/positioners/positioners-attachedproperties.qml diff --git a/examples/declarative/positioners/positioners.qml b/examples/qtquick/positioners/positioners.qml similarity index 98% rename from examples/declarative/positioners/positioners.qml rename to examples/qtquick/positioners/positioners.qml index d9d1664..6627ad7 100644 --- a/examples/declarative/positioners/positioners.qml +++ b/examples/qtquick/positioners/positioners.qml @@ -43,7 +43,10 @@ import "content" Rectangle { id: page - width: 420; height: 420 + width: 320; height: 480 + Flickable { + anchors.fill: parent + contentWidth: 420; contentHeight: 420 Column { id: layout1 @@ -261,4 +264,5 @@ Rectangle { Rectangle { color: "red"; width: 80; height: 50; border.color: "black"; radius: 15 } } + } } diff --git a/examples/qtquick/qtquick.pro b/examples/qtquick/qtquick.pro new file mode 100644 index 0000000..2ffc377 --- /dev/null +++ b/examples/qtquick/qtquick.pro @@ -0,0 +1,17 @@ +TEMPLATE = subdirs +SUBDIRS = accessibility \ + animation + #canvas \ + #draganddrop \ + #imageelements \ + #keyinteraction \ + #modelviews \ + #mousearea \ + #openglunderqml \ + #painteditem \ + #positioners \ + #righttoleft \ + #shadereffects \ + #text \ + #threading \ + #touchinteraction diff --git a/examples/declarative/righttoleft/layoutdirection/layoutdirection.qml b/examples/qtquick/righttoleft/layoutdirection/layoutdirection.qml similarity index 100% rename from examples/declarative/righttoleft/layoutdirection/layoutdirection.qml rename to examples/qtquick/righttoleft/layoutdirection/layoutdirection.qml diff --git a/examples/declarative/righttoleft/layoutdirection/layoutdirection.qmlproject b/examples/qtquick/righttoleft/layoutdirection/layoutdirection.qmlproject similarity index 100% rename from examples/declarative/righttoleft/layoutdirection/layoutdirection.qmlproject rename to examples/qtquick/righttoleft/layoutdirection/layoutdirection.qmlproject diff --git a/examples/declarative/righttoleft/layoutmirroring/layoutmirroring.qml b/examples/qtquick/righttoleft/layoutmirroring/layoutmirroring.qml similarity index 100% rename from examples/declarative/righttoleft/layoutmirroring/layoutmirroring.qml rename to examples/qtquick/righttoleft/layoutmirroring/layoutmirroring.qml diff --git a/examples/declarative/righttoleft/layoutmirroring/layoutmirroring.qmlproject b/examples/qtquick/righttoleft/layoutmirroring/layoutmirroring.qmlproject similarity index 100% rename from examples/declarative/righttoleft/layoutmirroring/layoutmirroring.qmlproject rename to examples/qtquick/righttoleft/layoutmirroring/layoutmirroring.qmlproject diff --git a/examples/declarative/righttoleft/textalignment/textalignment.qml b/examples/qtquick/righttoleft/textalignment/textalignment.qml similarity index 100% rename from examples/declarative/righttoleft/textalignment/textalignment.qml rename to examples/qtquick/righttoleft/textalignment/textalignment.qml diff --git a/examples/declarative/righttoleft/textalignment/textalignment.qmlproject b/examples/qtquick/righttoleft/textalignment/textalignment.qmlproject similarity index 100% rename from examples/declarative/righttoleft/textalignment/textalignment.qmlproject rename to examples/qtquick/righttoleft/textalignment/textalignment.qmlproject diff --git a/examples/declarative/shadereffects/content/Slider.qml b/examples/qtquick/shadereffects/content/Slider.qml similarity index 100% rename from examples/declarative/shadereffects/content/Slider.qml rename to examples/qtquick/shadereffects/content/Slider.qml diff --git a/examples/declarative/animation/basics/images/face-smile.png b/examples/qtquick/shadereffects/content/face-smile.png similarity index 100% rename from examples/declarative/animation/basics/images/face-smile.png rename to examples/qtquick/shadereffects/content/face-smile.png diff --git a/examples/declarative/shadereffects/content/qt-logo.png b/examples/qtquick/shadereffects/content/qt-logo.png similarity index 100% rename from examples/declarative/shadereffects/content/qt-logo.png rename to examples/qtquick/shadereffects/content/qt-logo.png diff --git a/examples/qtquick/shadereffects/shadereffects.qml b/examples/qtquick/shadereffects/shadereffects.qml new file mode 100644 index 0000000..70bcf13 --- /dev/null +++ b/examples/qtquick/shadereffects/shadereffects.qml @@ -0,0 +1,315 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the Declarative module 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 "content" + +Image { + width: 320 + height: 480 +/*! + \title QML Examples - Shader Effects + \example declarative/shadereffects + \image qml-shadereffects-example.png + \brief This is a shader effects example + + This example demonstrates a couple of visual effects that you can perform + with shaders in QtQuick 2.0 +*/ + source: "../snake/content/pics/background.png" + + Flickable { + anchors.fill: parent + contentWidth: 640 + contentHeight: 360 + + ShaderEffectSource { + id: theSource + sourceItem: theItem + smooth: true + } + + function saturate(x) { + return Math.min(Math.max(x, 0), 1) + } + + function sliderToColor(x) { + return Qt.rgba(saturate(Math.max(2 - 6 * x, 6 * x - 4)), + saturate(Math.min(6 * x, 4 - 6 * x)), + saturate(Math.min(6 * x - 2, 6 - 6 * x))) + } + + Grid { + anchors.centerIn: parent + columns: 3 + + Item { + id: theItem + width: 180 + height: 180 + ListView { + anchors.centerIn: parent + width: 160 + height: 140 + clip: true + snapMode: ListView.SnapOneItem + model: VisualItemModel { + Text { + width: 160 + height: 140 + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + font.pixelSize: 120 + font.family: "Times" + color: "blue" + text: "Qt" + } + Image { + width: 160 + height: 140 + source: "content/qt-logo.png" + smooth: true + } + Image { + width: 160 + height: 140 + source: "content/face-smile.png" + smooth: true + } + } + } + } + ShaderEffect { + width: 180 + height: 180 + property variant source: theSource + property real amplitude: 0.04 * wobbleSlider.value + property real frequency: 20 + property real time: 0 + NumberAnimation on time { loops: Animation.Infinite; from: 0; to: Math.PI * 2; duration: 600 } + fragmentShader: + "uniform lowp float qt_Opacity;" + + "uniform highp float amplitude;" + + "uniform highp float frequency;" + + "uniform highp float time;" + + "uniform sampler2D source;" + + "varying highp vec2 qt_TexCoord0;" + + "void main() {" + + " highp vec2 p = sin(time + frequency * qt_TexCoord0);" + + " gl_FragColor = texture2D(source, qt_TexCoord0 + amplitude * vec2(p.y, -p.x)) * qt_Opacity;" + + "}" + Slider { + id: wobbleSlider + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: parent.bottom + height: 40 + } + } + ShaderEffect { + width: 180 + height: 180 + property variant source: theSource + property variant shadow: ShaderEffectSource { + smooth: true + sourceItem: ShaderEffect { + width: theItem.width + height: theItem.height + property variant delta: Qt.size(0.0, 1.0 / height) + property variant source: ShaderEffectSource { + smooth: true + sourceItem: ShaderEffect { + width: theItem.width + height: theItem.height + property variant delta: Qt.size(1.0 / width, 0.0) + property variant source: theSource + fragmentShader: " + uniform lowp float qt_Opacity; + uniform sampler2D source; + uniform highp vec2 delta; + varying highp vec2 qt_TexCoord0; + void main() { + gl_FragColor =(0.0538 * texture2D(source, qt_TexCoord0 - 3.182 * delta) + + 0.3229 * texture2D(source, qt_TexCoord0 - 1.364 * delta) + + 0.2466 * texture2D(source, qt_TexCoord0) + + 0.3229 * texture2D(source, qt_TexCoord0 + 1.364 * delta) + + 0.0538 * texture2D(source, qt_TexCoord0 + 3.182 * delta)) * qt_Opacity; + }" + } + } + fragmentShader: " + uniform lowp float qt_Opacity; + uniform sampler2D source; + uniform highp vec2 delta; + varying highp vec2 qt_TexCoord0; + void main() { + gl_FragColor =(0.0538 * texture2D(source, qt_TexCoord0 - 3.182 * delta) + + 0.3229 * texture2D(source, qt_TexCoord0 - 1.364 * delta) + + 0.2466 * texture2D(source, qt_TexCoord0) + + 0.3229 * texture2D(source, qt_TexCoord0 + 1.364 * delta) + + 0.0538 * texture2D(source, qt_TexCoord0 + 3.182 * delta)) * qt_Opacity; + }" + } + } + property real angle: 0 + property variant offset: Qt.point(15.0 * Math.cos(angle), 15.0 * Math.sin(angle)) + NumberAnimation on angle { loops: Animation.Infinite; from: 0; to: Math.PI * 2; duration: 6000 } + property variant delta: Qt.size(offset.x / width, offset.y / height) + property real darkness: shadowSlider.value + fragmentShader: " + uniform lowp float qt_Opacity; + uniform highp vec2 offset; + uniform sampler2D source; + uniform sampler2D shadow; + uniform highp float darkness; + uniform highp vec2 delta; + varying highp vec2 qt_TexCoord0; + void main() { + lowp vec4 fg = texture2D(source, qt_TexCoord0); + lowp vec4 bg = texture2D(shadow, qt_TexCoord0 + delta); + gl_FragColor = (fg + vec4(0., 0., 0., darkness * bg.a) * (1. - fg.a)) * qt_Opacity; + }" + Slider { + id: shadowSlider + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: parent.bottom + height: 40 + } + } + ShaderEffect { + width: 180 + height: 180 + property variant source: theSource + property variant delta: Qt.size(0.5 / width, 0.5 / height) + fragmentShader: " + uniform sampler2D source; + uniform highp vec2 delta; + uniform highp float qt_Opacity; + varying highp vec2 qt_TexCoord0; + void main() { + lowp vec4 tl = texture2D(source, qt_TexCoord0 - delta); + lowp vec4 tr = texture2D(source, qt_TexCoord0 + vec2(delta.x, -delta.y)); + lowp vec4 bl = texture2D(source, qt_TexCoord0 - vec2(delta.x, -delta.y)); + lowp vec4 br = texture2D(source, qt_TexCoord0 + delta); + lowp vec4 gx = (tl + bl) - (tr + br); + lowp vec4 gy = (tl + tr) - (bl + br); + gl_FragColor.xyz = vec3(0.); + gl_FragColor.w = clamp(dot(sqrt(gx * gx + gy * gy), vec4(1.)), 0., 1.) * qt_Opacity; + }" + } + ShaderEffect { + width: 180 + height: 180 + property variant source: theSource + property color tint: sliderToColor(colorizeSlider.value) + fragmentShader: " + uniform sampler2D source; + uniform lowp vec4 tint; + uniform lowp float qt_Opacity; + varying highp vec2 qt_TexCoord0; + void main() { + lowp vec4 c = texture2D(source, qt_TexCoord0); + lowp float lo = min(min(c.x, c.y), c.z); + lowp float hi = max(max(c.x, c.y), c.z); + gl_FragColor = qt_Opacity * vec4(mix(vec3(lo), vec3(hi), tint.xyz), c.w); + }" + Slider { + id: colorizeSlider + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: parent.bottom + height: 40 + } + } + ShaderEffect { + width: 180 + height: 180 + mesh: Qt.size(10, 10) + property variant source: theSource + property real bend: 0 + property real minimize: 0 + property real side: genieSlider.value + SequentialAnimation on bend { + loops: Animation.Infinite + NumberAnimation { to: 1; duration: 700; easing.type: Easing.InOutSine } + PauseAnimation { duration: 1600 } + NumberAnimation { to: 0; duration: 700; easing.type: Easing.InOutSine } + PauseAnimation { duration: 1000 } + } + SequentialAnimation on minimize { + loops: Animation.Infinite + PauseAnimation { duration: 300 } + NumberAnimation { to: 1; duration: 700; easing.type: Easing.InOutSine } + PauseAnimation { duration: 1000 } + NumberAnimation { to: 0; duration: 700; easing.type: Easing.InOutSine } + PauseAnimation { duration: 1300 } + } + vertexShader: " + uniform highp mat4 qt_Matrix; + uniform highp float bend; + uniform highp float minimize; + uniform highp float side; + uniform highp float width; + uniform highp float height; + attribute highp vec4 qt_Vertex; + attribute highp vec2 qt_MultiTexCoord0; + varying highp vec2 qt_TexCoord0; + void main() { + qt_TexCoord0 = qt_MultiTexCoord0; + highp vec4 pos = qt_Vertex; + pos.y = mix(qt_Vertex.y, height, minimize); + highp float t = pos.y / height; + t = (3. - 2. * t) * t * t; + pos.x = mix(qt_Vertex.x, side * width, t * bend); + gl_Position = qt_Matrix * pos; + }" + Slider { + id: genieSlider + anchors.left: parent.left + anchors.right: parent.right + anchors.bottom: parent.bottom + height: 40 + } + } + } + } +} diff --git a/examples/declarative/text/fonts/availableFonts.qml b/examples/qtquick/text/fonts/availableFonts.qml similarity index 100% rename from examples/declarative/text/fonts/availableFonts.qml rename to examples/qtquick/text/fonts/availableFonts.qml diff --git a/examples/declarative/text/fonts/banner.qml b/examples/qtquick/text/fonts/banner.qml similarity index 100% rename from examples/declarative/text/fonts/banner.qml rename to examples/qtquick/text/fonts/banner.qml diff --git a/examples/declarative/text/fonts/content/fonts/tarzeau_ocr_a.ttf b/examples/qtquick/text/fonts/content/fonts/tarzeau_ocr_a.ttf similarity index 100% rename from examples/declarative/text/fonts/content/fonts/tarzeau_ocr_a.ttf rename to examples/qtquick/text/fonts/content/fonts/tarzeau_ocr_a.ttf diff --git a/examples/declarative/text/fonts/fonts.qml b/examples/qtquick/text/fonts/fonts.qml similarity index 100% rename from examples/declarative/text/fonts/fonts.qml rename to examples/qtquick/text/fonts/fonts.qml diff --git a/examples/declarative/text/fonts/hello.qml b/examples/qtquick/text/fonts/hello.qml similarity index 100% rename from examples/declarative/text/fonts/hello.qml rename to examples/qtquick/text/fonts/hello.qml diff --git a/examples/declarative/text/imgtag/TextWithImage.qml b/examples/qtquick/text/imgtag/TextWithImage.qml similarity index 100% rename from examples/declarative/text/imgtag/TextWithImage.qml rename to examples/qtquick/text/imgtag/TextWithImage.qml diff --git a/examples/declarative/text/imgtag/images/face-sad.png b/examples/qtquick/text/imgtag/images/face-sad.png similarity index 100% rename from examples/declarative/text/imgtag/images/face-sad.png rename to examples/qtquick/text/imgtag/images/face-sad.png diff --git a/examples/declarative/text/imgtag/images/face-smile-big.png b/examples/qtquick/text/imgtag/images/face-smile-big.png similarity index 100% rename from examples/declarative/text/imgtag/images/face-smile-big.png rename to examples/qtquick/text/imgtag/images/face-smile-big.png diff --git a/examples/declarative/text/imgtag/images/face-smile.png b/examples/qtquick/text/imgtag/images/face-smile.png similarity index 100% rename from examples/declarative/text/imgtag/images/face-smile.png rename to examples/qtquick/text/imgtag/images/face-smile.png diff --git a/examples/declarative/text/imgtag/images/heart200.png b/examples/qtquick/text/imgtag/images/heart200.png similarity index 100% rename from examples/declarative/text/imgtag/images/heart200.png rename to examples/qtquick/text/imgtag/images/heart200.png diff --git a/examples/declarative/text/imgtag/images/qtlogo.png b/examples/qtquick/text/imgtag/images/qtlogo.png similarity index 100% rename from examples/declarative/text/imgtag/images/qtlogo.png rename to examples/qtquick/text/imgtag/images/qtlogo.png diff --git a/examples/declarative/text/imgtag/images/starfish_2.png b/examples/qtquick/text/imgtag/images/starfish_2.png similarity index 100% rename from examples/declarative/text/imgtag/images/starfish_2.png rename to examples/qtquick/text/imgtag/images/starfish_2.png diff --git a/examples/declarative/text/imgtag/imgtag.qml b/examples/qtquick/text/imgtag/imgtag.qml similarity index 100% rename from examples/declarative/text/imgtag/imgtag.qml rename to examples/qtquick/text/imgtag/imgtag.qml diff --git a/examples/declarative/text/styledtext-layout.qml b/examples/qtquick/text/styledtext-layout.qml similarity index 100% rename from examples/declarative/text/styledtext-layout.qml rename to examples/qtquick/text/styledtext-layout.qml diff --git a/examples/declarative/text/text.qml b/examples/qtquick/text/text.qml similarity index 99% rename from examples/declarative/text/text.qml rename to examples/qtquick/text/text.qml index 14a88d2..9bfd290 100644 --- a/examples/declarative/text/text.qml +++ b/examples/qtquick/text/text.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.0 -import "../shared" +import "../../shared" Item { height: 480 diff --git a/examples/declarative/text/text.qmlproject b/examples/qtquick/text/text.qmlproject similarity index 100% rename from examples/declarative/text/text.qmlproject rename to examples/qtquick/text/text.qmlproject diff --git a/examples/declarative/text/textselection/pics/endHandle.png b/examples/qtquick/text/textselection/pics/endHandle.png similarity index 100% rename from examples/declarative/text/textselection/pics/endHandle.png rename to examples/qtquick/text/textselection/pics/endHandle.png diff --git a/examples/declarative/text/textselection/pics/endHandle.sci b/examples/qtquick/text/textselection/pics/endHandle.sci similarity index 100% rename from examples/declarative/text/textselection/pics/endHandle.sci rename to examples/qtquick/text/textselection/pics/endHandle.sci diff --git a/examples/declarative/text/textselection/pics/startHandle.png b/examples/qtquick/text/textselection/pics/startHandle.png similarity index 100% rename from examples/declarative/text/textselection/pics/startHandle.png rename to examples/qtquick/text/textselection/pics/startHandle.png diff --git a/examples/declarative/text/textselection/pics/startHandle.sci b/examples/qtquick/text/textselection/pics/startHandle.sci similarity index 100% rename from examples/declarative/text/textselection/pics/startHandle.sci rename to examples/qtquick/text/textselection/pics/startHandle.sci diff --git a/examples/declarative/text/textselection/textselection.qml b/examples/qtquick/text/textselection/textselection.qml similarity index 100% rename from examples/declarative/text/textselection/textselection.qml rename to examples/qtquick/text/textselection/textselection.qml diff --git a/examples/declarative/threading/threadedlistmodel/dataloader.js b/examples/qtquick/threading/threadedlistmodel/dataloader.js similarity index 100% rename from examples/declarative/threading/threadedlistmodel/dataloader.js rename to examples/qtquick/threading/threadedlistmodel/dataloader.js diff --git a/examples/declarative/threading/threadedlistmodel/threadedlistmodel.qmlproject b/examples/qtquick/threading/threadedlistmodel/threadedlistmodel.qmlproject similarity index 100% rename from examples/declarative/threading/threadedlistmodel/threadedlistmodel.qmlproject rename to examples/qtquick/threading/threadedlistmodel/threadedlistmodel.qmlproject diff --git a/examples/declarative/threading/threadedlistmodel/timedisplay.qml b/examples/qtquick/threading/threadedlistmodel/timedisplay.qml similarity index 100% rename from examples/declarative/threading/threadedlistmodel/timedisplay.qml rename to examples/qtquick/threading/threadedlistmodel/timedisplay.qml diff --git a/examples/declarative/threading/workerscript/workerscript.js b/examples/qtquick/threading/workerscript/workerscript.js similarity index 100% rename from examples/declarative/threading/workerscript/workerscript.js rename to examples/qtquick/threading/workerscript/workerscript.js diff --git a/examples/declarative/threading/workerscript/workerscript.qml b/examples/qtquick/threading/workerscript/workerscript.qml similarity index 100% rename from examples/declarative/threading/workerscript/workerscript.qml rename to examples/qtquick/threading/workerscript/workerscript.qml diff --git a/examples/declarative/threading/workerscript/workerscript.qmlproject b/examples/qtquick/threading/workerscript/workerscript.qmlproject similarity index 100% rename from examples/declarative/threading/workerscript/workerscript.qmlproject rename to examples/qtquick/threading/workerscript/workerscript.qmlproject diff --git a/examples/declarative/touchinteraction/multipointtouch/bearwhack.qml b/examples/qtquick/touchinteraction/multipointtouch/bearwhack.qml similarity index 100% rename from examples/declarative/touchinteraction/multipointtouch/bearwhack.qml rename to examples/qtquick/touchinteraction/multipointtouch/bearwhack.qml diff --git a/examples/declarative/touchinteraction/multipointtouch/content/AugmentedTouchPoint.qml b/examples/qtquick/touchinteraction/multipointtouch/content/AugmentedTouchPoint.qml similarity index 100% rename from examples/declarative/touchinteraction/multipointtouch/content/AugmentedTouchPoint.qml rename to examples/qtquick/touchinteraction/multipointtouch/content/AugmentedTouchPoint.qml diff --git a/examples/declarative/touchinteraction/multipointtouch/content/Bear0.png b/examples/qtquick/touchinteraction/multipointtouch/content/Bear0.png similarity index 100% rename from examples/declarative/touchinteraction/multipointtouch/content/Bear0.png rename to examples/qtquick/touchinteraction/multipointtouch/content/Bear0.png diff --git a/examples/declarative/touchinteraction/multipointtouch/content/Bear1.png b/examples/qtquick/touchinteraction/multipointtouch/content/Bear1.png similarity index 100% rename from examples/declarative/touchinteraction/multipointtouch/content/Bear1.png rename to examples/qtquick/touchinteraction/multipointtouch/content/Bear1.png diff --git a/examples/declarative/touchinteraction/multipointtouch/content/Bear2.png b/examples/qtquick/touchinteraction/multipointtouch/content/Bear2.png similarity index 100% rename from examples/declarative/touchinteraction/multipointtouch/content/Bear2.png rename to examples/qtquick/touchinteraction/multipointtouch/content/Bear2.png diff --git a/examples/declarative/touchinteraction/multipointtouch/content/Bear3.png b/examples/qtquick/touchinteraction/multipointtouch/content/Bear3.png similarity index 100% rename from examples/declarative/touchinteraction/multipointtouch/content/Bear3.png rename to examples/qtquick/touchinteraction/multipointtouch/content/Bear3.png diff --git a/examples/declarative/touchinteraction/multipointtouch/content/BearB.png b/examples/qtquick/touchinteraction/multipointtouch/content/BearB.png similarity index 100% rename from examples/declarative/touchinteraction/multipointtouch/content/BearB.png rename to examples/qtquick/touchinteraction/multipointtouch/content/BearB.png diff --git a/examples/declarative/touchinteraction/multipointtouch/content/BearWhackParticleSystem.qml b/examples/qtquick/touchinteraction/multipointtouch/content/BearWhackParticleSystem.qml similarity index 100% rename from examples/declarative/touchinteraction/multipointtouch/content/BearWhackParticleSystem.qml rename to examples/qtquick/touchinteraction/multipointtouch/content/BearWhackParticleSystem.qml diff --git a/examples/declarative/touchinteraction/multipointtouch/content/ParticleFlame.qml b/examples/qtquick/touchinteraction/multipointtouch/content/ParticleFlame.qml similarity index 100% rename from examples/declarative/touchinteraction/multipointtouch/content/ParticleFlame.qml rename to examples/qtquick/touchinteraction/multipointtouch/content/ParticleFlame.qml diff --git a/examples/declarative/touchinteraction/multipointtouch/content/blur-circle.png b/examples/qtquick/touchinteraction/multipointtouch/content/blur-circle.png similarity index 100% rename from examples/declarative/touchinteraction/multipointtouch/content/blur-circle.png rename to examples/qtquick/touchinteraction/multipointtouch/content/blur-circle.png diff --git a/examples/declarative/particles/plasmapatrol/content/pics/blur-circle3.png b/examples/qtquick/touchinteraction/multipointtouch/content/blur-circle3.png similarity index 100% rename from examples/declarative/particles/plasmapatrol/content/pics/blur-circle3.png rename to examples/qtquick/touchinteraction/multipointtouch/content/blur-circle3.png diff --git a/examples/declarative/touchinteraction/multipointtouch/content/heart-blur.png b/examples/qtquick/touchinteraction/multipointtouch/content/heart-blur.png similarity index 100% rename from examples/declarative/touchinteraction/multipointtouch/content/heart-blur.png rename to examples/qtquick/touchinteraction/multipointtouch/content/heart-blur.png diff --git a/examples/declarative/touchinteraction/multipointtouch/content/title.png b/examples/qtquick/touchinteraction/multipointtouch/content/title.png similarity index 100% rename from examples/declarative/touchinteraction/multipointtouch/content/title.png rename to examples/qtquick/touchinteraction/multipointtouch/content/title.png diff --git a/examples/declarative/touchinteraction/multipointtouch/multiflame.qml b/examples/qtquick/touchinteraction/multipointtouch/multiflame.qml similarity index 100% rename from examples/declarative/touchinteraction/multipointtouch/multiflame.qml rename to examples/qtquick/touchinteraction/multipointtouch/multiflame.qml diff --git a/examples/declarative/touchinteraction/pincharea/flickresize.qml b/examples/qtquick/touchinteraction/pincharea/flickresize.qml similarity index 100% rename from examples/declarative/touchinteraction/pincharea/flickresize.qml rename to examples/qtquick/touchinteraction/pincharea/flickresize.qml diff --git a/examples/declarative/touchinteraction/pincharea/qt-logo.jpg b/examples/qtquick/touchinteraction/pincharea/qt-logo.jpg similarity index 100% rename from examples/declarative/touchinteraction/pincharea/qt-logo.jpg rename to examples/qtquick/touchinteraction/pincharea/qt-logo.jpg diff --git a/examples/declarative/touchinteraction/touchinteraction.qml b/examples/qtquick/touchinteraction/touchinteraction.qml similarity index 94% rename from examples/declarative/touchinteraction/touchinteraction.qml rename to examples/qtquick/touchinteraction/touchinteraction.qml index ac0c8bf..b4a930c 100644 --- a/examples/declarative/touchinteraction/touchinteraction.qml +++ b/examples/qtquick/touchinteraction/touchinteraction.qml @@ -39,7 +39,7 @@ ****************************************************************************/ import QtQuick 2.0 -import "../shared" +import "../../shared" Item { height: 480 @@ -48,7 +48,6 @@ Item { id: ll anchors.fill: parent Component.onCompleted: { - addExample("MouseArea", "Using the basic touch input element", Qt.resolvedUrl("mousearea/mousearea-example.qml")); addExample("Multipoint Flames", "Create multiple flames with multiple fingers", Qt.resolvedUrl("multipointtouch/multiflame.qml")); addExample("Bear-Whack", "Use multiple touches to knock all the bears down", Qt.resolvedUrl("multipointtouch/bearwhack.qml")); addExample("Flick Resize", "Manipulate images using pinch gestures", Qt.resolvedUrl("pincharea/flickresize.qml")); diff --git a/examples/declarative/touchinteraction/touchinteraction.qmlproject b/examples/qtquick/touchinteraction/touchinteraction.qmlproject similarity index 100% rename from examples/declarative/touchinteraction/touchinteraction.qmlproject rename to examples/qtquick/touchinteraction/touchinteraction.qmlproject diff --git a/examples/declarative/shared/Button.qml b/examples/shared/Button.qml similarity index 100% rename from examples/declarative/shared/Button.qml rename to examples/shared/Button.qml diff --git a/examples/declarative/shared/LauncherList.qml b/examples/shared/LauncherList.qml similarity index 97% rename from examples/declarative/shared/LauncherList.qml rename to examples/shared/LauncherList.qml index 782fcc7..492290d 100644 --- a/examples/declarative/shared/LauncherList.qml +++ b/examples/shared/LauncherList.qml @@ -89,11 +89,12 @@ ListView { //Eats mouse events } Image { - source: "back.png" + source: "images/back.png" anchors.verticalCenter: parent.verticalCenter x: 4 MouseArea { anchors.fill: parent + anchors.margins: -10 onClicked: ei.exampleUrl = ""; } } diff --git a/examples/declarative/shared/README b/examples/shared/README similarity index 100% rename from examples/declarative/shared/README rename to examples/shared/README diff --git a/examples/declarative/shared/SimpleLauncherDelegate.qml b/examples/shared/SimpleLauncherDelegate.qml similarity index 100% rename from examples/declarative/shared/SimpleLauncherDelegate.qml rename to examples/shared/SimpleLauncherDelegate.qml diff --git a/examples/declarative/shared/back.png b/examples/shared/images/back.png similarity index 100% rename from examples/declarative/shared/back.png rename to examples/shared/images/back.png diff --git a/examples/shared/qmldir b/examples/shared/qmldir new file mode 100644 index 0000000..2f1e56a --- /dev/null +++ b/examples/shared/qmldir @@ -0,0 +1,3 @@ +Button 2.0 Button.qml +LauncherList 2.0 LauncherList.qml +SimpleLauncherDelegate 2.0 SimpleLauncherDelegate.qml diff --git a/examples/shared/shared.h b/examples/shared/shared.h new file mode 100644 index 0000000..e6d0130 --- /dev/null +++ b/examples/shared/shared.h @@ -0,0 +1,49 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ +#include +#include +#define DECLARATIVE_EXAMPLE_MAIN(NAME) int main(int argc, char* argv[]) \ +{\ + QGuiApplication app(argc,argv);\ + QQuickView view;\ + view.setSource(QUrl::fromLocalFile(#NAME ".qml"));\ + view.show();\ + return app.exec();\ +} diff --git a/examples/shared/shared.pro b/examples/shared/shared.pro new file mode 100644 index 0000000..d6ce120 --- /dev/null +++ b/examples/shared/shared.pro @@ -0,0 +1,9 @@ +#just install the files, all QML for now +TEMPLATE = aux + +qml.files = images \ + LauncherList.qml \ + SimpleLauncherDelegate.qml \ + Button.qml +qml.path = $$[QT_INSTALL_EXAMPLES]/qtdeclarative/shared +INSTALLS = qml diff --git a/examples/declarative/tutorials/dynamicview/dynamicview1/PetsModel.qml b/examples/tutorials/dynamicview/dynamicview1/PetsModel.qml similarity index 100% rename from examples/declarative/tutorials/dynamicview/dynamicview1/PetsModel.qml rename to examples/tutorials/dynamicview/dynamicview1/PetsModel.qml diff --git a/examples/declarative/tutorials/dynamicview/dynamicview1/dynamicview.qml b/examples/tutorials/dynamicview/dynamicview1/dynamicview.qml similarity index 100% rename from examples/declarative/tutorials/dynamicview/dynamicview1/dynamicview.qml rename to examples/tutorials/dynamicview/dynamicview1/dynamicview.qml diff --git a/examples/declarative/tutorials/dynamicview/dynamicview3/PetsModel.qml b/examples/tutorials/dynamicview/dynamicview2/PetsModel.qml similarity index 100% rename from examples/declarative/tutorials/dynamicview/dynamicview3/PetsModel.qml rename to examples/tutorials/dynamicview/dynamicview2/PetsModel.qml diff --git a/examples/declarative/tutorials/dynamicview/dynamicview2/dynamicview.qml b/examples/tutorials/dynamicview/dynamicview2/dynamicview.qml similarity index 100% rename from examples/declarative/tutorials/dynamicview/dynamicview2/dynamicview.qml rename to examples/tutorials/dynamicview/dynamicview2/dynamicview.qml diff --git a/examples/declarative/tutorials/dynamicview/dynamicview2/PetsModel.qml b/examples/tutorials/dynamicview/dynamicview3/PetsModel.qml similarity index 100% rename from examples/declarative/tutorials/dynamicview/dynamicview2/PetsModel.qml rename to examples/tutorials/dynamicview/dynamicview3/PetsModel.qml diff --git a/examples/declarative/tutorials/dynamicview/dynamicview3/dynamicview.qml b/examples/tutorials/dynamicview/dynamicview3/dynamicview.qml similarity index 100% rename from examples/declarative/tutorials/dynamicview/dynamicview3/dynamicview.qml rename to examples/tutorials/dynamicview/dynamicview3/dynamicview.qml diff --git a/examples/declarative/tutorials/dynamicview/dynamicview4/ListSelector.qml b/examples/tutorials/dynamicview/dynamicview4/ListSelector.qml similarity index 100% rename from examples/declarative/tutorials/dynamicview/dynamicview4/ListSelector.qml rename to examples/tutorials/dynamicview/dynamicview4/ListSelector.qml diff --git a/examples/declarative/modelviews/listview/content/PetsModel.qml b/examples/tutorials/dynamicview/dynamicview4/PetsModel.qml similarity index 100% rename from examples/declarative/modelviews/listview/content/PetsModel.qml rename to examples/tutorials/dynamicview/dynamicview4/PetsModel.qml diff --git a/examples/declarative/tutorials/dynamicview/dynamicview4/dynamicview.qml b/examples/tutorials/dynamicview/dynamicview4/dynamicview.qml similarity index 100% rename from examples/declarative/tutorials/dynamicview/dynamicview4/dynamicview.qml rename to examples/tutorials/dynamicview/dynamicview4/dynamicview.qml diff --git a/examples/declarative/tutorials/extending/chapter1-basics/app.qml b/examples/tutorials/extending/chapter1-basics/app.qml similarity index 100% rename from examples/declarative/tutorials/extending/chapter1-basics/app.qml rename to examples/tutorials/extending/chapter1-basics/app.qml diff --git a/examples/declarative/tutorials/extending/chapter1-basics/chapter1-basics.pro b/examples/tutorials/extending/chapter1-basics/chapter1-basics.pro similarity index 100% rename from examples/declarative/tutorials/extending/chapter1-basics/chapter1-basics.pro rename to examples/tutorials/extending/chapter1-basics/chapter1-basics.pro diff --git a/examples/declarative/tutorials/extending/chapter3-bindings/main.cpp b/examples/tutorials/extending/chapter1-basics/main.cpp similarity index 100% rename from examples/declarative/tutorials/extending/chapter3-bindings/main.cpp rename to examples/tutorials/extending/chapter1-basics/main.cpp diff --git a/examples/declarative/tutorials/extending/chapter1-basics/piechart.cpp b/examples/tutorials/extending/chapter1-basics/piechart.cpp similarity index 100% rename from examples/declarative/tutorials/extending/chapter1-basics/piechart.cpp rename to examples/tutorials/extending/chapter1-basics/piechart.cpp diff --git a/examples/declarative/tutorials/extending/chapter1-basics/piechart.h b/examples/tutorials/extending/chapter1-basics/piechart.h similarity index 100% rename from examples/declarative/tutorials/extending/chapter1-basics/piechart.h rename to examples/tutorials/extending/chapter1-basics/piechart.h diff --git a/examples/declarative/tutorials/extending/chapter2-methods/app.qml b/examples/tutorials/extending/chapter2-methods/app.qml similarity index 100% rename from examples/declarative/tutorials/extending/chapter2-methods/app.qml rename to examples/tutorials/extending/chapter2-methods/app.qml diff --git a/examples/declarative/tutorials/extending/chapter2-methods/chapter2-methods.pro b/examples/tutorials/extending/chapter2-methods/chapter2-methods.pro similarity index 100% rename from examples/declarative/tutorials/extending/chapter2-methods/chapter2-methods.pro rename to examples/tutorials/extending/chapter2-methods/chapter2-methods.pro diff --git a/examples/declarative/tutorials/extending/chapter2-methods/main.cpp b/examples/tutorials/extending/chapter2-methods/main.cpp similarity index 100% rename from examples/declarative/tutorials/extending/chapter2-methods/main.cpp rename to examples/tutorials/extending/chapter2-methods/main.cpp diff --git a/examples/declarative/tutorials/extending/chapter2-methods/piechart.cpp b/examples/tutorials/extending/chapter2-methods/piechart.cpp similarity index 100% rename from examples/declarative/tutorials/extending/chapter2-methods/piechart.cpp rename to examples/tutorials/extending/chapter2-methods/piechart.cpp diff --git a/examples/declarative/tutorials/extending/chapter2-methods/piechart.h b/examples/tutorials/extending/chapter2-methods/piechart.h similarity index 100% rename from examples/declarative/tutorials/extending/chapter2-methods/piechart.h rename to examples/tutorials/extending/chapter2-methods/piechart.h diff --git a/examples/declarative/tutorials/extending/chapter3-bindings/app.qml b/examples/tutorials/extending/chapter3-bindings/app.qml similarity index 100% rename from examples/declarative/tutorials/extending/chapter3-bindings/app.qml rename to examples/tutorials/extending/chapter3-bindings/app.qml diff --git a/examples/declarative/tutorials/extending/chapter3-bindings/chapter3-bindings.pro b/examples/tutorials/extending/chapter3-bindings/chapter3-bindings.pro similarity index 100% rename from examples/declarative/tutorials/extending/chapter3-bindings/chapter3-bindings.pro rename to examples/tutorials/extending/chapter3-bindings/chapter3-bindings.pro diff --git a/examples/declarative/tutorials/extending/chapter1-basics/main.cpp b/examples/tutorials/extending/chapter3-bindings/main.cpp similarity index 100% rename from examples/declarative/tutorials/extending/chapter1-basics/main.cpp rename to examples/tutorials/extending/chapter3-bindings/main.cpp diff --git a/examples/declarative/tutorials/extending/chapter3-bindings/piechart.cpp b/examples/tutorials/extending/chapter3-bindings/piechart.cpp similarity index 100% rename from examples/declarative/tutorials/extending/chapter3-bindings/piechart.cpp rename to examples/tutorials/extending/chapter3-bindings/piechart.cpp diff --git a/examples/declarative/tutorials/extending/chapter3-bindings/piechart.h b/examples/tutorials/extending/chapter3-bindings/piechart.h similarity index 100% rename from examples/declarative/tutorials/extending/chapter3-bindings/piechart.h rename to examples/tutorials/extending/chapter3-bindings/piechart.h diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/app.qml b/examples/tutorials/extending/chapter4-customPropertyTypes/app.qml similarity index 100% rename from examples/declarative/tutorials/extending/chapter4-customPropertyTypes/app.qml rename to examples/tutorials/extending/chapter4-customPropertyTypes/app.qml diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro b/examples/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro similarity index 100% rename from examples/declarative/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro rename to examples/tutorials/extending/chapter4-customPropertyTypes/chapter4-customPropertyTypes.pro diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/main.cpp b/examples/tutorials/extending/chapter4-customPropertyTypes/main.cpp similarity index 100% rename from examples/declarative/tutorials/extending/chapter4-customPropertyTypes/main.cpp rename to examples/tutorials/extending/chapter4-customPropertyTypes/main.cpp diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp b/examples/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp similarity index 100% rename from examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp rename to examples/tutorials/extending/chapter4-customPropertyTypes/piechart.cpp diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.h b/examples/tutorials/extending/chapter4-customPropertyTypes/piechart.h similarity index 100% rename from examples/declarative/tutorials/extending/chapter4-customPropertyTypes/piechart.h rename to examples/tutorials/extending/chapter4-customPropertyTypes/piechart.h diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.cpp b/examples/tutorials/extending/chapter4-customPropertyTypes/pieslice.cpp similarity index 100% rename from examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.cpp rename to examples/tutorials/extending/chapter4-customPropertyTypes/pieslice.cpp diff --git a/examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.h b/examples/tutorials/extending/chapter4-customPropertyTypes/pieslice.h similarity index 100% rename from examples/declarative/tutorials/extending/chapter4-customPropertyTypes/pieslice.h rename to examples/tutorials/extending/chapter4-customPropertyTypes/pieslice.h diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/app.qml b/examples/tutorials/extending/chapter5-listproperties/app.qml similarity index 100% rename from examples/declarative/tutorials/extending/chapter5-listproperties/app.qml rename to examples/tutorials/extending/chapter5-listproperties/app.qml diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro b/examples/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro similarity index 100% rename from examples/declarative/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro rename to examples/tutorials/extending/chapter5-listproperties/chapter5-listproperties.pro diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/main.cpp b/examples/tutorials/extending/chapter5-listproperties/main.cpp similarity index 100% rename from examples/declarative/tutorials/extending/chapter5-listproperties/main.cpp rename to examples/tutorials/extending/chapter5-listproperties/main.cpp diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/piechart.cpp b/examples/tutorials/extending/chapter5-listproperties/piechart.cpp similarity index 100% rename from examples/declarative/tutorials/extending/chapter5-listproperties/piechart.cpp rename to examples/tutorials/extending/chapter5-listproperties/piechart.cpp diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/piechart.h b/examples/tutorials/extending/chapter5-listproperties/piechart.h similarity index 100% rename from examples/declarative/tutorials/extending/chapter5-listproperties/piechart.h rename to examples/tutorials/extending/chapter5-listproperties/piechart.h diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/pieslice.cpp b/examples/tutorials/extending/chapter5-listproperties/pieslice.cpp similarity index 100% rename from examples/declarative/tutorials/extending/chapter6-plugins/pieslice.cpp rename to examples/tutorials/extending/chapter5-listproperties/pieslice.cpp diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.h b/examples/tutorials/extending/chapter5-listproperties/pieslice.h similarity index 100% rename from examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.h rename to examples/tutorials/extending/chapter5-listproperties/pieslice.h diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/ChartsPlugin/qmldir b/examples/tutorials/extending/chapter6-plugins/ChartsPlugin/qmldir similarity index 100% rename from examples/declarative/tutorials/extending/chapter6-plugins/ChartsPlugin/qmldir rename to examples/tutorials/extending/chapter6-plugins/ChartsPlugin/qmldir diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/app.qml b/examples/tutorials/extending/chapter6-plugins/app.qml similarity index 100% rename from examples/declarative/tutorials/extending/chapter6-plugins/app.qml rename to examples/tutorials/extending/chapter6-plugins/app.qml diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/chapter6-plugins.pro b/examples/tutorials/extending/chapter6-plugins/chapter6-plugins.pro similarity index 100% rename from examples/declarative/tutorials/extending/chapter6-plugins/chapter6-plugins.pro rename to examples/tutorials/extending/chapter6-plugins/chapter6-plugins.pro diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.cpp b/examples/tutorials/extending/chapter6-plugins/chartsplugin.cpp similarity index 100% rename from examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.cpp rename to examples/tutorials/extending/chapter6-plugins/chartsplugin.cpp diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.h b/examples/tutorials/extending/chapter6-plugins/chartsplugin.h similarity index 100% rename from examples/declarative/tutorials/extending/chapter6-plugins/chartsplugin.h rename to examples/tutorials/extending/chapter6-plugins/chartsplugin.h diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/piechart.cpp b/examples/tutorials/extending/chapter6-plugins/piechart.cpp similarity index 100% rename from examples/declarative/tutorials/extending/chapter6-plugins/piechart.cpp rename to examples/tutorials/extending/chapter6-plugins/piechart.cpp diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/piechart.h b/examples/tutorials/extending/chapter6-plugins/piechart.h similarity index 100% rename from examples/declarative/tutorials/extending/chapter6-plugins/piechart.h rename to examples/tutorials/extending/chapter6-plugins/piechart.h diff --git a/examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.cpp b/examples/tutorials/extending/chapter6-plugins/pieslice.cpp similarity index 100% rename from examples/declarative/tutorials/extending/chapter5-listproperties/pieslice.cpp rename to examples/tutorials/extending/chapter6-plugins/pieslice.cpp diff --git a/examples/declarative/tutorials/extending/chapter6-plugins/pieslice.h b/examples/tutorials/extending/chapter6-plugins/pieslice.h similarity index 100% rename from examples/declarative/tutorials/extending/chapter6-plugins/pieslice.h rename to examples/tutorials/extending/chapter6-plugins/pieslice.h diff --git a/examples/declarative/tutorials/extending/extending.pro b/examples/tutorials/extending/extending.pro similarity index 100% rename from examples/declarative/tutorials/extending/extending.pro rename to examples/tutorials/extending/extending.pro diff --git a/examples/declarative/tutorials/helloworld/Cell.qml b/examples/tutorials/helloworld/Cell.qml similarity index 100% rename from examples/declarative/tutorials/helloworld/Cell.qml rename to examples/tutorials/helloworld/Cell.qml diff --git a/examples/declarative/tutorials/helloworld/tutorial1.qml b/examples/tutorials/helloworld/tutorial1.qml similarity index 100% rename from examples/declarative/tutorials/helloworld/tutorial1.qml rename to examples/tutorials/helloworld/tutorial1.qml diff --git a/examples/declarative/tutorials/helloworld/tutorial2.qml b/examples/tutorials/helloworld/tutorial2.qml similarity index 100% rename from examples/declarative/tutorials/helloworld/tutorial2.qml rename to examples/tutorials/helloworld/tutorial2.qml diff --git a/examples/declarative/tutorials/helloworld/tutorial3.qml b/examples/tutorials/helloworld/tutorial3.qml similarity index 100% rename from examples/declarative/tutorials/helloworld/tutorial3.qml rename to examples/tutorials/helloworld/tutorial3.qml diff --git a/examples/declarative/tutorials/samegame/samegame1/Block.qml b/examples/tutorials/samegame/samegame1/Block.qml similarity index 100% rename from examples/declarative/tutorials/samegame/samegame1/Block.qml rename to examples/tutorials/samegame/samegame1/Block.qml diff --git a/examples/declarative/tutorials/samegame/samegame1/Button.qml b/examples/tutorials/samegame/samegame1/Button.qml similarity index 100% rename from examples/declarative/tutorials/samegame/samegame1/Button.qml rename to examples/tutorials/samegame/samegame1/Button.qml diff --git a/examples/declarative/tutorials/samegame/samegame1/samegame.qml b/examples/tutorials/samegame/samegame1/samegame.qml similarity index 100% rename from examples/declarative/tutorials/samegame/samegame1/samegame.qml rename to examples/tutorials/samegame/samegame1/samegame.qml diff --git a/examples/declarative/tutorials/samegame/samegame1/samegame1.qmlproject b/examples/tutorials/samegame/samegame1/samegame1.qmlproject similarity index 100% rename from examples/declarative/tutorials/samegame/samegame1/samegame1.qmlproject rename to examples/tutorials/samegame/samegame1/samegame1.qmlproject diff --git a/examples/declarative/tutorials/samegame/samegame2/Block.qml b/examples/tutorials/samegame/samegame2/Block.qml similarity index 100% rename from examples/declarative/tutorials/samegame/samegame2/Block.qml rename to examples/tutorials/samegame/samegame2/Block.qml diff --git a/examples/declarative/tutorials/samegame/samegame4/content/Button.qml b/examples/tutorials/samegame/samegame2/Button.qml similarity index 100% rename from examples/declarative/tutorials/samegame/samegame4/content/Button.qml rename to examples/tutorials/samegame/samegame2/Button.qml diff --git a/examples/declarative/tutorials/samegame/samegame2/samegame.js b/examples/tutorials/samegame/samegame2/samegame.js similarity index 100% rename from examples/declarative/tutorials/samegame/samegame2/samegame.js rename to examples/tutorials/samegame/samegame2/samegame.js diff --git a/examples/declarative/tutorials/samegame/samegame2/samegame.qml b/examples/tutorials/samegame/samegame2/samegame.qml similarity index 100% rename from examples/declarative/tutorials/samegame/samegame2/samegame.qml rename to examples/tutorials/samegame/samegame2/samegame.qml diff --git a/examples/declarative/tutorials/samegame/samegame2/samegame2.qmlproject b/examples/tutorials/samegame/samegame2/samegame2.qmlproject similarity index 100% rename from examples/declarative/tutorials/samegame/samegame2/samegame2.qmlproject rename to examples/tutorials/samegame/samegame2/samegame2.qmlproject diff --git a/examples/declarative/tutorials/samegame/samegame3/Block.qml b/examples/tutorials/samegame/samegame3/Block.qml similarity index 100% rename from examples/declarative/tutorials/samegame/samegame3/Block.qml rename to examples/tutorials/samegame/samegame3/Block.qml diff --git a/examples/declarative/tutorials/samegame/samegame3/Button.qml b/examples/tutorials/samegame/samegame3/Button.qml similarity index 100% rename from examples/declarative/tutorials/samegame/samegame3/Button.qml rename to examples/tutorials/samegame/samegame3/Button.qml diff --git a/examples/declarative/tutorials/samegame/samegame3/Dialog.qml b/examples/tutorials/samegame/samegame3/Dialog.qml similarity index 100% rename from examples/declarative/tutorials/samegame/samegame3/Dialog.qml rename to examples/tutorials/samegame/samegame3/Dialog.qml diff --git a/examples/declarative/tutorials/samegame/samegame3/samegame.js b/examples/tutorials/samegame/samegame3/samegame.js similarity index 100% rename from examples/declarative/tutorials/samegame/samegame3/samegame.js rename to examples/tutorials/samegame/samegame3/samegame.js diff --git a/examples/declarative/tutorials/samegame/samegame3/samegame.qml b/examples/tutorials/samegame/samegame3/samegame.qml similarity index 100% rename from examples/declarative/tutorials/samegame/samegame3/samegame.qml rename to examples/tutorials/samegame/samegame3/samegame.qml diff --git a/examples/declarative/tutorials/samegame/samegame3/samegame3.qmlproject b/examples/tutorials/samegame/samegame3/samegame3.qmlproject similarity index 100% rename from examples/declarative/tutorials/samegame/samegame3/samegame3.qmlproject rename to examples/tutorials/samegame/samegame3/samegame3.qmlproject diff --git a/examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml b/examples/tutorials/samegame/samegame4/content/BoomBlock.qml similarity index 100% rename from examples/declarative/tutorials/samegame/samegame4/content/BoomBlock.qml rename to examples/tutorials/samegame/samegame4/content/BoomBlock.qml diff --git a/examples/declarative/tutorials/samegame/samegame2/Button.qml b/examples/tutorials/samegame/samegame4/content/Button.qml similarity index 100% rename from examples/declarative/tutorials/samegame/samegame2/Button.qml rename to examples/tutorials/samegame/samegame4/content/Button.qml diff --git a/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml b/examples/tutorials/samegame/samegame4/content/Dialog.qml similarity index 100% rename from examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml rename to examples/tutorials/samegame/samegame4/content/Dialog.qml diff --git a/examples/declarative/tutorials/samegame/samegame4/content/samegame.js b/examples/tutorials/samegame/samegame4/content/samegame.js similarity index 100% rename from examples/declarative/tutorials/samegame/samegame4/content/samegame.js rename to examples/tutorials/samegame/samegame4/content/samegame.js diff --git a/examples/declarative/tutorials/samegame/samegame4/highscores/README b/examples/tutorials/samegame/samegame4/highscores/README similarity index 100% rename from examples/declarative/tutorials/samegame/samegame4/highscores/README rename to examples/tutorials/samegame/samegame4/highscores/README diff --git a/examples/declarative/tutorials/samegame/samegame4/highscores/score_data.xml b/examples/tutorials/samegame/samegame4/highscores/score_data.xml similarity index 100% rename from examples/declarative/tutorials/samegame/samegame4/highscores/score_data.xml rename to examples/tutorials/samegame/samegame4/highscores/score_data.xml diff --git a/examples/declarative/tutorials/samegame/samegame4/highscores/score_style.xsl b/examples/tutorials/samegame/samegame4/highscores/score_style.xsl similarity index 100% rename from examples/declarative/tutorials/samegame/samegame4/highscores/score_style.xsl rename to examples/tutorials/samegame/samegame4/highscores/score_style.xsl diff --git a/examples/declarative/tutorials/samegame/samegame4/highscores/scores.php b/examples/tutorials/samegame/samegame4/highscores/scores.php similarity index 100% rename from examples/declarative/tutorials/samegame/samegame4/highscores/scores.php rename to examples/tutorials/samegame/samegame4/highscores/scores.php diff --git a/examples/declarative/tutorials/samegame/samegame4/samegame.qml b/examples/tutorials/samegame/samegame4/samegame.qml similarity index 100% rename from examples/declarative/tutorials/samegame/samegame4/samegame.qml rename to examples/tutorials/samegame/samegame4/samegame.qml diff --git a/examples/declarative/tutorials/samegame/samegame4/samegame4.qmlproject b/examples/tutorials/samegame/samegame4/samegame4.qmlproject similarity index 100% rename from examples/declarative/tutorials/samegame/samegame4/samegame4.qmlproject rename to examples/tutorials/samegame/samegame4/samegame4.qmlproject diff --git a/examples/declarative/tutorials/samegame/shared/pics/background.jpg b/examples/tutorials/samegame/shared/pics/background.jpg similarity index 100% rename from examples/declarative/tutorials/samegame/shared/pics/background.jpg rename to examples/tutorials/samegame/shared/pics/background.jpg diff --git a/examples/declarative/tutorials/samegame/shared/pics/blueStar.png b/examples/tutorials/samegame/shared/pics/blueStar.png similarity index 100% rename from examples/declarative/tutorials/samegame/shared/pics/blueStar.png rename to examples/tutorials/samegame/shared/pics/blueStar.png diff --git a/examples/declarative/samegame/content/pics/blueStone.png b/examples/tutorials/samegame/shared/pics/blueStone.png similarity index 100% rename from examples/declarative/samegame/content/pics/blueStone.png rename to examples/tutorials/samegame/shared/pics/blueStone.png diff --git a/examples/declarative/tutorials/samegame/shared/pics/greenStar.png b/examples/tutorials/samegame/shared/pics/greenStar.png similarity index 100% rename from examples/declarative/tutorials/samegame/shared/pics/greenStar.png rename to examples/tutorials/samegame/shared/pics/greenStar.png diff --git a/examples/declarative/samegame/content/pics/greenStone.png b/examples/tutorials/samegame/shared/pics/greenStone.png similarity index 100% rename from examples/declarative/samegame/content/pics/greenStone.png rename to examples/tutorials/samegame/shared/pics/greenStone.png diff --git a/examples/declarative/tutorials/samegame/shared/pics/redStar.png b/examples/tutorials/samegame/shared/pics/redStar.png similarity index 100% rename from examples/declarative/tutorials/samegame/shared/pics/redStar.png rename to examples/tutorials/samegame/shared/pics/redStar.png diff --git a/examples/declarative/samegame/content/pics/redStone.png b/examples/tutorials/samegame/shared/pics/redStone.png similarity index 100% rename from examples/declarative/samegame/content/pics/redStone.png rename to examples/tutorials/samegame/shared/pics/redStone.png diff --git a/examples/declarative/snake/content/pics/star.png b/examples/tutorials/samegame/shared/pics/star.png similarity index 100% rename from examples/declarative/snake/content/pics/star.png rename to examples/tutorials/samegame/shared/pics/star.png diff --git a/examples/declarative/samegame/content/pics/yellowStone.png b/examples/tutorials/samegame/shared/pics/yellowStone.png similarity index 100% rename from examples/declarative/samegame/content/pics/yellowStone.png rename to examples/tutorials/samegame/shared/pics/yellowStone.png diff --git a/examples/declarative/ui-components/dialcontrol/content/Dial.qml b/examples/tutorials/ui-components/dialcontrol/content/Dial.qml similarity index 100% rename from examples/declarative/ui-components/dialcontrol/content/Dial.qml rename to examples/tutorials/ui-components/dialcontrol/content/Dial.qml diff --git a/examples/tutorials/ui-components/dialcontrol/content/QuitButton.qml b/examples/tutorials/ui-components/dialcontrol/content/QuitButton.qml new file mode 100644 index 0000000..702b892 --- /dev/null +++ b/examples/tutorials/ui-components/dialcontrol/content/QuitButton.qml @@ -0,0 +1,52 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 +Image { + source: "quit.png" + scale: quitMouse.pressed ? 0.8 : 1.0 + smooth: quitMouse.pressed + MouseArea { + id: quitMouse + anchors.fill: parent + anchors.margins: -10 + onClicked: Qt.quit() + } +} diff --git a/examples/declarative/ui-components/dialcontrol/content/background.png b/examples/tutorials/ui-components/dialcontrol/content/background.png similarity index 100% rename from examples/declarative/ui-components/dialcontrol/content/background.png rename to examples/tutorials/ui-components/dialcontrol/content/background.png diff --git a/examples/declarative/ui-components/dialcontrol/content/needle.png b/examples/tutorials/ui-components/dialcontrol/content/needle.png similarity index 100% rename from examples/declarative/ui-components/dialcontrol/content/needle.png rename to examples/tutorials/ui-components/dialcontrol/content/needle.png diff --git a/examples/declarative/ui-components/dialcontrol/content/needle_shadow.png b/examples/tutorials/ui-components/dialcontrol/content/needle_shadow.png similarity index 100% rename from examples/declarative/ui-components/dialcontrol/content/needle_shadow.png rename to examples/tutorials/ui-components/dialcontrol/content/needle_shadow.png diff --git a/examples/declarative/ui-components/dialcontrol/content/overlay.png b/examples/tutorials/ui-components/dialcontrol/content/overlay.png similarity index 100% rename from examples/declarative/ui-components/dialcontrol/content/overlay.png rename to examples/tutorials/ui-components/dialcontrol/content/overlay.png diff --git a/examples/tutorials/ui-components/dialcontrol/content/quit.png b/examples/tutorials/ui-components/dialcontrol/content/quit.png new file mode 100644 index 0000000..b822057 Binary files /dev/null and b/examples/tutorials/ui-components/dialcontrol/content/quit.png differ diff --git a/examples/declarative/ui-components/dialcontrol/dialcontrol.qml b/examples/tutorials/ui-components/dialcontrol/dialcontrol.qml similarity index 100% rename from examples/declarative/ui-components/dialcontrol/dialcontrol.qml rename to examples/tutorials/ui-components/dialcontrol/dialcontrol.qml diff --git a/examples/declarative/ui-components/flipable/content/5_heart.png b/examples/tutorials/ui-components/flipable/content/5_heart.png similarity index 100% rename from examples/declarative/ui-components/flipable/content/5_heart.png rename to examples/tutorials/ui-components/flipable/content/5_heart.png diff --git a/examples/declarative/ui-components/flipable/content/9_club.png b/examples/tutorials/ui-components/flipable/content/9_club.png similarity index 100% rename from examples/declarative/ui-components/flipable/content/9_club.png rename to examples/tutorials/ui-components/flipable/content/9_club.png diff --git a/examples/declarative/ui-components/flipable/content/Card.qml b/examples/tutorials/ui-components/flipable/content/Card.qml similarity index 100% rename from examples/declarative/ui-components/flipable/content/Card.qml rename to examples/tutorials/ui-components/flipable/content/Card.qml diff --git a/examples/declarative/ui-components/flipable/content/back.png b/examples/tutorials/ui-components/flipable/content/back.png similarity index 100% rename from examples/declarative/ui-components/flipable/content/back.png rename to examples/tutorials/ui-components/flipable/content/back.png diff --git a/examples/declarative/ui-components/flipable/flipable.qml b/examples/tutorials/ui-components/flipable/flipable.qml similarity index 100% rename from examples/declarative/ui-components/flipable/flipable.qml rename to examples/tutorials/ui-components/flipable/flipable.qml diff --git a/examples/declarative/ui-components/progressbar/content/ProgressBar.qml b/examples/tutorials/ui-components/progressbar/content/ProgressBar.qml similarity index 100% rename from examples/declarative/ui-components/progressbar/content/ProgressBar.qml rename to examples/tutorials/ui-components/progressbar/content/ProgressBar.qml diff --git a/examples/declarative/ui-components/progressbar/content/background.png b/examples/tutorials/ui-components/progressbar/content/background.png similarity index 100% rename from examples/declarative/ui-components/progressbar/content/background.png rename to examples/tutorials/ui-components/progressbar/content/background.png diff --git a/examples/declarative/ui-components/progressbar/main.qml b/examples/tutorials/ui-components/progressbar/main.qml similarity index 100% rename from examples/declarative/ui-components/progressbar/main.qml rename to examples/tutorials/ui-components/progressbar/main.qml diff --git a/examples/declarative/ui-components/scrollbar/ScrollBar.qml b/examples/tutorials/ui-components/scrollbar/ScrollBar.qml similarity index 100% rename from examples/declarative/ui-components/scrollbar/ScrollBar.qml rename to examples/tutorials/ui-components/scrollbar/ScrollBar.qml diff --git a/examples/declarative/ui-components/scrollbar/main.qml b/examples/tutorials/ui-components/scrollbar/main.qml similarity index 100% rename from examples/declarative/ui-components/scrollbar/main.qml rename to examples/tutorials/ui-components/scrollbar/main.qml diff --git a/examples/declarative/ui-components/scrollbar/pics/niagara_falls.jpg b/examples/tutorials/ui-components/scrollbar/pics/niagara_falls.jpg similarity index 100% rename from examples/declarative/ui-components/scrollbar/pics/niagara_falls.jpg rename to examples/tutorials/ui-components/scrollbar/pics/niagara_falls.jpg diff --git a/examples/declarative/ui-components/scrollbar/scrollbar.qmlproject b/examples/tutorials/ui-components/scrollbar/scrollbar.qmlproject similarity index 100% rename from examples/declarative/ui-components/scrollbar/scrollbar.qmlproject rename to examples/tutorials/ui-components/scrollbar/scrollbar.qmlproject diff --git a/examples/declarative/ui-components/searchbox/SearchBox.qml b/examples/tutorials/ui-components/searchbox/SearchBox.qml similarity index 100% rename from examples/declarative/ui-components/searchbox/SearchBox.qml rename to examples/tutorials/ui-components/searchbox/SearchBox.qml diff --git a/examples/declarative/ui-components/searchbox/images/clear.png b/examples/tutorials/ui-components/searchbox/images/clear.png similarity index 100% rename from examples/declarative/ui-components/searchbox/images/clear.png rename to examples/tutorials/ui-components/searchbox/images/clear.png diff --git a/examples/declarative/ui-components/searchbox/images/lineedit-bg-focus.png b/examples/tutorials/ui-components/searchbox/images/lineedit-bg-focus.png similarity index 100% rename from examples/declarative/ui-components/searchbox/images/lineedit-bg-focus.png rename to examples/tutorials/ui-components/searchbox/images/lineedit-bg-focus.png diff --git a/examples/declarative/ui-components/searchbox/images/lineedit-bg.png b/examples/tutorials/ui-components/searchbox/images/lineedit-bg.png similarity index 100% rename from examples/declarative/ui-components/searchbox/images/lineedit-bg.png rename to examples/tutorials/ui-components/searchbox/images/lineedit-bg.png diff --git a/examples/declarative/ui-components/searchbox/main.qml b/examples/tutorials/ui-components/searchbox/main.qml similarity index 100% rename from examples/declarative/ui-components/searchbox/main.qml rename to examples/tutorials/ui-components/searchbox/main.qml diff --git a/examples/declarative/ui-components/searchbox/searchbox.qmlproject b/examples/tutorials/ui-components/searchbox/searchbox.qmlproject similarity index 100% rename from examples/declarative/ui-components/searchbox/searchbox.qmlproject rename to examples/tutorials/ui-components/searchbox/searchbox.qmlproject diff --git a/examples/declarative/ui-components/slideswitch/content/Switch.qml b/examples/tutorials/ui-components/slideswitch/content/Switch.qml similarity index 100% rename from examples/declarative/ui-components/slideswitch/content/Switch.qml rename to examples/tutorials/ui-components/slideswitch/content/Switch.qml diff --git a/examples/declarative/ui-components/slideswitch/content/background.png b/examples/tutorials/ui-components/slideswitch/content/background.png similarity index 100% rename from examples/declarative/ui-components/slideswitch/content/background.png rename to examples/tutorials/ui-components/slideswitch/content/background.png diff --git a/examples/declarative/ui-components/slideswitch/content/background.svg b/examples/tutorials/ui-components/slideswitch/content/background.svg similarity index 100% rename from examples/declarative/ui-components/slideswitch/content/background.svg rename to examples/tutorials/ui-components/slideswitch/content/background.svg diff --git a/examples/declarative/ui-components/slideswitch/content/knob.png b/examples/tutorials/ui-components/slideswitch/content/knob.png similarity index 100% rename from examples/declarative/ui-components/slideswitch/content/knob.png rename to examples/tutorials/ui-components/slideswitch/content/knob.png diff --git a/examples/declarative/ui-components/slideswitch/content/knob.svg b/examples/tutorials/ui-components/slideswitch/content/knob.svg similarity index 100% rename from examples/declarative/ui-components/slideswitch/content/knob.svg rename to examples/tutorials/ui-components/slideswitch/content/knob.svg diff --git a/examples/declarative/ui-components/slideswitch/slideswitch.qml b/examples/tutorials/ui-components/slideswitch/slideswitch.qml similarity index 100% rename from examples/declarative/ui-components/slideswitch/slideswitch.qml rename to examples/tutorials/ui-components/slideswitch/slideswitch.qml diff --git a/examples/declarative/ui-components/spinner/content/Spinner.qml b/examples/tutorials/ui-components/spinner/content/Spinner.qml similarity index 100% rename from examples/declarative/ui-components/spinner/content/Spinner.qml rename to examples/tutorials/ui-components/spinner/content/Spinner.qml diff --git a/examples/declarative/ui-components/spinner/content/spinner-bg.png b/examples/tutorials/ui-components/spinner/content/spinner-bg.png similarity index 100% rename from examples/declarative/ui-components/spinner/content/spinner-bg.png rename to examples/tutorials/ui-components/spinner/content/spinner-bg.png diff --git a/examples/declarative/ui-components/spinner/content/spinner-select.png b/examples/tutorials/ui-components/spinner/content/spinner-select.png similarity index 100% rename from examples/declarative/ui-components/spinner/content/spinner-select.png rename to examples/tutorials/ui-components/spinner/content/spinner-select.png diff --git a/examples/declarative/ui-components/spinner/main.qml b/examples/tutorials/ui-components/spinner/main.qml similarity index 100% rename from examples/declarative/ui-components/spinner/main.qml rename to examples/tutorials/ui-components/spinner/main.qml diff --git a/examples/declarative/ui-components/spinner/spinner.qmlproject b/examples/tutorials/ui-components/spinner/spinner.qmlproject similarity index 100% rename from examples/declarative/ui-components/spinner/spinner.qmlproject rename to examples/tutorials/ui-components/spinner/spinner.qmlproject diff --git a/examples/declarative/ui-components/tabwidget/TabWidget.qml b/examples/tutorials/ui-components/tabwidget/TabWidget.qml similarity index 100% rename from examples/declarative/ui-components/tabwidget/TabWidget.qml rename to examples/tutorials/ui-components/tabwidget/TabWidget.qml diff --git a/examples/declarative/ui-components/tabwidget/main.qml b/examples/tutorials/ui-components/tabwidget/main.qml similarity index 100% rename from examples/declarative/ui-components/tabwidget/main.qml rename to examples/tutorials/ui-components/tabwidget/main.qml diff --git a/examples/declarative/ui-components/tabwidget/tab.png b/examples/tutorials/ui-components/tabwidget/tab.png similarity index 100% rename from examples/declarative/ui-components/tabwidget/tab.png rename to examples/tutorials/ui-components/tabwidget/tab.png diff --git a/examples/declarative/ui-components/tabwidget/tabwidget.qmlproject b/examples/tutorials/ui-components/tabwidget/tabwidget.qmlproject similarity index 100% rename from examples/declarative/ui-components/tabwidget/tabwidget.qmlproject rename to examples/tutorials/ui-components/tabwidget/tabwidget.qmlproject diff --git a/examples/declarative/window/Window.qml b/examples/window/Window.qml similarity index 100% rename from examples/declarative/window/Window.qml rename to examples/window/Window.qml diff --git a/examples/declarative/window/screen/screenInfo.qml b/examples/window/screen/screenInfo.qml similarity index 100% rename from examples/declarative/window/screen/screenInfo.qml rename to examples/window/screen/screenInfo.qml diff --git a/examples/declarative/window/standalone.qml b/examples/window/standalone.qml similarity index 100% rename from examples/declarative/window/standalone.qml rename to examples/window/standalone.qml diff --git a/examples/declarative/window/window.cpp b/examples/window/window.cpp similarity index 100% rename from examples/declarative/window/window.cpp rename to examples/window/window.cpp diff --git a/examples/declarative/window/window.pro b/examples/window/window.pro similarity index 100% rename from examples/declarative/window/window.pro rename to examples/window/window.pro diff --git a/tests/auto/qtquick2/examples/tst_examples.cpp b/tests/auto/qtquick2/examples/tst_examples.cpp index 0e420f7..ce8f214 100644 --- a/tests/auto/qtquick2/examples/tst_examples.cpp +++ b/tests/auto/qtquick2/examples/tst_examples.cpp @@ -89,32 +89,25 @@ tst_examples::tst_examples() excludedFiles << "doc/src/snippets/declarative/listmodel.qml"; //Just a ListModel, no root QQuickItem // Add directories you want excluded here - excludedDirs << "examples/declarative/text/fonts"; // QTBUG-21415 + excludedDirs << "examples/shared"; //Not an example + excludedDirs << "examples/qtquick/text/fonts"; // QTBUG-21415 excludedDirs << "doc/src/snippets/declarative/path"; //No root QQuickItem - // Not run in QQuickView - excludedDirs << "examples/declarative/qtquick1"; - // These snippets are not expected to run on their own. excludedDirs << "doc/src/snippets/declarative/visualdatamodel_rootindex"; excludedDirs << "doc/src/snippets/declarative/qtbinding"; excludedDirs << "doc/src/snippets/declarative/imports"; - excludedDirs << "doc/src/snippets/qtquick1/visualdatamodel_rootindex"; - excludedDirs << "doc/src/snippets/qtquick1/qtbinding"; - excludedDirs << "doc/src/snippets/qtquick1/imports"; #ifdef QT_NO_WEBKIT - excludedDirs << "examples/declarative/modelviews/webview"; - excludedDirs << "examples/declarative/webbrowser"; + excludedDirs << "examples/qtquick/modelviews/webview"; + excludedDirs << "examples/demos/webbrowser"; excludedDirs << "doc/src/snippets/declarative/webview"; - excludedDirs << "doc/src/snippets/qtquick1/webview"; #endif #ifdef QT_NO_XMLPATTERNS - excludedDirs << "examples/declarative/xml/xmldata"; - excludedDirs << "examples/declarative/twitter"; - excludedDirs << "examples/declarative/flickr"; - excludedDirs << "examples/declarative/photoviewer"; + excludedDirs << "examples/demos/twitter"; + excludedDirs << "examples/demos/flickr"; + excludedDirs << "examples/demos/photoviewer"; #endif } @@ -230,12 +223,10 @@ void tst_examples::sgexamples_data() { QTest::addColumn("file"); - QString examples = QLatin1String(SRCDIR) + "/../../../../examples/declarative/"; - QString tutorials = QLatin1String(SRCDIR) + "/../../../../examples/tutorials/"; //Only declarative tutorials since modularization + QString examples = QLatin1String(SRCDIR) + "/../../../../examples/"; QStringList files; files << findQmlFiles(QDir(examples)); - files << findQmlFiles(QDir(tutorials)); foreach (const QString &file, files) QTest::newRow(qPrintable(file)) << file;