diff options
author | Lars Knoll <lars.knoll@nokia.com> | 2012-04-11 14:56:22 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@nokia.com> | 2012-04-11 16:05:03 +0200 |
commit | a896d4b39ec3d45ba708d9b36ea9c864b1df2136 (patch) | |
tree | 45cfe153cce6114c2c76c48dc0bdabde2a8cf3e3 /examples | |
parent | 24fb8dc27eddfdd62bd2c3a6e863cbf433762cd6 (diff) | |
parent | 65bfc35429e845cf6b76d58107360a1360a654fc (diff) |
Merge remote-tracking branch 'origin/master' into api_changes
Conflicts:
src/qml/debugger/qqmlprofilerservice_p.h
src/qml/qml/qqmlboundsignal.cpp
src/qml/qml/v4/qv4bindings.cpp
src/quick/items/qquickshadereffect.cpp
src/quick/particles/qquickcustomparticle.cpp
src/quick/qtquick2.cpp
Change-Id: Ia9c6517035ae912fa75e77473a452bd3383def56
Diffstat (limited to 'examples')
26 files changed, 186 insertions, 101 deletions
diff --git a/examples/demos/calculator/CalculatorCore/calculator.js b/examples/demos/calculator/CalculatorCore/calculator.js index e2b5692cf3..b4b0d9eea9 100644 --- a/examples/demos/calculator/CalculatorCore/calculator.js +++ b/examples/demos/calculator/CalculatorCore/calculator.js @@ -7,7 +7,7 @@ var timer = 0 function disabled(op) { if (op == "." && display.text.toString().search(/\./) != -1) { return true - } else if (op == squareRoot && display.text.toString().search(/-/) != -1) { + } else if (op == window.squareRoot && display.text.toString().search(/-/) != -1) { return true } else { return false @@ -16,9 +16,9 @@ function disabled(op) { function doOperation(op) { if (op == '*')//Keyboard Aliases - op = multiplication; + op = window.multiplication; if (op == '/') - op = division; + op = window.division; if (disabled(op)) { return } @@ -40,14 +40,14 @@ function doOperation(op) { display.text = Number(display.text.valueOf()) + Number(curVal.valueOf()) } else if (display.currentOperation.text == "-") { display.text = Number(curVal) - Number(display.text.valueOf()) - } else if (display.currentOperation.text == multiplication) { + } else if (display.currentOperation.text == window.multiplication) { display.text = Number(curVal) * Number(display.text.valueOf()) - } else if (display.currentOperation.text == division) { + } else if (display.currentOperation.text == window.division) { display.text = Number(Number(curVal) / Number(display.text.valueOf())).toString() } else if (display.currentOperation.text == "=") { } - if (op == "+" || op == "-" || op == multiplication || op == division) { + if (op == "+" || op == "-" || op == window.multiplication || op == window.division) { display.currentOperation.text = op curVal = display.text.valueOf() return @@ -64,9 +64,9 @@ function doOperation(op) { display.text = (Math.abs(display.text.valueOf())).toString() } else if (op == "Int") { display.text = (Math.floor(display.text.valueOf())).toString() - } else if (op == plusminus) { + } else if (op == window.plusminus) { display.text = (display.text.valueOf() * -1).toString() - } else if (op == squareRoot) { + } else if (op == window.squareRoot) { display.text = (Math.sqrt(display.text.valueOf())).toString() } else if (op == "mc") { memory = 0; @@ -76,7 +76,7 @@ function doOperation(op) { display.text = memory.toString() } else if (op == "m-") { memory = display.text.valueOf() - } else if (op == leftArrow) { + } else if (op == window.leftArrow) { display.text = display.text.toString().slice(0, -1) if (display.text.length == 0) { display.text = "0" diff --git a/examples/demos/calculator/calculator-mobile.qml b/examples/demos/calculator/calculator-mobile.qml index 7ee622f698..d042c756fc 100644 --- a/examples/demos/calculator/calculator-mobile.qml +++ b/examples/demos/calculator/calculator-mobile.qml @@ -95,7 +95,7 @@ Rectangle { Row { spacing: 6 Button { width: column.w; height: column.h; color: 'purple'; operation: "Off" } - Button { width: column.w; height: column.h; color: 'purple'; operation: leftArrow } + Button { width: column.w; height: column.h; color: 'purple'; operation: window.leftArrow } Button { width: column.w; height: column.h; color: 'purple'; operation: "C" } Button { width: column.w; height: column.h; color: 'purple'; operation: "AC" } } @@ -118,12 +118,12 @@ Rectangle { Button { width: grid.w; height: column.h; operation: "7"; color: 'blue' } Button { width: grid.w; height: column.h; operation: "8"; color: 'blue' } Button { width: grid.w; height: column.h; operation: "9"; color: 'blue' } - Button { width: grid.w; height: column.h; operation: division } - Button { width: grid.w; height: column.h; operation: squareRoot } + Button { width: grid.w; height: column.h; operation: window.division } + Button { width: grid.w; height: column.h; operation: window.squareRoot } Button { width: grid.w; height: column.h; operation: "4"; color: 'blue' } Button { width: grid.w; height: column.h; operation: "5"; color: 'blue' } Button { width: grid.w; height: column.h; operation: "6"; color: 'blue' } - Button { width: grid.w; height: column.h; operation: multiplication } + Button { width: grid.w; height: column.h; operation: window.multiplication } Button { width: grid.w; height: column.h; operation: "x^2" } Button { width: grid.w; height: column.h; operation: "1"; color: 'blue' } Button { width: grid.w; height: column.h; operation: "2"; color: 'blue' } @@ -132,7 +132,7 @@ Rectangle { Button { width: grid.w; height: column.h; operation: "1/x" } Button { width: grid.w; height: column.h; operation: "0"; color: 'blue' } Button { width: grid.w; height: column.h; operation: "." } - Button { width: grid.w; height: column.h; operation: plusminus } + Button { width: grid.w; height: column.h; operation: window.plusminus } Button { width: grid.w; height: column.h; operation: "+" } Button { width: grid.w; height: column.h; operation: "="; color: 'red' } } diff --git a/examples/demos/calculator/calculator.qdoc b/examples/demos/calculator/calculator.qdoc index e94bdb4cfd..793948703e 100644 --- a/examples/demos/calculator/calculator.qdoc +++ b/examples/demos/calculator/calculator.qdoc @@ -27,9 +27,9 @@ /*! \title QML Demo - Calculator - \example declarative/calculator + \example demos/calculator \brief This is an example calculator application written in QML. - \image qml-calculator-demo-small.png + \image qml-calculator-example-small.png The Calculator demo implements a simple calculator in QML. It is written for desktop and portrait devices, although on device it supports orientation changes. diff --git a/examples/demos/clocks/clocks.qdoc b/examples/demos/clocks/clocks.qdoc new file mode 100644 index 0000000000..54479bae17 --- /dev/null +++ b/examples/demos/clocks/clocks.qdoc @@ -0,0 +1,37 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** GNU Free Documentation License +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. +** +** Other Usage +** Alternatively, this file may be used in accordance with the terms +** and conditions contained in a signed written agreement between you +** and Nokia. +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \title QML Demo - Clocks + \example demos/clocks + \brief This example demonstrates creating components and using them multiple times. + \image qml-clocks-example.png + + This demo give a simple world clock application, containing multiple clocks from around the world. + + In doing this, it reuses a signle Clock component with some slight changes to the parameters. +*/ diff --git a/examples/localstorage/localstorage.qml b/examples/localstorage/localstorage.qml index f967518de8..714774c78e 100644 --- a/examples/localstorage/localstorage.qml +++ b/examples/localstorage/localstorage.qml @@ -43,7 +43,7 @@ import "../shared" as Examples /*! \title QtQuick Examples - Local Storage - \example qtquick/localstorage + \example localstorage \brief This is a collection of QML local storage examples \image qml-localstorage-example.png @@ -63,4 +63,4 @@ Item { addExample("Hello World", "Simple SQL operations with local storage API", Qt.resolvedUrl("hello.qml")); } } -}
\ No newline at end of file +} diff --git a/examples/qml/dynamicscene/content/Button.qml b/examples/qml/dynamicscene/content/Button.qml index 014692274a..ba7db501cc 100644 --- a/examples/qml/dynamicscene/content/Button.qml +++ b/examples/qml/dynamicscene/content/Button.qml @@ -54,16 +54,14 @@ Rectangle { gradient: Gradient { GradientStop { position: 0.0 - color: !mouseArea.pressed ? activePalette.light : activePalette.button + color: !mouseArea.pressed ? "#eeeeee" : "#888888" } GradientStop { position: 1.0 - color: !mouseArea.pressed ? activePalette.button : activePalette.dark + color: !mouseArea.pressed ? "#888888" : "#333333" } } - SystemPalette { id: activePalette } - MouseArea { id: mouseArea anchors.fill: parent @@ -75,6 +73,5 @@ Rectangle { anchors.centerIn:parent font.pointSize: 10 text: parent.text - color: activePalette.buttonText } } diff --git a/examples/qml/dynamicscene/content/Sun.qml b/examples/qml/dynamicscene/content/Sun.qml index b84516eecc..9a956c9855 100644 --- a/examples/qml/dynamicscene/content/Sun.qml +++ b/examples/qml/dynamicscene/content/Sun.qml @@ -47,32 +47,27 @@ Image { property string image: "images/sun.png" source: image - - // once item is created, start moving offscreen - NumberAnimation on y { - to: (window.height / 2) + window.centerOffset - running: created - onRunningChanged: { - if (running) - duration = (window.height + window.centerOffset - sun.y) * 10; - else - state = "OffScreen" - } - } - - states: State { - name: "OffScreen" - StateChangeScript { - script: { sun.created = false; sun.destroy() } - } - } - onCreatedChanged: { if (created) { sun.z = 1; // above the sky but below the ground layer window.activeSuns++; + // once item is created, start moving offscreen + dropYAnim.duration = (window.height + window.centerOffset - sun.y) * 16; + dropAnim.running = true; } else { window.activeSuns--; } } + + SequentialAnimation on y{ + id: dropAnim + running: false + NumberAnimation { + id: dropYAnim + to: (window.height / 2) + window.centerOffset + } + ScriptAction { + script: { sun.created = false; sun.destroy() } + } + } } diff --git a/examples/qml/dynamicscene/dynamicscene.qml b/examples/qml/dynamicscene/dynamicscene.qml index c64df5cfc0..4771742621 100644 --- a/examples/qml/dynamicscene/dynamicscene.qml +++ b/examples/qml/dynamicscene/dynamicscene.qml @@ -38,6 +38,13 @@ ** ****************************************************************************/ +/*! + \title QML Example - Dynamic Scene + \example qml/dynamicscene + \brief This example demonstrates creating components dynamically. + \image qml-dynamicscene-example.png +*/ + import QtQuick 2.0 import QtQuick.Particles 2.0 import "content" @@ -95,7 +102,7 @@ Item { // sky Rectangle { id: sky - anchors { left: parent.left; top: toolbox.bottom; right: parent.right; bottomMargin: -centerOffset; bottom: parent.verticalCenter } + anchors { left: parent.left; top: toolbox.bottom; right: parent.right; bottomMargin: -window.centerOffset; bottom: parent.verticalCenter } gradient: Gradient { GradientStop { id: gradientStopA; position: 0.0; color: "#0E1533" } GradientStop { id: gradientStopB; position: 1.0; color: "#437284" } @@ -127,21 +134,19 @@ Item { Rectangle { id: ground z: 2 // just above the sun so that the sun can set behind it - anchors { left: parent.left; top: parent.verticalCenter; topMargin: centerOffset; right: parent.right; bottom: parent.bottom } + anchors { left: parent.left; top: parent.verticalCenter; topMargin: window.centerOffset; right: parent.right; bottom: parent.bottom } gradient: Gradient { GradientStop { position: 0.0; color: "ForestGreen" } GradientStop { position: 1.0; color: "DarkGreen" } } } - SystemPalette { id: activePalette } - - // right-hand panel + // top panel Rectangle { id: toolbox - height: centerOffset * 2 - color: activePalette.window + height: window.centerOffset * 2 + color: "white" anchors { right: parent.right; top: parent.top; left: parent.left} Column { @@ -192,7 +197,7 @@ Item { } } - Text { text: "Active Suns: " + activeSuns } + Text { text: "Active Suns: " + window.activeSuns } } } @@ -202,7 +207,7 @@ Item { z: 1000 width: parent.width height: popupColumn.height + 16 - color: activePalette.window + color: "white" property bool poppedUp: false property int downY: window.height - (createButton.height + 16) @@ -213,7 +218,6 @@ Item { Column { id: popupColumn y: 8 - anchors.centerIn: parent spacing: 8 Row { @@ -250,7 +254,7 @@ Item { selectByMouse: true wrapMode: TextEdit.WordWrap - text: "import QtQuick 2.0\nImage {\n id: smile\n x: 360 * Math.random()\n y: 180 * Math.random() \n source: 'content/images/face-smile.png'\n NumberAnimation on opacity { \n to: 0; duration: 1500\n }\n Component.onCompleted: smile.destroy(1500);\n}" + text: "import QtQuick 2.0\nImage {\n id: smile\n x: 360 * Math.random()\n y: 40 * Math.random() \n source: 'content/images/face-smile.png'\n NumberAnimation on opacity { \n to: 0; duration: 1500\n }\n Component.onCompleted: smile.destroy(1500);\n}" } } } diff --git a/examples/qml/i18n/i18n.qml b/examples/qml/i18n/i18n.qml index f8bf30d0f0..2ffdd1914f 100644 --- a/examples/qml/i18n/i18n.qml +++ b/examples/qml/i18n/i18n.qml @@ -40,23 +40,29 @@ import QtQuick 2.0 -// -// The QML runtime automatically loads a translation from the i18n subdirectory of the root -// QML file, based on the system language. -// -// The files are created/updated by running: -// -// lupdate i18n.qml -ts i18n/base.ts -// -// Translations for new languages are created by copying i18n/base.ts to i18n/qml_<lang>.ts -// The .ts files can then be edited with Linguist: -// -// linguist i18n/qml_fr.ts -// -// The run-time translation files are then generated by running: -// -// lrelease i18n/*.ts -// +/*! + \title QML Examples - Internationalization + \example qml/i18n + \image qml-i18n-example.png + \brief This is an internationalization example + + The QML runtime automatically loads a translation from the i18n subdirectory of the root + QML file, based on the system language. + + The files are created/updated by running: + + lupdate i18n.qml -ts i18n/base.ts + + Translations for new languages are created by copying i18n/base.ts to i18n/qml_<lang>.ts + The .ts files can then be edited with Linguist: + + linguist i18n/qml_fr.ts + + The run-time translation files are then generated by running: + + lrelease i18n/*.ts +*/ + Rectangle { width: 640; height: 480 diff --git a/examples/quick/accessibility/accessibility.qml b/examples/quick/accessibility/accessibility.qml index e987561bb1..5e4b0f8dcd 100644 --- a/examples/quick/accessibility/accessibility.qml +++ b/examples/quick/accessibility/accessibility.qml @@ -44,7 +44,7 @@ import "content" /*! \title QtQuick Examples - Accessibility - \example qtquick/accessibility + \example quick/accessibility \brief This example has accessible buttons. */ diff --git a/examples/quick/animation/animation.qml b/examples/quick/animation/animation.qml index bca68457d9..f478cb713b 100644 --- a/examples/quick/animation/animation.qml +++ b/examples/quick/animation/animation.qml @@ -43,7 +43,7 @@ import "../../shared" as Examples /*! \title QtQuick Examples - Animation - \example qtquick/animation + \example quick/animation \brief This is a collection of QML Animation examples. \image qml-animations-example.png diff --git a/examples/quick/canvas/canvas.qml b/examples/quick/canvas/canvas.qml index bdb58f4c78..cf3c37a4c3 100644 --- a/examples/quick/canvas/canvas.qml +++ b/examples/quick/canvas/canvas.qml @@ -45,6 +45,7 @@ import "../../shared" as Examples \title QtQuick Examples - Canvas \example quick/canvas \brief This is a collection of QML Canvas examples. + \image qml-canvas-example.png This is a collection of small QML examples relating to Canvas item. Each example is a small QML file emphasizing a particular element or feature. diff --git a/examples/quick/draganddrop/draganddrop.qml b/examples/quick/draganddrop/draganddrop.qml index 88e6d5e021..9f56177f23 100644 --- a/examples/quick/draganddrop/draganddrop.qml +++ b/examples/quick/draganddrop/draganddrop.qml @@ -43,7 +43,7 @@ import "../../shared" as Examples /*! \title QtQuick Examples - Drag and Drop - \example qtquick/draganddrop + \example quick/draganddrop \brief This is a collection of QML drag and drop examples \image qml-draganddrop-example.png diff --git a/examples/quick/imageelements/content/BorderImageSelector.qml b/examples/quick/imageelements/content/BorderImageSelector.qml index f3a534b3cd..8084b512fd 100644 --- a/examples/quick/imageelements/content/BorderImageSelector.qml +++ b/examples/quick/imageelements/content/BorderImageSelector.qml @@ -56,7 +56,7 @@ Item { curIdx += steps; } Image { - source: "../../../shared/images/back.png" + source: "arrow.png" MouseArea{ anchors.fill: parent onClicked: selector.advance(-1) @@ -68,7 +68,7 @@ Item { Behavior on opacity {NumberAnimation{}} } Image { - source: "../../../shared/images/back.png" + source: "arrow.png" mirror: true MouseArea{ anchors.fill: parent diff --git a/examples/quick/imageelements/content/arrow.png b/examples/quick/imageelements/content/arrow.png Binary files differnew file mode 100644 index 0000000000..506ac42fcf --- /dev/null +++ b/examples/quick/imageelements/content/arrow.png diff --git a/examples/quick/imageelements/imageelements.qml b/examples/quick/imageelements/imageelements.qml index bb23ef6979..adfa43a659 100644 --- a/examples/quick/imageelements/imageelements.qml +++ b/examples/quick/imageelements/imageelements.qml @@ -43,7 +43,7 @@ import "../../shared" /*! \title QML Examples - Image Elements - \example declarative/imageelements + \example quick/imageelements \brief This is a collection of QML examples \image qml-imageelements-example.png diff --git a/examples/quick/modelviews/listview/content/SmallText.qml b/examples/quick/modelviews/listview/content/SmallText.qml new file mode 100644 index 0000000000..e27446827f --- /dev/null +++ b/examples/quick/modelviews/listview/content/SmallText.qml @@ -0,0 +1,46 @@ +/**************************************************************************** +** +** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/ +** +** This file is part of the examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +import QtQuick 2.0 + +Text { + font.pixelSize: 12 +} + diff --git a/examples/quick/modelviews/listview/content/TextButton.qml b/examples/quick/modelviews/listview/content/TextButton.qml index 980ee21553..9f0e673f8a 100644 --- a/examples/quick/modelviews/listview/content/TextButton.qml +++ b/examples/quick/modelviews/listview/content/TextButton.qml @@ -52,12 +52,10 @@ Rectangle { radius: 10 gradient: Gradient { - GradientStop { id: gradientStop; position: 0.0; color: palette.light } - GradientStop { position: 1.0; color: palette.button } + GradientStop { id: gradientStop; position: 0.0; color: "#eeeeee" } + GradientStop { position: 1.0; color: "#888888" } } - SystemPalette { id: palette } - MouseArea { id: mouseArea anchors.fill: parent @@ -72,7 +70,7 @@ Rectangle { states: State { name: "pressed" when: mouseArea.pressed - PropertyChanges { target: gradientStop; color: palette.dark } + PropertyChanges { target: gradientStop; color: "#333333" } } } diff --git a/examples/quick/modelviews/listview/expandingdelegates.qml b/examples/quick/modelviews/listview/expandingdelegates.qml index 43a9662422..02d5edc1d1 100644 --- a/examples/quick/modelviews/listview/expandingdelegates.qml +++ b/examples/quick/modelviews/listview/expandingdelegates.qml @@ -106,13 +106,13 @@ Rectangle { font.bold: true; font.pointSize: 16 } - Text { + SmallText { text: "Ingredients" - font.pointSize: 12; font.bold: true + font.bold: true opacity: recipe.detailsOpacity } - Text { + SmallText { text: ingredients wrapMode: Text.WordWrap width: parent.width @@ -127,7 +127,7 @@ Rectangle { anchors { top: topLayout.bottom; topMargin: 10; bottom: parent.bottom; bottomMargin: 10 } opacity: recipe.detailsOpacity - Text { + SmallText { id: methodTitle anchors.top: parent.top text: "Method" diff --git a/examples/quick/modelviews/listview/highlight.qml b/examples/quick/modelviews/listview/highlight.qml index 2dca1f4b18..239a946523 100644 --- a/examples/quick/modelviews/listview/highlight.qml +++ b/examples/quick/modelviews/listview/highlight.qml @@ -56,9 +56,9 @@ Rectangle { id: wrapper width: 200; height: 55 Column { - Text { text: 'Name: ' + name } - Text { text: 'Type: ' + type } - Text { text: 'Age: ' + age } + SmallText { text: 'Name: ' + name } + SmallText { text: 'Type: ' + type } + SmallText { text: 'Age: ' + age } } // indent the item if it is the current item states: State { diff --git a/examples/quick/positioners/positioners-transitions.qml b/examples/quick/positioners/positioners-transitions.qml index 6081c9f8a8..f1b61c1740 100644 --- a/examples/quick/positioners/positioners-transitions.qml +++ b/examples/quick/positioners/positioners-transitions.qml @@ -43,12 +43,12 @@ import QtQuick 2.0 Rectangle { id: page width: 320; height: 480 - property int effectiveOpacity: 1.0 + property real effectiveOpacity: 1.0 Timer { interval: 2000 running: true repeat: true - onTriggered: effectiveOpacity = (effectiveOpacity == 1.0 ? 0.0 : 1.0) + onTriggered: effectiveOpacity = (effectiveOpacity == 1.0 ? 0.0 : 1.0); } Column { diff --git a/examples/quick/righttoleft/righttoleft.qml b/examples/quick/righttoleft/righttoleft.qml index 6561595603..b95f671d95 100644 --- a/examples/quick/righttoleft/righttoleft.qml +++ b/examples/quick/righttoleft/righttoleft.qml @@ -43,7 +43,7 @@ import "../../shared" as Examples /*! \title QtQuick Examples - Right to Left - \example qtquick/Right to Left + \example quick/righttoleft \brief This is a collection of QML Right to Left examples. \image qml-righttoleft-example.png diff --git a/examples/quick/shadereffects/shadereffects.qml b/examples/quick/shadereffects/shadereffects.qml index b76c960a8f..4b3bb2a5e2 100644 --- a/examples/quick/shadereffects/shadereffects.qml +++ b/examples/quick/shadereffects/shadereffects.qml @@ -43,11 +43,12 @@ import QtQuick 2.0 import "content" Rectangle { + id: root width: 320 height: 480 /*! \title QML Examples - Shader Effects - \example declarative/shadereffects + \example quick/shadereffects \image qml-shadereffects-example.png \brief This is a shader effects example @@ -56,10 +57,10 @@ Rectangle { */ property color col: "lightsteelblue" gradient: Gradient { - GradientStop { position: 0.0; color: Qt.tint(col, "#20FFFFFF") } - GradientStop { position: 0.1; color: Qt.tint(col, "#20AAAAAA") } - GradientStop { position: 0.9; color: Qt.tint(col, "#20666666") } - GradientStop { position: 1.0; color: Qt.tint(col, "#20000000") } + GradientStop { position: 0.0; color: Qt.tint(root.col, "#20FFFFFF") } + GradientStop { position: 0.1; color: Qt.tint(root.col, "#20AAAAAA") } + GradientStop { position: 0.9; color: Qt.tint(root.col, "#20666666") } + GradientStop { position: 1.0; color: Qt.tint(root.col, "#20000000") } } ShaderEffectSource { @@ -241,7 +242,7 @@ Rectangle { width: 160 height: 160 property variant source: theSource - property color tint: sliderToColor(colorizeSlider.value) + property color tint: root.sliderToColor(colorizeSlider.value) fragmentShader: " uniform sampler2D source; uniform lowp vec4 tint; diff --git a/examples/quick/text/text.qml b/examples/quick/text/text.qml index e9c40773c9..e8be93cb69 100644 --- a/examples/quick/text/text.qml +++ b/examples/quick/text/text.qml @@ -42,7 +42,7 @@ import QtQuick 2.0 import "../../shared" /*! \title QML Examples - Text - \example declarative/text + \example quick/text \brief This is a collection of QML examples \image qml-text-example.png diff --git a/examples/quick/threading/threading.qml b/examples/quick/threading/threading.qml index 7ba8b8f70d..b96c6975ac 100644 --- a/examples/quick/threading/threading.qml +++ b/examples/quick/threading/threading.qml @@ -43,7 +43,7 @@ import "../../shared" as Examples /*! \title QtQuick Examples - Threading - \example qtquick/threading + \example quick/threading \brief This is a collection of QML Multithreading examples. \image qml-threading-example.png diff --git a/examples/quick/touchinteraction/touchinteraction.qml b/examples/quick/touchinteraction/touchinteraction.qml index 0be625a160..e64c145714 100644 --- a/examples/quick/touchinteraction/touchinteraction.qml +++ b/examples/quick/touchinteraction/touchinteraction.qml @@ -43,7 +43,7 @@ import "../../shared" /*! \title QtQuick Examples - Touch Interaction - \example qtquick/touchinteraction + \example quick/touchinteraction \brief This is a collection of QML Touch Interaction examples. \image qml-touchinteraction-example.png |