aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/doc
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-05-28 15:24:18 +0200
committerFrederik Gladhorn <frederik.gladhorn@digia.com>2013-05-28 15:35:03 +0200
commitba0899542cf03a685335bf4e02edfb377bade224 (patch)
tree554213486fd3420745da3821c3e4502e4c15830f /src/quick/doc
parent6f411ef9d460d6a4f73a455b6eec9afc2f52d305 (diff)
parent43484528552cb2ba3dc1dabfcce22ed40bf4f8db (diff)
Merge remote-tracking branch 'origin/stable' into dev
Conflicts: src/quick/doc/src/appdevguide/porting.qdoc sync.profile Change-Id: Iec5516c596c3eca60a3e6ceb1d45f2a7a1595c12
Diffstat (limited to 'src/quick/doc')
-rw-r--r--src/quick/doc/images/qml-extending-types.pngbin738 -> 0 bytes
-rw-r--r--src/quick/doc/images/qml-uses-animation.pngbin474 -> 0 bytes
-rw-r--r--src/quick/doc/images/qml-uses-integratingjs.pngbin679 -> 0 bytes
-rw-r--r--src/quick/doc/images/qml-uses-layouts-anchors.pngbin946 -> 0 bytes
-rw-r--r--src/quick/doc/images/qml-uses-layouts-direct.pngbin344 -> 0 bytes
-rw-r--r--src/quick/doc/images/qml-uses-layouts-positioners.pngbin471 -> 0 bytes
-rw-r--r--src/quick/doc/images/qml-uses-styling-text.pngbin29158 -> 0 bytes
-rw-r--r--src/quick/doc/images/qml-uses-styling.pngbin6330 -> 0 bytes
-rw-r--r--src/quick/doc/images/qml-uses-text.pngbin41485 -> 0 bytes
-rw-r--r--src/quick/doc/images/qml-uses-userinput.pngbin6713 -> 0 bytes
-rw-r--r--src/quick/doc/images/qml-uses-visual-opacity.pngbin211 -> 0 bytes
-rw-r--r--src/quick/doc/images/qml-uses-visual-rectangles.pngbin770 -> 0 bytes
-rw-r--r--src/quick/doc/images/qml-uses-visual-transforms.pngbin671 -> 0 bytes
-rw-r--r--src/quick/doc/qtquick.qdocconf2
-rw-r--r--src/quick/doc/snippets/qml/codingconventions/dotproperties.qml68
-rw-r--r--src/quick/doc/snippets/qml/codingconventions/javascript-imports.qml47
-rw-r--r--src/quick/doc/snippets/qml/codingconventions/lists.qml62
-rw-r--r--src/quick/doc/snippets/qml/codingconventions/myscript.js9
-rw-r--r--src/quick/doc/snippets/qml/codingconventions/photo.qml85
-rw-r--r--src/quick/doc/snippets/qml/colors.qml (renamed from src/quick/doc/snippets/qml/visualdatagroup.qml)98
-rw-r--r--src/quick/doc/snippets/qml/usecases/Button.qml86
-rw-r--r--src/quick/doc/snippets/qml/usecases/MyText.qml48
-rw-r--r--src/quick/doc/snippets/qml/usecases/animations.qml187
-rw-r--r--src/quick/doc/snippets/qml/usecases/integratingjs-inline.qml79
-rw-r--r--src/quick/doc/snippets/qml/usecases/integratingjs.qml71
-rw-r--r--src/quick/doc/snippets/qml/usecases/layouts.qml142
-rw-r--r--src/quick/doc/snippets/qml/usecases/myscript.js46
-rw-r--r--src/quick/doc/snippets/qml/usecases/styling-text.qml73
-rw-r--r--src/quick/doc/snippets/qml/usecases/styling.qml65
-rw-r--r--src/quick/doc/snippets/qml/usecases/text.qml105
-rw-r--r--src/quick/doc/snippets/qml/usecases/userinput-keys.qml71
-rw-r--r--src/quick/doc/snippets/qml/usecases/userinput.qml70
-rw-r--r--src/quick/doc/snippets/qml/usecases/visual-opacity.qml83
-rw-r--r--src/quick/doc/snippets/qml/usecases/visual-rects.qml78
-rw-r--r--src/quick/doc/snippets/qml/usecases/visual-transforms.qml72
-rw-r--r--src/quick/doc/snippets/qml/usecases/visual.qml66
-rw-r--r--src/quick/doc/snippets/qml/visualdatamodel.qml64
-rw-r--r--src/quick/doc/snippets/qml/visualdatamodel_rootindex/main.cpp62
-rw-r--r--src/quick/doc/snippets/qml/visualdatamodel_rootindex/view.qml65
-rw-r--r--src/quick/doc/snippets/qml/xmlrole.qml (renamed from src/quick/doc/snippets/qml/codingconventions/javascript.qml)46
-rw-r--r--src/quick/doc/src/advtutorial.qdoc58
-rw-r--r--src/quick/doc/src/appdevguide/applicationdevelopers.qdoc145
-rw-r--r--src/quick/doc/src/appdevguide/codingconventions.qdoc106
-rw-r--r--src/quick/doc/src/appdevguide/debugging.qdoc158
-rw-r--r--src/quick/doc/src/appdevguide/deployment.qdoc212
-rw-r--r--src/quick/doc/src/appdevguide/glossary.qdoc193
-rw-r--r--src/quick/doc/src/appdevguide/internationalization.qdoc280
-rw-r--r--src/quick/doc/src/appdevguide/performance.qdoc1147
-rw-r--r--src/quick/doc/src/appdevguide/porting.qdoc258
-rw-r--r--src/quick/doc/src/appdevguide/qmlscene.qdoc146
-rw-r--r--src/quick/doc/src/appdevguide/qtquicktest.qdoc131
-rw-r--r--src/quick/doc/src/appdevguide/quickstart/basics.qdoc118
-rw-r--r--src/quick/doc/src/appdevguide/quickstart/essentials.qdoc184
-rw-r--r--src/quick/doc/src/appdevguide/usecases/animations.qdoc73
-rw-r--r--src/quick/doc/src/appdevguide/usecases/integratingjs.qdoc70
-rw-r--r--src/quick/doc/src/appdevguide/usecases/layouts.qdoc79
-rw-r--r--src/quick/doc/src/appdevguide/usecases/styling.qdoc63
-rw-r--r--src/quick/doc/src/appdevguide/usecases/text.qdoc58
-rw-r--r--src/quick/doc/src/appdevguide/usecases/userinput.qdoc83
-rw-r--r--src/quick/doc/src/appdevguide/usecases/visual.qdoc85
-rw-r--r--src/quick/doc/src/concepts/effects/sprites.qdoc1
-rw-r--r--src/quick/doc/src/concepts/input/focus.qdoc1
-rw-r--r--src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc24
-rw-r--r--src/quick/doc/src/concepts/positioning/layouts.qdoc1
-rw-r--r--src/quick/doc/src/concepts/positioning/righttoleft.qdoc3
-rw-r--r--src/quick/doc/src/dynamicview-tutorial.qdoc48
-rw-r--r--src/quick/doc/src/examples.qdoc5
-rw-r--r--src/quick/doc/src/qmltypereference.qdoc20
-rw-r--r--src/quick/doc/src/qtquick.qdoc4
-rw-r--r--src/quick/doc/src/whatsnew.qdoc30
70 files changed, 214 insertions, 5520 deletions
diff --git a/src/quick/doc/images/qml-extending-types.png b/src/quick/doc/images/qml-extending-types.png
deleted file mode 100644
index 6990d7c190..0000000000
--- a/src/quick/doc/images/qml-extending-types.png
+++ /dev/null
Binary files differ
diff --git a/src/quick/doc/images/qml-uses-animation.png b/src/quick/doc/images/qml-uses-animation.png
deleted file mode 100644
index b54361260c..0000000000
--- a/src/quick/doc/images/qml-uses-animation.png
+++ /dev/null
Binary files differ
diff --git a/src/quick/doc/images/qml-uses-integratingjs.png b/src/quick/doc/images/qml-uses-integratingjs.png
deleted file mode 100644
index 3bb0d8aadf..0000000000
--- a/src/quick/doc/images/qml-uses-integratingjs.png
+++ /dev/null
Binary files differ
diff --git a/src/quick/doc/images/qml-uses-layouts-anchors.png b/src/quick/doc/images/qml-uses-layouts-anchors.png
deleted file mode 100644
index 769597cf52..0000000000
--- a/src/quick/doc/images/qml-uses-layouts-anchors.png
+++ /dev/null
Binary files differ
diff --git a/src/quick/doc/images/qml-uses-layouts-direct.png b/src/quick/doc/images/qml-uses-layouts-direct.png
deleted file mode 100644
index 0682da36f8..0000000000
--- a/src/quick/doc/images/qml-uses-layouts-direct.png
+++ /dev/null
Binary files differ
diff --git a/src/quick/doc/images/qml-uses-layouts-positioners.png b/src/quick/doc/images/qml-uses-layouts-positioners.png
deleted file mode 100644
index ebdd9c58dd..0000000000
--- a/src/quick/doc/images/qml-uses-layouts-positioners.png
+++ /dev/null
Binary files differ
diff --git a/src/quick/doc/images/qml-uses-styling-text.png b/src/quick/doc/images/qml-uses-styling-text.png
deleted file mode 100644
index af2518a9e8..0000000000
--- a/src/quick/doc/images/qml-uses-styling-text.png
+++ /dev/null
Binary files differ
diff --git a/src/quick/doc/images/qml-uses-styling.png b/src/quick/doc/images/qml-uses-styling.png
deleted file mode 100644
index a6bf68e783..0000000000
--- a/src/quick/doc/images/qml-uses-styling.png
+++ /dev/null
Binary files differ
diff --git a/src/quick/doc/images/qml-uses-text.png b/src/quick/doc/images/qml-uses-text.png
deleted file mode 100644
index 6b3d88cb3f..0000000000
--- a/src/quick/doc/images/qml-uses-text.png
+++ /dev/null
Binary files differ
diff --git a/src/quick/doc/images/qml-uses-userinput.png b/src/quick/doc/images/qml-uses-userinput.png
deleted file mode 100644
index 2793e8d1d7..0000000000
--- a/src/quick/doc/images/qml-uses-userinput.png
+++ /dev/null
Binary files differ
diff --git a/src/quick/doc/images/qml-uses-visual-opacity.png b/src/quick/doc/images/qml-uses-visual-opacity.png
deleted file mode 100644
index ab238deb54..0000000000
--- a/src/quick/doc/images/qml-uses-visual-opacity.png
+++ /dev/null
Binary files differ
diff --git a/src/quick/doc/images/qml-uses-visual-rectangles.png b/src/quick/doc/images/qml-uses-visual-rectangles.png
deleted file mode 100644
index acf7cb160a..0000000000
--- a/src/quick/doc/images/qml-uses-visual-rectangles.png
+++ /dev/null
Binary files differ
diff --git a/src/quick/doc/images/qml-uses-visual-transforms.png b/src/quick/doc/images/qml-uses-visual-transforms.png
deleted file mode 100644
index d89fc75256..0000000000
--- a/src/quick/doc/images/qml-uses-visual-transforms.png
+++ /dev/null
Binary files differ
diff --git a/src/quick/doc/qtquick.qdocconf b/src/quick/doc/qtquick.qdocconf
index 37ace7b0db..fba4ff89df 100644
--- a/src/quick/doc/qtquick.qdocconf
+++ b/src/quick/doc/qtquick.qdocconf
@@ -34,7 +34,7 @@ qhp.QtQuick.subprojects.examples.selectors = fake:example
tagfile = ../../../doc/qtquick/qtquick.tags
-depends += qtcore qtxmlpatterns qtqml qtgui qtlinguist qtquickcontrols
+depends += qtcore qtxmlpatterns qtqml qtgui qtlinguist qtquickcontrols qtdoc
headerdirs += ..
diff --git a/src/quick/doc/snippets/qml/codingconventions/dotproperties.qml b/src/quick/doc/snippets/qml/codingconventions/dotproperties.qml
deleted file mode 100644
index bbb40a77ee..0000000000
--- a/src/quick/doc/snippets/qml/codingconventions/dotproperties.qml
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation 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 Digia Plc 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 {
-
-//! [0]
-Rectangle {
- anchors.left: parent.left; anchors.top: parent.top; anchors.right: parent.right; anchors.leftMargin: 20
-}
-
-Text {
- text: "hello"
- font.bold: true; font.italic: true; font.pixelSize: 20; font.capitalization: Font.AllUppercase
-}
-
-//! [0]
-
-//! [1]
-Rectangle {
- anchors { left: parent.left; top: parent.top; right: parent.right; leftMargin: 20 }
-}
-
-Text {
- text: "hello"
- font { bold: true; italic: true; pixelSize: 20; capitalization: Font.AllUppercase }
-}
-//! [1]
-
-}
diff --git a/src/quick/doc/snippets/qml/codingconventions/javascript-imports.qml b/src/quick/doc/snippets/qml/codingconventions/javascript-imports.qml
deleted file mode 100644
index fd8301cebe..0000000000
--- a/src/quick/doc/snippets/qml/codingconventions/javascript-imports.qml
+++ /dev/null
@@ -1,47 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation 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 Digia Plc 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
-
-//![0]
-import "myscript.js" as Script
-
-Rectangle { color: "blue"; width: Script.calculateWidth(parent) }
-//![0]
diff --git a/src/quick/doc/snippets/qml/codingconventions/lists.qml b/src/quick/doc/snippets/qml/codingconventions/lists.qml
deleted file mode 100644
index c45129187e..0000000000
--- a/src/quick/doc/snippets/qml/codingconventions/lists.qml
+++ /dev/null
@@ -1,62 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation 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 Digia Plc 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 {
- Item {
-//! [0]
-states: [
- State {
- name: "open"
- PropertyChanges { target: container; width: 200 }
- }
-]
-//! [0]
- }
- Item {
-//! [1]
-states: State {
- name: "open"
- PropertyChanges { target: container; width: 200 }
-}
-//! [1]
- }
-}
diff --git a/src/quick/doc/snippets/qml/codingconventions/myscript.js b/src/quick/doc/snippets/qml/codingconventions/myscript.js
deleted file mode 100644
index cfa646250b..0000000000
--- a/src/quick/doc/snippets/qml/codingconventions/myscript.js
+++ /dev/null
@@ -1,9 +0,0 @@
-function calculateWidth(parent)
-{
- var w = parent.width / 3
- // ...
- // more javascript code
- // ...
- console.debug(w)
- return w
-}
diff --git a/src/quick/doc/snippets/qml/codingconventions/photo.qml b/src/quick/doc/snippets/qml/codingconventions/photo.qml
deleted file mode 100644
index 5260f87127..0000000000
--- a/src/quick/doc/snippets/qml/codingconventions/photo.qml
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation 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 Digia Plc 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
-
-//! [0]
-Rectangle {
- id: photo // id on the first line makes it easy to find an object
-
- property bool thumbnail: false // property declarations
- property alias image: photoImage.source
-
- signal clicked // signal declarations
-
- function doSomething(x) // javascript functions
- {
- return x + photoImage.width
- }
-
- color: "gray" // object properties
- x: 20; y: 20; height: 150 // try to group related properties together
- width: { // large bindings
- if (photoImage.width > 200) {
- photoImage.width;
- } else {
- 200;
- }
- }
-
- Rectangle { // child objects
- id: border
- anchors.centerIn: parent; color: "white"
-
- Image { id: photoImage; anchors.centerIn: parent }
- }
-
- states: State { // states
- name: "selected"
- PropertyChanges { target: border; color: "red" }
- }
-
- transitions: Transition { // transitions
- from: ""; to: "selected"
- ColorAnimation { target: border; duration: 200 }
- }
-}
-//! [0]
-
diff --git a/src/quick/doc/snippets/qml/visualdatagroup.qml b/src/quick/doc/snippets/qml/colors.qml
index 4254b50e63..473df711bd 100644
--- a/src/quick/doc/snippets/qml/visualdatagroup.qml
+++ b/src/quick/doc/snippets/qml/colors.qml
@@ -37,45 +37,89 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-//![0]
+
import QtQuick 2.0
Rectangle {
- width: 200; height: 100
+ width: 160; height: 250
+
+ Image {
+ width: 160; height: 200
+ source: "pics/checker.svg"
+ fillMode: Image.Tile
- VisualDataModel {
- id: visualModel
- model: ListModel {
- ListElement { name: "Apple" }
- ListElement { name: "Orange" }
+ //! [colors]
+ Rectangle {
+ color: "steelblue"
+ width: 40; height: 40
+ }
+ Rectangle {
+ color: "transparent"
+ y: 40; width: 40; height: 40
+ }
+ Rectangle {
+ color: "#FF0000"
+ y: 80; width: 40; height: 40
}
+ Rectangle {
+ color: "#800000FF"
+ y: 120; width: 40; height: 40
+ }
+ Rectangle {
+ color: "#00000000" // ARGB fully transparent
+ y: 160
+ width: 40; height: 40
+ }
+ //! [colors]
- groups: [
- VisualDataGroup { name: "selected" }
- ]
+ Rectangle {
+ x: 40
+ width: 120; height: 200
- delegate: Rectangle {
- id: item
- height: 25
- width: 200
Text {
- text: {
- var text = "Name: " + name
- if (item.VisualDataModel.inSelected)
- text += " (" + item.VisualDataModel.selectedIndex + ")"
- return text;
- }
+ font.pixelSize: 16
+ text: "steelblue"
+ x: 10; height: 40
+ verticalAlignment: Text.AlignVCenter
}
- MouseArea {
- anchors.fill: parent
- onClicked: item.VisualDataModel.inSelected = !item.VisualDataModel.inSelected
+ Text {
+ font.pixelSize: 16
+ text: "transparent"
+ x: 10; y: 40; height: 40
+ verticalAlignment: Text.AlignVCenter
+ }
+ Text {
+ font.pixelSize: 16
+ text: "FF0000"
+ x: 10; y: 80; height: 40
+ verticalAlignment: Text.AlignVCenter
+ }
+ Text {
+ font.pixelSize: 16
+ text: "800000FF"
+ x: 10; y: 120; height: 40
+ verticalAlignment: Text.AlignVCenter
+ }
+ Text {
+ font.pixelSize: 16
+ text: "00000000"
+ x: 10; y: 160; height: 40
+ verticalAlignment: Text.AlignVCenter
}
}
}
- ListView {
- anchors.fill: parent
- model: visualModel
+ Image {
+ y: 210
+ width: 40; height: 40
+ source: "pics/checker.svg"
+ fillMode: Image.Tile
+ }
+
+ Text {
+ font.pixelSize: 16
+ text: "(background)"
+ x: 50; y: 210; height: 40
+ verticalAlignment: Text.AlignVCenter
}
}
-//![0]
diff --git a/src/quick/doc/snippets/qml/usecases/Button.qml b/src/quick/doc/snippets/qml/usecases/Button.qml
deleted file mode 100644
index 6c4c0f7cd3..0000000000
--- a/src/quick/doc/snippets/qml/usecases/Button.qml
+++ /dev/null
@@ -1,86 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation 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 Digia Plc 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$
-**
-****************************************************************************/
-
-//![0]
-import QtQuick 2.0
-
-Rectangle {
- id: container
- // The caption property is an alias to the text of the Text element, so Button users can set the text
- property alias caption: txt.text
- // The clicked signal is emitted whenever the button is clicked, so Button users can respond
- signal clicked
-
- // The button is set to have rounded corners and a thin black border
- radius: 4
- border.width: 1
- // This button has a fixed size, but it could resize based on the text
- width: 160
- height: 40
-
- // A SystemPalette is used to get colors from the system settings for the background
- SystemPalette { id: sysPalette }
-
- gradient: Gradient {
-
- // The top gradient is darker when 'pressed', all colors come from the system palette
- GradientStop { position: 0.0; color: ma.pressed ? sysPalette.dark : sysPalette.light }
-
- GradientStop { position: 1.0; color: sysPalette.button }
- }
-
- Text {
- id: txt
- // This is the default value of the text, but most Button users will set their own with the caption property
- text: "Button"
- font.bold: true
- font.pixelSize: 16
- anchors.centerIn: parent
- }
-
- MouseArea {
- id: ma
- anchors.fill: parent
- // This re-emits the clicked signal on the root item, so that Button users can respond to it
- onClicked: container.clicked()
- }
-}
-
-//![0]
diff --git a/src/quick/doc/snippets/qml/usecases/MyText.qml b/src/quick/doc/snippets/qml/usecases/MyText.qml
deleted file mode 100644
index d58a4036bb..0000000000
--- a/src/quick/doc/snippets/qml/usecases/MyText.qml
+++ /dev/null
@@ -1,48 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation 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 Digia Plc 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$
-**
-****************************************************************************/
-
-//![0]
-import QtQuick 2.0
-
-Text {
- color: "lightsteelblue"
- font { family: 'Courier'; pixelSize: 20; bold: true; capitalization: Font.SmallCaps }
-}
-//![0]
diff --git a/src/quick/doc/snippets/qml/usecases/animations.qml b/src/quick/doc/snippets/qml/usecases/animations.qml
deleted file mode 100644
index 1887acf901..0000000000
--- a/src/quick/doc/snippets/qml/usecases/animations.qml
+++ /dev/null
@@ -1,187 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation 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 Digia Plc 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$
-**
-****************************************************************************/
-
-//![0]
-import QtQuick 2.0
-
-Item {
-
- width: 320
- height: 480
-
- Rectangle {
- color: "#272822"
- width: 320
- height: 480
- }
-
- Column {
- //![states]
-
- Item {
- id: container
- width: 320
- height: 120
-
- Rectangle {
- id: rect
- color: "red"
- width: 120
- height: 120
-
- MouseArea {
- anchors.fill: parent
- onClicked: container.state == 'other' ? container.state = '' : container.state = 'other'
- }
- }
- states: [
- // This adds a second state to the container where the rectangle is farther to the right
-
- State { name: "other"
-
- PropertyChanges {
- target: rect
- x: 200
- }
- }
- ]
- transitions: [
- // This adds a transition that defaults to applying to all state changes
-
- Transition {
-
- // This applies a default NumberAnimation to any changes a state change makes to x or y properties
- NumberAnimation { properties: "x,y" }
- }
- ]
- }
- //![states]
- //![behave]
- Item {
- width: 320
- height: 120
-
- Rectangle {
- color: "green"
- width: 120
- height: 120
-
- // This is the behavior, and it applies a NumberAnimation to any attempt to set the x property
- Behavior on x {
-
- NumberAnimation {
- //This specifies how long the animation takes
- duration: 600
- //This selects an easing curve to interpolate with, the default is Easing.Linear
- easing.type: Easing.OutBounce
- }
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: parent.x == 0 ? parent.x = 200 : parent.x = 0
- }
- }
- }
- //![behave]
- //![constant]
- Item {
- width: 320
- height: 120
-
- Rectangle {
- color: "blue"
- width: 120
- height: 120
-
- // By setting this SequentialAnimation on x, it and animations within it will automatically animate
- // the x property of this element
- SequentialAnimation on x {
- id: xAnim
- // Animations on properties start running by default
- running: false
- loops: Animation.Infinite // The animation is set to loop indefinitely
- NumberAnimation { from: 0; to: 200; duration: 500; easing.type: Easing.InOutQuad }
- NumberAnimation { from: 200; to: 0; duration: 500; easing.type: Easing.InOutQuad }
- PauseAnimation { duration: 250 } // This puts a bit of time between the loop
- }
-
- MouseArea {
- anchors.fill: parent
- // The animation starts running when you click within the rectangle
- onClicked: xAnim.running = true
- }
- }
- }
- //![constant]
-
- //![scripted]
- Item {
- width: 320
- height: 120
-
- Rectangle {
- id: rectangle
- color: "yellow"
- width: 120
- height: 120
-
- MouseArea {
- anchors.fill: parent
- // The animation starts running when you click within the rectange
- onClicked: anim.running = true;
- }
- }
-
- // This animation specifically targets the Rectangle's properties to animate
- SequentialAnimation {
- id: anim
- // Animations on their own are not running by default
- // The default number of loops is one, restart the animation to see it again
-
- NumberAnimation { target: rectangle; property: "x"; from: 0; to: 200; duration: 500 }
-
- NumberAnimation { target: rectangle; property: "x"; from: 200; to: 0; duration: 500 }
- }
- }
- //![scripted]
- }
-}
-//![0]
diff --git a/src/quick/doc/snippets/qml/usecases/integratingjs-inline.qml b/src/quick/doc/snippets/qml/usecases/integratingjs-inline.qml
deleted file mode 100644
index 24758d4e09..0000000000
--- a/src/quick/doc/snippets/qml/usecases/integratingjs-inline.qml
+++ /dev/null
@@ -1,79 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation 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 Digia Plc 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$
-**
-****************************************************************************/
-
-//![0]
-import QtQuick 2.0
-
-Item {
- id: container
- width: 320
- height: 480
-
- function randomNumber() {
- return Math.random() * 360;
- }
-
- function getNumber() {
- return container.randomNumber();
- }
-
- MouseArea {
- anchors.fill: parent
- // This line uses the JS function from the item
- onClicked: rectangle.rotation = container.getNumber();
- }
-
- Rectangle {
- color: "#272822"
- width: 320
- height: 480
- }
-
- Rectangle {
- id: rectangle
- anchors.centerIn: parent
- width: 160
- height: 160
- color: "green"
- Behavior on rotation { RotationAnimation { direction: RotationAnimation.Clockwise } }
- }
-
-}
-//![0]
diff --git a/src/quick/doc/snippets/qml/usecases/integratingjs.qml b/src/quick/doc/snippets/qml/usecases/integratingjs.qml
deleted file mode 100644
index 9e7ed2a35b..0000000000
--- a/src/quick/doc/snippets/qml/usecases/integratingjs.qml
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation 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 Digia Plc 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$
-**
-****************************************************************************/
-
-//![0]
-import QtQuick 2.0
-import "myscript.js" as Logic
-
-Item {
- width: 320
- height: 480
-
- Rectangle {
- color: "#272822"
- width: 320
- height: 480
- }
-
- MouseArea {
- anchors.fill: parent
- // This line uses the JS function from the separate JS file
- onClicked: rectangle.rotation = Logic.getRandom(rectangle.rotation);
- }
-
- Rectangle {
- id: rectangle
- anchors.centerIn: parent
- width: 160
- height: 160
- color: "green"
- Behavior on rotation { RotationAnimation { direction: RotationAnimation.Clockwise } }
- }
-
-}
-//![0]
diff --git a/src/quick/doc/snippets/qml/usecases/layouts.qml b/src/quick/doc/snippets/qml/usecases/layouts.qml
deleted file mode 100644
index e9483d2b9b..0000000000
--- a/src/quick/doc/snippets/qml/usecases/layouts.qml
+++ /dev/null
@@ -1,142 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation 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 Digia Plc 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]
-import QtQuick 2.0
-
-//![import]
-
-Column {
-
-//![direct]
-Item {
- width: 100; height: 100
-
- Rectangle {
- // Manually positioned at 20,20
- x: 20
- y: 20
- width: 80
- height: 80
- color: "red"
- }
-}
-//![direct]
-
-//![anchors]
-Item {
- width: 200; height: 200
-
- Rectangle {
- // Anchored to 20px off the top right corner of the parent
- anchors.right: parent.right
- anchors.top: parent.top
- anchors.margins: 20 // Sets all margins at once
-
- width: 80
- height: 80
- color: "orange"
- }
-
- Rectangle {
- // Anchored to 20px off the top center corner of the parent.
- // Notice the different group property syntax for 'anchors' compared to
- // the previous Rectangle. Both are valid.
- anchors { horizontalCenter: parent.horizontalCenter; top: parent.top; topMargin: 20 }
-
- width: 80
- height: 80
- color: "green"
- }
-}
-//![anchors]
-
-//![positioners]
-Item {
- width: 300; height: 100
-
- Row { // The "Row" type lays out its child items in a horizontal line
- spacing: 20 // Places 20px of space between items
-
- Rectangle { width: 80; height: 80; color: "red" }
- Rectangle { width: 80; height: 80; color: "green" }
- Rectangle { width: 80; height: 80; color: "blue" }
- }
-}
-//![positioners]
-
-Item {
- width: 300; height: 400
-
- Rectangle {
- id: middleRect
- //This Rectangle has its y animated, for the others to follow
- x: 120
- y: 220
- SequentialAnimation on y {
- loops: -1
- NumberAnimation { from: 220; to: 380; easing.type: Easing.InOutQuad; duration: 1200 }
- NumberAnimation { from: 380; to: 220; easing.type: Easing.InOutQuad; duration: 1200 }
- }
- width: 80
- height: 80
- color: "green"
- }
- Rectangle {
- // x,y bound to the position of middleRect
- x: middleRect.x - 100
- y: middleRect.y
- width: 80
- height: 80
- color: "red"
- }
-
- Rectangle {
- // Anchored to the position of middleRect
- anchors.left: middleRect.right
- anchors.leftMargin: 20
- anchors.verticalCenter: middleRect.verticalCenter
- width: 80
- height: 80
- color: "blue"
- }
-}
-
-}
diff --git a/src/quick/doc/snippets/qml/usecases/myscript.js b/src/quick/doc/snippets/qml/usecases/myscript.js
deleted file mode 100644
index 84b0c801a2..0000000000
--- a/src/quick/doc/snippets/qml/usecases/myscript.js
+++ /dev/null
@@ -1,46 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation 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 Digia Plc 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$
-**
-****************************************************************************/
-
-//![0]
-// myscript.js
-function getRandom(previousValue) {
- return Math.floor(previousValue + Math.random() * 90) % 360;
-}
-//![0]
diff --git a/src/quick/doc/snippets/qml/usecases/styling-text.qml b/src/quick/doc/snippets/qml/usecases/styling-text.qml
deleted file mode 100644
index 0c68a11ad6..0000000000
--- a/src/quick/doc/snippets/qml/usecases/styling-text.qml
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation 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 Digia Plc 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$
-**
-****************************************************************************/
-
-//![0]
-import QtQuick 2.0
-
-Item {
- id: root
- width: 480
- height: 320
-
- Rectangle {
- color: "#272822"
- width: 480
- height: 320
- }
-
-//![texts]
- Column {
- spacing: 20
-
- MyText { text: 'I am the very model of a modern major general!' }
-
- MyText { text: 'I\'ve information vegetable, animal and mineral.' }
-
- MyText {
- width: root.width
- wrapMode: Text.WordWrap
- text: 'I know the kings of England and I quote the fights historical:'
- }
-
- MyText { text: 'From Marathon to Waterloo in order categorical.' }
- }
-//![texts]
-}
-//![0]
diff --git a/src/quick/doc/snippets/qml/usecases/styling.qml b/src/quick/doc/snippets/qml/usecases/styling.qml
deleted file mode 100644
index b46b9e3d55..0000000000
--- a/src/quick/doc/snippets/qml/usecases/styling.qml
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation 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 Digia Plc 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$
-**
-****************************************************************************/
-
-//![0]
-import QtQuick 2.0
-
-Item {
- width: 320
- height: 480
-
- Rectangle {
- color: "#272822"
- width: 320
- height: 480
- }
-
- Column {
- width: childrenRect.width
- anchors.centerIn: parent
- spacing: 8
- // Each of these is a Button as styled in Button.qml
- Button { caption: "Eeny"; onClicked: console.log("Eeny");}
- Button { caption: "Meeny"; onClicked: console.log("Meeny");}
- Button { caption: "Miny"; onClicked: console.log("Miny");}
- Button { caption: "Mo"; onClicked: console.log("Mo");}
- }
-}
-//![0]
diff --git a/src/quick/doc/snippets/qml/usecases/text.qml b/src/quick/doc/snippets/qml/usecases/text.qml
deleted file mode 100644
index c7adc12763..0000000000
--- a/src/quick/doc/snippets/qml/usecases/text.qml
+++ /dev/null
@@ -1,105 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation 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 Digia Plc 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$
-**
-****************************************************************************/
-
-//![0]
-import QtQuick 2.0
-
-Item {
- id: root
- width: 480
- height: 320
-
- Rectangle {
- color: "#272822"
- width: 480
- height: 320
- }
-
- Column {
- spacing: 20
-
- Text {
- text: 'I am the very model of a modern major general!'
-
- // color can be set on the entire element with this property
- color: "yellow"
-
- }
-
- Text {
- // For text to wrap, a width has to be explicitly provided
- width: root.width
-
- // This setting makes the text wrap at word boundaries when it goes past the width of the Text object
- wrapMode: Text.WordWrap
-
- // You can use \ to escape quotation marks, or to add new lines (\n). Use \\ to get a \ in the string
- text: 'I am the very model of a modern major general. I\'ve information vegetable, animal and mineral. I know the kings of england and I quote the fights historical; from Marathon to Waterloo in order categorical.'
-
- // color can be set on the entire element with this property
- color: "white"
-
- }
-
- Text {
- text: 'I am the very model of a modern major general!'
-
- // color can be set on the entire element with this property
- color: "yellow"
-
- // font properties can be set effciently on the whole string at once
- font { family: 'Courier'; pixelSize: 20; italic: true; capitalization: Font.SmallCaps }
-
- }
-
- Text {
- // HTML like markup can also be used
- text: '<font color="white">I am the <b>very</b> model of a modern <i>major general</i>!</font>'
-
- // This could also be written font { pointSize: 14 }. Both syntaxes are valid.
- font.pointSize: 14
-
- // StyledText format supports fewer tags, but is more efficient than RichText
- textFormat: Text.StyledText
-
- }
- }
-}
-//![0]
diff --git a/src/quick/doc/snippets/qml/usecases/userinput-keys.qml b/src/quick/doc/snippets/qml/usecases/userinput-keys.qml
deleted file mode 100644
index 73b42b2f59..0000000000
--- a/src/quick/doc/snippets/qml/usecases/userinput-keys.qml
+++ /dev/null
@@ -1,71 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation 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 Digia Plc 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$
-**
-****************************************************************************/
-
-//![0]
-import QtQuick 2.0
-
-Item {
- id: root
-
- width: 320
- height: 480
-
- Rectangle {
- color: "#272822"
- width: 320
- height: 480
- }
-
- Rectangle {
- id: rectangle
- x: 40
- y: 20
- width: 120
- height: 120
- color: "red"
-
- focus: true
- Keys.onUpPressed: rectangle.y -= 10
- Keys.onDownPressed: rectangle.y += 10
- Keys.onLeftPressed: rectangle.x += 10
- Keys.onRightPressed: rectangle.x -= 10
- }
-}
-//![0]
diff --git a/src/quick/doc/snippets/qml/usecases/userinput.qml b/src/quick/doc/snippets/qml/usecases/userinput.qml
deleted file mode 100644
index 5aabcde18e..0000000000
--- a/src/quick/doc/snippets/qml/usecases/userinput.qml
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation 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 Digia Plc 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$
-**
-****************************************************************************/
-
-//![0]
-import QtQuick 2.0
-
-Item {
- id: root
-
- width: 320
- height: 480
-
- Rectangle {
- color: "#272822"
- width: 320
- height: 480
- }
-
- Rectangle {
- id: rectangle
- x: 40
- y: 20
- width: 120
- height: 120
- color: "red"
-
- MouseArea {
- anchors.fill: parent
- onClicked: rectangle.width += 10
- }
- }
-}
-//![0]
diff --git a/src/quick/doc/snippets/qml/usecases/visual-opacity.qml b/src/quick/doc/snippets/qml/usecases/visual-opacity.qml
deleted file mode 100644
index d5a1e6f91f..0000000000
--- a/src/quick/doc/snippets/qml/usecases/visual-opacity.qml
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation 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 Digia Plc 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$
-**
-****************************************************************************/
-
-//![0]
-import QtQuick 2.0
-
-Item {
-
- width: 320
- height: 480
-
- Rectangle {
- color: "#272822"
- width: 320
- height: 480
- }
-
- Item {
- x: 20
- y: 270
- width: 200
- height: 200
- MouseArea {
- anchors.fill: parent
- onClicked: topRect.visible = !topRect.visible
- }
- Rectangle {
- x: 20
- y: 20
- width: 100
- height: 100
- color: "red"
- }
- Rectangle {
- id: topRect
- opacity: 0.5
-
- x: 100
- y: 100
- width: 100
- height: 100
- color: "blue"
- }
- }
-}
-//![0]
diff --git a/src/quick/doc/snippets/qml/usecases/visual-rects.qml b/src/quick/doc/snippets/qml/usecases/visual-rects.qml
deleted file mode 100644
index 16cfd7bae5..0000000000
--- a/src/quick/doc/snippets/qml/usecases/visual-rects.qml
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation 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 Digia Plc 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$
-**
-****************************************************************************/
-
-//![0]
-import QtQuick 2.0
-
-Item {
-
- width: 320
- height: 480
-
- Rectangle {
- color: "#272822"
- width: 320
- height: 480
- }
-
- // This element displays a rectangle with a gradient and a border
- Rectangle {
- x: 160
- y: 20
- width: 100
- height: 100
- radius: 8 // This gives rounded corners to the Rectangle
- gradient: Gradient { // This sets a vertical gradient fill
- GradientStop { position: 0.0; color: "aqua" }
- GradientStop { position: 1.0; color: "teal" }
- }
- border { width: 3; color: "white" } // This sets a 3px wide black border to be drawn
- }
-
- // This rectangle is a plain color with no border
- Rectangle {
- x: 40
- y: 20
- width: 100
- height: 100
- color: "red"
- }
-}
-//![0]
diff --git a/src/quick/doc/snippets/qml/usecases/visual-transforms.qml b/src/quick/doc/snippets/qml/usecases/visual-transforms.qml
deleted file mode 100644
index 924f4b79ff..0000000000
--- a/src/quick/doc/snippets/qml/usecases/visual-transforms.qml
+++ /dev/null
@@ -1,72 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation 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 Digia Plc 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$
-**
-****************************************************************************/
-
-//![0]
-import QtQuick 2.0
-
-Item {
-
- width: 320
- height: 480
-
- Rectangle {
- color: "#272822"
- width: 320
- height: 480
- }
-
- Rectangle {
- rotation: 45 // This rotates the Rectangle by 45 degrees
- x: 20
- y: 160
- width: 100
- height: 100
- color: "blue"
- }
- Rectangle {
- scale: 0.8 // This scales the Rectangle down to 80% size
- x: 160
- y: 160
- width: 100
- height: 100
- color: "green"
- }
-}
-//![0]
diff --git a/src/quick/doc/snippets/qml/usecases/visual.qml b/src/quick/doc/snippets/qml/usecases/visual.qml
deleted file mode 100644
index fe381136cb..0000000000
--- a/src/quick/doc/snippets/qml/usecases/visual.qml
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation 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 Digia Plc 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$
-**
-****************************************************************************/
-
-//![0]
-import QtQuick 2.0
-
-Item {
-
- width: 320
- height: 480
-
- Rectangle {
- color: "#272822"
- width: 320
- height: 480
- }
-
- //![image]
- // This element displays an image. Because the source is online, it may take some time to fetch
- Image {
- x: 40
- y: 20
- width: 61
- height: 73
- source: "http://codereview.qt-project.org/static/logo_qt.png"
- }
- //![image]
-}
-//![0]
diff --git a/src/quick/doc/snippets/qml/visualdatamodel.qml b/src/quick/doc/snippets/qml/visualdatamodel.qml
deleted file mode 100644
index 0513c5b5f2..0000000000
--- a/src/quick/doc/snippets/qml/visualdatamodel.qml
+++ /dev/null
@@ -1,64 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation 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 Digia Plc 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$
-**
-****************************************************************************/
-//![0]
-import QtQuick 2.0
-
-Rectangle {
- width: 200; height: 100
-
- VisualDataModel {
- id: visualModel
- model: ListModel {
- ListElement { name: "Apple" }
- ListElement { name: "Orange" }
- }
- delegate: Rectangle {
- height: 25
- width: 100
- Text { text: "Name: " + name}
- }
- }
-
- ListView {
- anchors.fill: parent
- model: visualModel
- }
-}
-//![0]
diff --git a/src/quick/doc/snippets/qml/visualdatamodel_rootindex/main.cpp b/src/quick/doc/snippets/qml/visualdatamodel_rootindex/main.cpp
deleted file mode 100644
index da1086146c..0000000000
--- a/src/quick/doc/snippets/qml/visualdatamodel_rootindex/main.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQml module 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 Digia Plc 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 <QQuickView>
-#include <QQmlContext>
-
-#include <QApplication>
-#include <QDirModel>
-
-//![0]
-int main(int argc, char ** argv)
-{
- QApplication app(argc, argv);
-
- QQuickView view;
-
- QDirModel model;
- view.rootContext()->setContextProperty("dirModel", &model);
-
- view.setSource(QUrl::fromLocalFile("view.qml"));
- view.show();
-
- return app.exec();
-}
-//![0]
-
diff --git a/src/quick/doc/snippets/qml/visualdatamodel_rootindex/view.qml b/src/quick/doc/snippets/qml/visualdatamodel_rootindex/view.qml
deleted file mode 100644
index 1e8cfade96..0000000000
--- a/src/quick/doc/snippets/qml/visualdatamodel_rootindex/view.qml
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation 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 Digia Plc 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$
-**
-****************************************************************************/
-//![0]
-import QtQuick 2.0
-
-ListView {
- id: view
- width: 300
- height: 400
-
- model: VisualDataModel {
- model: dirModel
-
- delegate: Rectangle {
- width: 200; height: 25
- Text { text: filePath }
-
- MouseArea {
- anchors.fill: parent
- onClicked: {
- if (model.hasModelChildren)
- view.model.rootIndex = view.model.modelIndex(index)
- }
- }
- }
- }
-}
-//![0]
diff --git a/src/quick/doc/snippets/qml/codingconventions/javascript.qml b/src/quick/doc/snippets/qml/xmlrole.qml
index 72c954f699..0f75135da2 100644
--- a/src/quick/doc/snippets/qml/codingconventions/javascript.qml
+++ b/src/quick/doc/snippets/qml/xmlrole.qml
@@ -39,35 +39,43 @@
****************************************************************************/
import QtQuick 2.0
+import QtQuick.XmlListModel 2.0
Rectangle {
+ width: 300; height: 200
//![0]
-Rectangle { color: "blue"; width: parent.width / 3 }
+XmlListModel {
+ id: model
//![0]
+ source: "xmlrole.xml"
//![1]
-Rectangle {
- color: "blue"
- width: {
- var w = parent.width / 3
- console.debug(w)
- return w
- }
+ // XmlRole queries will be made on <book> elements
+ query: "/catalogue/book"
+
+ // query the book title
+ XmlRole { name: "title"; query: "title/string()" }
+
+ // query the book's year
+ XmlRole { name: "year"; query: "year/number()" }
+
+ // query the book's type (the '@' indicates 'type' is an attribute, not an element)
+ XmlRole { name: "type"; query: "@type/string()" }
+
+ // query the book's first listed author (note in XPath the first index is 1, not 0)
+ XmlRole { name: "first_author"; query: "author[1]/string()" }
}
//![1]
-//![2]
-function calculateWidth(object)
-{
- var w = object.width / 3
- // ...
- // more javascript code
- // ...
- console.debug(w)
- return w
+ListView {
+ width: 300; height: 200
+ model: model
+ delegate: Column {
+ Text { text: title + " (" + type + ")"; font.bold: true }
+ Text { text: first_author }
+ Text { text: year }
+ }
}
-Rectangle { color: "blue"; width: calculateWidth(parent) }
-//![2]
}
diff --git a/src/quick/doc/src/advtutorial.qdoc b/src/quick/doc/src/advtutorial.qdoc
index a27cb78eba..80a0173f32 100644
--- a/src/quick/doc/src/advtutorial.qdoc
+++ b/src/quick/doc/src/advtutorial.qdoc
@@ -81,7 +81,7 @@ To begin with, we create our Same Game application with a main screen like this:
This is defined by the main application file, \c samegame.qml, which looks like this:
-\snippet quick/tutorials/samegame/samegame1/samegame.qml 0
+\snippet tutorials/samegame/samegame1/samegame.qml 0
This gives you a basic game window that includes the main canvas for the
blocks, a "New Game" button and a score display.
@@ -99,7 +99,7 @@ The \c Button item in the code above is defined in a separate component file nam
To create a functional button, we use the QML types \l Text and \l MouseArea inside a \l Rectangle.
Here is the \c Button.qml code:
-\snippet quick/tutorials/samegame/samegame1/Button.qml 0
+\snippet tutorials/samegame/samegame1/Button.qml 0
This essentially defines a rectangle that contains text and can be clicked. The \l MouseArea
has an \c onClicked() handler that is implemented to emit the \c clicked() signal of the
@@ -109,7 +109,7 @@ In Same Game, the screen is filled with small blocks when the game begins.
Each block is just an item that contains an image. The block
code is defined in a separate \c Block.qml file:
-\snippet quick/tutorials/samegame/samegame1/Block.qml 0
+\snippet tutorials/samegame/samegame1/Block.qml 0
At the moment, the block doesn't do anything; it is just an image. As the
tutorial progresses we will animate and give behaviors to the blocks.
@@ -153,7 +153,7 @@ create the blocks in JavaScript.
Here is the JavaScript code for generating the blocks, contained in a new
file, \c samegame.js. The code is explained below.
-\snippet quick/tutorials/samegame/samegame2/samegame.js 0
+\snippet tutorials/samegame/samegame2/samegame.js 0
The \c startNewGame() function deletes the blocks created in the previous game and
calculates the number of rows and columns of blocks required to fill the game window for the new game.
@@ -165,7 +165,7 @@ and moves the new block to its position on the game canvas. This involves severa
\list
-\li \l {QML:Qt::createComponent()}{Qt.createComponent()} is called to
+\li \l {QtQml2::Qt::createComponent()}{Qt.createComponent()} is called to
generate a type from \c Block.qml. If the component is ready,
we can call \c createObject() to create an instance of the \c Block
item.
@@ -189,14 +189,14 @@ Now we need to call the JavaScript code in \c samegame.js from our QML files.
To do this, we add this line to \c samegame.qml which imports
the JavaScript file as a \l{QML Modules}{module}:
-\snippet quick/tutorials/samegame/samegame2/samegame.qml 2
+\snippet tutorials/samegame/samegame2/samegame.qml 2
This allows us to refer to any functions within \c samegame.js using "SameGame"
as a prefix: for example, \c SameGame.startNewGame() or \c SameGame.createBlock().
This means we can now connect the New Game button's \c onClicked handler to the \c startNewGame()
function, like this:
-\snippet quick/tutorials/samegame/samegame2/samegame.qml 1
+\snippet tutorials/samegame/samegame2/samegame.qml 1
So, when you click the New Game button, \c startNewGame() is called and generates a field of blocks, like this:
@@ -237,7 +237,7 @@ As this is a tutorial about QML, not game design, we will only discuss \c handle
To make it easier for the JavaScript code to interface with the QML types, we have added an Item called \c gameCanvas to \c samegame.qml. It replaces the background as the item which contains the blocks. It also accepts mouse input from the user. Here is the item code:
-\snippet quick/tutorials/samegame/samegame3/samegame.qml 1
+\snippet tutorials/samegame/samegame3/samegame.qml 1
The \c gameCanvas item is the exact size of the board, and has a \c score property and a \l MouseArea to handle mouse clicks.
The blocks are now created as its children, and its dimensions are used to determine the board size so that
@@ -247,7 +247,7 @@ Note that it can still be accessed from the script.
When clicked, the \l MouseArea calls \c{handleClick()} in \c samegame.js, which determines whether the player's click should cause any blocks to be removed, and updates \c gameCanvas.score with the current score if necessary. Here is the \c handleClick() function:
-\snippet quick/tutorials/samegame/samegame3/samegame.js 1
+\snippet tutorials/samegame/samegame3/samegame.js 1
Note that if \c score was a global variable in the \c{samegame.js} file you would not be able to bind to it. You can only bind to QML properties.
@@ -255,17 +255,17 @@ Note that if \c score was a global variable in the \c{samegame.js} file you woul
When the player clicks a block and triggers \c handleClick(), \c handleClick() also calls \c victoryCheck() to update the score and to check whether the player has completed the game. Here is the \c victoryCheck() code:
-\snippet quick/tutorials/samegame/samegame3/samegame.js 2
+\snippet tutorials/samegame/samegame3/samegame.js 2
This updates the \c gameCanvas.score value and displays a "Game Over" dialog if the game is finished.
The Game Over dialog is created using a \c Dialog type that is defined in \c Dialog.qml. Here is the \c Dialog.qml code. Notice how it is designed to be usable imperatively from the script file, via the functions and signals:
-\snippet quick/tutorials/samegame/samegame3/Dialog.qml 0
+\snippet tutorials/samegame/samegame3/Dialog.qml 0
And this is how it is used in the main \c samegame.qml file:
-\snippet quick/tutorials/samegame/samegame3/samegame.qml 2
+\snippet tutorials/samegame/samegame3/samegame.qml 2
We give the dialog a \l {Item::z}{z} value of 100 to ensure it is displayed on top of our other components. The default \c z value for an item is 0.
@@ -274,7 +274,7 @@ We give the dialog a \l {Item::z}{z} value of 100 to ensure it is displayed on t
It's not much fun to play Same Game if all the blocks are the same color, so we've modified the \c createBlock() function in \c samegame.js to randomly create a different type of block (for either red, green or blue) each time it is called. \c Block.qml has also changed so that each block contains a different image depending on its type:
-\snippet quick/tutorials/samegame/samegame3/Block.qml 0
+\snippet tutorials/samegame/samegame3/Block.qml 0
\section2 A working game
@@ -286,7 +286,7 @@ Here is a screenshot of what has been accomplished so far:
This is what \c samegame.qml looks like now:
-\snippet quick/tutorials/samegame/samegame3/samegame.qml 0
+\snippet tutorials/samegame/samegame3/samegame.qml 0
The game works, but it's a little boring right now. Where are the smooth animated transitions? Where are the high scores?
If you were a QML expert you could have written these in the first iteration, but in this tutorial they've been saved
@@ -319,7 +319,7 @@ In \c BoomBlock.qml, we apply a \l SpringAnimation behavior to the \c x and \c y
block will follow and animate its movement in a spring-like fashion towards the specified position (whose
values will be set by \c samegame.js).Here is the code added to \c BoomBlock.qml:
-\snippet quick/tutorials/samegame/samegame4/content/BoomBlock.qml 1
+\snippet tutorials/samegame/samegame4/content/BoomBlock.qml 1
The \c spring and \c damping values can be changed to modify the spring-like effect of the animation.
@@ -336,7 +336,7 @@ animate the opacity value so that it gradually fades in and out, instead of abru
visible and invisible. To do this, we'll apply a \l Behavior on the \c opacity property of the \c Image
type in \c BoomBlock.qml:
-\snippet quick/tutorials/samegame/samegame4/content/BoomBlock.qml 2
+\snippet tutorials/samegame/samegame4/content/BoomBlock.qml 2
Note the \c{opacity: 0} which means the block is transparent when it is first created. We could set the opacity
in \c samegame.js when we create and destroy the blocks,
@@ -362,14 +362,14 @@ To fade out, we set \c dying to true instead of setting opacity to 0 when a bloc
Finally, we'll add a cool-looking particle effect to the blocks when they are destroyed. To do this, we first add a \l ParticleSystem in
\c BoomBlock.qml, like so:
-\snippet quick/tutorials/samegame/samegame4/content/BoomBlock.qml 3
+\snippet tutorials/samegame/samegame4/content/BoomBlock.qml 3
To fully understand this you should read the \l Particles documentation, but it's important to note that \c emitRate is set
to zero so that particles are not emitted normally.
Also, we extend the \c dying State, which creates a burst of particles by calling the \c burst() method on the particles type. The code for the states now look
like this:
-\snippet quick/tutorials/samegame/samegame4/content/BoomBlock.qml 4
+\snippet tutorials/samegame/samegame4/content/BoomBlock.qml 4
Now the game is beautifully animated, with subtle (or not-so-subtle) animations added for all of the
player's actions. The end result is shown below, with a different set of images to demonstrate basic theming:
@@ -386,32 +386,32 @@ To do this, we will show a dialog when the game is over to request the player's
This requires a few changes to \c Dialog.qml. In addition to a \c Text type, it now has a
\c TextInput child item for receiving keyboard text input:
-\snippet quick/tutorials/samegame/samegame4/content/Dialog.qml 0
+\snippet tutorials/samegame/samegame4/content/Dialog.qml 0
\dots 4
-\snippet quick/tutorials/samegame/samegame4/content/Dialog.qml 2
+\snippet tutorials/samegame/samegame4/content/Dialog.qml 2
\dots 4
-\snippet quick/tutorials/samegame/samegame4/content/Dialog.qml 3
+\snippet tutorials/samegame/samegame4/content/Dialog.qml 3
We'll also add a \c showWithInput() function. The text input will only be visible if this function
is called instead of \c show(). When the dialog is closed, it emits a \c closed() signal, and
other types can retrieve the text entered by the user through an \c inputText property:
-\snippet quick/tutorials/samegame/samegame4/content/Dialog.qml 0
-\snippet quick/tutorials/samegame/samegame4/content/Dialog.qml 1
+\snippet tutorials/samegame/samegame4/content/Dialog.qml 0
+\snippet tutorials/samegame/samegame4/content/Dialog.qml 1
\dots 4
-\snippet quick/tutorials/samegame/samegame4/content/Dialog.qml 3
+\snippet tutorials/samegame/samegame4/content/Dialog.qml 3
Now the dialog can be used in \c samegame.qml:
-\snippet quick/tutorials/samegame/samegame4/samegame.qml 0
+\snippet tutorials/samegame/samegame4/samegame.qml 0
When the dialog emits the \c closed signal, we call the new \c saveHighScore() function in \c samegame.js, which stores the high score locally in an SQL database and also send the score to an online database if possible.
The \c nameInputDialog is activated in the \c victoryCheck() function in \c samegame.js:
-\snippet quick/tutorials/samegame/samegame4/content/samegame.js 3
+\snippet tutorials/samegame/samegame4/content/samegame.js 3
\dots 4
-\snippet quick/tutorials/samegame/samegame4/content/samegame.js 4
+\snippet tutorials/samegame/samegame4/content/samegame.js 4
\section3 Storing high scores offline
@@ -419,7 +419,7 @@ Now we need to implement the functionality to actually save the High Scores tabl
Here is the \c saveHighScore() function in \c samegame.js:
-\snippet quick/tutorials/samegame/samegame4/content/samegame.js 2
+\snippet tutorials/samegame/samegame4/content/samegame.js 2
First we call \c sendHighScore() (explained in the section below) if it is possible to send the high scores to an online database.
@@ -438,7 +438,7 @@ If the player entered their name we can send the data to the web service us
If the player enters a name, we send the data to the service using this code in \c samegame.js:
-\snippet quick/tutorials/samegame/samegame4/content/samegame.js 1
+\snippet tutorials/samegame/samegame4/content/samegame.js 1
The \l XMLHttpRequest in this code is the same as the \c XMLHttpRequest() as you'll find in standard browser JavaScript, and can be used in the same way to dynamically get XML
or QML from the web service to display the high scores. We don't worry about the response in this case - we just post the high
diff --git a/src/quick/doc/src/appdevguide/applicationdevelopers.qdoc b/src/quick/doc/src/appdevguide/applicationdevelopers.qdoc
deleted file mode 100644
index 80fdc3607d..0000000000
--- a/src/quick/doc/src/appdevguide/applicationdevelopers.qdoc
+++ /dev/null
@@ -1,145 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Free Documentation License Usage
-** 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. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
-\page qtquick-applicationdevelopers.html
-\title QML Application Developer Resources
-\brief Essential documentation for QML application developers
-
-QML is a declarative language that allows user interfaces to be described in
-terms of their visual components and how they interact and relate with one
-another. It is a highly readable language that was designed to enable
-components to be interconnected in a dynamic manner, and it allows components
-to be easily reused and customized within a user interface. Using the
-\c QtQuick module, designers and developers can easily build fluid animated
-user interfaces in QML, and have the option of connecting these user
-interfaces to any back-end C++ libraries.
-
-This page links to all the information you need to start developing
-applications with \l{Qt QML}{QML} and \l{Qt Quick}.
-
-\section2 Other QML modules
-
-Qt Quick only provides basic visual types, much of Qt's functionality is exposed to QML
-through other modules. If you require the functionality of those modules, you should browse
-their QML documentation. Qt Essentials modules exposing QML types include:
-
-\list
-\li \l {Qt Multimedia} for playing and managing multimedia content and cameras.
-\li \l {Qt WebKit} for rendering web content.
-\endlist
-
-\section1 Quick Start
-
-\list
-\li \l{qtquick-quickstart-basics.html}{QML Basics}
- \list
- \li \l{qtquick-quickstart-basics.html#creating-a-qml-document}{Creating a QML Document}
- \li \l{qtquick-quickstart-basics.html#loading-and-displaying-the-qml-document}{Loading and Displaying the QML Document}
- \endlist
-\li \l{qtquick-quickstart-essentials.html}{QML Essentials}
- \list
- \li \l{qtquick-quickstart-essentials.html#handling-user-input}{Handling User Input}
- \li \l{qtquick-quickstart-essentials.html#property-bindings}{Property Bindings}
- \li \l{qtquick-quickstart-essentials.html#animations}{Animations}
- \li \l{qtquick-quickstart-essentials.html#defining-custom-qml-types-for-re-use}{Defining Custom QML Types for Re-use}
- \endlist
-\endlist
-
-\section1 Code Samples and Demos
-
-To learn more about uses of QML code, there are several code samples which show
-how QML types are used. In addition, there are several demos which show how
-QML code is used in applications.
-
-\list
-\li \l{Qt Quick Code Samples}
-\li \l{QML Demos}
-\endlist
-\section1 Features And Use-Case Solutions
-
-\list
-\li \l{qtquick-usecase-visual.html}{Visual types in QML}
-\li \l{qtquick-usecase-userinput.html}{Responding to User Input in QML}
-\li \l{qtquick-usecase-animations.html}{Animations in QML}
-\li \l{qtquick-usecase-text.html}{Displaying Text in QML}
-\li \l{qtquick-usecase-layouts.html}{Layouts in QML}
-\li \l{qtquick-usecase-styling.html}{Style and Theme Support}
-\li \l{qtquick-usecase-integratingjs.html}{Integrating JavaScript in QML}
-\endlist
-
-
-\section1 In-Depth Documentation
-
-\section2 What is QML?
-
-QML is a user interface specification and programming language.
-It allows developers and designers alike to create highly performant, fluidly
-animated and visually appealing applications. QML offers a highly readable,
-declarative, JSON-like syntax with support for imperative JavaScript
-expressions combined with dynamic property bindings.
-
-The QML language and engine infrastructure is provided by the \l {Qt QML} module.
-For in-depth information about the QML language, please see the
-\l{Qt QML} module documentation.
-
-\section2 What is Qt Quick?
-
-Qt Quick is the standard library of types and functionality for QML. It
-includes visual types, interactive types, animations, models and views,
-particle effects and shader effects. A QML application developer can get
-access to all of that functionality with a single import statement.
-
-The \c QtQuick QML library is provided by the \l{Qt Quick} module.
-For in-depth information about the various QML types and other functionality
-provided by Qt Quick, please see the \l{Qt Quick} module documentation.
-
-\section1 Advanced Application Development Topics
-
-\list
-\li \l{qtquick-deployment.html}{Deploying QML Applications}
-\li \l{qtquick-performance.html}{Performance Considerations and Suggestions}
-\li \l{qtquick-internationalization.html}{Internationalization and Localization}
-\li Testing and Debugging
- \list
- \li \l{qtquick-qmlscene.html}{Prototyping with qmlscene}
- \li \l{qtquick-debugging.html}{Debugging QML Applications}
- \li \l{qtquick-qtquicktest.html}{Qt Quick Test: QML Unit Testing Framework}
- \endlist
-\li \l{qml-codingconventions.html}{QML Coding Conventions}
-\li \l{qtquick-glossary.html}{Glossary of Terms}
-\endlist
-
-\section1 Release Notes and Porting Guides
-
-\list
-\li \l{Qt QML Release Notes}
-\li \l{Qt Quick Release Notes}
-\li \l{Porting QML Applications to Qt 5}
-\endlist
-
-*/
diff --git a/src/quick/doc/src/appdevguide/codingconventions.qdoc b/src/quick/doc/src/appdevguide/codingconventions.qdoc
deleted file mode 100644
index 385c00d2a6..0000000000
--- a/src/quick/doc/src/appdevguide/codingconventions.qdoc
+++ /dev/null
@@ -1,106 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Free Documentation License Usage
-** 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. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
-\page qml-codingconventions.html
-\title QML Coding Conventions
-\brief code style convention
-
-This document contains the QML coding conventions that we follow in our documentation and examples and recommend that others follow.
-
-\section1 QML Object Declarations
-
-Throughout our documentation and examples, \l{QML Object Attributes}{QML object attributes} are always structured in the following order:
-
-\list
-\li id
-\li property declarations
-\li signal declarations
-\li JavaScript functions
-\li object properties
-\li child objects
-\li states
-\li transitions
-\endlist
-
-For better readability, we separate these different parts with an empty line.
-
-
-For example, a hypothetical \e photo QML object would look like this:
-
-\snippet qml/codingconventions/photo.qml 0
-
-
-\section1 Grouped Properties
-
-If using multiple properties from a group of properties,
-consider using \e {group notation} instead of \e {dot notation} if it
-improves readability.
-
-For example, this:
-
-\snippet qml/codingconventions/dotproperties.qml 0
-
-could be written like this:
-
-\snippet qml/codingconventions/dotproperties.qml 1
-
-
-\section1 Lists
-
-If a list contains only one element, we generally omit the square brackets.
-
-For example, it is very common for a component to only have one state.
-
-In this case, instead of:
-
-\snippet qml/codingconventions/lists.qml 0
-
-we will write this:
-
-\snippet qml/codingconventions/lists.qml 1
-
-
-\section1 JavaScript Code
-
-If the script is a single expression, we recommend writing it inline:
-
-\snippet qml/codingconventions/javascript.qml 0
-
-If the script is only a couple of lines long, we generally use a block:
-
-\snippet qml/codingconventions/javascript.qml 1
-
-If the script is more than a couple of lines long or can be used by different objects, we recommend creating a function and calling it like this:
-
-\snippet qml/codingconventions/javascript.qml 2
-
-For long scripts, we will put the functions in their own JavaScript file and import it like this:
-
-\snippet qml/codingconventions/javascript-imports.qml 0
-
-*/
diff --git a/src/quick/doc/src/appdevguide/debugging.qdoc b/src/quick/doc/src/appdevguide/debugging.qdoc
deleted file mode 100644
index 07d9bac801..0000000000
--- a/src/quick/doc/src/appdevguide/debugging.qdoc
+++ /dev/null
@@ -1,158 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Free Documentation License Usage
-** 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. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
-\page qtquick-debugging.html
-\ingroup qtquick-tools
-\title Debugging QML Applications
-\brief debugging tools in QML
-
-\section1 Console API
-
-\section2 Log
-
-\c console.log, console.debug, console.info, console.warn and console.error can be used to print
-debugging information to the console. For example:
-
-\code
-function f(a, b) {
- console.log("a is ", a, "b is ", b);
-}
-\endcode
-
-The output is generated using the qDebug, qWarning, qCritical methods in C++
-(see also \l {Debugging Techniques}).
-
-Setting the environment variable QML_CONSOLE_EXTENDED also prints the source
-code location of the call.
-
-\section2 Assert
-
-\c console.assert tests that an expression is true. If not, it will write an optional message
-to the console and print the stack trace.
-
-\code
-function f() {
- var x = 12
- console.assert(x == 12, "This will pass");
- console.assert(x > 12, "This will fail");
-}
-\endcode
-
-\section2 Timer
-
-\c console.time and console.timeEnd log the time (in milliseconds) that was spent between
-the calls. Both take a string argument that identifies the measurement. For example:
-
-\code
-function f() {
- console.time("wholeFunction");
- console.time("firstPart");
- // first part
- console.timeEnd("firstPart");
- // second part
- console.timeEnd("wholeFunction");
-}
-\endcode
-
-\section2 Trace
-
-\c console.trace prints the stack trace of the JavaScript execution at the point where
-it was called. The stack trace info contains the function name, file name, line number
-and column number. The stack trace is limited to last 10 stack frames.
-
-\section2 Count
-
-\c console.count prints the current number of times a particular piece of code has been executed,
-along with a message. That is,
-
-\code
-function f() {
- console.count("f called");
-}
-\endcode
-
-will print \c{f called: 1}, \c{f called: 2} ... whenever \c{f()} is executed.
-
-\section2 Profile
-
-\c console.profile turns on the QML and JavaScript profilers. Nested calls are not
-supported and a warning will be printed to the console.
-
-\c console.profileEnd turns off the QML and JavaScript profilers. Calling this function
-without a previous call to console.profile will print a warning to the console. A
-profiling client should have been attached before this call to receive and store the
-profiling data. For example:
-
-\code
-function f() {
- console.profile();
- //Call some function that needs to be profiled.
- //Ensure that a client is attached before ending
- //the profiling session.
- console.profileEnd();
-}
-\endcode
-
-\section2 Exception
-
-\c console.exception prints an error message together with the stack trace of JavaScript
-execution at the point where it is called.
-
-\section1 Debugging module imports
-
-The \c QML_IMPORT_TRACE environment variable can be set to enable debug output
-from QML's import loading mechanisms.
-
-For example, for a simple QML file like this:
-
-\qml
-import QtQuick 2.0
-
-Rectangle { width: 100; height: 100 }
-\endqml
-
-If you set \c {QML_IMPORT_TRACE=1} before running the \l{qtquick-qmlscene.html}
-{QML Scene} (or your QML C++ application), you will see output similar to this:
-
-\code
-QQmlImportDatabase::addImportPath "/qt-sdk/imports"
-QQmlImportDatabase::addImportPath "/qt-sdk/bin/QMLViewer.app/Contents/MacOS"
-QQmlImportDatabase::addToImport 0x106237370 "." -1.-1 File as ""
-QQmlImportDatabase::addToImport 0x106237370 "Qt" 4.7 Library as ""
-QQmlImportDatabase::resolveType "Rectangle" = "QDeclarativeRectangle"
-\endcode
-
-
-\section1 Debugging with Qt Creator
-
-\l{http://qt-project.org/doc/qtcreator}{Qt Creator} provides built-in
-support for QML debugging. QML projects and standalone C++ applications that
-utilize QML can be debugged on desktops as well as on remote devices.
-For more information, see the Qt Creator Manual.
-
-*/
diff --git a/src/quick/doc/src/appdevguide/deployment.qdoc b/src/quick/doc/src/appdevguide/deployment.qdoc
deleted file mode 100644
index 3788cbdb08..0000000000
--- a/src/quick/doc/src/appdevguide/deployment.qdoc
+++ /dev/null
@@ -1,212 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Free Documentation License Usage
-** 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. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
-\page qtquick-deployment.html
-\title Deploying QML Applications
-\brief Deploying QML applications
-
-
-
-QML documents are loaded and executed by the QML runtime. This includes the
-Declarative UI engine along with the built-in QML types and plugin modules,
-and it also provides access to third-party QML types and modules.
-
-Applications that use QML need to invoke the QML runtime in order to
-execute QML documents. This can be done by creating a QQuickView
-or a QQmlEngine, as described below. In addition, the Declarative UI
-package includes the qmlscene tool, which loads \c .qml files. This tool is
-useful for developing and testing QML code without the need to write
-a C++ application to load the QML runtime.
-
-
-
-\section1 Deploying QML-based applications
-
-To deploy an application that uses QML, the QML runtime must be invoked by
-the application. This is done by writing a Qt C++ application that loads the
-QQmlEngine by either:
-
-\list
-\li Loading the QML file through a QQuickView instance, or
-\li Creating a QQmlEngine instance and loading QML files with QQmlComponent
-\endlist
-
-
-\section2 Deploying with QQuickView
-
-QQuickView is a QWindow-based class that is able to load QML files.
-For example, if there is a QML file, \c application.qml, it will
-look like this:
-
-\qml
- import QtQuick 2.0
-
- Rectangle { width: 100; height: 100; color: "red" }
-\endqml
-
-It can be loaded in a Qt application's \c main.cpp file like this:
-
-\code
- #include <QGuiApplication>
- #include <QQuickView>
-
- int main(int argc, char *argv[])
- {
- QGuiApplication app(argc, argv);
-
- QQuickView view;
- view.setSource(QUrl::fromLocalFile("application.qml"));
- view.show();
-
- return app.exec();
- }
-\endcode
-
-This creates a QWindow-based view that displays the contents of
-\c application.qml.
-
-The application's \c .pro \l{qmake Project Files}{project file} must specify
-the \c declarative module for the \c QT variable. For example:
-
-\code
- TEMPLATE += app
- QT += quick
- SOURCES += main.cpp
-\endcode
-
-
-\section2 Creating a QQmlEngine directly
-
-If \c application.qml does not have any graphical components, or if it is
-preferred to avoid QQuickView for other reasons, the QQmlEngine
-can be constructed directly instead. In this case, \c application.qml is
-loaded as a QQmlComponent instance rather than placed into a view:
-
-\code
- #include <QGuiApplication>
- #include <QQmlEngine>
- #include <QQmlContext>
- #include <QQmlComponent>
-
- int main(int argc, char *argv[])
- {
- QGuiApplication app(argc, argv);
-
- QQmlEngine engine;
- QQmlContext *objectContext = new QQmlContext(engine.rootContext());
-
- QQmlComponent component(&engine, "application.qml");
- QObject *object = component.create(objectContext);
-
- // ... delete object and objectContext when necessary
-
- return app.exec();
- }
-\endcode
-
-QGuiApplication can be replaced by a QCoreApplication in the code above in case you are not
-using any graphical items from Qt Quick. This allows using QML as a language without any
-dependencies to the \l {Qt GUI} module.
-
-See \l{qtqml-cppintegration-data.html}{qtqml-cppintegration-exposecppattributes.html}{Exposing Attributes of C++ Types to QML}
-for more information about using QQmlEngine, QQmlContext and QQmlComponent, as well
-as details on including QML files through \l{The Qt Resource System}{Qt's Resource system}.
-
-
-
-\section1 Developing and Prototyping with QML Scene
-
-The Declarative UI package includes a QML runtime tool,
-\l{qtquick-qmlscene.html}{qmlscene}, which loads and displays QML documents.
-This is useful during the application development phase for prototyping
-QML-based applications without writing your own C++ applications to invoke
-the QML runtime.
-
-
-
-\section1 Managing resource files with the Qt resource system
-
-The \l {The Qt Resource System}{Qt resource system} allows resource files to be stored as
-binary files in an application executable. This can be useful when building a mixed
-QML/C++ application as it enables QML files (as well as other resources such as images
-and sound files) to be referred to through the resource system URI scheme rather than
-relative or absolute paths to filesystem resources. Note, however, that if you use the resource
-system, the application executable must be re-compiled whenever a QML source file is changed
-in order to update the resources in the package.
-
-To use the resource system in a mixed QML/C++ application:
-
-\list
-\li Create a \c .qrc \l {The Qt Resource System}{resource collection file} that lists resource
- files in XML format
-\li From C++, load the main QML file as a resource using the \c :/ prefix or as a URL with the
- \c qrc scheme
-\endlist
-
-Once this is done, all files specified by relative paths in QML will be loaded from
-the resource system instead. Use of the resource system is completely transparent to
-the QML layer; this means all QML code should refer to resource files using relative
-paths and should \e not use the \c qrc scheme. This scheme should only be used from
-C++ code for referring to resource files.
-
-Here is a application packaged using the \l {The Qt Resource System}{Qt resource system}.
-The directory structure looks like this:
-
-\code
-project
- |- example.qrc
- |- main.qml
- |- images
- |- background.png
- |- main.cpp
- |- project.pro
-\endcode
-
-The \c main.qml and \c background.png files will be packaged as resource files. This is
-done in the \c example.qrc resource collection file:
-
-\snippet ../src/qml/doc/snippets/qml/qtbinding/resources/example.qdoc 0
-
-Since \c background.png is a resource file, \c main.qml can refer to it using the relative
-path specified in \c example.qrc:
-
-\snippet ../src/qml/doc/snippets/qml/qtbinding/resources/main.qml 0
-
-To allow QML to locate resource files correctly, the \c main.cpp loads the main QML
-file, \c main.qml, as a resource file using the \c qrc scheme:
-
-\snippet ../src/qml/doc/snippets/qml/qtbinding/resources/main.cpp 0
-
-Finally, \c project.pro uses the RESOURCES variable to indicate that \c example.qrc should
-be used to build the application resources:
-
-\quotefile ../src/qml/doc/snippets/qml/qtbinding/resources/resources.pro
-
-See \l {The Qt Resource System} for more information.
-
-*/
diff --git a/src/quick/doc/src/appdevguide/glossary.qdoc b/src/quick/doc/src/appdevguide/glossary.qdoc
deleted file mode 100644
index 3c02918576..0000000000
--- a/src/quick/doc/src/appdevguide/glossary.qdoc
+++ /dev/null
@@ -1,193 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Free Documentation License Usage
-** 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. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
-\page qtquick-glossary.html
-\title Qt Quick Glossary Of Terms
-\brief Glossary of terms used in the documentation for QML and Qt Quick
-
-\section1 Common Terms
-
-\table
- \header
- \li Term
- \li Definition
-
- \row
- \li QML
- \li The language in which QML applications are written. The language
- architecture and engine are implemented by the Qt QML module.
-
- \row
- \li Qt Quick
- \li The standard library of types and functionality for the
- QML language, which is provided by the Qt Quick module,
- and may be accessed with "import QtQuick 2.0"
-
- \row
- \li Type
- \li In QML, a \e type may refer to either a
- \l{qtqml-typesystem-topic.html}{Basic Type} or a
- \l{qtqml-typesystem-topic.html#qml-object-types}{QML Object Type}.
-
- The QML language provides a number of built in
- (\l{qtqml-typesystem-basictypes.html}{basic types}), and the
- Qt Quick module provides various \l{qtquick-qmltypereference.html}
- {Qt Quick types} for building QML applications. Types can also be
- provided by third-party developers through
- (\l{qtqml-modules-topic.html}{modules}) or by the application
- developer in the application itself through
- \l{qtqml-documents-definetypes.html}{QML Documents}.
-
- See \l{qtqml-typesystem-topic.html}{The QML Type System}
- for more details.
-
- \row
- \li Basic Type
- \li A \l{qtqml-typesystem-topic.html}{basic type} is a simple type
- such as \c int, \c string and \c bool. Unlike
- \l{qtqml-typesystem-topic.html#qml-object-types}{object types},
- an object cannot be instantiated from a basic type; for example,
- it is not possible to create an \c int object with properties,
- methods, signals and so on.
-
- Basic types are built into the QML language, whereas object types
- cannot be used unless the appropriate
- \l{qtqml-modules-topic.html}{module} is imported.
-
- See \l{qtqml-typesystem-topic.html}{The QML Type System}
- for more details.
-
- \row
- \li Object Type
- \li A \l{qtqml-typesystem-topic.html#qml-object-types}{QML Object Type}
- is a type that can be instantiated by the QML engine.
-
- A QML type can be defined either by a document in a .qml file
- beginning with a capital letter, or by a QObject-based C++ class.
-
- See \l{qtqml-typesystem-topic.html}{The QML Type System}
- for more details.
-
- \row
- \li Object
- \li A QML object is an instance of a
- \l{qtqml-typesystem-topic.html#qml-object-types}{QML Object Type}.
-
- Such objects are created by the engine when it processes
- \l{qtqml-syntax-basics.html#object-declarations}{object declarations},
- which specify the objects to be created and the attributes that are to
- be defined for each object.
-
- Additionally, objects can be dynamically created at runtime through
- Component.createObject() and Qt.createQmlObject().
-
- See also \l{#lazy-instantiation}{Lazy Instantiation}.
-
- \row
- \li Component
- \li A component is a template from which a QML object or object
- tree is created. It is produced when a document is loaded by
- the QML engine. Once it has been loaded, it can be used to
- instantiate the object or object tree that it represents.
-
- Additionally, the \l Component type is a special type that can
- can be used to declare a component inline within a document.
- Component objects can also be dynamically created through
- Qt.createComponent() to dynamically create QML objects.
-
- \row
- \li Document
- \li A \l{qtqml-documents-topic.html}{QML Document} is a self
- contained piece of QML source code that begins with one or more
- import statements and contains a single top-level object
- declaration. A document may reside in a .qml file or a text string.
-
- If it is placed in a .qml file whose name begins with a capital
- letter, the file is recognized by the engine as a definition of
- a QML type. The top-level object declaration encapsulates the
- object tree that will be instantiated by the type.
-
- \row
- \li Property
- \li A property is an attribute of an object type that has a name and
- an associated value; this value can be read (and in most cases, also
- written to) externally.
-
- An object can have one or more properties. Some properties
- are associated with the canvas (e.g., x, y, width, height,
- and opacity) while others may be data specific to that type
- (e.g., the "text" property of the \l Text type).
-
- See \l{qtqml-syntax-objectattributes.html}{QML Object Attributes}
- for more details.
-
- \row
- \li Binding
- \li A binding is a JavaScript expression which is "bound" to a
- property. The value of the property at any point in time
- will be the value returned by evaluating that expression.
-
- See \l{qtqml-syntax-propertybinding.html}{Property Binding}
- for more details.
-
- \row
- \li Signal
- \li A signal is a notification from a QML object. When an object emits
- a signal, other objects can receive and process this signal through
- a \l{Signal Attributes}{signal handler}.
-
- Most properties of QML objects
- have a change signal, and also an associated change signal handler
- which may be defined by clients to implement functionality. For
- example, the "onClicked()" handler of an instance of the MouseArea
- type might be defined in an application to cause a sound to be
- played.
-
- See \l{qtqml-syntax-signals.html}{Signal and Handler Event System}
- for more details.
-
- \row
- \li Signal Handler
- \li A signal handler is the expression (or function) which is triggered
- by a signal. It is also known as a "slot" in C++.
-
- See \l{qtqml-syntax-signals.html}{Signal and Handler Event System}
- for more details.
-
- \row
- \target lazy-instantiation
- \li Lazy Instantiation
- \li Object instances can be instantiated "lazily" at run-time,
- to avoid performing unnecessary work until needed. Qt Quick
- provides the \l Loader type to make lazy instantiation more
- convenient.
-\endtable
-
-\section1 Indexed Alphabetically
-
-*/
diff --git a/src/quick/doc/src/appdevguide/internationalization.qdoc b/src/quick/doc/src/appdevguide/internationalization.qdoc
deleted file mode 100644
index 9c3e9d9cfb..0000000000
--- a/src/quick/doc/src/appdevguide/internationalization.qdoc
+++ /dev/null
@@ -1,280 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Free Documentation License Usage
-** 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. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
-\page qtquick-internationalization.html howto
-\ingroup qml-features
-\title Internationalization and Localization with Qt Quick
-\brief Following these steps, you can write your Qt Quick application so it can be localized for multiple languages
-
-\section1 Internationalizing your Application
-
-The following sections describe various aspects of internationalizing your QML
-source code. If you follow these guides for all the user interface components in
-your application, it becomes possible to localize every aspect of your
-application for different languages and local cultural conventions such as the
-way dates and numbers are formatted.
-
-\section2 1. Use qsTr() for all Literal User Interface Strings
-
-Strings in QML can be marked for translation using the qsTr(), qsTranslate(),
-qsTrId(), QT_TR_NOOP(), QT_TRANSLATE_NOOP(), and QT_TRID_NOOP() functions. The
-most common way of marking strings is with the qsTr() function. For example:
-
-\code
-Text {
- id: txt1;
- text: qsTr("Back");
-}
-\endcode
-
-This code makes "Back" a key entry in the translation files. At runtime, the
-translation system looks up the keyword "Back" and then gets the corresponding
-translation value for the current system locale. The result is returned to the
-\c text property and the user interface will show the appropriate translation of
-"Back" for the current locale.
-
-
-\section2 2. Add Context for the Translator
-
-User interface strings are often short so you need to help the person
-translating the text understand the context of the text. You can add context
-information in the source code as extra descriptive text before the string to be
-translated. These extra descriptions are included in the .ts translation files
-delivered to the translator.
-
-\note The .ts files are XML files with the source texts and a place for the
-translated text. The updated .ts files are converted into binary translation
-files and included as part of the final application.
-
-In the following code snippet, the text on the \c {//:} line is the main comment
-for the translator.
-
-The text on the \c{//~} line is optional extra information. The first word of
-the text is used as an additional identifier in the XML element in the .ts file
-so make sure the first word is not part of the sentence. For example, the
-comment "Context Not related to that" is converted to "<extra-Context>Not
-related to that" in the .ts file.
-
-\code
-Text {
- id: txt1;
- // This user interface string is only used here
- //: The back of the object, not the front
- //~ Context Not related to back-stepping
- text: qsTr("Back");
-}
-\endcode
-
-\section2 3. Disambiguate Identical Texts
-
-The translation system consolidates the user interface text strings into unique
-items. This consolidation saves the person doing the translation work having to
-translate the same text multiple times. However, in some cases, the text is
-identical but has a different meaning. For example, in English, "back" means
-take a step backward and also means the part of an object opposite to the front.
-You need to tell the translation system about these two separate meanings so the
-translator can create two separate translations.
-
-Differentiate between identical texts by adding some id text as the second
-parameter of the qsTr() function.
-
-In the following code snippet, the \c {not front} text is an id to differentiate
-this "Back" text from the backstepping "Back" text:
-
-\code
-Text {
- id: txt1;
- // This user interface string is used only here
- //: The back of the object, not the front
- //~ Context Not related to back-stepping
- text: qsTr("Back", "not front");
-}
-\endcode
-
-\section2 4. Use \c %x to Insert Parameters into a String
-
-Different languages put words together in different orders so it is not a good
-idea to create sentences by concatenating words and data. Instead, use \c % to
-insert parameters into strings. For example, the following snippet has a string
-with two number parameters \c %1 and \c %2. These parameters are inserted with
-the \c .arg() functions.
-
-\code
-Text {
- text: qsTr("File %1 of %2").arg(counter).arg(total)
-}
-\endcode
-
-%1 refers to the first parameter and \c %2 refers to the second parameter so this
-code produces output like: "File 2 of 3".
-
-\section2 5. Use %Lx so Numbers are Localized
-
-If you include the \c %L modifier when you specify a parameter, the number is
-localized according to the current regional settings. For example, in the
-following code snippet, \c %L1 means to format the first parameters according to
-the number formatting conventions of the currently selected locale (geographical
-region):
-
-\code
-Text {
- text: qsTr("%L1").arg(total)
-}
-\endcode
-
-Then, with the above code, if \c total is the number "4321.56" (four thousand
-three hundred and twenty one point fifty six); with English regional settings,
-(locale) the output is "4,321.56"; with German regional settings, the output is
-"4.321,56".
-
-\section2 6. Internationalize Dates, Times and Currencies
-
-There are no special in-string modifiers for formatting dates and times.
-Instead, you need to query the current locale (geographical region) and use the
-methods of \l {QtQuick2::Date}{Date} to format the string.
-
-\c Qt.locale() returns a \l {QtQuick2::Locale}{Locale} object which contains all
-kinds of information about the locale. In particular, the \l
-{QtQuick2::Locale::name}{Locale.name} property contains the language and country
-information for the current locale. You can use the value as is, or you can
-parse it to determine the appropriate content for the current locale.
-
-The following snippet gets the current date and time with Date(), then converts
-that to a string for the current locale. Then it inserts the date string into
-the %1 parameter for the appropriate translation.
-
-\code
-Text {
- text: qsTr("Date %1").arg(Date().toLocaleString(Qt.locale()))
-}
-\endcode
-
-To make sure currency numbers are localized, use the \l
-{QtQuick2::Number}{Number} type. This type has similar functions as the Date
-type for converting numbers into localized currency strings.
-
-\section2 7. Use QT_TR_NOOP() for Translatable Data Text Strings
-
-If the user changes the system language without a reboot, depending on the
-system, the strings in arrays and list models and other data structures might
-not be refreshed automatically. To force the texts to be refreshed when they are
-displayed in the user interface, you need declare the strings with the
-QT_TR_NOOP() macro. Then, when you populate the objects for display, you need to
-explicitly retrieve the translation for each text. For example:
-
-\code
-ListModel {
- id: myListModel;
- ListElement {
- //: Capital city of Finland
- name: QT_TR_NOOP("Helsinki");
- }
- }
-
-...
-
-Text {
- text: qsTr(myListModel.get(0).name); // get the translation of the name property in element 0
- }
-\endcode
-
-
-\section2 8. Use Locale to Extend Localization Features
-
-If you want different graphics or audio for different geographical regions, you
-can use Qt.locale() to get the current locale. Then you choose appropriate
-graphics or audio for that locale.
-
-The following code snippet shows how you could select an appropriate icon
-that represents the language of the current locale.
-
-\code
-Component.onCompleted: {
- switch (Qt.locale().name.substring(0,2)) {
- case "en": // show the English-language icon
- languageIcon = "../images/language-icon_en.png";
- break;
- case "fi": // show the Finnish language icon
- languageIcon = "../images/language-icon_fi.png";
- break;
- default: // show a default language icon
- languageIcon = "../images/language-icon_default.png";
- }
-}
-\endcode
-
-\section1 Localizing your Application
-
-Qt Quick applications use the same underlying localization system as Qt C++
-applications (lupdate, lrelease and .ts files). You use the same tools as
-described in the \l {Qt Linguist Manual: Release Manager}{Qt Linguist Manual}.
-You can even have user interface strings in C++ and QML source in the same
-application. The system will create a single combined translation file and the
-strings are accessible from QML and C++.
-
-\section2 Use a Conditional to Hide QML Source From the Compiler
-
-The \c lupdate tool extracts user interface strings from your application.
-lupdate reads your application's .pro file to identify which source files
-contain texts to be translated. This means your source files must be listed in
-the \c SOURCES or \c HEADERS entry in the .pro file. If your files are not
-listed the texts in them will not be found.
-
-However, the SOURCES variable is intended for C++ source files. If you list QML
-or JavaScript source files there, the compiler tries to build them as though
-they are C++ files. As a workaround, you can use an \c lupdate_only{...}
-conditional statement so the \c lupdate tool sees the .qml files but the C++
-compiler ignores them.
-
-For example, the following .pro file snippet specifies two .qml files in
-the application.
-
-\code
-lupdate_only{
-SOURCES = main.qml \
- MainPage.qml
-}
-\endcode
-
-
-You can also specify the .qml source files with a wildcard match. The
-search is not recursive so you need to specify each directory where there are
-user interface strings in the source code:
-
-\code
-lupdate_only{
-SOURCES = *.qml \
- *.js \
- content/*.qml \
- content/*.js
-}
-\endcode
-
-See the \l {Qt Linguist Manual} for more details about Qt localization.
-
-*/
diff --git a/src/quick/doc/src/appdevguide/performance.qdoc b/src/quick/doc/src/appdevguide/performance.qdoc
deleted file mode 100644
index c6c4835afc..0000000000
--- a/src/quick/doc/src/appdevguide/performance.qdoc
+++ /dev/null
@@ -1,1147 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Free Documentation License Usage
-** 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. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
-\page qtquick-performance.html
-\title Performance Considerations And Suggestions
-\brief Discussion of performance-related tradeoffs and best-practices
-
-\section1 Timing Considerations
-
-As an application developer, you must strive to allow the rendering engine
-to achieve a consistent 60 frames-per-second refresh rate. 60 FPS means
-that there is approximately 16 milliseconds between each frame in which
-processing can be done, which includes the processing required to upload
-the draw primitives to the graphics hardware.
-
-In practice, this means that the application developer should:
-\list
- \li use asynchronous,event driven programming wherever possible
- \li use worker threads to do significant processing
- \li never manually spin the event loop
- \li never spend more than a couple of milliseconds per frame within blocking functions.
-\endlist
-
-Failure to do so will result in skipped frames, which has a drastic effect on the
-user experience.
-
-\note A pattern which is tempting, but should \e never be used, is creating your
-own QEventLoop or calling QCoreApplication::processEvents() in order to avoid
-blocking within a C++ code block invoked from QML. This is dangerous because
-when an event loop is entered in a signal handler or binding, the QML engine
-continues to run other bindings, animations, transitions, etc. Those bindings
-can then cause side effects which, for example, destroy the hierarchy containing
-your event loop.
-
-\section1 Profiling
-
-The most important tip is: use the QML profiler included with Qt Creator. Knowing
-where time is spent in an application will allow you to focus on problem areas which
-actually exist, rather than problem areas which potentially exist. See the Qt Creator
-manual for more information on how to use the QML profiling tool.
-
-Determining which bindings are being run the most often, or which functions your
-application is spending the most time in, will allow you to decide whether you need
-to optimize the problem areas, or redesign some implementation details of your
-application so that the performance is improved. Attempting to optimize code without
-profiling is likely to result in very minor rather than significant performance
-improvements.
-
-\section1 JavaScript Code
-
-Most QML applications will have a large amount of JavaScript code in them, in the
-form of dynamic functions, signal handlers, and property binding expressions.
-This is generally not a problem. Thanks to some optimizations in the QML engine,
-such as to the bindings compiler, it can for some use-cases be faster than calling a C++
-function. However, care must be taken to ensure that unnecessary processing isn't
-triggered accidentally.
-
-\section2 Bindings
-
-There are two types of bindings in QML: optimized and non-optimized bindings.
-It is a good idea to keep binding expressions as simple as possible, since the
-QML engine makes use of an optimized binding expression evaluator which can
-evaluate simple binding expressions without needing to switch into a full
-JavaScript execution environment. These optimized bindings are evaluated far
-more efficiently than more complex (non-optimized) bindings. The basic
-requirement for optimization of bindings is that the type information of every
-symbol accessed must be known at compile time.
-
-Things to avoid in binding expressions to maximize optimizability:
-\list
- \li declaring intermediate JavaScript variables
- \li accessing "var" properties
- \li calling JavaScript functions
- \li constructing closures or defining functions within the binding expression
- \li accessing properties outside of the immediate evaluation scope
- \li writing to other properties as side effects
-\endlist
-
-The QML_COMPILER_STATS environment variable may be set when running a QML application
-to print statistics about how many bindings were able to be optimized.
-
-Bindings are quickest when they know the type of objects and properties they are working
-with. This means that non-final property lookup in a binding expression can be slower
-in some cases, where it is possible that the type of the property being looked up has
-been changed (for example, by a derived type).
-
-The immediate evaluation scope can be summarized by saying that it contains:
-\list
- \li the properties of the expression scope object (for binding expressions, this is
- the object to which the property binding belongs)
- \li ids of any objects in the component
- \li the properties of the root item in the component
-\endlist
-
-Ids of objects from other components and properties of any such objects, as
-well as symbols defined in or included from a JavaScript import, are not in the
-immediate evaluation scope, and thus bindings which access any of those things
-will not be optimized.
-
-Note that if a binding cannot be optimized by the QML engine's optimized binding
-expression evaluator, and thus must be evaluated by the full JavaScript environment,
-some of the tips listed above will no longer apply. For example, it can sometimes be
-beneficial to cache the result of property resolution in an intermediate JavaScript
-variable in a very complex binding. Upcoming sections have more information on these
-sorts of optimizations.
-
-\section2 Type-Conversion
-
-One major cost of using JavaScript is that in most cases when a property from a QML
-type is accessed, a JavaScript object with an external resource containing the
-underlying C++ data (or a reference to it) is created. In most cases, this is fairly
-inexpensive, but in others it can be quite expensive. One example of where it is
-expensive is assigning a C++ QVariantMap Q_PROPERTY to a QML "variant" property.
-Lists can also be expensive, although sequences of specific types (QList of int,
-qreal, bool, QString, and QUrl) should be inexpensive; other list types involve an
-expensive conversion cost (creating a new JavaScript Array, and adding new types
-one by one, with per-type conversion from C++ type instance to JavaScript value).
-
-Converting between some basic property types (such as "string" and "url" properties)
-can also be expensive. Using the closest matching property type will avoid unnecessary
-conversion.
-
-If you must expose a QVariantMap to QML, use a "var" property rather than a "variant"
-property. In general, "property var" should be considered to be superior to
-"property variant" for every use-case in QtQuick 2.0 (note that "property variant"
-is marked as obsolete in the QtQuick 2.0 documentation), as it allows a true JavaScript
-reference to be stored (which can reduce the number of conversions required in certain
-expressions).
-
-\section2 Resolving Properties
-
-Property resolution takes time. While in some cases the result of a lookup can be
-cached and reused, it is always best to avoid doing unnecessary work altogether, if
-possible.
-
-In the following example, we have a block of code which is run often (in this case, it
-is the contents of an explicit loop; but it could be a commonly-evaluated binding expression,
-for example) and in it, we resolve the object with the "rect" id and its "color" property
-multiple times:
-
-\qml
-// bad.qml
-import QtQuick 2.0
-
-Item {
- width: 400
- height: 200
- Rectangle {
- id: rect
- anchors.fill: parent
- color: "blue"
- }
-
- function printValue(which, value) {
- console.log(which + " = " + value);
- }
-
- Component.onCompleted: {
- var t0 = new Date();
- for (var i = 0; i < 1000; ++i) {
- printValue("red", rect.color.r);
- printValue("green", rect.color.g);
- printValue("blue", rect.color.b);
- printValue("alpha", rect.color.a);
- }
- var t1 = new Date();
- console.log("Took: " + (t1.valueOf() - t0.valueOf()) + " milliseconds for 1000 iterations");
- }
-}
-\endqml
-
-We could instead resolve the common base just once in the block:
-
-\qml
-// good.qml
-import QtQuick 2.0
-
-Item {
- width: 400
- height: 200
- Rectangle {
- id: rect
- anchors.fill: parent
- color: "blue"
- }
-
- function printValue(which, value) {
- console.log(which + " = " + value);
- }
-
- Component.onCompleted: {
- var t0 = new Date();
- for (var i = 0; i < 1000; ++i) {
- var rectColor = rect.color; // resolve the common base.
- printValue("red", rectColor.r);
- printValue("green", rectColor.g);
- printValue("blue", rectColor.b);
- printValue("alpha", rectColor.a);
- }
- var t1 = new Date();
- console.log("Took: " + (t1.valueOf() - t0.valueOf()) + " milliseconds for 1000 iterations");
- }
-}
-\endqml
-
-Just this simple change results in a significant performance improvement.
-Note that the code above can be improved even further (since the property
-being looked up never changes during the loop processing), by hoisting the
-property resolution out of the loop, as follows:
-
-\qml
-// better.qml
-import QtQuick 2.0
-
-Item {
- width: 400
- height: 200
- Rectangle {
- id: rect
- anchors.fill: parent
- color: "blue"
- }
-
- function printValue(which, value) {
- console.log(which + " = " + value);
- }
-
- Component.onCompleted: {
- var t0 = new Date();
- var rectColor = rect.color; // resolve the common base outside the tight loop.
- for (var i = 0; i < 1000; ++i) {
- printValue("red", rectColor.r);
- printValue("green", rectColor.g);
- printValue("blue", rectColor.b);
- printValue("alpha", rectColor.a);
- }
- var t1 = new Date();
- console.log("Took: " + (t1.valueOf() - t0.valueOf()) + " milliseconds for 1000 iterations");
- }
-}
-\endqml
-
-\section2 Property Bindings
-
-A property binding expression will be re-evaluated if any of the properties
-it references are changed. As such, binding expressions should be kept as
-simple as possible.
-
-If you have a loop where you do some processing, but only the final result
-of the processing is important, it is often better to update a temporary
-accumulator which you afterwards assign to the property you need to update,
-rather than incrementally updating the property itself, in order to avoid
-triggering re-evaluation of binding expressions during the intermediate
-stages of accumulation.
-
-The following contrived example illustrates this point:
-
-\qml
-// bad.qml
-import QtQuick 2.0
-
-Item {
- id: root
- width: 200
- height: 200
- property int accumulatedValue: 0
-
- Text {
- anchors.fill: parent
- text: root.accumulatedValue.toString()
- onTextChanged: console.log("text binding re-evaluated")
- }
-
- Component.onCompleted: {
- var someData = [ 1, 2, 3, 4, 5, 20 ];
- for (var i = 0; i < someData.length; ++i) {
- accumulatedValue = accumulatedValue + someData[i];
- }
- }
-}
-\endqml
-
-The loop in the onCompleted handler causes the "text" property binding to
-be re-evaluated six times (which then results in any other property bindings
-which rely on the text value, as well as the onTextChanged signal handler,
-to be re-evaluated each time, and lays out the text for display each time).
-This is clearly unnecessary in this case, since we really only care about
-the final value of the accumulation.
-
-It could be rewritten as follows:
-
-\qml
-// good.qml
-import QtQuick 2.0
-
-Item {
- id: root
- width: 200
- height: 200
- property int accumulatedValue: 0
-
- Text {
- anchors.fill: parent
- text: root.accumulatedValue.toString()
- onTextChanged: console.log("text binding re-evaluated")
- }
-
- Component.onCompleted: {
- var someData = [ 1, 2, 3, 4, 5, 20 ];
- var temp = accumulatedValue;
- for (var i = 0; i < someData.length; ++i) {
- temp = temp + someData[i];
- }
- accumulatedValue = temp;
- }
-}
-\endqml
-
-\section2 Sequence tips
-
-As mentioned earlier, some sequence types are fast (for example, QList<int>, QList<qreal>,
-QList<bool>, QList<QString>, QStringList and QList<QUrl>) while others will be
-much slower. Aside from using these types wherever possible instead of slower types,
-there are some other performance-related semantics you need to be aware of to achieve
-the best performance.
-
-Firstly, there are two different implementations for sequence types: one for where
-the sequence is a Q_PROPERTY of a QObject (we'll call this a reference sequence),
-and another for where the sequence is returned from a Q_INVOKABLE function of a
-QObject (we'll call this a copy sequence).
-
-A reference sequence is read and written via QMetaObject::property() and thus is read
-and written as a QVariant. This means that changing the value of any element in the
-sequence from JavaScript will result in three steps occurring: the complete sequence
-will be read from the QObject (as a QVariant, but then cast to a sequence of the correct
-type); the element at the specified index will be changed in that sequence; and the
-complete sequence will be written back to the QObject (as a QVariant).
-
-A copy sequence is far simpler as the actual sequence is stored in the JavaScript
-object's resource data, so no read/modify/write cycle occurs (instead, the resource
-data is modified directly).
-
-Therefore, writes to elements of a reference sequence will be much slower than writes
-to elements of a copy sequence. In fact, writing to a single element of an N-element
-reference sequence is equivalent in cost to assigning a N-element copy sequence to that
-reference sequence, so you're usually better off modifying a temporary copy sequence
-and then assigning the result to a reference sequence, during computation.
-
-Assume the existence (and prior registration into the "Qt.example 1.0" namespace) of the
-following C++ type:
-
-\code
-class SequenceTypeExample : public QQuickItem
-{
- Q_OBJECT
- Q_PROPERTY (QList<qreal> qrealListProperty READ qrealListProperty WRITE setQrealListProperty NOTIFY qrealListPropertyChanged)
-
-public:
- SequenceTypeExample() : QQuickItem() { m_list << 1.1 << 2.2 << 3.3; }
- ~SequenceTypeExample() {}
-
- QList<qreal> qrealListProperty() const { return m_list; }
- void setQrealListProperty(const QList<qreal> &list) { m_list = list; emit qrealListPropertyChanged(); }
-
-signals:
- void qrealListPropertyChanged();
-
-private:
- QList<qreal> m_list;
-};
-\endcode
-
-The following example writes to elements of a reference sequence in a
-tight loop, resulting in bad performance:
-
-\qml
-// bad.qml
-import QtQuick 2.0
-import Qt.example 1.0
-
-SequenceTypeExample {
- id: root
- width: 200
- height: 200
-
- Component.onCompleted: {
- var t0 = new Date();
- qrealListProperty.length = 100;
- for (var i = 0; i < 500; ++i) {
- for (var j = 0; j < 100; ++j) {
- qrealListProperty[j] = j;
- }
- }
- var t1 = new Date();
- console.log("elapsed: " + (t1.valueOf() - t0.valueOf()) + " milliseconds");
- }
-}
-\endqml
-
-The QObject property read and write in the inner loop caused by the
-\c{"qrealListProperty[j] = j"} expression makes this code very suboptimal. Instead,
-something functionally equivalent but much faster would be:
-
-\qml
-// good.qml
-import QtQuick 2.0
-import Qt.example 1.0
-
-SequenceTypeExample {
- id: root
- width: 200
- height: 200
-
- Component.onCompleted: {
- var t0 = new Date();
- var someData = [1.1, 2.2, 3.3]
- someData.length = 100;
- for (var i = 0; i < 500; ++i) {
- for (var j = 0; j < 100; ++j) {
- someData[j] = j;
- }
- qrealListProperty = someData;
- }
- var t1 = new Date();
- console.log("elapsed: " + (t1.valueOf() - t0.valueOf()) + " milliseconds");
- }
-}
-\endqml
-
-Secondly, a change signal for the property is emitted if any element in it changes.
-If you have many bindings to a particular element in a sequence property, it is better
-to create a dynamic property which is bound to that element, and use that dynamic
-property as the symbol in the binding expressions instead of the sequence element,
-as it will only cause re-evaluation of bindings if its value changes.
-
-This is an unusual use-case which most clients should never hit, but is worth being
-aware of, in case you find yourself doing something like this:
-
-\qml
-// bad.qml
-import QtQuick 2.0
-import Qt.example 1.0
-
-SequenceTypeExample {
- id: root
-
- property int firstBinding: qrealListProperty[1] + 10;
- property int secondBinding: qrealListProperty[1] + 20;
- property int thirdBinding: qrealListProperty[1] + 30;
-
- Component.onCompleted: {
- var t0 = new Date();
- for (var i = 0; i < 1000; ++i) {
- qrealListProperty[2] = i;
- }
- var t1 = new Date();
- console.log("elapsed: " + (t1.valueOf() - t0.valueOf()) + " milliseconds");
- }
-}
-\endqml
-
-Note that even though only the element at index 2 is modified in the loop, the three
-bindings will all be re-evaluated since the granularity of the change signal is that
-the entire property has changed. As such, adding an intermediate binding can
-sometimes be beneficial:
-
-\qml
-// good.qml
-import QtQuick 2.0
-import Qt.example 1.0
-
-SequenceTypeExample {
- id: root
-
- property int intermediateBinding: qrealListProperty[1]
- property int firstBinding: intermediateBinding + 10;
- property int secondBinding: intermediateBinding + 20;
- property int thirdBinding: intermediateBinding + 30;
-
- Component.onCompleted: {
- var t0 = new Date();
- for (var i = 0; i < 1000; ++i) {
- qrealListProperty[2] = i;
- }
- var t1 = new Date();
- console.log("elapsed: " + (t1.valueOf() - t0.valueOf()) + " milliseconds");
- }
-}
-\endqml
-
-In the above example, only the intermediate binding will be re-evaluated each time,
-resulting in a significant performance increase.
-
-\section2 Value-Type tips
-
-Value-type properties (font, color, vector3d, etc) have similar QObject property
-and change notification semantics to sequence type properties. As such, the tips
-given above for sequences are also applicable for value-type properties. While
-they are usually less of a problem with value-types (since the number of
-sub-properties of a value-type is usually far less than the number of elements
-in a sequence), any increase in the number of bindings being re-evaluated needlessly
-will have a negative impact on performance.
-
-\section2 Other JavaScript Objects
-
-Different JavaScript engines provide different optimizations. The JavaScript engine
-which \l {Qt Quick}{Qt Quick 2} uses is optimized for object instantiation and property
-lookup, but the optimizations which it provides relies on certain criteria. If your
-application does not meet the criteria, the JavaScript engine falls back to a
-"slow-path" mode with much worse performance. As such, always try to ensure you
-meet the following criteria:
-
-\list
-\li Avoid using eval() if at all possible
-\li Do not delete properties of objects
-\endlist
-
-\section1 Common Interface Elements
-
-\section2 Text Elements
-
-Calculating text layouts can be a slow operation. Consider using the \c PlainText
-format instead of \c StyledText wherever possible, as this reduces the amount of work
-required of the layout engine. If you cannot use \c PlainText (as you need to embed
-images, or use tags to specify ranges of characters to have certain formatting (bold,
-italic, etc) as opposed to the entire text) then you should use \c StyledText.
-
-You should only use \c AutoText if the text might be (but probably isn't)
-\c StyledText as this mode will incur a parsing cost. The \c RichText mode should
-not be used, as \c StyledText provides almost all of its features at a fraction of
-its cost.
-
-\section2 Images
-
-Images are a vital part of any user interface. Unfortunately, they are also a big
-source of problems due to the time it takes to load them, the amount of memory they
-consume, and the way in which they are used.
-
-\section3 Asynchronous Loading
-
-Images are often quite large, and so it is wise to ensure that loading an image doesn't
-block the UI thread. Set the "asynchronous" property of the QML Image element to
-\c true to enable asynchronous loading of images from the local file system (remote
-images are always loaded asynchronously) where this would not result in a negative impact
-upon the aesthetics of the user interface.
-
-Image elements with the "asynchronous" property set to \c true will load images in
-a low-priority worker thread.
-
-\section3 Explicit Source Size
-
-If your application loads a large image but displays it in a small-sized element, set
-the "sourceSize" property to the size of the element being rendered to ensure that the
-smaller-scaled version of the image is kept in memory, rather than the large one.
-
-Beware that changing the sourceSize will cause the image to be reloaded.
-
-\section3 Avoid Run-time Composition
-
-Also remember that you can avoid doing composition work at run-time by providing the
-pre-composed image resource with your application (for example, providing elements with shadow
-effects).
-
-\section2 Position Elements With Anchors
-
-It is more efficient to use anchors rather than bindings to position items
-relative to each other. Consider this use of bindings to position rect2
-relative to rect1:
-
-\code
-Rectangle {
- id: rect1
- x: 20
- width: 200; height: 200
-}
-Rectangle {
- id: rect2
- x: rect1.x
- y: rect1.y + rect1.height
- width: rect1.width - 20
- height: 200
-}
-\endcode
-
-This is achieved more efficiently using anchors:
-
-\code
-Rectangle {
- id: rect1
- x: 20
- width: 200; height: 200
-}
-Rectangle {
- id: rect2
- height: 200
- anchors.left: rect1.left
- anchors.top: rect1.bottom
- anchors.right: rect1.right
- anchors.rightMargin: 20
-}
-\endcode
-
-Positioning with bindings (by assigning binding expressions to the x, y, width
-and height properties of visual objects, rather than using anchors) is
-relatively slow, although it allows maximum flexibility.
-
-If the layout is not dynamic, the most performant way to specify the layout is
-via static initialization of the x, y, width and height properties. Item
-coordinates are always relative to their parent, so if you wanted to be a fixed
-offset from your parent's 0,0 coordinate you should not use anchors. In the
-following example the child Rectangle objects are in the same place, but the
-anchors code shown is not as resource efficient as the code which
-uses fixed positioning via static initialization:
-
-\code
-Rectangle {
- width: 60
- height: 60
- Rectangle {
- id: fixedPositioning
- x: 20
- y: 20
- width: 20
- height: 20
- }
- Rectangle {
- id: anchorPositioning
- anchors.fill: parent
- anchors.margins: 20
- }
-}
-\endcode
-
-\section1 Models and Views
-
-Most applications will have at least one model feeding data to a view. There are
-some semantics which application developers need to be aware of, in order to achieve
-maximal performance.
-
-\section2 Custom C++ Models
-
-It is often desirable to write your own custom model in C++ for use with a view in
-QML. While the optimal implementation of any such model will depend heavily on the
-use-case it must fulfil, some general guidelines are as follows:
-
-\list
-\li Be as asynchronous as possible
-\li Do all processing in a (low priority) worker thread
-\li Batch up backend operations so that (potentially slow) I/O and IPC is minimized
-\li Use a sliding slice window to cache results, whose parameters are determined with the help of profiling
-\endlist
-
-It is important to note that using a low-priority worker thread is recommended to
-minimise the risk of starving the GUI thread (which could result in worse perceived
-performance). Also, remember that synchronization and locking mechanisms can be a
-significant cause of slow performance, and so care should be taken to avoid
-unnecessary locking.
-
-\section2 ListModel
-
-QML provides a ListModel element which can be used to feed data to a ListView.
-It should suffice for most use-cases and be relatively performant so long as
-it is used correctly.
-
-\section3 Populate Within A Worker Thread
-
-ListModel elements can be populated in a (low priority) worker thread in JavaScript. The
-developer must explicitly call "sync()" on the ListModel from within the WorkerScript to
-have the changes synchronized to the main thread. See the WorkerScript documentation
-for more information.
-
-Please note that using a WorkerScript element will result in a separate JavaScript engine
-being created (as the JavaScript engine is per-thread). This will result in increased
-memory usage. Multiple WorkerScript elements will all use the same worker thread, however,
-so the memory impact of using a second or third WorkerScript element is negligible once
-an application already uses one.
-
-\section3 Don't Use Dynamic Roles
-
-The ListModel element in \c {QtQuick 2.0} is much more performant than in \c {QtQuick 1.0}. The
-performance improvements mainly come from assumptions about the type of roles within each
-element in a given model - if the type doesn't change, the caching performance improves
-dramatically. If the type can change dynamically from element to element, this optimization
-becomes impossible, and the performance of the model will be an order of magnitude worse.
-
-Therefore, dynamic typing is disabled by default; the developer must specifically set
-the boolean "dynamicRoles" property of the model to enable dynamic typing (and suffer
-the attendant performance degradation). We recommend that you do not use dynamic typing
-if it is possible to redesign your application to avoid it.
-
-\section2 Views
-
-View delegates should be kept as simple as possible. Have just enough QML in the delegate
-to display the necessary information. Any additional functionality which is not immediately
-required (for example, if it displays more information when clicked) should not be created until
-needed (see the upcoming section on lazy initialization).
-
-The following list is a good summary of things to keep in mind when designing a delegate:
-\list
-\li The fewer elements that are in a delegate, the faster they can be created, and thus
- the faster the view can be scrolled.
-\li Keep the number of bindings in a delegate to a minimum; in particular, use anchors
- rather than bindings for relative positioning within a delegate.
-\li Avoid using ShaderEffect elements within delegates.
-\li Never enable clipping on a delegate.
-\endlist
-
-You may set the \c cacheBuffer property of a view to allow asynchronous creation and
-buffering of delegates outside of the visible area. Utilizing a \c cacheBuffer is
-recommended for view delegates that are non-trivial and unlikely to be created within a
-single frame.
-
-Be mindful that a \c cacheBuffer keeps additional delegates in-memory and therefore the
-value derived from utilizing the \c cacheBuffer must be balanced against additional memory
-usage. Developers should use benchmarking to find the best value for their use-case, since
-the increased memory pressure caused by utilizing a \c cacheBuffer can, in some rare cases,
-cause reduced frame rate when scrolling.
-
-\section1 Visual Effects
-
-\l {Qt Quick}{Qt Quick 2} includes several features which allow developers and designers to create
-exceptionally appealing user interfaces. Fluidity and dynamic transitions as well
-as visual effects can be used to great effect in an application, but some care must
-be taken when using some of the features in QML as they can have performance implications.
-
-\section2 Animations
-
-In general, animating a property will cause any bindings which reference that property
-to be re-evaluated. Usually, this is what is desired but in other cases it may be better
-to disable the binding prior to performing the animation, and then reassign the binding
-once the animation has completed.
-
-Avoid running JavaScript during animation. For example, running a complex JavaScript
-expression for each frame of an x property animation should be avoided.
-
-Developers should be especially careful using script animations, as these are run in the main
-thread (and therefore can cause frames to be skipped if they take too long to complete).
-
-\section2 Particles
-
-The \l {QtQuick.Particles 2}{Qt Quick 2.0 Particles} module allows beautiful particle effects to be integrated
-seamlessly into user interfaces. However every platform has different graphics hardware
-capabilities, and the Particles module is unable to limit parameters to what your hardware
-can gracefully support. The more particles you attempt to render (and the larger they are),
-the faster your graphics hardware will need to be in order to render at 60 FPS. Affecting
-more particles requires a faster CPU. It is therefore important to test all
-particle effects on your target platform carefully, to calibrate the number and size of
-particles you can render at 60 FPS.
-
-It should be noted that a particle system can be disabled when not in use
-(for example, on a non-visible element) to avoid doing unnecessary simulation.
-
-See the \l{Particle System Performance Guide} for more in-depth information.
-
-\section2 Shaders
-
-Shaders written in GLSL allow for complex transformations and visual effects to be written,
-however they should be used with care. Using a ShaderEffectSource causes a scene to
-prerendered into an FBO before it can be drawn. This extra overhead is quite expensive.
-
-A ShaderEffect element can imply a ShaderEffectSource (and the indirect rendering costs
-associated with that) and also involves uploading a vertex and fragment shader program
-(which is then compiled into a GLSL shader). Each fragment shader runs once for every
-pixel of the scene, and so these should be kept as simple as possible.
-
-\section1 Controlling Element Lifetime
-
-By partitioning an application into simple, modular components, each contained in a single
-QML file, you can achieve faster application startup time and better control over memory
-usage, and reduce the number of active-but-invisible elements in your application.
-
-\section2 Lazy Initialization
-
-The QML engine does some tricky things to try to ensure that loading and initialization of
-components doesn't cause frames to be skipped. However, there is no better way to reduce
-startup time than to avoid doing work you don't need to do, and delaying the work until
-it is necessary. This may be achieved by using either \l Loader or creating components
-\l {qtqml-javascript-dynamicobjects.html}{dynamically}.
-
-\section3 Using Loader
-
-The Loader is an element which allows dynamic loading and unloading of components.
-
-\list
-\li Using the "active" property of a Loader, initialization can be delayed until required.
-\li Using the overloaded version of the "setSource()" function, initial property values can
- be supplied.
-\li Setting the Loader \l {Loader::asynchronous}{asynchronous} property to true may also
- improve fluidity while a component is instantiated.
-\endlist
-
-\section3 Using Dynamic Creation
-
-Developers can use the Qt.createComponent() function to create a component dynamically at
-runtime from within JavaScript, and then call createObject() to instantiate it. Depending
-on the ownership semantics specified in the call, the developer may have to delete the
-created object manually. See \l{qtqml-javascript-dynamicobjects.html}
-{Dynamic Object Management in QML} for more information.
-
-\section2 Destroy Unused Elements
-
-Elements which are invisible because they are a child of a non-visible element (for example, the
-second tab in a tab-widget, while the first tab is shown) should be initialized lazily in
-most cases, and deleted when no longer in use, to avoid the ongoing cost of leaving them
-active (for example, rendering, animations, property binding evaluation, etc).
-
-An item loaded with a Loader element may be released by resetting the "source" or
-"sourceComponent" property of the Loader, while other items may be explicitly
-released by calling destroy() on them. In some cases, it may be necessary to
-leave the item active, in which case it should be made invisible at the very least.
-
-See the upcoming section on Rendering for more information on active but invisible elements.
-
-\section1 Rendering
-
-The scene graph used for rendering in \c {QtQuick 2.0} allows highly dynamic, animated user
-interfaces to be rendered fluidly at 60 FPS. There are some things which can
-dramatically decrease rendering performance, however, and developers should be careful
-to avoid these pitfalls wherever possible.
-
-\section2 Clipping
-
-Clipping is disabled by default, and should only be enabled when required.
-
-Clipping is a visual effect, NOT an optimization. It increases (rather than reduces)
-complexity for the renderer. If clipping is enabled, an item will clip its own painting,
-as well as the painting of its children, to its bounding rectangle. This stops the renderer
-from being able to reorder the drawing order of elements freely, resulting in a sub-optimal
-best-case scene graph traversal.
-
-Clipping inside a delegate is especially bad and should be avoided at all costs.
-
-\section2 Over-drawing and Invisible Elements
-
-If you have elements which are totally covered by other (opaque) elements, it is best to
-set their "visible" property to \c false or they will be drawn needlessly.
-
-Similarly, elements which are invisible (for example, the second tab in a tab widget, while the
-first tab is shown) but need to be initialized at startup time (for example, if the cost of
-instantiating the second tab takes too long to be able to do it only when the tab is
-activated), should have their "visible" property set to \c false, in order to avoid the
-cost of drawing them (although as previously explained, they will still incur the cost of
-any animations or bindings evaluation since they are still active).
-
-\section2 Manual Layouts
-
-The scene graph renderer is able to batch up certain operations to minimise the number of
-OpenGL state changes required. However, this optimization is only possible for the
-built-in layout elements provided by \c {QtQuick 2.0}, and cannot be applied to manual layouts.
-
-Therefore, application developers should use the Row, Column, Grid, GridView, and ListView
-elements instead of manual layouts wherever possible.
-
-\section1 Memory Allocation And Collection
-
-The amount of memory which will be allocated by an application and the way in which that
-memory will be allocated are very important considerations. Aside from the obvious
-concerns about out-of-memory conditions on memory-constrained devices, allocating memory
-on the heap is a fairly computationally expensive operation, and certain allocation
-strategies can result in increased fragmentation of data across pages. JavaScript uses
-a managed memory heap which is automatically garbage collected, and this provides some
-advantages but also has some important implications.
-
-An application written in QML uses memory from both the C++ heap and an automatically
-managed JavaScript heap. The application developer needs to be aware of the subtleties
-of each in order to maximise performance.
-
-\section2 Tips For QML Application Developers
-
-The tips and suggestions contained in this section are guidelines only, and may not be
-applicable in all circumstances. Be sure to benchmark and analyze your application
-carefully using empirical metrics, in order to make the best decisions possible.
-
-\section3 Instantiate and initialize components lazily
-
-If your application consists of multiple views (for example, multiple tabs) but only
-one is required at any one time, you can use lazy instantiation to minimize the
-amount of memory you need to have allocated at any given time. See the prior section
-on \l{Lazy Initialization} for more information.
-
-\section3 Destroy unused objects
-
-If you lazily instantiate components, or dynamically create objects during a JavaScript
-expression, it is often better to manually \c{destroy()} them rather than waiting for
-automatic garbage collection to do so. See the prior section on
-\l{Controlling Element Lifetime} for more information.
-
-\section3 Don't manually invoke the garbage collector
-
-In most cases, it is not wise to manually invoke the garbage collector, as it will block
-the GUI thread for a substantial period of time. This can result in skipped frames and
-jerky animations, which should be avoided at all costs.
-
-There are some cases where manually invoking the garbage collector is acceptable (and
-this is explained in greater detail in an upcoming section), but in most cases, invoking
-the garbage collector is unnecessary and counter-productive.
-
-\section3 Avoid complex bindings
-
-Aside from the reduced performance of complex bindings (for example, due to having to
-enter the JavaScript execution context to perform evaluation), they also take up more
-memory both on the C++ heap and the JavaScript heap than bindings which can be
-evaluated by QML's optimized binding expression evaluator.
-
-\section3 Avoid defining multiple identical implicit types
-
-If a QML element has a custom property defined in QML, it becomes its own implicit type.
-This is explained in greater detail in an upcoming section. If multiple identical
-implicit types are defined inline in a component, some memory will be wasted. In that
-situation it is usually better to explicitly define a new component which can then be
-reused.
-
-Defining a custom property can often be a beneficial performance optimization (for
-example, to reduce the number of bindings which are required or re-evaluated), or it
-can improve the modularity and maintainability of a component. In those cases, using
-custom properties is encouraged. However, the new type should, if it is used more than
-once, be split into its own component (.qml file) in order to conserve memory.
-
-\section3 Re-use existing components
-
-If you are considering defining a new component, it's worth double checking that such a
-component doesn't already exist in the component set for your platform. Otherwise, you
-will be forcing the QML engine to generate and store type-data for a type which is
-essentially a duplicate of another pre-existing and potentially already loaded component.
-
-\section3 Use singleton types instead of pragma library scripts
-
-If you are using a pragma library script to store application-wide instance data,
-consider using a QObject singleton type instead. This should result in better performance,
-and will result in less JavaScript heap memory being used.
-
-\section2 Memory Allocation in a QML Application
-
-The memory usage of a QML application may be split into two parts: its C++ heap usage
-and its JavaScript heap usage. Some of the memory allocated in each will be unavoidable,
-as it is allocated by the QML engine or the JavaScript engine, while the rest is
-dependent upon decisions made by the application developer.
-
-The C++ heap will contain:
-\list
- \li the fixed and unavoidable overhead of the QML engine (implementation data
- structures, context information, and so on)
- \li per-component compiled data and type information, including per-type property
- metadata, which is generated by the QML engine depending on which modules are
- imported by the application and which components the application loads
- \li per-object C++ data (including property values) plus a per-element metaobject
- hierarchy, depending on which components the application instantiates
- \li any data which is allocated specifically by QML imports (libraries)
-\endlist
-
-The JavaScript heap will contain:
-\list
- \li the fixed and unavoidable overhead of the JavaScript engine itself (including
- built-in JavaScript types)
- \li the fixed and unavoidable overhead of our JavaScript integration (constructor
- functions for loaded types, function templates, and so on)
- \li per-type layout information and other internal type-data generated by the JavaScript
- engine at runtime, for each type (see note below, regarding types)
- \li per-object JavaScript data ("var" properties, JavaScript functions and signal
- handlers, and non-optimized binding expressions)
- \li variables allocated during expression evaluation
-\endlist
-
-Furthermore, there will be one JavaScript heap allocated for use in the main thread, and
-optionally one other JavaScript heap allocated for use in the WorkerScript thread. If an
-application does not use a WorkerScript element, that overhead will not be incurred. The
-JavaScript heap can be several megabytes in size, and so applications written for
-memory-constrained devices may be best served to avoid using the WorkerScript element
-despite its usefulness in populating list models asynchronously.
-
-Note that both the QML engine and the JavaScript engine will automatically generate their
-own caches of type-data about observed types. Every component loaded by an application
-is a distinct (explicit) type, and every element (component instance) which defines its
-own custom properties in QML is an implicit type. Any element (instance of a component)
-which does not define any custom properties is considered by the JavaScript and QML engines
-to be of the type explicitly defined by the component, rather than its own implicit type.
-
-Consider the following example:
-\qml
-import QtQuick 2.0
-
-Item {
- id: root
-
- Rectangle {
- id: r0
- color: "red"
- }
-
- Rectangle {
- id: r1
- color: "blue"
- width: 50
- }
-
- Rectangle {
- id: r2
- property int customProperty: 5
- }
-
- Rectangle {
- id: r3
- property string customProperty: "hello"
- }
-
- Rectangle {
- id: r4
- property string customProperty: "hello"
- }
-}
-\endqml
-
-In the previous example, the rectangles \c r0 and \c r1 do not have any custom properties,
-and thus the JavaScript and QML engines consider them both to be of the same type. That
-is, \c r0 and \c r1 are both considered to be of the explicitly defined \c Rectangle type.
-The rectangles \c r2, \c r3 and \c r4 each have custom properties and are each considered
-to be different (implicit) types. Note that \c r3 and \c r4 are each considered to be of
-different types, even though they have identical property information, simply because the
-custom property was not declared in the component which they are instances of.
-
-If \c r3 and \c r4 were both instances of a \c RectangleWithString component, and that
-component definition included the declaration of a string property named \c customProperty,
-then \c r3 and \c r4 would be considered to be the same type (that is, they would be
-instances of the \c RectangleWithString type, rather than defining their own implicit type).
-
-\section2 In-Depth Memory Allocation Considerations
-
-Whenever making decisions regarding memory allocation or performance trade-offs, it is
-important to keep in mind the impact of CPU-cache performance, operating system paging,
-and JavaScript engine garbage collection. Potential solutions should be benchmarked
-carefully in order to ensure that the best one is selected.
-
-No set of general guidelines can replace a solid understanding of the underlying
-principles of computer science combined with a practical knowledge of the implementation
-details of the platform for which the application developer is developing. Furthermore,
-no amount of theoretical calculation can replace a good set of benchmarks and analysis
-tools when making trade-off decisions.
-
-\section3 Fragmentation
-
-Fragmentation is a C++ development issue. If the application developer is not defining
-any C++ types or plugins, they may safely ignore this section.
-
-Over time, an application will allocate large portions of memory, write data to that
-memory, and subsequently free some portions of that memory once it has finished using
-some of the data. This can result in "free" memory being located in non-contiguous
-chunks, which cannot be returned to the operating system for other applications to use.
-It also has an impact on the caching and access characteristics of the application, as
-the "living" data may be spread across many different pages of physical memory. This
-in turn could force the operating system to swap which can cause filesystem I/O - which
-is, comparatively speaking, an extremely slow operation.
-
-Fragmentation can be avoided by utilizing pool allocators (and other contiguous memory
-allocators), by reducing the amount of memory which is allocated at any one time by
-carefully managing object lifetimes, by periodically cleansing and rebuilding caches,
-or by utilizing a memory-managed runtime with garbage collection (such as JavaScript).
-
-\section3 Garbage Collection
-
-JavaScript provides garbage collection. Memory which is allocated on the JavaScript
-heap (as opposed to the C++ heap) is owned by the JavaScript engine. The engine will
-periodically collect all unreferenced data on the JavaScript heap, and if fragmentation
-becomes an issue, it will compact its heap by moving all "living" data into a contiguous
-region of memory (allowing the freed memory to be returned to the operating system).
-
-\section4 Implications of Garbage Collection
-
-Garbage collection has advantages and disadvantages. It ensures that fragmentation is
-less of an issue, and it means that manually managing object lifetime is less important.
-However, it also means that a potentially long-lasting operation may be initiated by the
-JavaScript engine at a time which is out of the application developer's control. Unless
-JavaScript heap usage is considered carefully by the application developer, the frequency
-and duration of garbage collection may have a negative impact upon the application
-experience.
-
-\section4 Manually Invoking the Garbage Collector
-
-An application written in QML will (most likely) require garbage collection to be
-performed at some stage. While garbage collection will be automatically triggered by
-the JavaScript engine when the amount of available free memory is low, it is occasionally
-better if the application developer makes decisions about when to invoke the garbage
-collector manually (although usually this is not the case).
-
-The application developer is likely to have the best understanding of when an application
-is going to be idle for substantial periods of time. If a QML application uses a lot
-of JavaScript heap memory, causing regular and disruptive garbage collection cycles
-during particularly performance-sensitive tasks (for example, list scrolling, animations,
-and so forth), the application developer may be well served to manually invoke the
-garbage collector during periods of zero activity. Idle periods are ideal for performing
-garbage collection since the user will not notice any degradation of user experience
-(skipped frames, jerky animations, and so on) which would result from invoking the garbage
-collector while activity is occurring.
-
-The garbage collector may be invoked manually by calling \c{gc()} within JavaScript.
-This will cause a comprehensive collection and compaction cycle to be performed, which
-may take from between a few hundred to more than a thousand milliseconds to complete, and
-so should be avoided if at all possible.
-
-\section3 Memory vs Performance Trade-offs
-
-In some situations, it is possible to trade-off increased memory usage for decreased
-processing time. For example, caching the result of a symbol lookup used in a tight loop
-to a temporary variable in a JavaScript expression will result in a significant performance
-improvement when evaluating that expression, but it involves allocating a temporary variable.
-In some cases, these trade-offs are sensible (such as the case above, which is almost always
-sensible), but in other cases it may be better to allow processing to take slightly longer
-in order to avoid increasing the memory pressure on the system.
-
-In some cases, the impact of increased memory pressure can be extreme. In some situations,
-trading off memory usage for an assumed performance gain can result in increased page-thrash
-or cache-thrash, causing a huge reduction in performance. It is always necessary to benchmark
-the impact of trade-offs carefully in order to determine which solution is best in a given
-situation.
-
-For in-depth information on cache performance and memory-time trade-offs, please see
-Ulrich Drepper's excellent article "What Every Programmer Should Know About Memory"
-(available at http://ftp.linux.org.ua/pub/docs/developer/general/cpumemory.pdf as at 18th
-April 2012), and for information on C++-specific optimizations, please see Agner Fog's
-excellent manuals on optimizing C++ applications (available at
-http://www.agner.org/optimize/ as at 18th April 2012).
-
-*/
diff --git a/src/quick/doc/src/appdevguide/porting.qdoc b/src/quick/doc/src/appdevguide/porting.qdoc
deleted file mode 100644
index 050b2e550a..0000000000
--- a/src/quick/doc/src/appdevguide/porting.qdoc
+++ /dev/null
@@ -1,258 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Free Documentation License Usage
-** 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. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
-\page qtquick-porting-qt5.html
-\title Porting QML Applications to Qt 5
-\brief Lists the Qt 5.0 changes that affect the existing QML applications
-
-When porting QML-related code from Qt 4.8 to Qt 5, application developers should be aware that
-the QML infrastructure has undergone considerable changes in Qt 5. The sections below describe
-these changes and the impact they have on your existing code.
-
-This article describes the changes that affect your existing code. If you are
-interested in the summary of all new features in Qt 5 for QML application development, see
-\l{Qt QML Release Notes} and \l{Qt Quick Release Notes}.
-
-\section1 QML Language changes
-
-There are very few changes in the QML language that affect the porting of existing Qt 4.8 QML code to Qt 5. These are:
-
-\list
-\li Individual file imports no longer work (for example, import "MyType.qml"). Import the containing directory instead.
-\li Relative file paths in JavaScript files are now resolved relative to the location of the JavaScript file instead of the QML file that imported it.
-\endlist
-\li It's no longer possible to override signals from the base component.
-
-\section1 QtQuick Module
-
-The \c QtQuick module has been updated to version 2.0. All QML applications should update their import
-statements to use the new version:
-
-\qml
-import QtQuick 2.0
-\endqml
-
-
-\section2 Property and Method Changes
-
-\list
-\li ListView's \c highlightMoveSpeed and \c highlightResizeSpeed properties have been renamed to
-\l{ListView::}{highlightMoveVelocity} and \l{ListView::}{highlightResizeVelocity}, respectively.
-\li TextInput and TextEdit's \c openSoftwareInputPanel() and \c closeSoftwareInputPanel() methods
-have been removed. Use the new Qt.inputMethod property and call Qt.inputMethod.show()
-Qt.inputMethod.hide() to show and hide the virtual keyboard.
-\endlist
-
-\section2 Type and API Changes
-
-\list
-\li XmlListModel has moved into its own module, QtQuick.XmlListModel. Any code that uses the
-XmlListModel and XmlRole types must import \e {QtQuick.XmlListModel} instead.
-\li The local storage API that enables SQL support has been moved from the \l {QML Global Object}
-into a \c QtQuick.LocalStorage singleton type. Any code that requires the local storage API must import
-\e {QtQuick.LocalStorage} instead. See the \l {QtQuick.LocalStorage 2}{QtQuick.LocalStorage} documentation
-for examples.
-\li The \c LayoutItem type has been removed from the \c QtQuick module as it was specific to the
-Graphics View framework backend used in \l {Qt Quick 1}.
-\endlist
-
-\section2 Behavioral Changes
-
-\c {QtQuick 2.0} includes a number of behavioral changes and you should thoroughly test your applications after
-porting. These changes will not necessarily lead to run-time errors, but may break certain assumptions in your code.
-Below are the prominent changes to be aware of when porting your applications.
-
-Item opacity and visibility:
-
-\list
-\li The input handling details of \l{Item::}{opacity} and \l{Item::}{visible} have changed. An opacity of zero no
- longer affects input handling, where previously it stopped mouse input. A visibility of false no longer affects
- keyboard input, but still stops mouse input. The new \l{Item::}{enabled} property stops mouse and keyboard input, but does not affect how or whether
- the item is rendered. A workaround for applying the old behavior in most cases is to bind enabled to
- \tt {(visible && opacity > 0.0)}.
-\li Previously, if an item was in a positioner (i.e. a \l Row, \l Column, \l Grid and \l Flow)
- and the item's \c opacity changed to 0, or its \c visible value became \c false, the positioner
- would remove the item from its layout and collapse the space for that item. In \c {QtQuick 2.0}, this
- now only happens when an item's \c visible is \c false; the item opacity no longer affects whether
- the item is laid out. (This is consistent with the existing behavior of ListView and GridView).
-\endlist
-
-Text:
-
-\list
-\li The TextEdit::textFormat property now defaults to \c PlainText instead of \c AutoText.
-\li When Text::textFormat is set to \c Text.AutoText format, the text object will automatically
- switch to \c Text.StyledText instead of \c Text.RichText.
-\endlist
-
-Other:
-
-\list
-\li Modifying the Image::sourceSize now fits the image to the size, maintaining aspect
- ratio.
-\li For ListView and GridView, the \c cacheBuffer property now has a non-zero default and
- delegates in the cache buffer are created asynchronously. Also, using a \c RightToLeft layout
- now also reverses the \c preferredHighlightBegin and \c preferredHighlightEnd.
-\li For \l Loader, the \c sourceChanged and \c sourceComponentChanged signals are now only emitted
- when their respective properties change value. (Previously \l Loader emitted both of these signals
- when either of the relevant properties had changed.)
-\endlist
-
-
-\section2 Changes to experimental Qt.labs modules
-
-\list
-\li The \c Qt.labs.particles module has been removed. It is replaced by the fully-fledged \l
-QtQuick.Particles module which is an enormous improvement on its predecessor.
-\li The \c Qt.labs.shaders module has been removed as the \c ShaderEffectItem and \l
-ShaderEffectSource types from this module have been moved into the \c QtQuick module. Note the \c
-ShaderEffectItem type has been renamed to \l ShaderEffect.
-\endlist
-
-
-\section1 C++ code
-
-In Qt 5, all QML applications are rendered with an OpenGL scenegraph architecture rather than the
-Graphics View framework used in Qt 4. Due to the scale of this architectural change, the C++ API has
-been extensively restructured and the \c QtDeclarative module has been deprecated in favor of two
-new modules: \l {Qt QML}, which implements the QML engine and language infrastructure, and \l {Qt Quick},
-which implements the visual canvas and scenegraph backend.
-
-All classes that were previously in the \c QtDeclarative module have been moved into the \l {Qt QML}
-and \l {Qt Quick} modules, and their class names have been changed to reflect their new module
-locations. The class name changes are as follows:
-
-\table
-\header
- \li Qt QML
- \li Qt Quick
-\row
- \li
- \list
- \li QDeclarativeComponent -> QQmlComponent
- \li QDeclarativeContext -> QQmlContext
- \li QDeclarativeEngine -> QQmlEngine
- \li QDeclarativeError -> QQmlError
- \li QDeclarativeExpression -> QQmlExpression
- \li QDeclarativeExtensionPlugin -> QQmlExtensionPlugin
- \li QDeclarativeInfo -> QQmlInfo
- \li QDeclarativeListReference -> QQmlListReference
- \li QDeclarativeNetworkAccessManagerFactory -> QQmlNetworkAccessManagerFactory
- \li QDeclarativeParserStatus -> QQmlParserStatus
- \li QDeclarativeProperty -> QQmlProperty
- \li QDeclarativePropertyMap -> QQmlPropertyMap
- \li QDeclarativePropertyValueSource -> QQmlPropertyValueSource
- \li QDeclarativeScriptString -> QQmlScriptString
- \endlist
- \li
- \list
- \li QDeclarativeItem -> QQuickItem
- \li QDeclarativeView -> QQuickView
- \li QDeclarativeImageProvider -> QQuickImageProvider
- \endlist
-\endtable
-
-To use the new \c QQml* and \c QQuick* classes in Qt 5, link against the approprate module from
-your qmake \c .pro file. For example the following will link against both the \l {Qt QML} and \l {Qt Quick}
-modules:
-
-\code
-QT += qml quick
-\endcode
-
-Required header files can then be included:
-
-\code
-#include <QtQml/QQmlEngine>
-#include <QtQuick/QQuickView>
-\endcode
-
-(The \c QtDeclarative module is still available to developers as the \c {Qt Quick 1} module, as
-discussed \l {Qt Quick 1}{below}. However, it should not be used for
-new applications.)
-
-
-\section3 QDeclarativeItem and QDeclarativeView
-
-When porting to QQuickItem, note that QDeclarativeItem inherited from QGraphicsItem; in contrast,
-QQuickItem inherits directly from QObject, and any QGraphicsItem-specific functionality is no longer
-available. In particular, QQuickItem does not have a \c paint() method for performing custom
-rendering through the QPainter API. Instead, in Qt 5, custom rendering should be performed through
-the new \c QSG* classes to take full advantage of the scene graph. See the \l {Qt Quick Scene Graph}
-documentation details on using these classes.
-
-Alternatively, the QQuickPaintedItem provides a \c paint() method and can be used as
-a convenient way to port QDeclarativeItem-based classes that use the QPainter API. Note this method
-is less performant than using the \c QSG* classes.
-
-When porting from QDeclarativeView to QQuickView, note that QDeclarativeItem inherited from
-QGraphicsView. In contrast, QQuickView inherits from QQuickWindow and uses the QWindow
-infrastructure introduced in Qt 5; any QGraphicsView-specific functionality is no longer available.
-
-
-\section3 qmlscene Utility
-
-The \c qmlviewer tool provided for prototyping and testing QML applications in Qt 4.x has been
-replaced with the \c qmlscene tool which integrates with the new scenegraph features in Qt 5.
-
-
-\section2 QML plugins
-
-All QML plugins should extend QQmlExtensionPlugin in Qt 5.
-
-Additionally, plugins should use the new Qt plugin infrastructure introduced in Qt 5. QML plugins no
-longer require the Q_EXPORT_PLUGIN2() macro. Instead, they should use the Q_PLUGIN_METADATA() macro
-within the plugin class declaration.
-
-See the updated \l {qtqml-modules-cppplugins.html}{Creating C++ Plugins For QML} documentation for
-an overview of creating QML plugins in Qt 5.
-
-
-\keyword Qt Quick 1
-
-\section2 QtDeclarative module in Qt 5
-
-For the purposes of porting older applications, the \c {QtDeclarative} module is still available in Qt
-5 but has been renamed to \c {Qt Quick 1}. Applications that required Qt Quick 1 specific API (e.g.
-QDeclarativeView or QDeclarativeItem and the Graphics View integration) can use this module. Note
-that new applications should use the new \l {Qt QML} and \l {Qt Quick} modules instead.
-
-To use the \c {Qt Quick 1} module, add "quick1" to your qmake \c .pro file:
-
-\code
-QT += quick1
-\endcode
-
-Required header files can be included from the Qt Quick 1 module:
-
-\code
-#include <QtQuick1/QDeclarativeView>
-#include <QtQuick1/QDeclarativeItem>
-\endcode
-
-*/
diff --git a/src/quick/doc/src/appdevguide/qmlscene.qdoc b/src/quick/doc/src/appdevguide/qmlscene.qdoc
deleted file mode 100644
index 1a2e66e962..0000000000
--- a/src/quick/doc/src/appdevguide/qmlscene.qdoc
+++ /dev/null
@@ -1,146 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Free Documentation License Usage
-** 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. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \page qtquick-qmlscene.html
- \ingroup qtquick-tools
- \title Prototyping with qmlscene
- \ingroup qttools
- \brief Utility to test and load QML files
-
- Qt 5 includes \c qmlscene, a utility to load QML documents.
- The \c{qmlscene} utility enables viewing your QML document even before the
- application is complete. This utility also provides the following
- additional features that are useful while developing QML applications:
- \list
- \li View the QML document in a maximized window.
- \li View the QML document in full-screen mode.
- \li Make the window transparent.
- \li Disable multi-sampling (anti-aliasing).
- \li Do not detect the version of the .qml file.
- \li Run all animations in slow motion.
- \li Resize the window to the size of the root item.
- \li Add the list of import paths.
- \li Add a named bundle.
- \li Use a translation file to set the language.
- \endlist
-
- The \c qmlscene utility is meant to be used for testing your QML
- applications, and not as a launcher in a production environment.
- To launch a QML application in a production environment, develop a custom
- C++ application or bundle the QML file in a module. See \l {Deploying QML
- applications} for more information.
-
- To load a .qml file, run the tool and select the file to be opened, or
- provide the file path on the command prompt:
-
- \code
- qmlscene myqmlfile.qml
- \endcode
-
- To see the configuration options, run \c qmlscene with the \c -help
- argument.
-
- \section1 Adding Module Import Paths
-
- Additional module import paths can be provided using the \c -I flag.
- For example, the \l{QML Plugin Example}{QML plugin example}
- creates a C++ plugin identified with the namespace, \c TimeExample.
- To load the plugin, you must run \c qmlscene with the \c{-I} flag from the
- example's base directory:
-
- \code
- qmlscene -I imports plugins.qml
- \endcode
-
- This adds the current directory to the import path so that \c qmlscene will
- find the plugin in the \c imports directory.
-
- \note By default, the current directory is included in the import search
- path, but modules in a namespace such as \c TimeExample are not found
- unless the path is explicitly added.
-
- \section1 Loading Test Data
-
- Often, QML applications are prototyped with test data that is later
- replaced by real data sources from C++ plugins. The \c qmlscene utility
- assists in this aspect by loading test data into the application context.
- It looks for a directory named \c {dummydata} in the same directory as
- the target QML file, and loads the .qml files in that directory as QML
- objects and bind them to the root context as properties named after the files.
-
- For example, the following QML document refers to a \c lottoNumbers
- property which does not exist within the document:
-
- \qml
- import QtQuick 2.0
-
- ListView {
- width: 200; height: 300
- model: lottoNumbers
- delegate: Text { text: number }
- }
- \endqml
-
- If, within the document's directory, there is a \c{dummydata} directory
- which contains a \c lottoNumbers.qml file like this:
-
- \qml
- import QtQuick 2.0
-
- ListModel {
- ListElement { number: 23 }
- ListElement { number: 44 }
- ListElement { number: 78 }
- }
- \endqml
-
- Then this model would be automatically loaded into the ListView in the
- previous document.
-
- Child properties are included when loaded from \c dummydata. The following
- document refers to a \c clock.time property:
-
- \qml
- import QtQuick 2.0
- Text { text: clock.time }
- \endqml
-
- The text value could be filled by a \c dummydata/clock.qml file with a
- \c time property in the root context:
-
- \qml
- import QtQuick 2.0
- QtObject { property int time: 54321 }
- \endqml
-
- To replace this with real data, bind the real data object to
- the root context in C++ using QQmlContext::setContextProperty(). This is
- detailed in \l{Integrating QML and C++}.
-
-*/
-
diff --git a/src/quick/doc/src/appdevguide/qtquicktest.qdoc b/src/quick/doc/src/appdevguide/qtquicktest.qdoc
deleted file mode 100644
index 62369c1526..0000000000
--- a/src/quick/doc/src/appdevguide/qtquicktest.qdoc
+++ /dev/null
@@ -1,131 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Free Documentation License Usage
-** 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. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-/*!
- \page qtquick-qtquicktest.html
- \title Qt Quick Test Reference Documentation
- \brief unit testing framework for QML
-
- \section1 Introduction
-
- QtQuickTest is a unit test framework for QML applications.
- Test cases are written as JavaScript functions within a TestCase
- type:
-
- \code
- import QtQuick 2.0
- import QtTest 1.0
-
- TestCase {
- name: "MathTests"
-
- function test_math() {
- compare(2 + 2, 4, "2 + 2 = 4")
- }
-
- function test_fail() {
- compare(2 + 2, 5, "2 + 2 = 5")
- }
- }
- \endcode
-
- Functions whose names start with \c{test_} are treated as test cases
- to be executed. See the documentation for the \l TestCase and
- \l SignalSpy types for more information on writing test cases.
-
- \section1 Running tests
-
- Test cases are launched by a C++ harness that consists of
- the following code:
-
- \code
- #include <QtQuickTest/quicktest.h>
- QUICK_TEST_MAIN(example)
- \endcode
-
- Where "example" is the identifier to use to uniquely identify
- this set of tests. You should add \c{CONFIG += qmltestcase}.
- for example:
-
- \code
- TEMPLATE = app
- TARGET = tst_example
- CONFIG += warn_on qmltestcase
- SOURCES += tst_example.cpp
- \endcode
-
- The test harness scans the specified source directory recursively
- for "tst_*.qml" files. If \c{QUICK_TEST_SOURCE_DIR} is not defined,
- then the current directory will be scanned when the harness is run.
- Other *.qml files may appear for auxillary QML components that are
- used by the test.
-
- The \c{-input} command-line option can be set at runtime to run
- test cases from a different directory. This may be needed to run
- tests on a target device where the compiled-in directory name refers
- to a host. For example:
-
- \code
- tst_example -input /mnt/SDCard/qmltests
- \endcode
-
- It is also possible to run a single file using the \c{-input} option.
- For example:
-
- \code
- tst_example -input data/test.qml
- \endcode
-
- \code
- tst_example -input <full_path>/test.qml
- \endcode
-
- \note Specifying the full path to the qml test file is for example
- needed for shadow builds.
-
- If your test case needs QML imports, then you can add them as
- \c{-import} options to the test program command-line by adding
- the following line to your .pro file:
-
- \code
- IMPORTPATH += $$PWD/../imports/my_module1 $$PWD/../imports/my_module2
- \endcode
-
- The \c{-functions} command-line option will return a list of the current
- tests functions. It is possible to run a single test function using the name
- of the test function as an argument. For example:
-
- \code
- tst_example Test_Name::function1
- \endcode
-
- The \c{-help} command-line option will return all the options available.
-
- \code
- tst_example -help
- \endcode
-*/
diff --git a/src/quick/doc/src/appdevguide/quickstart/basics.qdoc b/src/quick/doc/src/appdevguide/quickstart/basics.qdoc
deleted file mode 100644
index 15f3c2f5ff..0000000000
--- a/src/quick/doc/src/appdevguide/quickstart/basics.qdoc
+++ /dev/null
@@ -1,118 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Free Documentation License Usage
-** 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. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-/*!
-\page qtquick-quickstart-basics.html
-\title Quick Start Guide - QML Basics
-\brief Basic QML application development examples
-
-\section1 Creating a QML Document
-
-A QML document defines a hierarchy of objects with a highly-readable,
-structured layout. Every QML document consists of two parts: an imports
-section and an object declaration section. The types and functionality most
-common to user interfaces are provided in the \c{QtQuick}
-import.
-
-\section2 Importing and Using the QtQuick Module
-
-To use the \l{Qt Quick} module, a QML document needs to
-import it. The import syntax looks like this:
-
-\qml
-import QtQuick 2.0
-\endqml
-
-The types and functionality that \l{Qt Quick} provides can now
-be used in the QML document!
-
-\section2 Defining an Object Hierarchy
-
-The object declaration in a QML document defines what will be displayed in the
-visual scene. \l{Qt Quick} provides the basic building blocks
-for all user interfaces, including objects to display images and text, and to
-handle user input.
-
-A simple object declaration might be a colored rectangle with some text centered
-in it:
-
-\qml
-Rectangle {
- width: 200
- height: 100
- color: "red"
-
- Text {
- anchors.centerIn: parent
- text: "Hello, World!"
- }
-}
-\endqml
-
-This defines an object hierarchy with a root \l Rectangle object
-which has a child \l Text object. The \c parent of the \l Text object is
-automatically set to the \l Rectangle, and similarly, the \l Text object is
-added to the \c children property of the \l Rectangle object, by QML.
-
-\section2 Putting it Together
-
-The \l Rectangle and \l Text types used in the above example are both provided
-by the \c{QtQuick} import. Putting the import and object declaration
-together, we get a complete QML document:
-
-\qml
-import QtQuick 2.0
-
-Rectangle {
- width: 200
- height: 100
- color: "red"
-
- Text {
- anchors.centerIn: parent
- text: "Hello, World!"
- }
-}
-\endqml
-
-If we save that document as "HelloWorld.qml" we can load and display it.
-
-\section1 Loading and Displaying the QML Document
-
-To display the graphical scene defined by the QML document, it may be loaded
-with the \l{Prototyping with qmlscene}{qmlscene} tool. The
-\l{Prototyping with qmlscene}{qmlscene} tool should be installed into the
-Qt installation directory. Assuming that the Qt binaries are installed into
-or are available in the system executable path, you can display the QML
-document with the following command:
-
-\code
-qmlscene HelloWorld.qml
-\endcode
-
-You should see the text "Hello, World!" in the center of a red rectangle.
-
-*/
diff --git a/src/quick/doc/src/appdevguide/quickstart/essentials.qdoc b/src/quick/doc/src/appdevguide/quickstart/essentials.qdoc
deleted file mode 100644
index d7a9ec3cdb..0000000000
--- a/src/quick/doc/src/appdevguide/quickstart/essentials.qdoc
+++ /dev/null
@@ -1,184 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Free Documentation License Usage
-** 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. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-/*!
-\page qtquick-quickstart-essentials.html
-\title Quick Start Guide - QML Essentials
-\brief Essential QML application development examples
-
-\section1 Handling User Input
-
-One of the great advantages of using QML to define a user interface is that it
-allows the user interface designer to define how the application should react
-to events with simple JavaScript expressions. In QML, we refer to those events
-as \l{Signal and Handler Event System}{signals} and such signals can be handled
-with \l{qml-signals-and-handlers}{signal handlers}.
-
-For example, consider the following example:
-\qml
-import QtQuick 2.0
-
-Rectangle {
- width: 200
- height: 100
- color: "red"
-
- Text {
- anchors.centerIn: parent
- text: "Hello, World!"
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: parent.color = "blue"
- }
-}
-\endqml
-
-This example can be saved as "ClickableHelloWorld.qml" and run with qmlscene.
-Whenever the user clicks anywhere in the window, the rectangle will change
-from red to blue. Note that the \l MouseArea type also emits the clicked
-signal for touch events, so this code will also work on a mobile device.
-
-Keyboard user input can be similarly handled with a simple expression:
-
-\qml
-import QtQuick 2.0
-
-Rectangle {
- width: 200
- height: 100
- color: "red"
-
- Text {
- anchors.centerIn: parent
- text: "Hello, World!"
- }
-
- focus: true
- Keys.onPressed: {
- if (event.key == Qt.Key_Return) {
- color = "blue";
- event.accepted = true;
- }
- }
-}
-\endqml
-
-By accepting focus, the color can be changed to blue whenever the return key
-is pressed.
-
-\section1 Property Bindings
-
-Objects and their properties form the basis of a graphical interface defined
-in a QML document. The QML language allows properties to be bound to each
-other in various ways, enabling highly dynamic user interfaces.
-
-In the following example, the geometry of each child \l Rectangle is bound to
-that of the parent \l Rectangle. If the geometry of the parent \l Rectangle
-were to change, the geometry of each child \l Rectangle would automatically
-update due to the property bindings.
-
-\qml
-import QtQuick 2.0
-
-Rectangle {
- width: 400
- height: 200
-
- Rectangle {
- width: parent.width / 2
- height: parent.height
- }
-
- Rectangle {
- width: parent.width / 2
- height: parent.height
- x: parent.width / 2
- }
-}
-\endqml
-
-\section1 Animations
-
-Properties can also be dynamically updated via animations. The \c QtQuick
-import provides various animation types which can be used to animate changes
-to a property's value. In the following example, a property is animated which
-then gets displayed in a \l Text area:
-
-\qml
-import QtQuick 2.0
-
-Rectangle {
- color: "lightgray"
- width: 200
- height: 200
-
- property int animatedValue: 0
- SequentialAnimation on animatedValue {
- loops: Animation.Infinite
- PropertyAnimation { to: 150; duration: 1000 }
- PropertyAnimation { to: 0; duration: 1000 }
- }
-
- Text {
- anchors.centerIn: parent
- text: animatedValue
- }
-}
-\endqml
-
-The value being displayed will vary from 0 to 150 periodically.
-
-\section1 Defining Custom QML Types for Re-use
-
-One of the most important concepts in QML is that of type re-use. An
-application will probably have multiple visual types which are all similar
-(for example, multiple push buttons), and QML allows these sort of things to
-be defined as re-usable, custom types, to minimize code duplication and
-maximize readability.
-
-For example, imagine that the developer defines a new \c Button type in the
-\c Button.qml file:
-
-\snippet qml/qml-extending-types/components/Button.qml 0
-
-That type may now be re-used multiple times in the application, as follows:
-
-\table
-\row
-\li \snippet qml/qml-extending-types/components/application.qml 0
-\li \image qml-extending-types.png
-\endtable
-
-
-In this way, modular user interface types can be built up and re-used within
-an application.
-
-See \l {QML Object Attributes}
-for more details on how to develop your own reusable components.
-
-*/
diff --git a/src/quick/doc/src/appdevguide/usecases/animations.qdoc b/src/quick/doc/src/appdevguide/usecases/animations.qdoc
deleted file mode 100644
index 3249a632f5..0000000000
--- a/src/quick/doc/src/appdevguide/usecases/animations.qdoc
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Free Documentation License Usage
-** 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. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-/*!
-\page qtquick-usecase-animations.html
-\title Usecase - Animations In QML
-\brief Example of how to include animations in QML applications
-
-\l {Qt Quick} provides the ability to animate properties. Animating properties allows property values to move through
-intermediate values instead of immediately changing to the target value. To animate the position of an item, you can
-animate the properties that controle the item's position, x and y for example, so that the item's position
-changes each frame on the way to the target position.
-
-\section1 Fluid UIs
-
-QML was designed to facilitate the creation of fluid UIs. These are user interfaces where the UI components animate instead of appearing, disappearing, or jumping abruptly. Qt Quick provides two simple ways to have UI
-components move with animation instead of instantly appearing at their new location.
-
-\section2 States and Transitions
-
-Qt Quick allows you to declare various UI states in \l State objects. These states are comprised of property changes from a
-base state, and can be a useful way of organizing your UI logic. Transitions are objects you can associate with an item
-to define how its properties will animate when they change due to a state change.
-
-States and transitions for an item can be declared with the \l Item::states and \l Item::transitions properties.
-States are declared inside the states list property of an item, usually the root item of the component. Transitions
-defined on the same item are used to animate the changes in the state. Here is an example.
-
-\snippet qml/usecases/animations.qml states
-
-\section2 Animating Property Changes.
-
-Behaviors can be used to specify an animation for a property to use when it changes. This is then applied to all
-changes, regardless of their source. The following example animates a button moving around the
-screen using behaviors.
-
-\snippet qml/usecases/animations.qml behave
-
-\section1 Other Animations
-
-Not all animations have to be tied to a specific property or state. You can also create animations more generally, and
-specify target items and properties inside the animation. Here are some examples of different ways to do this:
-
-\snippet qml/usecases/animations.qml constant
-\snippet qml/usecases/animations.qml scripted
-\image qml-uses-animation.png
-
-More information about animations can be found on the \l{Important Concepts in Qt Quick - States, Transitions and
-Animations} page.
-*/
diff --git a/src/quick/doc/src/appdevguide/usecases/integratingjs.qdoc b/src/quick/doc/src/appdevguide/usecases/integratingjs.qdoc
deleted file mode 100644
index 4bad4a4033..0000000000
--- a/src/quick/doc/src/appdevguide/usecases/integratingjs.qdoc
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Free Documentation License Usage
-** 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. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-/*!
-\page qtquick-usecase-integratingjs.html
-\title Use Case - Integrating JavaScript in QML
-\brief Example of how to integrate JavaScript code in QML applications
-
-JavaScript code can be easily integrated into QML to provide UI logic, imperative control, or other benefits.
-
-\section1 Using JavaScript Expressions for Property Values
-
-JavaScript expressions can be used in QML as bindings. For example
-\code
-Item {
- width: Math.random()
- height: width < 100 ? 100 : (width + 50) / 2
-}
-\endcode
-
-Note that function calls, like Math.random(), will not be revaluated unless their arguments
-change. So binding to Math.random() will be one random number and not revaluated, but if the width is changed in some
-other manner, the height binding will be reevaluated to take that into account.
-
-\section1 Adding JavaScript Functions in QML
-
-JavaScript functions can be declared on QML items, like in the below example. This allows you to call the method
-using the item id.
-
-\snippet qml/usecases/integratingjs-inline.qml 0
-
-\section1 Using JavaScript files
-
-JavaScript files can be used for abstracting out logic from QML files. To do this, first place your functions inside a
-.js file like in the example shown.
-
-\snippet qml/usecases/myscript.js 0
-
-Then import the file into any .qml file that needs to use the functions, like the example QML file below.
-
-\snippet qml/usecases/integratingjs.qml 0
-
-\image qml-uses-integratingjs.png
-
-For further details on the JavaScript engine used by QML, as well as the difference from browser JS, see the full
-documentation on \c {Using JavaScript Expressions with QML}.
-*/
diff --git a/src/quick/doc/src/appdevguide/usecases/layouts.qdoc b/src/quick/doc/src/appdevguide/usecases/layouts.qdoc
deleted file mode 100644
index e8e35a93e7..0000000000
--- a/src/quick/doc/src/appdevguide/usecases/layouts.qdoc
+++ /dev/null
@@ -1,79 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Free Documentation License Usage
-** 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. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-/*!
-\page qtquick-usecase-layouts.html
-\title Use Case - Layouts In QML
-\brief Example of how to create layouts for visual components in a QML application
-
-There are several ways to position items in QML.
-
-Below is a brief overview. For more details, see \l {Important Concepts In Qt Quick - Positioning}.
-
-\section1 Manual Positioning
-
-Items can be placed at specific x,y coordinates on the screen by setting their x,y properties. This will
-setup their position relative to the top left corner of their parent, according to the
-\l {Concepts - Visual Coordinates in Qt Quick}{visual coordinate system} rules.
-
-Combined with using \l{Property Binding}{bindings} instead of constant valudes for these properties, relative positioning is also easily
-accomplished by setting the x and y coordinates to the appropriate bindings.
-
-\snippet qml/usecases/layouts.qml import
-\snippet qml/usecases/layouts.qml direct
-
-\image qml-uses-layouts-direct.png
-
-
-\section1 Anchors
-
-The \c Item type provides the abilitiy to anchor to other \l Item types. There are six anchor lines for each item: \e left,
-\e right, \e{vertical center}, \e top, \e bottom and \e{horizontal center}. The three vertical anchor lines can be anchored to any of
-the three vertical anchor lines of another item, and the three horizontal anchor lines can be anchored to the
-horizontal anchor lines of another item.
-
-For full details, see \l {Positioning with Anchors} and the documentation of the \l{Item::anchors.top}{anchors property}.
-
-\snippet qml/usecases/layouts.qml import
-\snippet qml/usecases/layouts.qml anchors
-
-\image qml-uses-layouts-anchors.png
-
-
-\section1 Positioners
-
-For the common case of wanting to position a set of types in a regular pattern, Qt Quick provides some positioner
-types. Items placed in a positioner are automatically positioned in some way; for example, a \l Row positions items to be
-horizontally adjacent (forming a row).
-
-For full details see \l {Item Layouts} and the documentation for \l{qtquick-qmltypereference.html#positioning}{the positioner types}.
-
-\snippet qml/usecases/layouts.qml import
-\snippet qml/usecases/layouts.qml positioners
-
-\image qml-uses-layouts-positioners.png
-
-*/
diff --git a/src/quick/doc/src/appdevguide/usecases/styling.qdoc b/src/quick/doc/src/appdevguide/usecases/styling.qdoc
deleted file mode 100644
index f8c7a94d30..0000000000
--- a/src/quick/doc/src/appdevguide/usecases/styling.qdoc
+++ /dev/null
@@ -1,63 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Free Documentation License Usage
-** 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. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-/*!
-\page qtquick-usecase-styling.html
-\title Use Case - Style And Theme Support
-\brief Example of how to style user interface components in QML
-
-The types provided in the \l {Qt Quick} module are not complete user interface components on their own. A common use case is to
-develop a set of custom styled user interface components out of the types in the \l {Qt Quick} module. This is easily
-accomplished by creating your own reusable components.
-
-With the reusable components approach, you define your own type with the appearance you want to have in your
-application and style that type directly. You then use that type in your application instead of the unstyled type. For
-example, you could create a MyText.qml which is a Text type with certain properties set by default, and use MyText
-instead of Text elsewhere in your application.
-
-\section1 Example Themed Text
-\section2 Button Definition
-\snippet qml/usecases/MyText.qml 0
-\section2 Using the Text
-\snippet qml/usecases/styling-text.qml texts
-\image qml-uses-styling-text.png
-
-Because the root item in MyText.qml is a Text item it will behave as a
-Text item, and the properties can be overriden in specific uses. However, the properties will be set to the values
-specified in MyText when the item is first generated, thus applying your style by default.
-
-For pre-styled user interface components, see the \c{Qt Components} add-on which provides a set of components.
-For accessing the system theme, see the \l{SystemPalette} type documentation.
-
-\section1 Example Themed Button
-\section2 Button Definition
-\snippet qml/usecases/Button.qml 0
-\section2 Using the Button
-\snippet qml/usecases/styling.qml 0
-\image qml-uses-styling.png
-
-For more examples of creating custom UI components in QML, see the tutorials.
-*/
diff --git a/src/quick/doc/src/appdevguide/usecases/text.qdoc b/src/quick/doc/src/appdevguide/usecases/text.qdoc
deleted file mode 100644
index 7b8e21eb5b..0000000000
--- a/src/quick/doc/src/appdevguide/usecases/text.qdoc
+++ /dev/null
@@ -1,58 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Free Documentation License Usage
-** 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. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-/*!
-\page qtquick-usecase-text.html
-\title Use Case - Displaying Text In QML
-\brief Example of how to display text in QML
-To display text the Text type is provided by the \l {Qt Quick} module. For related uses, the \l{TextInput} and
-\l{TextEdit} types provide editable text controls. For full HTML markup, see the \l {Qt WebKit} module.
-
-\section1 Displaying and Formatting Text
-
-To display text in QML, create a Text item and set the text property to the text you wish to display. The Text item
-will now display that text.
-
-Several properties can be set on the Text item to style the entire block of text. These include color, font family,
-font size, bold and italic. For a full list of properties, consult the \l{Text} type documentation.
-
-Rich text like markup can be used to selectively style specific sections of text with a Text item. Set \l
-Text::textFormat to Text.StyledText to use this functionality. More details are available in the documentation of the
-\l{Text} type.
-
-\section1 Laying out Text
-
-By default, Text will display the text as a single line unless it contains embedded newlines. To wrap the line, set the
-wrapMode property and give the text an explicit width for it to wrap to. If the width or height is not explicitly set,
-reading these properties will return the parameters of the bounding rect of the text (if you have explicitly set width
-or height, you can still use paintedWidth and paintedHeight). With these parameters in mind, the Text can be positioned
-like any other Item.
-
-\section1 Example Code
-\snippet qml/usecases/text.qml 0
-\image qml-uses-text.png
-
-*/
diff --git a/src/quick/doc/src/appdevguide/usecases/userinput.qdoc b/src/quick/doc/src/appdevguide/usecases/userinput.qdoc
deleted file mode 100644
index 7e93a263f1..0000000000
--- a/src/quick/doc/src/appdevguide/usecases/userinput.qdoc
+++ /dev/null
@@ -1,83 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Free Documentation License Usage
-** 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. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-/*!
-\page qtquick-usecase-userinput.html
-\title Use Case - Responding To User Input in QML
-\brief Example of how to accept user input and respond to it in a QML application
-
-\section1 Supported Types of User Input
-
-The \l {Qt Quick} module provides support for the most common types of user input,
-including mouse and touch events, text input and key-press events. Other
-modules provide support for other types of user input (for example, the
-\l {Qt Sensors} module provides support for shake-gestures in QML applications).
-
-This article covers how to handle basic user input; for further information
-about motion-gesture support, please see the \l {Qt Sensors} documentation. For
-information about audio-visual input, please see the \l {Qt Multimedia} documentation.
-
-\section2 Mouse and Touch Events
-
-The \l MouseArea type allows mouse and touch events to be handled in a QML
-application. A \l MouseArea can be combined with either an \l Image or a
-\l Rectangle and \l Text object to implement a simple button.
-
-\snippet qml/usecases/userinput.qml 0
-
-For more advanced use cases requiring multiple touch points, please read the
-documentation for the \l MultiPointTouchArea type and the \l PinchArea type.
-
-Note that some types have their own built in input handling. For example,
-\l Flickable responds to mouse dragging, mouse wheel scrolling, touch dragging,
-and touch flicking by default.
-
-\section2 Keyboard and Button Events
-
-Button and key presses, from buttons on a device, a keypad, or a keyboard,
-can all be handled using the \l Keys attached property. This attached property
-is available on all \l Item derived types, and works with the \l Item::focus property
-to determine which type receives the key event. For simple key handling, you can set the focus
-to true on a single \l Item and do all your key handling there.
-
-\snippet qml/usecases/userinput-keys.qml 0
-
-For text input the \l {Qt Quick} module provides several built-in types.
-In particular, the \l TextInput and \l TextEdit types allow for single-line
-entry and multi-line editing respectively.
-
-Here is all you need to get a working TextInput:
-
-\code
-import QtQuick 2.0
-
-TextInput {
- focus: true
- text: "Initial Text"
-}
-\endcode
-
-*/
diff --git a/src/quick/doc/src/appdevguide/usecases/visual.qdoc b/src/quick/doc/src/appdevguide/usecases/visual.qdoc
deleted file mode 100644
index fc7b96cadc..0000000000
--- a/src/quick/doc/src/appdevguide/usecases/visual.qdoc
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia. For licensing terms and
-** conditions see http://qt.digia.com/licensing. For further information
-** use the contact form at http://qt.digia.com/contact-us.
-**
-** GNU Free Documentation License Usage
-** 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. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: http://www.gnu.org/copyleft/fdl.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-/*!
-\page qtquick-usecase-visual.html
-\title Use Case - Visual Elements In QML
-\brief Example of how to display visual item types in a QML application
-
-\section1 The Rectangle Type
-
-For the most basic of visuals, \l {Qt Quick} provides a \l Rectangle type to draw rectangles. These rectangles can be colored with a
-color or a vertical gradient. The \l Rectangle type can also draw borders on the rectangle.
-
-For drawing custom shapes beyond rectangles, see the \l Canvas type or display
-a pre-rendered image using the \l Image type.
-
-\snippet qml/usecases/visual-rects.qml 0
-\image qml-uses-visual-rectangles.png
-
-\section1 The Image Type
-
-\l {Qt Quick} provides an \l Image type which may be used to display images. The
-\l Image type has a \l source property whose value can be a remote or local
-URL, or the URL of an image file embedded in a compiled resource file.
-
-\snippet qml/usecases/visual.qml image
-
-For more complex images there are other types similar to \l Image.
-\l BorderImage draws an image with grid scaling, suitable for images used as
-borders. \l AnimatedImage plays animated .gif and .mng images. \l AnimatedSprite
-and \l SpriteSequence play animations comprised of multiple frames stored adjacently
-in a non animated image format.
-
-For displaying video files and camera data, see the \l {Qt Multimedia} module.
-
-\section1 Shared Visual Properties
-
-All visual items provided by \l {Qt Quick} are based on the Item type, which provides a common set of attributes for
-visual items, including opacity and transform attributes.
-
-\section2 Opacity and Visibility
-
-The QML object types provided by Qt Quick have built-in support for \l{Item::opacity}{opacity}.
-Opacity can be animated to allow smooth transitions to or from a transparent
-state. Visibility can also be managed with the \l{Item::visible}{visible} property more efficiently,
-but at the cost of not being able to animate it.
-
-\snippet qml/usecases/visual-opacity.qml 0
-\image qml-uses-visual-opacity.png
-
-\section2 Transforms
-
-Qt Quick types have built-in support for transformations. If you wish to have your
-visual content rotated or scaled, you can set the \l Item::rotation or \l Item::scale
-property. These can also be animated.
-
-\snippet qml/usecases/visual-transforms.qml 0
-\image qml-uses-visual-transforms.png
-
-For more complex transformations, see the \l Item::transform property.
-
-*/
diff --git a/src/quick/doc/src/concepts/effects/sprites.qdoc b/src/quick/doc/src/concepts/effects/sprites.qdoc
index 3a82f1963b..805a423002 100644
--- a/src/quick/doc/src/concepts/effects/sprites.qdoc
+++ b/src/quick/doc/src/concepts/effects/sprites.qdoc
@@ -27,7 +27,6 @@
/*!
\ingroup qtquick-images-sprites
-\ingroup qml-features
\page qtquick-effects-sprites.html
\title Sprite Animations
\brief Sprite-based animations with flexible transitioning
diff --git a/src/quick/doc/src/concepts/input/focus.qdoc b/src/quick/doc/src/concepts/input/focus.qdoc
index 4807921dc0..827f6d85c8 100644
--- a/src/quick/doc/src/concepts/input/focus.qdoc
+++ b/src/quick/doc/src/concepts/input/focus.qdoc
@@ -27,7 +27,6 @@
/*!
\page qtquick-input-focus.html
-\ingroup qml-features
\title Keyboard Focus in Qt Quick
\brief handling keyboard focus
diff --git a/src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc b/src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc
index 7310d25929..28bbbf1cca 100644
--- a/src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc
+++ b/src/quick/doc/src/concepts/modelviewsdata/cppmodels.qdoc
@@ -49,12 +49,12 @@ via the \e modelData role.
Here is a ListView with a delegate that references its model item's
value using the \c modelData role:
-\snippet quick/models/stringlistmodel/view.qml 0
+\snippet models/stringlistmodel/view.qml 0
A Qt application can load this QML document and set the value of \c myModel
to a QStringList:
-\snippet quick/models/stringlistmodel/main.cpp 0
+\snippet models/stringlistmodel/main.cpp 0
The complete source code for this example is available in
\l {quick/modelviews/stringlistmodel}{examples/quick/modelviews/stringlistmodel}
@@ -74,11 +74,11 @@ The following application creates a \c DataObject class with
Q_PROPERTY values that will be accessible as named roles when a
QList<DataObject*> is exposed to QML:
-\snippet quick/models/objectlistmodel/dataobject.h 0
+\snippet models/objectlistmodel/dataobject.h 0
\dots 4
-\snippet quick/models/objectlistmodel/dataobject.h 1
+\snippet models/objectlistmodel/dataobject.h 1
\codeline
-\snippet quick/models/objectlistmodel/main.cpp 0
+\snippet models/objectlistmodel/main.cpp 0
\dots
The QObject* is available as the \c modelData property. As a convenience,
@@ -86,7 +86,7 @@ the properties of the object are also made available directly in the
delegate's context. Here, \c view.qml references the \c DataModel properties in
the ListView delegate:
-\snippet quick/models/objectlistmodel/view.qml 0
+\snippet models/objectlistmodel/view.qml 0
Note the use of \c color property with qualifier.
The properties of the object are not replicated in the \c model
@@ -130,21 +130,21 @@ which exposes the \e type and \e sizes roles. It reimplements
QAbstractItemModel::roleNames() to expose the role names, so that they can be
accessed via QML:
-\snippet quick/models/abstractitemmodel/model.h 0
+\snippet models/abstractitemmodel/model.h 0
\dots
-\snippet quick/models/abstractitemmodel/model.h 1
+\snippet models/abstractitemmodel/model.h 1
\dots
-\snippet quick/models/abstractitemmodel/model.h 2
+\snippet models/abstractitemmodel/model.h 2
\codeline
-\snippet quick/models/abstractitemmodel/model.cpp 0
+\snippet models/abstractitemmodel/model.cpp 0
\codeline
-\snippet quick/models/abstractitemmodel/main.cpp 0
+\snippet models/abstractitemmodel/main.cpp 0
\dots
This model is displayed by a ListView delegate that accesses the \e type and \e size
roles:
-\snippet quick/models/abstractitemmodel/view.qml 0
+\snippet models/abstractitemmodel/view.qml 0
QML views are automatically updated when the model changes. Remember the model
must follow the standard rules for model changes and notify the view when
diff --git a/src/quick/doc/src/concepts/positioning/layouts.qdoc b/src/quick/doc/src/concepts/positioning/layouts.qdoc
index 9165c2f6df..785bcc6ca6 100644
--- a/src/quick/doc/src/concepts/positioning/layouts.qdoc
+++ b/src/quick/doc/src/concepts/positioning/layouts.qdoc
@@ -28,7 +28,6 @@
/*!
\ingroup qtquick-positioners
\page qtquick-positioning-layouts.html
-\ingroup qml-features
\title Item Layouts
Positioner items are container items that manage the positions and sizes of
diff --git a/src/quick/doc/src/concepts/positioning/righttoleft.qdoc b/src/quick/doc/src/concepts/positioning/righttoleft.qdoc
index 7052de3b49..bc67594960 100644
--- a/src/quick/doc/src/concepts/positioning/righttoleft.qdoc
+++ b/src/quick/doc/src/concepts/positioning/righttoleft.qdoc
@@ -27,7 +27,6 @@
/*!
\page qtquick-positioning-righttoleft.html
-\ingroup qml-features
\title Right-to-left User Interfaces
\brief switching text flow and layout
\section1 Overview
@@ -139,7 +138,7 @@ The painting of these icons can be mirrored with a dedicated \c mirror property
\section1 Default layout direction
-The \l {QML:Qt::application}{Qt.application.layoutDirection} property can be used to query the active layout direction of the
+The \l {QtQml2::Qt::application}{Qt.application.layoutDirection} property can be used to query the active layout direction of the
application. It is based on QApplication::layoutDirection(), which most commonly determines the layout
direction from the active language translation file.
diff --git a/src/quick/doc/src/dynamicview-tutorial.qdoc b/src/quick/doc/src/dynamicview-tutorial.qdoc
index a04f057c72..fad09b396b 100644
--- a/src/quick/doc/src/dynamicview-tutorial.qdoc
+++ b/src/quick/doc/src/dynamicview-tutorial.qdoc
@@ -62,12 +62,12 @@ delegate which provides a template for constructing items in the view.
The code for the ListView and delegate looks like this:
-\snippet quick/tutorials/dynamicview/dynamicview1/dynamicview.qml 0
+\snippet tutorials/dynamicview/dynamicview1/dynamicview.qml 0
The model is defined in a separate QML file which looks like this:
-\snippet quick/tutorials/dynamicview/dynamicview1/PetsModel.qml 0
-\snippet quick/tutorials/dynamicview/dynamicview1/PetsModel.qml 1
+\snippet tutorials/dynamicview/dynamicview1/PetsModel.qml 0
+\snippet tutorials/dynamicview/dynamicview1/PetsModel.qml 1
\section2 Walkthrough
@@ -77,11 +77,11 @@ is the template from which each item in the ListView is constructed.
The \c name, \c age, \c type, and \c size variables referenced in the delegate are sourced from
the model data. The names correspond to roles defined in the model.
-\snippet quick/tutorials/dynamicview/dynamicview1/dynamicview.qml 1
+\snippet tutorials/dynamicview/dynamicview1/dynamicview.qml 1
The second part of the application is the ListView itself to which we bind the model and delegate.
-\snippet quick/tutorials/dynamicview/dynamicview1/dynamicview.qml 2
+\snippet tutorials/dynamicview/dynamicview1/dynamicview.qml 2
*/
/*!
@@ -97,7 +97,7 @@ Now that we have a visible list of items we want to be able to interact with the
by extending the delegate so the visible content can be dragged up and down the screen. The
updated delegate looks like this:
-\snippet quick/tutorials/dynamicview/dynamicview2/dynamicview.qml 0
+\snippet tutorials/dynamicview/dynamicview2/dynamicview.qml 0
\section2 Walkthrough
@@ -106,8 +106,8 @@ for mouse events and will allow us to drag the delegate's content item. It also
a container for the content item which is important as a delegate's root item is positioned by
the view and cannot be moved by other means.
-\snippet quick/tutorials/dynamicview/dynamicview2/dynamicview.qml 1
-\snippet quick/tutorials/dynamicview/dynamicview2/dynamicview.qml 2
+\snippet tutorials/dynamicview/dynamicview2/dynamicview.qml 1
+\snippet tutorials/dynamicview/dynamicview2/dynamicview.qml 2
Dragging the content item is enabled by binding it to the MouseArea's
\l {QtQuick2::MouseArea::drag.target}{drag.target} property. Because we still want the view to be
@@ -117,14 +117,14 @@ timeout has expired it is interpreted as moving the list and if it moves after i
dragging an item. To make it more obvious to the user when an item can be dragged we'll change the
background color of the content item when the timeout has expired.
-\snippet quick/tutorials/dynamicview/dynamicview2/dynamicview.qml 3
+\snippet tutorials/dynamicview/dynamicview2/dynamicview.qml 3
The other thing we'll need to do before an item can be dragged is to unset any anchors on the
content item so it can be freely moved around. We do this in a state change that is triggered
when the delegate item is held, at the same time we can reparent the content item to the root item
so that is above other items in the stacking order and isn't obscured as it is dragged around.
-\snippet quick/tutorials/dynamicview/dynamicview2/dynamicview.qml 4
+\snippet tutorials/dynamicview/dynamicview2/dynamicview.qml 4
*/
@@ -141,10 +141,10 @@ The next step in our application to move items within the list as they're dragge
can re-order the list. To achieve this we introduce three new types to our application;
VisualDataModel, \l Drag and DropArea.
-\snippet quick/tutorials/dynamicview/dynamicview3/dynamicview.qml 0
-\snippet quick/tutorials/dynamicview/dynamicview3/dynamicview.qml 1
-\snippet quick/tutorials/dynamicview/dynamicview3/dynamicview.qml 2
-\snippet quick/tutorials/dynamicview/dynamicview3/dynamicview.qml 5
+\snippet tutorials/dynamicview/dynamicview3/dynamicview.qml 0
+\snippet tutorials/dynamicview/dynamicview3/dynamicview.qml 1
+\snippet tutorials/dynamicview/dynamicview3/dynamicview.qml 2
+\snippet tutorials/dynamicview/dynamicview3/dynamicview.qml 5
\section2 Walkthrough
@@ -152,7 +152,7 @@ In order to re-order the view we need to determine when one item has been dragge
the Drag attached property we can generate events that are sent to the scene graph whenever the item
it is attached to moves.
-\snippet quick/tutorials/dynamicview/dynamicview3/dynamicview.qml 1
+\snippet tutorials/dynamicview/dynamicview3/dynamicview.qml 1
Drag events are only sent while the active property is true, so in this example the first event
would be sent when the delegate was held with additional event sents when dragging. The
@@ -163,7 +163,7 @@ Then we use a DropArea in each view item to determine when the hot spot of the d
intersects another item, when a drag enters one of these DropAreas we can move the dragged item
to the index of the item it was dragged over.
-\snippet quick/tutorials/dynamicview/dynamicview3/dynamicview.qml 3
+\snippet tutorials/dynamicview/dynamicview3/dynamicview.qml 3
To move the items within the view we use a VisualDataModel. The VisualDataModel type is used by
the view types to instantiate delegate items from model data and when constructed explicitly can
@@ -177,7 +177,7 @@ To utilize a VisualDataModel with a ListView we bind it to the \l {QtQuick2::Lis
property of the view and bind the \l {QtQuick2::VisualDataModel::model}{model} and
\l {QtQuick2::VisualDataModel::delegate}{delegate} to the VisualDataModel.
-\snippet quick/tutorials/dynamicview/dynamicview3/dynamicview.qml 4
+\snippet tutorials/dynamicview/dynamicview3/dynamicview.qml 4
*/
@@ -193,7 +193,7 @@ Drag and drop isn't the only way items in a view can be re-ordered, using a Visu
also possible to sort items based on model data. To do that we extend our VisualDataModel instance
like this:
-\snippet quick/tutorials/dynamicview/dynamicview4/dynamicview.qml 0
+\snippet tutorials/dynamicview/dynamicview4/dynamicview.qml 0
\section2 Walkthrough
@@ -204,8 +204,8 @@ we want items to first be added to an unsorted group from where we can transfer
position in the items group. To do that we clear includeByDefault on the items group and set it on
a new group name 'unsorted'.
-\snippet quick/tutorials/dynamicview/dynamicview4/dynamicview.qml 1
-\snippet quick/tutorials/dynamicview/dynamicview4/dynamicview.qml 2
+\snippet tutorials/dynamicview/dynamicview4/dynamicview.qml 1
+\snippet tutorials/dynamicview/dynamicview4/dynamicview.qml 2
We sort the items by first finding the position in the items group to insert the first unsorted
item and then transfer the item to the items group before moving it to the pre-determined index and
@@ -216,19 +216,19 @@ with the \l {QtQuick2::VisualDataModel::get} {get} function. Through the model
handle we can access the same model data that is available in a delegate instance of that item and
compare against other items to determine relative position.
-\snippet quick/tutorials/dynamicview/dynamicview4/dynamicview.qml 3
+\snippet tutorials/dynamicview/dynamicview4/dynamicview.qml 3
The lessThan argument to the sort function is a comparsion function which will determine the order
of the list. In this example it can be one of the following:
-\snippet quick/tutorials/dynamicview/dynamicview4/dynamicview.qml 4
+\snippet tutorials/dynamicview/dynamicview4/dynamicview.qml 4
A sort is triggered whenever new items are added to the unsorted VisualDataGroup which we are
notified of by the \l {QtQuick2::VisualDataGroup::onChanged}{onChanged} handler. If no sort
function is currently selected we simply transfer all items from the unsorted group to the items
group, otherwise we call sort with the selected sort function.
-\snippet quick/tutorials/dynamicview/dynamicview4/dynamicview.qml 5
+\snippet tutorials/dynamicview/dynamicview4/dynamicview.qml 5
Finally when the selected sort order changes we can trigger a full re-sort of the list by moving
all items from the items group to the unsorted group, which will trigger the
@@ -236,6 +236,6 @@ all items from the items group to the unsorted group, which will trigger the
items group in correct order. Note that the \l {QtQuick2::VisualDataGroup::onChanged}{onChanged}
handler will not be invoked recursively so there's no issue with it being invoked during a sort.
-\snippet quick/tutorials/dynamicview/dynamicview4/dynamicview.qml 6
+\snippet tutorials/dynamicview/dynamicview4/dynamicview.qml 6
*/
diff --git a/src/quick/doc/src/examples.qdoc b/src/quick/doc/src/examples.qdoc
index 8d3bc30624..ddca973496 100644
--- a/src/quick/doc/src/examples.qdoc
+++ b/src/quick/doc/src/examples.qdoc
@@ -38,10 +38,13 @@ These are code samples that show how to use various aspects of Qt Quick. Larger
compound interfaces are grouped as applications as they demonstrate more Qt
Quick features.
+Here is a list of fully-functional demo applications.
To run the sample applications, open them in Qt Creator or use the included
\l {Prototyping with qmlscene}{qmlscene} tool.
-Some of these code samples have a corresponding \l{qtquick-tutorials}{tutorial}.
+\annotatedlist{qtquickdemos}
+
+Some of these code samples below have a corresponding \l{qtquick-tutorials}{tutorial}.
The Qt Quick features are covered in the \l {qtquick-overviews}{main page}.
This set of code samples are part of the collection of \l{Qt Examples}.
diff --git a/src/quick/doc/src/qmltypereference.qdoc b/src/quick/doc/src/qmltypereference.qdoc
index 43d6b952cb..d580ba8c96 100644
--- a/src/quick/doc/src/qmltypereference.qdoc
+++ b/src/quick/doc/src/qmltypereference.qdoc
@@ -64,6 +64,12 @@ information about the concepts which are central to \c QtQuick.
system for QML applications
\li \l{QtQuick.Window 2}{Window} - contains types for creating
top-level windows and accessing screen information
+ \li \l{QtQuick.Dialogs 1}{Dialogs} - contains types for creating and
+ interacting with system dialogs
+ \li \l{QtQuick.Controls 1.0}{Controls} - provides a set of reusable
+ UI components
+ \li \l{QtQuick.Layouts 1.0}{Layouts} - contains types that are used
+ to arrange items in the user interface
\endlist
\section1 Basic Types
@@ -78,9 +84,9 @@ In addition, the \c QtQuick module provides the following basic types:
\section1 Object Types
All of the object types provided by \c QtQuick are based on the \l{Item} type,
-which itself derives from \l{QML::QtObject}. \l{qtqml-typereference-topic.html#object-types}
+which itself derives from \l{QtQml2::QtObject}{QtObject}. \l{qtqml-typereference-topic.html#object-types}
{QML object types} provided by the Qt QML module
-(such as \l{QML::QtObject} and \l{QML::Component}) are also available when
+(such as \l{QtQml2::QtObject}{QtObject} and \l{QtQml2::Component}{Component}) are also available when
you import \c QtQuick.
\section2 Visual Types
@@ -311,9 +317,9 @@ For more details about the module itself, see the \l{Qt Quick} module page.
\li By a hexadecimal triplet or quad in the form \c "#RRGGBB" and \c "#AARRGGBB"
respectively. For example, the color red corresponds to a triplet of \c "#FF0000"
and a slightly transparent blue to a quad of \c "#800000FF".
- \li Using the \l{QML:Qt::rgba()}{Qt.rgba()}, \l{QML:Qt::hsla()}{Qt.hsla()},
- \l{QML:Qt::darker()}{Qt.darker()}, \l{QML:Qt::lighter()}{Qt.lighter()} or
- \l{QML:Qt::tint()}{Qt.tint()} functions.
+ \li Using the \l{QtQml2::Qt::rgba()}{Qt.rgba()}, \l{QtQml2::Qt::hsla()}{Qt.hsla()},
+ \l{QtQml2::Qt::darker()}{Qt.darker()}, \l{QtQml2::Qt::lighter()}{Qt.lighter()} or
+ \l{QtQml2::Qt::tint()}{Qt.tint()} functions.
\endlist
Example:
@@ -335,7 +341,7 @@ For more details about the module itself, see the \l{Qt Quick} module page.
}
\endqml
- To test color values for equality, use the \l{QML:Qt::colorEqual()}{Qt.colorEqual()}
+ To test color values for equality, use the \l{QtQml2::Qt::colorEqual()}{Qt.colorEqual()}
function. This allows colors to be accurately compared whether they are in property
form or in any of the acceptable string specification forms.
@@ -576,7 +582,7 @@ console.log(c + " " + d); // false true
Rotation { angle: 60; axis: "0,1,0" }
\endqml
- or with the \l{QML:Qt::vector3d()}{Qt.vector3d()} function:
+ or with the \l{QtQml2::Qt::vector3d()}{Qt.vector3d()} function:
\qml
Rotation { angle: 60; axis: Qt.vector3d(0, 1, 0) }
diff --git a/src/quick/doc/src/qtquick.qdoc b/src/quick/doc/src/qtquick.qdoc
index 9fba663a1c..7163baa819 100644
--- a/src/quick/doc/src/qtquick.qdoc
+++ b/src/quick/doc/src/qtquick.qdoc
@@ -76,7 +76,7 @@ of the \l{qtquick-quickstart-basics.html}{QML Basics} and
\l{qtquick-quickstart-essentials.html}{QML Essentials} from the
\l{qtquick-applicationdevelopers.html}{QML Application Developer Resources}.
-To find out more about using the QML language, see the \l{Qt QML Module Documentation}.
+To find out more about using the QML language, see the \l{Qt QML} module documentation.
\section1 Qt Quick Module Documentation
@@ -125,6 +125,8 @@ Additional Qt Quick information:
system for Qt Quick
\li \l{QtQuick.Window 2}{Window} - contains types for creating
top-level windows and accessing screen information
+ \li \l{QtQuick.Dialogs 1}{Dialogs} - contains types for creating and
+ interacting with system dialogs
\endlist
\li \l{Qt Quick Release Notes} - list of changes and additions in the Qt Quick
\li \l{Qt Quick Code Samples} - list of all Qt Quick examples
diff --git a/src/quick/doc/src/whatsnew.qdoc b/src/quick/doc/src/whatsnew.qdoc
index baa0312aa4..2b865073d3 100644
--- a/src/quick/doc/src/whatsnew.qdoc
+++ b/src/quick/doc/src/whatsnew.qdoc
@@ -29,7 +29,35 @@
\title Qt Quick Release Notes
\page qtquick-releasenotes.html
-\section1 Qt Quick in Qt 5
+\section1 Qt Quick in Qt 5.1
+
+\l{Qt Quick} 2.1 is new in Qt 5.1. This is a summary of improvements and new
+features introduced by the new import and new classes in Qt 5.1:
+\list
+\li New threaded render loop for Mac, Linux, and Embedded.
+\li New render loop for windows for smoother animations.
+\li New \l Window properties: activeFocusItem, minimumWidth, minimumHeight,
+ maximumWidth, maximumHeight, visibility, contentOrientation, and opacity.
+\li New \l Item property: activeFocusOnTab.
+\li New \l Grid properties: horizontalAlignment, verticalAlignment, and
+ effectiveHorizontalAlignment.
+\li New \l TextEdit properties: selectByKeyboard and textDocument
+\li A \l Window declared inside another Window or \l Item will automatically be
+ transient for (centered upon) the outer window.
+\endlist
+
+\section2 New Submodules
+
+In Qt 5.1, there are several new modules which extend Qt Quick functionalities.
+\list
+\li \l{Qt Quick Dialogs} - contains types for creating and interacting with system dialogs
+\li \l{Qt Quick Controls} - provides a set of reusable UI components
+\li \l{Qt Quick Layouts} - contains types that are used to arrange items in the user interface
+\endlist
+
+The \l{What's New in Qt 5.1} has more information about the Qt 5.1 release.
+
+\section1 Qt Quick in Qt 5.0
The \l {Qt Quick} module is new in Qt 5. It provides the visual canvas and scenegraph back-end
as well as the \c QtQuick QML module for QML application development.