aboutsummaryrefslogtreecommitdiffstats
path: root/examples/declarative/qtquick1/toys
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/qtquick1/toys')
-rw-r--r--examples/declarative/qtquick1/toys/README37
-rw-r--r--examples/declarative/qtquick1/toys/clocks/clocks.qml59
-rw-r--r--examples/declarative/qtquick1/toys/clocks/clocks.qmlproject16
-rw-r--r--examples/declarative/qtquick1/toys/clocks/content/Clock.qml124
-rw-r--r--examples/declarative/qtquick1/toys/clocks/content/QuitButton.qml52
-rw-r--r--examples/declarative/qtquick1/toys/clocks/content/background.pngbin46895 -> 0 bytes
-rw-r--r--examples/declarative/qtquick1/toys/clocks/content/center.pngbin765 -> 0 bytes
-rw-r--r--examples/declarative/qtquick1/toys/clocks/content/clock-night.pngbin23359 -> 0 bytes
-rw-r--r--examples/declarative/qtquick1/toys/clocks/content/clock.pngbin20653 -> 0 bytes
-rw-r--r--examples/declarative/qtquick1/toys/clocks/content/hour.pngbin625 -> 0 bytes
-rw-r--r--examples/declarative/qtquick1/toys/clocks/content/minute.pngbin625 -> 0 bytes
-rw-r--r--examples/declarative/qtquick1/toys/clocks/content/quit.pngbin583 -> 0 bytes
-rw-r--r--examples/declarative/qtquick1/toys/clocks/content/second.pngbin303 -> 0 bytes
-rw-r--r--examples/declarative/qtquick1/toys/corkboards/Day.qml153
-rw-r--r--examples/declarative/qtquick1/toys/corkboards/cork.jpgbin149337 -> 0 bytes
-rw-r--r--examples/declarative/qtquick1/toys/corkboards/corkboards.qml115
-rw-r--r--examples/declarative/qtquick1/toys/corkboards/corkboards.qmlproject16
-rw-r--r--examples/declarative/qtquick1/toys/corkboards/note-yellow.pngbin54559 -> 0 bytes
-rw-r--r--examples/declarative/qtquick1/toys/corkboards/tack.pngbin7282 -> 0 bytes
-rw-r--r--examples/declarative/qtquick1/toys/dynamicscene/dynamicscene.qml224
-rw-r--r--examples/declarative/qtquick1/toys/dynamicscene/dynamicscene.qmlproject16
-rw-r--r--examples/declarative/qtquick1/toys/dynamicscene/images/NOTE1
-rw-r--r--examples/declarative/qtquick1/toys/dynamicscene/images/face-smile.pngbin15408 -> 0 bytes
-rw-r--r--examples/declarative/qtquick1/toys/dynamicscene/images/moon.pngbin1757 -> 0 bytes
-rw-r--r--examples/declarative/qtquick1/toys/dynamicscene/images/rabbit_brown.pngbin1245 -> 0 bytes
-rw-r--r--examples/declarative/qtquick1/toys/dynamicscene/images/rabbit_bw.pngbin1759 -> 0 bytes
-rw-r--r--examples/declarative/qtquick1/toys/dynamicscene/images/star.pngbin349 -> 0 bytes
-rw-r--r--examples/declarative/qtquick1/toys/dynamicscene/images/sun.pngbin8153 -> 0 bytes
-rw-r--r--examples/declarative/qtquick1/toys/dynamicscene/images/tree_s.pngbin3406 -> 0 bytes
-rw-r--r--examples/declarative/qtquick1/toys/dynamicscene/qml/Button.qml80
-rw-r--r--examples/declarative/qtquick1/toys/dynamicscene/qml/GenericSceneItem.qml49
-rw-r--r--examples/declarative/qtquick1/toys/dynamicscene/qml/PaletteItem.qml59
-rw-r--r--examples/declarative/qtquick1/toys/dynamicscene/qml/PerspectiveItem.qml65
-rw-r--r--examples/declarative/qtquick1/toys/dynamicscene/qml/Sun.qml78
-rw-r--r--examples/declarative/qtquick1/toys/dynamicscene/qml/itemCreation.js62
-rw-r--r--examples/declarative/qtquick1/toys/tic-tac-toe/content/Button.qml79
-rw-r--r--examples/declarative/qtquick1/toys/tic-tac-toe/content/TicTac.qml60
-rw-r--r--examples/declarative/qtquick1/toys/tic-tac-toe/content/pics/board.pngbin12258 -> 0 bytes
-rw-r--r--examples/declarative/qtquick1/toys/tic-tac-toe/content/pics/o.pngbin1470 -> 0 bytes
-rw-r--r--examples/declarative/qtquick1/toys/tic-tac-toe/content/pics/x.pngbin1331 -> 0 bytes
-rw-r--r--examples/declarative/qtquick1/toys/tic-tac-toe/content/tic-tac-toe.js149
-rw-r--r--examples/declarative/qtquick1/toys/tic-tac-toe/tic-tac-toe.qml123
-rw-r--r--examples/declarative/qtquick1/toys/tic-tac-toe/tic-tac-toe.qmlproject16
-rw-r--r--examples/declarative/qtquick1/toys/toys.qmlproject14
-rw-r--r--examples/declarative/qtquick1/toys/tvtennis/tvtennis.qml109
-rw-r--r--examples/declarative/qtquick1/toys/tvtennis/tvtennis.qmlproject16
46 files changed, 0 insertions, 1772 deletions
diff --git a/examples/declarative/qtquick1/toys/README b/examples/declarative/qtquick1/toys/README
deleted file mode 100644
index ff4d0242d7..0000000000
--- a/examples/declarative/qtquick1/toys/README
+++ /dev/null
@@ -1,37 +0,0 @@
-These pure QML examples demonstrate
-some of what can be easily done using just a few QML files.
-
-The example launcher provided with Qt can be used to explore each of the
-examples in this directory. They can also be viewed directly with the
-QML viewer utility, without requiring compilation.
-
-Documentation for these examples can be found via the Tutorial and Examples
-link in the main Qt documentation.
-
-
-Finding the Qt Examples and Demos launcher
-==========================================
-
-On Windows:
-
-The launcher can be accessed via the Windows Start menu. Select the menu
-entry entitled "Qt Examples and Demos" entry in the submenu containing
-the Qt tools.
-
-On Mac OS X:
-
-For the binary distribution, the qtdemo executable is installed in the
-/Developer/Applications/Qt directory. For the source distribution, it is
-installed alongside the other Qt tools on the path specified when Qt is
-configured.
-
-On Unix/Linux:
-
-The qtdemo executable is installed alongside the other Qt tools on the path
-specified when Qt is configured.
-
-On all platforms:
-
-The source code for the launcher can be found in the demos/qtdemo directory
-in the Qt package. This example is built at the same time as the Qt libraries,
-tools, examples, and demonstrations.
diff --git a/examples/declarative/qtquick1/toys/clocks/clocks.qml b/examples/declarative/qtquick1/toys/clocks/clocks.qml
deleted file mode 100644
index b2a2844c00..0000000000
--- a/examples/declarative/qtquick1/toys/clocks/clocks.qml
+++ /dev/null
@@ -1,59 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import "content"
-
-Rectangle {
- width: 640; height: 240
- color: "#646464"
-
- Row {
- anchors.centerIn: parent
- Clock { city: "New York"; shift: -4 }
- Clock { city: "Mumbai"; shift: 5.5 }
- Clock { city: "Tokyo"; shift: 9 }
- }
- QuitButton {
- anchors.right: parent.right
- anchors.top: parent.top
- anchors.margins: 10
- }
-}
diff --git a/examples/declarative/qtquick1/toys/clocks/clocks.qmlproject b/examples/declarative/qtquick1/toys/clocks/clocks.qmlproject
deleted file mode 100644
index c29367a487..0000000000
--- a/examples/declarative/qtquick1/toys/clocks/clocks.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.1
-
-Project {
- mainFile: "clocks.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/declarative/qtquick1/toys/clocks/content/Clock.qml b/examples/declarative/qtquick1/toys/clocks/content/Clock.qml
deleted file mode 100644
index fde4364586..0000000000
--- a/examples/declarative/qtquick1/toys/clocks/content/Clock.qml
+++ /dev/null
@@ -1,124 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-
-Item {
- id: clock
- width: 200; height: 230
-
- property alias city: cityLabel.text
- property int hours
- property int minutes
- property int seconds
- property real shift
- property bool night: false
-
- function timeChanged() {
- var date = new Date;
- hours = shift ? date.getUTCHours() + Math.floor(clock.shift) : date.getHours()
- night = ( hours < 7 || hours > 19 )
- minutes = shift ? date.getUTCMinutes() + ((clock.shift % 1) * 60) : date.getMinutes()
- seconds = date.getUTCSeconds();
- }
-
- Timer {
- interval: 100; running: true; repeat: true;
- onTriggered: clock.timeChanged()
- }
-
- Image { id: background; source: "clock.png"; visible: clock.night == false }
- Image { source: "clock-night.png"; visible: clock.night == true }
-
-
- Image {
- x: 92.5; y: 27
- source: "hour.png"
- smooth: true
- transform: Rotation {
- id: hourRotation
- origin.x: 7.5; origin.y: 73;
- angle: (clock.hours * 30) + (clock.minutes * 0.5)
- Behavior on angle {
- SpringAnimation { spring: 2; damping: 0.2; modulus: 360 }
- }
- }
- }
-
- Image {
- x: 93.5; y: 17
- source: "minute.png"
- smooth: true
- transform: Rotation {
- id: minuteRotation
- origin.x: 6.5; origin.y: 83;
- angle: clock.minutes * 6
- Behavior on angle {
- SpringAnimation { spring: 2; damping: 0.2; modulus: 360 }
- }
- }
- }
-
- Image {
- x: 97.5; y: 20
- source: "second.png"
- smooth: true
- transform: Rotation {
- id: secondRotation
- origin.x: 2.5; origin.y: 80;
- angle: clock.seconds * 6
- Behavior on angle {
- SpringAnimation { spring: 2; damping: 0.2; modulus: 360 }
- }
- }
- }
-
- Image {
- anchors.centerIn: background; source: "center.png"
- }
-
- Text {
- id: cityLabel
- y: 200; anchors.horizontalCenter: parent.horizontalCenter
- color: "white"
- font.bold: true; font.pixelSize: 14
- style: Text.Raised; styleColor: "black"
- }
-}
diff --git a/examples/declarative/qtquick1/toys/clocks/content/QuitButton.qml b/examples/declarative/qtquick1/toys/clocks/content/QuitButton.qml
deleted file mode 100644
index 8161613e89..0000000000
--- a/examples/declarative/qtquick1/toys/clocks/content/QuitButton.qml
+++ /dev/null
@@ -1,52 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-Image {
- source: "quit.png"
- scale: quitMouse.pressed ? 0.8 : 1.0
- smooth: quitMouse.pressed
- MouseArea {
- id: quitMouse
- anchors.fill: parent
- anchors.margins: -10
- onClicked: Qt.quit()
- }
-}
diff --git a/examples/declarative/qtquick1/toys/clocks/content/background.png b/examples/declarative/qtquick1/toys/clocks/content/background.png
deleted file mode 100644
index a885950862..0000000000
--- a/examples/declarative/qtquick1/toys/clocks/content/background.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/qtquick1/toys/clocks/content/center.png b/examples/declarative/qtquick1/toys/clocks/content/center.png
deleted file mode 100644
index 7fbd802a44..0000000000
--- a/examples/declarative/qtquick1/toys/clocks/content/center.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/qtquick1/toys/clocks/content/clock-night.png b/examples/declarative/qtquick1/toys/clocks/content/clock-night.png
deleted file mode 100644
index cc7151a397..0000000000
--- a/examples/declarative/qtquick1/toys/clocks/content/clock-night.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/qtquick1/toys/clocks/content/clock.png b/examples/declarative/qtquick1/toys/clocks/content/clock.png
deleted file mode 100644
index 462edacc0e..0000000000
--- a/examples/declarative/qtquick1/toys/clocks/content/clock.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/qtquick1/toys/clocks/content/hour.png b/examples/declarative/qtquick1/toys/clocks/content/hour.png
deleted file mode 100644
index f8061a1235..0000000000
--- a/examples/declarative/qtquick1/toys/clocks/content/hour.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/qtquick1/toys/clocks/content/minute.png b/examples/declarative/qtquick1/toys/clocks/content/minute.png
deleted file mode 100644
index 1297ec7c2b..0000000000
--- a/examples/declarative/qtquick1/toys/clocks/content/minute.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/qtquick1/toys/clocks/content/quit.png b/examples/declarative/qtquick1/toys/clocks/content/quit.png
deleted file mode 100644
index b822057d4e..0000000000
--- a/examples/declarative/qtquick1/toys/clocks/content/quit.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/qtquick1/toys/clocks/content/second.png b/examples/declarative/qtquick1/toys/clocks/content/second.png
deleted file mode 100644
index 4aa9fb5e8e..0000000000
--- a/examples/declarative/qtquick1/toys/clocks/content/second.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/qtquick1/toys/corkboards/Day.qml b/examples/declarative/qtquick1/toys/corkboards/Day.qml
deleted file mode 100644
index 50828af4df..0000000000
--- a/examples/declarative/qtquick1/toys/corkboards/Day.qml
+++ /dev/null
@@ -1,153 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-
-Component {
- Item {
- property variant stickies
-
- id: page
- width: ListView.view.width+40; height: ListView.view.height
-
-
- Image {
- source: "cork.jpg"
- width: page.ListView.view.width
- height: page.ListView.view.height
- fillMode: Image.PreserveAspectCrop
- clip: true
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: page.focus = false;
- }
-
- Text {
- text: name; x: 15; y: 8; height: 40; width: 370
- font.pixelSize: 18; font.bold: true; color: "white"
- style: Text.Outline; styleColor: "black"
- }
-
- Repeater {
- model: notes
- Item {
- id: stickyPage
-
- property int randomX: Math.random() * (page.ListView.view.width-0.5*stickyImage.width) +100
- property int randomY: Math.random() * (page.ListView.view.height-0.5*stickyImage.height) +50
-
- x: randomX; y: randomY
-
- rotation: -flickable.horizontalVelocity / 100;
- Behavior on rotation {
- SpringAnimation { spring: 2.0; damping: 0.15 }
- }
-
- Item {
- id: sticky
- scale: 0.7
-
- Image {
- id: stickyImage
- x: 8 + -width * 0.6 / 2; y: -20
- source: "note-yellow.png"
- scale: 0.6; transformOrigin: Item.TopLeft
- smooth: true
- }
-
- TextEdit {
- id: myText
- x: -104; y: 36; width: 215; height: 200
- smooth: true
- font.pixelSize: 24
- readOnly: false
- rotation: -8
- text: noteText
- }
-
- Item {
- x: stickyImage.x; y: -20
- width: stickyImage.width * stickyImage.scale
- height: stickyImage.height * stickyImage.scale
-
- MouseArea {
- id: mouse
- anchors.fill: parent
- drag.target: stickyPage
- drag.axis: Drag.XandYAxis
- drag.minimumY: 0
- drag.maximumY: page.height - 80
- drag.minimumX: 100
- drag.maximumX: page.width - 140
- onClicked: { myText.focus = true; myText.openSoftwareInputPanel(); }
- }
- }
- }
-
- Image {
- x: -width / 2; y: -height * 0.5 / 2
- source: "tack.png"
- scale: 0.7; transformOrigin: Item.TopLeft
- }
-
- states: State {
- name: "pressed"
- when: mouse.pressed
- PropertyChanges { target: sticky; rotation: 8; scale: 1 }
- PropertyChanges { target: page; z: 8 }
- }
-
- transitions: Transition {
- NumberAnimation { properties: "rotation,scale"; duration: 200 }
- }
- }
- }
- }
-}
-
-
-
-
-
-
-
-
diff --git a/examples/declarative/qtquick1/toys/corkboards/cork.jpg b/examples/declarative/qtquick1/toys/corkboards/cork.jpg
deleted file mode 100644
index 160bc002bf..0000000000
--- a/examples/declarative/qtquick1/toys/corkboards/cork.jpg
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/qtquick1/toys/corkboards/corkboards.qml b/examples/declarative/qtquick1/toys/corkboards/corkboards.qml
deleted file mode 100644
index fddea91ea5..0000000000
--- a/examples/declarative/qtquick1/toys/corkboards/corkboards.qml
+++ /dev/null
@@ -1,115 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-
-Rectangle {
- width: 800; height: 480
- color: "#464646"
-
- ListModel {
- id: list
-
- ListElement {
- name: "Sunday"
- notes: [
- ListElement { noteText: "Lunch" },
- ListElement { noteText: "Birthday Party" }
- ]
- }
-
- ListElement {
- name: "Monday"
- notes: [
- ListElement { noteText: "Pickup kids from\nschool\n4.30pm" },
- ListElement { noteText: "Checkout Qt" }, ListElement { noteText: "Read email" }
- ]
- }
-
- ListElement {
- name: "Tuesday"
- notes: [
- ListElement { noteText: "Walk dog" },
- ListElement { noteText: "Buy newspaper" }
- ]
- }
-
- ListElement {
- name: "Wednesday"
- notes: [ ListElement { noteText: "Cook dinner" } ]
- }
-
- ListElement {
- name: "Thursday"
- notes: [
- ListElement { noteText: "Meeting\n5.30pm" },
- ListElement { noteText: "Weed garden" }
- ]
- }
-
- ListElement {
- name: "Friday"
- notes: [
- ListElement { noteText: "More work" },
- ListElement { noteText: "Grocery shopping" }
- ]
- }
-
- ListElement {
- name: "Saturday"
- notes: [
- ListElement { noteText: "Drink" },
- ListElement { noteText: "Download Qt\nPlay with QML" }
- ]
- }
- }
-
- ListView {
- id: flickable
-
- anchors.fill: parent
- focus: true
- highlightRangeMode: ListView.StrictlyEnforceRange
- orientation: ListView.Horizontal
- snapMode: ListView.SnapOneItem
- model: list
- delegate: Day { }
- }
-}
diff --git a/examples/declarative/qtquick1/toys/corkboards/corkboards.qmlproject b/examples/declarative/qtquick1/toys/corkboards/corkboards.qmlproject
deleted file mode 100644
index daae9c1fed..0000000000
--- a/examples/declarative/qtquick1/toys/corkboards/corkboards.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.1
-
-Project {
- mainFile: "corkboards.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/declarative/qtquick1/toys/corkboards/note-yellow.png b/examples/declarative/qtquick1/toys/corkboards/note-yellow.png
deleted file mode 100644
index 8ddecc8b03..0000000000
--- a/examples/declarative/qtquick1/toys/corkboards/note-yellow.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/qtquick1/toys/corkboards/tack.png b/examples/declarative/qtquick1/toys/corkboards/tack.png
deleted file mode 100644
index cef2d1cd23..0000000000
--- a/examples/declarative/qtquick1/toys/corkboards/tack.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/qtquick1/toys/dynamicscene/dynamicscene.qml b/examples/declarative/qtquick1/toys/dynamicscene/dynamicscene.qml
deleted file mode 100644
index e153034294..0000000000
--- a/examples/declarative/qtquick1/toys/dynamicscene/dynamicscene.qml
+++ /dev/null
@@ -1,224 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import Qt.labs.particles 1.0
-import "qml"
-
-Item {
- id: window
-
- property int activeSuns: 0
-
- //This is a desktop-sized example
- width: 800; height: 480
-
-
- MouseArea {
- anchors.fill: parent
- onClicked: window.focus = false;
- }
-
- //This is the message box that pops up when there's an error
- Rectangle {
- id: dialog
-
- opacity: 0
- anchors.centerIn: parent
- width: dialogText.width + 6; height: dialogText.height + 6
- border.color: 'black'
- color: 'lightsteelblue'
- z: 65535 //Arbitrary number chosen to be above all the items, including the scaled perspective ones.
-
- function show(str){
- dialogText.text = str;
- dialogAnim.start();
- }
-
- Text {
- id: dialogText
- x: 3; y: 3
- font.pixelSize: 14
- }
-
- SequentialAnimation {
- id: dialogAnim
- NumberAnimation { target: dialog; property:"opacity"; to: 1; duration: 1000 }
- PauseAnimation { duration: 5000 }
- NumberAnimation { target: dialog; property:"opacity"; to: 0; duration: 1000 }
- }
- }
-
- // sky
- Rectangle {
- id: sky
- anchors { left: parent.left; top: parent.top; right: toolbox.right; bottom: parent.verticalCenter }
- gradient: Gradient {
- GradientStop { id: gradientStopA; position: 0.0; color: "#0E1533" }
- GradientStop { id: gradientStopB; position: 1.0; color: "#437284" }
- }
- }
-
- // stars (when there's no sun)
- Particles {
- id: stars
- x: 0; y: 0; width: parent.width; height: parent.height / 2
- source: "images/star.png"
- angleDeviation: 360
- velocity: 0; velocityDeviation: 0
- count: parent.width / 10
- fadeInDuration: 2800
- opacity: 1
- }
-
- // ground
- Rectangle {
- id: ground
- z: 2 // just above the sun so that the sun can set behind it
- anchors { left: parent.left; top: parent.verticalCenter; right: toolbox.left; bottom: parent.bottom }
- gradient: Gradient {
- GradientStop { position: 0.0; color: "ForestGreen" }
- GradientStop { position: 1.0; color: "DarkGreen" }
- }
- }
-
- SystemPalette { id: activePalette }
-
- // right-hand panel
- Rectangle {
- id: toolbox
-
- width: 380
- color: activePalette.window
- anchors { right: parent.right; top: parent.top; bottom: parent.bottom }
-
- Column {
- anchors.centerIn: parent
- spacing: 8
-
- Text { text: "Drag an item into the scene." }
-
- Rectangle {
- width: palette.width + 10; height: palette.height + 10
- border.color: "black"
-
- Row {
- id: palette
- anchors.centerIn: parent
- spacing: 8
-
- PaletteItem {
- anchors.verticalCenter: parent.verticalCenter
- componentFile: "Sun.qml"
- image: "../images/sun.png"
- }
- PaletteItem {
- anchors.verticalCenter: parent.verticalCenter
- componentFile: "GenericSceneItem.qml"
- image: "../images/moon.png"
- }
- PaletteItem {
- anchors.verticalCenter: parent.verticalCenter
- componentFile: "PerspectiveItem.qml"
- image: "../images/tree_s.png"
- }
- PaletteItem {
- anchors.verticalCenter: parent.verticalCenter
- componentFile: "PerspectiveItem.qml"
- image: "../images/rabbit_brown.png"
- }
- PaletteItem {
- anchors.verticalCenter: parent.verticalCenter
- componentFile: "PerspectiveItem.qml"
- image: "../images/rabbit_bw.png"
- }
- }
- }
-
- Text { text: "Active Suns: " + activeSuns }
-
- Rectangle { width: parent.width; height: 1; color: "black" }
-
- Text { text: "Arbitrary QML:" }
-
- Rectangle {
- width: 360; height: 240
-
- TextEdit {
- id: qmlText
- anchors.fill: parent; anchors.margins: 5
- readOnly: false
- font.pixelSize: 14
- wrapMode: TextEdit.WordWrap
-
- text: "import QtQuick 1.0\nImage {\n id: smile\n x: 360 * Math.random()\n y: 180 * Math.random() \n source: 'images/face-smile.png'\n NumberAnimation on opacity { \n to: 0; duration: 1500\n }\n Component.onCompleted: smile.destroy(1500);\n}"
- }
- }
-
- Button {
- text: "Create"
- onClicked: {
- try {
- Qt.createQmlObject(qmlText.text, window, 'CustomObject');
- } catch(err) {
- dialog.show('Error on line ' + err.qmlErrors[0].lineNumber + '\n' + err.qmlErrors[0].message);
- }
- }
- }
- }
- }
-
- //Day state, for when a sun is added to the scene
- states: State {
- name: "Day"
- when: window.activeSuns > 0
-
- PropertyChanges { target: gradientStopA; color: "DeepSkyBlue" }
- PropertyChanges { target: gradientStopB; color: "SkyBlue" }
- PropertyChanges { target: stars; opacity: 0 }
- }
-
- //! [top-level transitions]
- transitions: Transition {
- PropertyAnimation { duration: 3000 }
- ColorAnimation { duration: 3000 }
- }
- //! [top-level transitions]
-}
diff --git a/examples/declarative/qtquick1/toys/dynamicscene/dynamicscene.qmlproject b/examples/declarative/qtquick1/toys/dynamicscene/dynamicscene.qmlproject
deleted file mode 100644
index 52ac474383..0000000000
--- a/examples/declarative/qtquick1/toys/dynamicscene/dynamicscene.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.1
-
-Project {
- mainFile: "dynamicscene.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/declarative/qtquick1/toys/dynamicscene/images/NOTE b/examples/declarative/qtquick1/toys/dynamicscene/images/NOTE
deleted file mode 100644
index fcd87f9132..0000000000
--- a/examples/declarative/qtquick1/toys/dynamicscene/images/NOTE
+++ /dev/null
@@ -1 +0,0 @@
-Images (except star.png) are from the KDE project.
diff --git a/examples/declarative/qtquick1/toys/dynamicscene/images/face-smile.png b/examples/declarative/qtquick1/toys/dynamicscene/images/face-smile.png
deleted file mode 100644
index 3d66d72578..0000000000
--- a/examples/declarative/qtquick1/toys/dynamicscene/images/face-smile.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/qtquick1/toys/dynamicscene/images/moon.png b/examples/declarative/qtquick1/toys/dynamicscene/images/moon.png
deleted file mode 100644
index 1c0d6066a8..0000000000
--- a/examples/declarative/qtquick1/toys/dynamicscene/images/moon.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/qtquick1/toys/dynamicscene/images/rabbit_brown.png b/examples/declarative/qtquick1/toys/dynamicscene/images/rabbit_brown.png
deleted file mode 100644
index ebfdeed332..0000000000
--- a/examples/declarative/qtquick1/toys/dynamicscene/images/rabbit_brown.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/qtquick1/toys/dynamicscene/images/rabbit_bw.png b/examples/declarative/qtquick1/toys/dynamicscene/images/rabbit_bw.png
deleted file mode 100644
index 7bff9b92ca..0000000000
--- a/examples/declarative/qtquick1/toys/dynamicscene/images/rabbit_bw.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/qtquick1/toys/dynamicscene/images/star.png b/examples/declarative/qtquick1/toys/dynamicscene/images/star.png
deleted file mode 100644
index 27ef924267..0000000000
--- a/examples/declarative/qtquick1/toys/dynamicscene/images/star.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/qtquick1/toys/dynamicscene/images/sun.png b/examples/declarative/qtquick1/toys/dynamicscene/images/sun.png
deleted file mode 100644
index 7713ca5ce7..0000000000
--- a/examples/declarative/qtquick1/toys/dynamicscene/images/sun.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/qtquick1/toys/dynamicscene/images/tree_s.png b/examples/declarative/qtquick1/toys/dynamicscene/images/tree_s.png
deleted file mode 100644
index 6eac35a729..0000000000
--- a/examples/declarative/qtquick1/toys/dynamicscene/images/tree_s.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/qtquick1/toys/dynamicscene/qml/Button.qml b/examples/declarative/qtquick1/toys/dynamicscene/qml/Button.qml
deleted file mode 100644
index a9d3199b48..0000000000
--- a/examples/declarative/qtquick1/toys/dynamicscene/qml/Button.qml
+++ /dev/null
@@ -1,80 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-
-Rectangle {
- id: container
-
- property variant text
- signal clicked
-
- height: text.height + 10; width: text.width + 20
- border.width: 1
- radius: 4
- smooth: true
-
- gradient: Gradient {
- GradientStop {
- position: 0.0
- color: !mouseArea.pressed ? activePalette.light : activePalette.button
- }
- GradientStop {
- position: 1.0
- color: !mouseArea.pressed ? activePalette.button : activePalette.dark
- }
- }
-
- SystemPalette { id: activePalette }
-
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- onClicked: container.clicked()
- }
-
- Text {
- id: text
- anchors.centerIn:parent
- font.pointSize: 10
- text: parent.text
- color: activePalette.buttonText
- }
-}
diff --git a/examples/declarative/qtquick1/toys/dynamicscene/qml/GenericSceneItem.qml b/examples/declarative/qtquick1/toys/dynamicscene/qml/GenericSceneItem.qml
deleted file mode 100644
index 139747048f..0000000000
--- a/examples/declarative/qtquick1/toys/dynamicscene/qml/GenericSceneItem.qml
+++ /dev/null
@@ -1,49 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-
-Image {
- property bool created: false
- property string image
-
- source: image
-
-}
diff --git a/examples/declarative/qtquick1/toys/dynamicscene/qml/PaletteItem.qml b/examples/declarative/qtquick1/toys/dynamicscene/qml/PaletteItem.qml
deleted file mode 100644
index 45540f58ad..0000000000
--- a/examples/declarative/qtquick1/toys/dynamicscene/qml/PaletteItem.qml
+++ /dev/null
@@ -1,59 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import "itemCreation.js" as Code
-
-Image {
- id: paletteItem
-
- property string componentFile
- property string image
-
- source: image
-
- MouseArea {
- anchors.fill: parent
-
- onPressed: Code.startDrag(mouse);
- onPositionChanged: Code.continueDrag(mouse);
- onReleased: Code.endDrag(mouse);
- }
-}
diff --git a/examples/declarative/qtquick1/toys/dynamicscene/qml/PerspectiveItem.qml b/examples/declarative/qtquick1/toys/dynamicscene/qml/PerspectiveItem.qml
deleted file mode 100644
index 0956572e7f..0000000000
--- a/examples/declarative/qtquick1/toys/dynamicscene/qml/PerspectiveItem.qml
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-
-Image {
- id: rootItem
-
- property bool created: false
- property string image
-
- property double scaledBottom: y + (height + height*scale) / 2
- property bool onLand: scaledBottom > window.height / 2
-
- source: image
- opacity: onLand ? 1 : 0.25
- scale: Math.max((y + height - 250) * 0.01, 0.3)
- smooth: true
-
- onCreatedChanged: {
- if (created && !onLand)
- rootItem.destroy();
- else
- z = scaledBottom;
- }
-
- onYChanged: z = scaledBottom;
-}
diff --git a/examples/declarative/qtquick1/toys/dynamicscene/qml/Sun.qml b/examples/declarative/qtquick1/toys/dynamicscene/qml/Sun.qml
deleted file mode 100644
index 505b3fdb01..0000000000
--- a/examples/declarative/qtquick1/toys/dynamicscene/qml/Sun.qml
+++ /dev/null
@@ -1,78 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-
-Image {
- id: sun
-
- property bool created: false
- property string image: "../images/sun.png"
-
- source: image
-
- // once item is created, start moving offscreen
- NumberAnimation on y {
- to: window.height / 2
- running: created
- onRunningChanged: {
- if (running)
- duration = (window.height - 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++;
- } else {
- window.activeSuns--;
- }
- }
-}
diff --git a/examples/declarative/qtquick1/toys/dynamicscene/qml/itemCreation.js b/examples/declarative/qtquick1/toys/dynamicscene/qml/itemCreation.js
deleted file mode 100644
index b96f3a5e39..0000000000
--- a/examples/declarative/qtquick1/toys/dynamicscene/qml/itemCreation.js
+++ /dev/null
@@ -1,62 +0,0 @@
-var itemComponent = null;
-var draggedItem = null;
-var startingMouse;
-var posnInWindow;
-
-function startDrag(mouse)
-{
- posnInWindow = paletteItem.mapToItem(window, 0, 0);
- startingMouse = { x: mouse.x, y: mouse.y }
- loadComponent();
-}
-
-//Creation is split into two functions due to an asynchronous wait while
-//possible external files are loaded.
-
-function loadComponent() {
- if (itemComponent != null) { // component has been previously loaded
- createItem();
- return;
- }
-
- itemComponent = Qt.createComponent(paletteItem.componentFile);
- if (itemComponent.status == Component.Loading) //Depending on the content, it can be ready or error immediately
- component.statusChanged.connect(createItem);
- else
- createItem();
-}
-
-function createItem() {
- if (itemComponent.status == Component.Ready && draggedItem == null) {
- draggedItem = itemComponent.createObject(window, {"image": paletteItem.image, "x": posnInWindow.x, "y": posnInWindow.y, "z": 3});
- // make sure created item is above the ground layer
- } else if (itemComponent.status == Component.Error) {
- draggedItem = null;
- console.log("error creating component");
- console.log(itemComponent.errorString());
- }
-}
-
-function continueDrag(mouse)
-{
- if (draggedItem == null)
- return;
-
- draggedItem.x = mouse.x + posnInWindow.x - startingMouse.x;
- draggedItem.y = mouse.y + posnInWindow.y - startingMouse.y;
-}
-
-function endDrag(mouse)
-{
- if (draggedItem == null)
- return;
-
- if (draggedItem.x + draggedItem.width > toolbox.x) { //Don't drop it in the toolbox
- draggedItem.destroy();
- draggedItem = null;
- } else {
- draggedItem.created = true;
- draggedItem = null;
- }
-}
-
diff --git a/examples/declarative/qtquick1/toys/tic-tac-toe/content/Button.qml b/examples/declarative/qtquick1/toys/tic-tac-toe/content/Button.qml
deleted file mode 100644
index 01f2c61aad..0000000000
--- a/examples/declarative/qtquick1/toys/tic-tac-toe/content/Button.qml
+++ /dev/null
@@ -1,79 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-
-Rectangle {
- id: container
-
- property string text
- property bool pressed: false
-
- signal clicked
-
- width: buttonLabel.width + 20; height: buttonLabel.height + 6
- border { width: 1; color: Qt.darker(container.color) }
- radius: 8
- color: "lightgray"
- smooth: true
-
- gradient: Gradient {
- GradientStop {
- position: 0.0
- color: container.pressed ? "darkgray" : "white"
- }
- GradientStop {
- position: 1.0
- color: container.color
- }
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: container.clicked()
- }
-
- Text {
- id: buttonLabel
- anchors.centerIn: container
- text: container.text
- font.pixelSize: 14
- }
-}
diff --git a/examples/declarative/qtquick1/toys/tic-tac-toe/content/TicTac.qml b/examples/declarative/qtquick1/toys/tic-tac-toe/content/TicTac.qml
deleted file mode 100644
index 67b0402a98..0000000000
--- a/examples/declarative/qtquick1/toys/tic-tac-toe/content/TicTac.qml
+++ /dev/null
@@ -1,60 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-
-Item {
- signal clicked
-
- states: [
- State { name: "X"; PropertyChanges { target: image; source: "pics/x.png" } },
- State { name: "O"; PropertyChanges { target: image; source: "pics/o.png" } }
- ]
-
- Image {
- id: image
- anchors.centerIn: parent
- }
-
- MouseArea {
- anchors.fill: parent
- onClicked: parent.clicked()
- }
-}
diff --git a/examples/declarative/qtquick1/toys/tic-tac-toe/content/pics/board.png b/examples/declarative/qtquick1/toys/tic-tac-toe/content/pics/board.png
deleted file mode 100644
index 7e5b7ba27c..0000000000
--- a/examples/declarative/qtquick1/toys/tic-tac-toe/content/pics/board.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/qtquick1/toys/tic-tac-toe/content/pics/o.png b/examples/declarative/qtquick1/toys/tic-tac-toe/content/pics/o.png
deleted file mode 100644
index abc7ee020b..0000000000
--- a/examples/declarative/qtquick1/toys/tic-tac-toe/content/pics/o.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/qtquick1/toys/tic-tac-toe/content/pics/x.png b/examples/declarative/qtquick1/toys/tic-tac-toe/content/pics/x.png
deleted file mode 100644
index ddc65c83b8..0000000000
--- a/examples/declarative/qtquick1/toys/tic-tac-toe/content/pics/x.png
+++ /dev/null
Binary files differ
diff --git a/examples/declarative/qtquick1/toys/tic-tac-toe/content/tic-tac-toe.js b/examples/declarative/qtquick1/toys/tic-tac-toe/content/tic-tac-toe.js
deleted file mode 100644
index 5a166b750f..0000000000
--- a/examples/declarative/qtquick1/toys/tic-tac-toe/content/tic-tac-toe.js
+++ /dev/null
@@ -1,149 +0,0 @@
-function winner(board)
-{
- for (var i=0; i<3; ++i) {
- if (board.children[i].state != ""
- && board.children[i].state == board.children[i+3].state
- && board.children[i].state == board.children[i+6].state)
- return true
-
- if (board.children[i*3].state != ""
- && board.children[i*3].state == board.children[i*3+1].state
- && board.children[i*3].state == board.children[i*3+2].state)
- return true
- }
-
- if (board.children[0].state != ""
- && board.children[0].state == board.children[4].state != ""
- && board.children[0].state == board.children[8].state != "")
- return true
-
- if (board.children[2].state != ""
- && board.children[2].state == board.children[4].state != ""
- && board.children[2].state == board.children[6].state != "")
- return true
-
- return false
-}
-
-function restartGame()
-{
- game.running = true
-
- for (var i=0; i<9; ++i)
- board.children[i].state = ""
-}
-
-function makeMove(pos, player)
-{
- board.children[pos].state = player
- if (winner(board)) {
- gameFinished(player + " wins")
- return true
- } else {
- return false
- }
-}
-
-function canPlayAtPos(pos)
-{
- return board.children[pos].state == ""
-}
-
-function computerTurn()
-{
- var r = Math.random();
- if (r < game.difficulty)
- smartAI();
- else
- randomAI();
-}
-
-function smartAI()
-{
- function boardCopy(a) {
- var ret = new Object;
- ret.children = new Array(9);
- for (var i = 0; i<9; i++) {
- ret.children[i] = new Object;
- ret.children[i].state = a.children[i].state;
- }
- return ret;
- }
-
- for (var i=0; i<9; i++) {
- var simpleBoard = boardCopy(board);
- if (canPlayAtPos(i)) {
- simpleBoard.children[i].state = "O";
- if (winner(simpleBoard)) {
- makeMove(i, "O")
- return
- }
- }
- }
- for (var i=0; i<9; i++) {
- var simpleBoard = boardCopy(board);
- if (canPlayAtPos(i)) {
- simpleBoard.children[i].state = "X";
- if (winner(simpleBoard)) {
- makeMove(i, "O")
- return
- }
- }
- }
-
- function thwart(a,b,c) { //If they are at a, try b or c
- if (board.children[a].state == "X") {
- if (canPlayAtPos(b)) {
- makeMove(b, "O")
- return true
- } else if (canPlayAtPos(c)) {
- makeMove(c, "O")
- return true
- }
- }
- return false;
- }
-
- if (thwart(4,0,2)) return;
- if (thwart(0,4,3)) return;
- if (thwart(2,4,1)) return;
- if (thwart(6,4,7)) return;
- if (thwart(8,4,5)) return;
- if (thwart(1,4,2)) return;
- if (thwart(3,4,0)) return;
- if (thwart(5,4,8)) return;
- if (thwart(7,4,6)) return;
-
- for (var i =0; i<9; i++) {
- if (canPlayAtPos(i)) {
- makeMove(i, "O")
- return
- }
- }
- restartGame();
-}
-
-function randomAI()
-{
- var unfilledPosns = new Array();
-
- for (var i=0; i<9; ++i) {
- if (canPlayAtPos(i))
- unfilledPosns.push(i);
- }
-
- if (unfilledPosns.length == 0) {
- restartGame();
- } else {
- var choice = unfilledPosns[Math.floor(Math.random() * unfilledPosns.length)];
- makeMove(choice, "O");
- }
-}
-
-function gameFinished(message)
-{
- messageDisplay.text = message
- messageDisplay.visible = true
- game.running = false
-}
-
diff --git a/examples/declarative/qtquick1/toys/tic-tac-toe/tic-tac-toe.qml b/examples/declarative/qtquick1/toys/tic-tac-toe/tic-tac-toe.qml
deleted file mode 100644
index 49d78a99d1..0000000000
--- a/examples/declarative/qtquick1/toys/tic-tac-toe/tic-tac-toe.qml
+++ /dev/null
@@ -1,123 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-import "content"
-import "content/tic-tac-toe.js" as Logic
-
-Rectangle {
- id: game
-
- property bool running: true
- property real difficulty: 1.0 //chance it will actually think
-
- width: display.width; height: display.height + 10
-
- Image {
- id: boardImage
- source: "content/pics/board.png"
- }
-
-
- Column {
- id: display
-
- Grid {
- id: board
- width: boardImage.width; height: boardImage.height
- columns: 3
-
- Repeater {
- model: 9
-
- TicTac {
- width: board.width/3
- height: board.height/3
-
- onClicked: {
- if (game.running && Logic.canPlayAtPos(index)) {
- if (!Logic.makeMove(index, "X"))
- Logic.computerTurn();
- }
- }
- }
- }
- }
-
- Row {
- spacing: 4
- anchors.horizontalCenter: parent.horizontalCenter
-
- Button {
- text: "Hard"
- pressed: game.difficulty == 1.0
- onClicked: { game.difficulty = 1.0 }
- }
- Button {
- text: "Moderate"
- pressed: game.difficulty == 0.8
- onClicked: { game.difficulty = 0.8 }
- }
- Button {
- text: "Easy"
- pressed: game.difficulty == 0.2
- onClicked: { game.difficulty = 0.2 }
- }
- }
- }
-
-
- Text {
- id: messageDisplay
- anchors.centerIn: parent
- color: "blue"
- style: Text.Outline; styleColor: "white"
- font.pixelSize: 50; font.bold: true
- visible: false
-
- Timer {
- running: messageDisplay.visible
- onTriggered: {
- messageDisplay.visible = false;
- Logic.restartGame();
- }
- }
- }
-}
diff --git a/examples/declarative/qtquick1/toys/tic-tac-toe/tic-tac-toe.qmlproject b/examples/declarative/qtquick1/toys/tic-tac-toe/tic-tac-toe.qmlproject
deleted file mode 100644
index 6351084ba9..0000000000
--- a/examples/declarative/qtquick1/toys/tic-tac-toe/tic-tac-toe.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.1
-
-Project {
- mainFile: "tic-tac-toe.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/declarative/qtquick1/toys/toys.qmlproject b/examples/declarative/qtquick1/toys/toys.qmlproject
deleted file mode 100644
index 2bb4016996..0000000000
--- a/examples/declarative/qtquick1/toys/toys.qmlproject
+++ /dev/null
@@ -1,14 +0,0 @@
-import QmlProject 1.0
-
-Project {
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}
diff --git a/examples/declarative/qtquick1/toys/tvtennis/tvtennis.qml b/examples/declarative/qtquick1/toys/tvtennis/tvtennis.qml
deleted file mode 100644
index 604411b52d..0000000000
--- a/examples/declarative/qtquick1/toys/tvtennis/tvtennis.qml
+++ /dev/null
@@ -1,109 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/
-**
-** This file is part of the examples of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-
-Rectangle {
- id: page
- width: 640; height: 480
- color: "Black"
-
- // Make a ball to bounce
- Rectangle {
- id: ball
-
- // Add a property for the target y coordinate
- property variant direction : "right"
-
- x: 20; width: 20; height: 20; z: 1
- color: "Lime"
-
- // Move the ball to the right and back to the left repeatedly
- SequentialAnimation on x {
- loops: Animation.Infinite
- NumberAnimation { to: page.width - 40; duration: 2000 }
- PropertyAction { target: ball; property: "direction"; value: "left" }
- NumberAnimation { to: 20; duration: 2000 }
- PropertyAction { target: ball; property: "direction"; value: "right" }
- }
-
- // Make y move with a velocity of 200
- Behavior on y { SpringAnimation{ velocity: 200; }
- }
-
- Component.onCompleted: y = page.height-10; // start the ball motion
-
- // Detect the ball hitting the top or bottom of the view and bounce it
- onYChanged: {
- if (y <= 0) {
- y = page.height - 20;
- } else if (y >= page.height - 20) {
- y = 0;
- }
- }
- }
-
- // Place bats to the left and right of the view, following the y
- // coordinates of the ball.
- Rectangle {
- id: leftBat
- color: "Lime"
- x: 2; width: 20; height: 90
- y: ball.direction == 'left' ? ball.y - 45 : page.height/2 -45;
- Behavior on y { SpringAnimation{ velocity: 300 } }
- }
- Rectangle {
- id: rightBat
- color: "Lime"
- x: page.width - 22; width: 20; height: 90
- y: ball.direction == 'right' ? ball.y - 45 : page.height/2 -45;
- Behavior on y { SpringAnimation{ velocity: 300 } }
- }
-
- // The rest, to make it look realistic, if neither ever scores...
- Rectangle { color: "Lime"; x: page.width/2-80; y: 0; width: 40; height: 60 }
- Rectangle { color: "Black"; x: page.width/2-70; y: 10; width: 20; height: 40 }
- Rectangle { color: "Lime"; x: page.width/2+40; y: 0; width: 40; height: 60 }
- Rectangle { color: "Black"; x: page.width/2+50; y: 10; width: 20; height: 40 }
- Repeater {
- model: page.height / 20
- Rectangle { color: "Lime"; x: page.width/2-5; y: index * 20; width: 10; height: 10 }
- }
-}
diff --git a/examples/declarative/qtquick1/toys/tvtennis/tvtennis.qmlproject b/examples/declarative/qtquick1/toys/tvtennis/tvtennis.qmlproject
deleted file mode 100644
index a79805bb73..0000000000
--- a/examples/declarative/qtquick1/toys/tvtennis/tvtennis.qmlproject
+++ /dev/null
@@ -1,16 +0,0 @@
-import QmlProject 1.1
-
-Project {
- mainFile: "tvtennis.qml"
-
- /* Include .qml, .js, and image files from current directory and subdirectories */
- QmlFiles {
- directory: "."
- }
- JavaScriptFiles {
- directory: "."
- }
- ImageFiles {
- directory: "."
- }
-}