aboutsummaryrefslogtreecommitdiffstats
path: root/examples/qtquick/canvas/contents
diff options
context:
space:
mode:
Diffstat (limited to 'examples/qtquick/canvas/contents')
-rw-r--r--examples/qtquick/canvas/contents/Button.qml87
-rw-r--r--examples/qtquick/canvas/contents/ScrollBar.qml74
-rw-r--r--examples/qtquick/canvas/contents/Slider.qml115
-rw-r--r--examples/qtquick/canvas/contents/Stocks.qml147
-rw-r--r--examples/qtquick/canvas/contents/TitleBar.qml70
-rw-r--r--examples/qtquick/canvas/contents/ToolBar.qml69
-rw-r--r--examples/qtquick/canvas/contents/images/button-pressed.pngbin0 -> 571 bytes
-rw-r--r--examples/qtquick/canvas/contents/images/button.pngbin0 -> 564 bytes
-rw-r--r--examples/qtquick/canvas/contents/images/default.svg82
-rwxr-xr-xexamples/qtquick/canvas/contents/images/gloss.pngbin0 -> 1236 bytes
-rwxr-xr-xexamples/qtquick/canvas/contents/images/lineedit.pngbin0 -> 1415 bytes
-rw-r--r--examples/qtquick/canvas/contents/images/lineedit.sci5
-rwxr-xr-xexamples/qtquick/canvas/contents/images/quit.pngbin0 -> 2369 bytes
-rwxr-xr-xexamples/qtquick/canvas/contents/images/stripes.pngbin0 -> 257 bytes
-rwxr-xr-xexamples/qtquick/canvas/contents/images/titlebar.pngbin0 -> 1436 bytes
-rw-r--r--examples/qtquick/canvas/contents/images/titlebar.sci5
-rwxr-xr-xexamples/qtquick/canvas/contents/images/toolbutton.pngbin0 -> 2550 bytes
-rw-r--r--examples/qtquick/canvas/contents/images/toolbutton.sci5
-rw-r--r--examples/qtquick/canvas/contents/qt-logo.pngbin0 -> 23519 bytes
19 files changed, 659 insertions, 0 deletions
diff --git a/examples/qtquick/canvas/contents/Button.qml b/examples/qtquick/canvas/contents/Button.qml
new file mode 100644
index 0000000000..1413cdb9fa
--- /dev/null
+++ b/examples/qtquick/canvas/contents/Button.qml
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Item {
+ id: container
+
+ signal clicked
+
+ property string text
+ width: buttonText.width + 28
+ height: buttonText.height + 14
+
+ BorderImage {
+ id: buttonImage
+ source: "images/toolbutton.sci"
+ width: container.width - 10
+ height: container.height
+ }
+ BorderImage {
+ id: pressed
+ opacity: 0
+ source: "images/toolbutton.sci"
+ width: container.width - 10
+ height: container.height
+ }
+ MouseArea {
+ id: mouseRegion
+ anchors.fill: buttonImage
+ onClicked: { container.clicked(); }
+ }
+ Text {
+ id: buttonText
+ color: "white"
+ anchors.centerIn: buttonImage
+ font.bold: true
+ font.pointSize: 15
+ text: container.text
+ style: Text.Raised
+ styleColor: "black"
+ }
+ states: [
+ State {
+ name: "Pressed"
+ when: mouseRegion.pressed == true
+ PropertyChanges { target: pressed; opacity: 1 }
+ }
+ ]
+} \ No newline at end of file
diff --git a/examples/qtquick/canvas/contents/ScrollBar.qml b/examples/qtquick/canvas/contents/ScrollBar.qml
new file mode 100644
index 0000000000..98b8efee4a
--- /dev/null
+++ b/examples/qtquick/canvas/contents/ScrollBar.qml
@@ -0,0 +1,74 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the Qt Mobility Components.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Item {
+ id: scrollBar
+ // The properties that define the scrollbar's state.
+ // position and pageSize are in the range 0.0 - 1.0. They are relative to the
+ // height of the page, i.e. a pageSize of 0.5 means that you can see 50%
+ // of the height of the view.
+ // orientation can be either 'Vertical' or 'Horizontal'
+ property real position
+ property real pageSize
+ property string orientation : "Vertical"
+ property alias bgColor: background.color
+ property alias fgColor: thumb.color
+
+ // A light, semi-transparent background
+ Rectangle {
+ id: background
+ radius: orientation == 'Vertical' ? (width/2 - 1) : (height/2 - 1)
+ color: "white"; opacity: 0.3
+ anchors.fill: parent
+ }
+ // Size the bar to the required size, depending upon the orientation.
+ Rectangle {
+ id: thumb
+ opacity: 0.7
+ color: "black"
+ radius: orientation == 'Vertical' ? (width/2 - 1) : (height/2 - 1)
+ x: orientation == 'Vertical' ? 1 : (scrollBar.position * (scrollBar.width-2) + 1)
+ y: orientation == 'Vertical' ? (scrollBar.position * (scrollBar.height-2) + 1) : 1
+ width: orientation == 'Vertical' ? (parent.width-2) : (scrollBar.pageSize * (scrollBar.width-2))
+ height: orientation == 'Vertical' ? (scrollBar.pageSize * (scrollBar.height-2)) : (parent.height-2)
+ }
+}
diff --git a/examples/qtquick/canvas/contents/Slider.qml b/examples/qtquick/canvas/contents/Slider.qml
new file mode 100644
index 0000000000..1050e307f6
--- /dev/null
+++ b/examples/qtquick/canvas/contents/Slider.qml
@@ -0,0 +1,115 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the Declarative module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** GNU Lesser General Public License Usage
+** This file may be used under the terms of the GNU Lesser General Public
+** License version 2.1 as published by the Free Software Foundation and
+** appearing in the file LICENSE.LGPL included in the packaging of this
+** file. Please review the following information to ensure the GNU Lesser
+** General Public License version 2.1 requirements will be met:
+** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU General
+** Public License version 3.0 as published by the Free Software Foundation
+** and appearing in the file LICENSE.GPL included in the packaging of this
+** file. Please review the following information to ensure the GNU General
+** Public License version 3.0 requirements will be met:
+** http://www.gnu.org/copyleft/gpl.html.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms and
+** conditions contained in a signed written agreement between you and Nokia.
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Item {
+ id:slider
+ property real min:0
+ property real max:1
+ property real value: min + (max - min) * (bar.x / (foo.width - bar.width))
+ property real init:min+(max-min)/2
+ property string name:"Slider"
+
+ Component.onCompleted: setValue(init)
+ function setValue(v) {
+ if (min < max)
+ bar.x = v/(max - min) * (foo.width - bar.width);
+ }
+ Rectangle {
+ id:sliderName
+ anchors.left:parent.left
+ height: childrenRect.height
+ width:childrenRect.width
+ anchors.verticalCenter:parent.verticalCenter
+ Text {
+ text:slider.name
+ font.pointSize:12
+ }
+ }
+ Item {
+ id: foo
+ height: 6
+ width: parent.width - 4 - sliderName.width
+ anchors.verticalCenter:parent.verticalCenter
+ anchors.left:sliderName.right
+ anchors.leftMargin:5
+ Rectangle {
+ height: parent.height
+ anchors.left: parent.left
+ anchors.right: bar.horizontalCenter
+ color: "blue"
+ radius: 3
+ }
+ Rectangle {
+ height: parent.height
+ anchors.left: bar.horizontalCenter
+ anchors.right: parent.right
+ color: "gray"
+ radius: 3
+ }
+ Rectangle {
+ anchors.fill: parent
+ color: "transparent"
+ radius: 3
+ border.width: 2
+ border.color: "black"
+ }
+
+ Rectangle {
+ id: bar
+ y: -7
+ width: 20
+ height: 20
+ radius: 15
+ color: "white"
+ border.width: 2
+ border.color: "black"
+ MouseArea {
+ anchors.fill: parent
+ drag.target: parent
+ drag.axis: Drag.XAxis
+ drag.minimumX: 0
+ drag.maximumX: foo.width - parent.width
+ }
+ }
+ }
+}
diff --git a/examples/qtquick/canvas/contents/Stocks.qml b/examples/qtquick/canvas/contents/Stocks.qml
new file mode 100644
index 0000000000..043bca132e
--- /dev/null
+++ b/examples/qtquick/canvas/contents/Stocks.qml
@@ -0,0 +1,147 @@
+/****************************************************************************
+**
+** 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
+
+ListModel {
+ id:stocks
+ //Data from : http://en.wikipedia.org/wiki/NASDAQ-100
+
+ ListElement {name:"Activision Blizzard"; stockId:"ATVI"}
+ ListElement {name:"Adobe Systems Incorporated"; stockId:"ADBE"}
+ ListElement {name:"Akamai Technologies, Inc"; stockId:"AKAM"}
+ ListElement {name:"Alexion Pharmaceuticals"; stockId:"ALXN"}
+ ListElement {name:"Altera Corporation"; stockId:"ALTR"}
+ ListElement {name:"Amazon.com, Inc."; stockId:"AMZN"}
+ ListElement {name:"Amgen Inc."; stockId:"AMGN"}
+ ListElement {name:"Apollo Group, Inc."; stockId:"APOL"}
+ ListElement {name:"Apple Inc."; stockId:"AAPL"}
+ ListElement {name:"Applied Materials, Inc."; stockId:"AMAT"}
+ ListElement {name:"Autodesk, Inc."; stockId:"ADSK"}
+ ListElement {name:"Automatic Data Processing, Inc."; stockId:"ADP"}
+ ListElement {name:"Baidu.com, Inc."; stockId:"BIDU"}
+ ListElement {name:"Bed Bath & Beyond Inc."; stockId:"BBBY"}
+ ListElement {name:"Biogen Idec, Inc"; stockId:"BIIB"}
+ ListElement {name:"BMC Software, Inc."; stockId:"BMC"}
+ ListElement {name:"Broadcom Corporation"; stockId:"BRCM"}
+ ListElement {name:"C. H. Robinson Worldwide, Inc."; stockId:"CHRW"}
+ ListElement {name:"CA, Inc."; stockId:"CA"}
+ ListElement {name:"Celgene Corporation"; stockId:"CELG"}
+ ListElement {name:"Cephalon, Inc."; stockId:"CEPH"}
+ ListElement {name:"Cerner Corporation"; stockId:"CERN"}
+ ListElement {name:"Check Point Software Technologies Ltd."; stockId:"CHKP"}
+ ListElement {name:"Cisco Systems, Inc."; stockId:"CSCO"}
+ ListElement {name:"Citrix Systems, Inc."; stockId:"CTXS"}
+ ListElement {name:"Cognizant Technology Solutions Corporation"; stockId:"CTSH"}
+ ListElement {name:"Comcast Corporation"; stockId:"CMCSA"}
+ ListElement {name:"Costco Wholesale Corporation"; stockId:"COST"}
+ ListElement {name:"Ctrip.com International, Ltd."; stockId:"CTRP"}
+ ListElement {name:"Dell Inc."; stockId:"DELL"}
+ ListElement {name:"DENTSPLY International Inc."; stockId:"XRAY"}
+ ListElement {name:"DirecTV"; stockId:"DTV"}
+ ListElement {name:"Dollar Tree, Inc."; stockId:"DLTR"}
+ ListElement {name:"eBay Inc."; stockId:"EBAY"}
+ ListElement {name:"Electronic Arts Inc."; stockId:"ERTS"}
+ ListElement {name:"Expedia, Inc."; stockId:"EXPE"}
+ ListElement {name:"Expeditors International of Washington, Inc."; stockId:"EXPD"}
+ ListElement {name:"Express Scripts, Inc."; stockId:"ESRX"}
+ ListElement {name:"F5 Networks, Inc."; stockId:"FFIV"}
+ ListElement {name:"Fastenal Company"; stockId:"FAST"}
+ ListElement {name:"First Solar, Inc."; stockId:"FSLR"}
+ ListElement {name:"Fiserv, Inc."; stockId:"FISV"}
+ ListElement {name:"Flextronics International Ltd."; stockId:"FLEX"}
+ ListElement {name:"FLIR Systems, Inc."; stockId:"FLIR"}
+ ListElement {name:"Garmin Ltd."; stockId:"GRMN"}
+ ListElement {name:"Gilead Sciences, Inc."; stockId:"GILD"}
+ ListElement {name:"Google Inc."; stockId:"GOOG"}
+ ListElement {name:"Green Mountain Coffee Roasters, Inc."; stockId:"GMCR"}
+ ListElement {name:"Henry Schein, Inc."; stockId:"HSIC"}
+ ListElement {name:"Illumina, Inc."; stockId:"ILMN"}
+ ListElement {name:"Infosys Technologies"; stockId:"INFY"}
+ ListElement {name:"Intel Corporation"; stockId:"INTC"}
+ ListElement {name:"Intuit, Inc."; stockId:"INTU"}
+ ListElement {name:"Intuitive Surgical Inc."; stockId:"ISRG"}
+ ListElement {name:"Joy Global Inc."; stockId:"JOYG"}
+ ListElement {name:"KLA Tencor Corporation"; stockId:"KLAC"}
+ ListElement {name:"Lam Research Corporation"; stockId:"LRCX"}
+ ListElement {name:"Liberty Media Corporation, Interactive Series A"; stockId:"LINTA"}
+ ListElement {name:"Life Technologies Corporation"; stockId:"LIFE"}
+ ListElement {name:"Linear Technology Corporation"; stockId:"LLTC"}
+ ListElement {name:"Marvell Technology Group, Ltd."; stockId:"MRVL"}
+ ListElement {name:"Mattel, Inc."; stockId:"MAT"}
+ ListElement {name:"Maxim Integrated Products"; stockId:"MXIM"}
+ ListElement {name:"Microchip Technology Incorporated"; stockId:"MCHP"}
+ ListElement {name:"Micron Technology, Inc."; stockId:"MU"}
+ ListElement {name:"Microsoft Corporation"; stockId:"MSFT"}
+ ListElement {name:"Mylan, Inc."; stockId:"MYL"}
+ ListElement {name:"NetApp, Inc."; stockId:"NTAP"}
+ ListElement {name:"Netflix, Inc."; stockId:"NFLX"}
+ ListElement {name:"News Corporation, Ltd."; stockId:"NWSA"}
+ ListElement {name:"NII Holdings, Inc."; stockId:"NIHD"}
+ ListElement {name:"NVIDIA Corporation"; stockId:"NVDA"}
+ ListElement {name:"O'Reilly Automotive, Inc."; stockId:"ORLY"}
+ ListElement {name:"Oracle Corporation"; stockId:"ORCL"}
+ ListElement {name:"PACCAR Inc."; stockId:"PCAR"}
+ ListElement {name:"Paychex, Inc."; stockId:"PAYX"}
+ ListElement {name:"Priceline.com, Incorporated"; stockId:"PCLN"}
+ ListElement {name:"Qiagen N.V."; stockId:"QGEN"}
+ ListElement {name:"QUALCOMM Incorporated"; stockId:"QCOM"}
+ ListElement {name:"Research in Motion Limited"; stockId:"RIMM"}
+ ListElement {name:"Ross Stores Inc."; stockId:"ROST"}
+ ListElement {name:"SanDisk Corporation"; stockId:"SNDK"}
+ ListElement {name:"Seagate Technology Holdings"; stockId:"STX"}
+ ListElement {name:"Sears Holdings Corporation"; stockId:"SHLD"}
+ ListElement {name:"Sigma-Aldrich Corporation"; stockId:"SIAL"}
+ ListElement {name:"Staples Inc."; stockId:"SPLS"}
+ ListElement {name:"Starbucks Corporation"; stockId:"SBUX"}
+ ListElement {name:"Stericycle, Inc"; stockId:"SRCL"}
+ ListElement {name:"Symantec Corporation"; stockId:"SYMC"}
+ ListElement {name:"Teva Pharmaceutical Industries Ltd."; stockId:"TEVA"}
+ ListElement {name:"Urban Outfitters, Inc."; stockId:"URBN"}
+ ListElement {name:"VeriSign, Inc."; stockId:"VRSN"}
+ ListElement {name:"Vertex Pharmaceuticals"; stockId:"VRTX"}
+ ListElement {name:"Virgin Media, Inc."; stockId:"VMED"}
+ ListElement {name:"Vodafone Group, plc."; stockId:"VOD"}
+ ListElement {name:"Warner Chilcott, Ltd."; stockId:"WCRX"}
+ ListElement {name:"Whole Foods Market, Inc."; stockId:"WFM"}
+ ListElement {name:"Wynn Resorts Ltd."; stockId:"WYNN"}
+ ListElement {name:"Xilinx, Inc."; stockId:"XLNX"}
+ ListElement {name:"Yahoo! Inc."; stockId:"YHOO"}
+}
diff --git a/examples/qtquick/canvas/contents/TitleBar.qml b/examples/qtquick/canvas/contents/TitleBar.qml
new file mode 100644
index 0000000000..28edda2ae7
--- /dev/null
+++ b/examples/qtquick/canvas/contents/TitleBar.qml
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Item {
+ id: titleBar
+ property string title: ""
+
+ BorderImage { source: "images/titlebar.sci"; width: parent.width; height: parent.height + 14; y: -7 }
+
+ Image {
+ id: quitButton
+ anchors.left: parent.left//; anchors.leftMargin: 0
+ anchors.verticalCenter: parent.verticalCenter
+ source: "images/quit.png"
+ MouseArea {
+ anchors.fill: parent
+ onClicked: Qt.quit()
+ }
+ }
+
+ Text {
+ id: categoryText
+ anchors {
+ left: quitButton.right; right: parent.right; //leftMargin: 10; rightMargin: 10
+ verticalCenter: parent.verticalCenter
+ }
+ elide: Text.ElideLeft
+ text: title
+ font.bold: true; font.pointSize: 20; color: "White"; style: Text.Raised; styleColor: "Black"
+ }
+}
diff --git a/examples/qtquick/canvas/contents/ToolBar.qml b/examples/qtquick/canvas/contents/ToolBar.qml
new file mode 100644
index 0000000000..7ae7391ddf
--- /dev/null
+++ b/examples/qtquick/canvas/contents/ToolBar.qml
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+import QtQuick 2.0
+
+Item {
+ id: toolbar
+
+ property variant labels
+ signal buttonClicked(int index)
+
+ BorderImage {
+ source: "images/titlebar.sci"
+ width: parent.width
+ height: parent.height + 14
+ y: -7
+ }
+
+ Row {
+ y: 3
+ anchors.horizontalCenter: parent.horizontalCenter
+ Repeater {
+ model: toolbar.labels
+ delegate:
+ Button {
+ text: modelData
+ onClicked: toolbar.buttonClicked(model.index)
+ }
+ }
+ }
+
+}
diff --git a/examples/qtquick/canvas/contents/images/button-pressed.png b/examples/qtquick/canvas/contents/images/button-pressed.png
new file mode 100644
index 0000000000..e434d327f2
--- /dev/null
+++ b/examples/qtquick/canvas/contents/images/button-pressed.png
Binary files differ
diff --git a/examples/qtquick/canvas/contents/images/button.png b/examples/qtquick/canvas/contents/images/button.png
new file mode 100644
index 0000000000..56a63ce641
--- /dev/null
+++ b/examples/qtquick/canvas/contents/images/button.png
Binary files differ
diff --git a/examples/qtquick/canvas/contents/images/default.svg b/examples/qtquick/canvas/contents/images/default.svg
new file mode 100644
index 0000000000..248199cc4e
--- /dev/null
+++ b/examples/qtquick/canvas/contents/images/default.svg
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="48px" height="48px" id="svg1306">
+ <defs id="defs1308">
+ <linearGradient id="linearGradient4083">
+ <stop id="stop4085" offset="0" stop-color="#ffffff" stop-opacity="0"/>
+ <stop offset="0.75" id="stop4089" stop-color="#ffffff" stop-opacity="0"/>
+ <stop id="stop4087" offset="1" stop-color="#ffffff" stop-opacity="1"/>
+ </linearGradient>
+ <linearGradient id="linearGradient4032">
+ <stop id="stop4034" offset="0" stop-color="#fff7c2" stop-opacity="0.63829786"/>
+ <stop offset="0.59394139" id="stop4036" stop-color="#fcaf3e" stop-opacity="0.18348624"/>
+ <stop id="stop4038" offset="0.83850551" stop-color="#fcaf3e" stop-opacity="0.50458717"/>
+ <stop id="stop4040" offset="1" stop-color="#fcaf3e" stop-opacity="1"/>
+ </linearGradient>
+ <linearGradient id="linearGradient4026">
+ <stop id="stop4028" offset="0" stop-color="#fff9c6" stop-opacity="1"/>
+ <stop offset="0.54166669" id="stop4042" stop-color="#fff28c" stop-opacity="1"/>
+ <stop id="stop4030" offset="1" stop-color="#ffea85" stop-opacity="1"/>
+ </linearGradient>
+ <linearGradient xlink:href="#linearGradient4026" id="linearGradient3168" gradientUnits="userSpaceOnUse" x1="-28.968945" y1="-25.326815" x2="-37.19698" y2="-9.5590506"/>
+ <radialGradient xlink:href="#linearGradient4032" id="radialGradient4020" cx="-33.519073" cy="-22.113297" fx="-33.519073" fy="-22.113297" r="9.5" gradientUnits="userSpaceOnUse" gradientTransform="matrix(0.487739,1.292402,-1.10267,0.497242,-41.77393,32.41492)"/>
+ <radialGradient xlink:href="#linearGradient4083" id="radialGradient4081" cx="23.99999" cy="23.381506" fx="23.99999" fy="23.381506" r="19.141981" gradientTransform="matrix(1.006701,2.235326e-16,-2.23715e-16,1.007522,-0.160816,0.426981)" gradientUnits="userSpaceOnUse"/>
+ </defs>
+
+ <metadata id="metadata1311">
+ <rdf:RDF>
+ <cc:Work rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
+ <dc:title>weather-clear</dc:title>
+ <dc:date>January 2006</dc:date>
+ <dc:creator>
+ <cc:Agent>
+ <dc:title>Ryan Collier (pseudo)</dc:title>
+ </cc:Agent>
+ </dc:creator>
+ <dc:publisher>
+ <cc:Agent>
+ <dc:title>http://www.tango-project.org</dc:title>
+ </cc:Agent>
+ </dc:publisher>
+ <dc:source>http://www.pseudocode.org</dc:source>
+ <dc:subject>
+ <rdf:Bag>
+ <rdf:li>weather</rdf:li>
+ <rdf:li>applet</rdf:li>
+ <rdf:li>notification</rdf:li>
+ </rdf:Bag>
+ </dc:subject>
+ <cc:license rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/"/>
+ <dc:contributor>
+ <cc:Agent>
+ <dc:title>Garrett LeSage</dc:title>
+ </cc:Agent>
+ </dc:contributor>
+ </cc:Work>
+ <cc:License rdf:about="http://creativecommons.org/licenses/by-sa/2.0/">
+ <cc:permits rdf:resource="http://web.resource.org/cc/Reproduction"/>
+ <cc:permits rdf:resource="http://web.resource.org/cc/Distribution"/>
+ <cc:requires rdf:resource="http://web.resource.org/cc/Notice"/>
+ <cc:requires rdf:resource="http://web.resource.org/cc/Attribution"/>
+ <cc:permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/>
+ <cc:requires rdf:resource="http://web.resource.org/cc/ShareAlike"/>
+ </cc:License>
+ </rdf:RDF>
+ </metadata>
+ <g id="layer1">
+ <g>
+ <g opacity="0.7">
+ <path d="M 24 2.5 L 21.625 9.1875 C 22.399034 9.0641318 23.191406 9 24 9 C 24.808594 9 25.600966 9.0641317 26.375 9.1875 L 24 2.5 z M 8.8125 8.78125 L 11.84375 15.21875 C 12.779034 13.928569 13.928569 12.779034 15.21875 11.84375 L 8.8125 8.78125 z M 39.21875 8.78125 L 32.78125 11.84375 C 34.071431 12.779034 35.220966 13.928569 36.15625 15.21875 L 39.21875 8.78125 z M 9.1875 21.59375 L 2.5 23.96875 L 9.1875 26.34375 C 9.0673373 25.57952 9 24.797813 9 24 C 9 23.180625 9.0608858 22.377571 9.1875 21.59375 z M 38.8125 21.625 C 38.935868 22.399034 39 23.191406 39 24 C 39 24.808594 38.935868 25.600966 38.8125 26.375 L 45.5 24 L 38.8125 21.625 z M 11.84375 32.78125 L 8.8125 39.1875 L 15.21875 36.15625 C 13.928569 35.220966 12.779034 34.071431 11.84375 32.78125 z M 36.15625 32.78125 C 35.229789 34.05926 34.087617 35.194799 32.8125 36.125 L 39.21875 39.1875 L 36.15625 32.78125 z M 21.625 38.8125 L 24 45.5 L 26.375 38.8125 C 25.600966 38.935868 24.808594 39 24 39 C 23.191406 39 22.399034 38.935868 21.625 38.8125 z " fill="#fce94f" fill-opacity="1" stroke="#fcaf3e" stroke-width="0.73732895" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="4" stroke-dasharray="none" stroke-opacity="1"/>
+ <path d="M 24 5.25 L 22.65625 9.0625 C 23.098888 9.0231486 23.547187 9 24 9 C 24.452813 9 24.901112 9.0231486 25.34375 9.0625 L 24 5.25 z M 10.78125 10.75 L 12.5 14.375 C 13.071538 13.694089 13.724004 13.038745 14.40625 12.46875 L 10.78125 10.75 z M 37.25 10.75 L 33.625 12.46875 C 34.304675 13.038189 34.961811 13.695325 35.53125 14.375 L 37.25 10.75 z M 9.0625 22.625 L 5.28125 23.96875 L 9.0625 25.3125 C 9.024981 24.880146 9 24.442031 9 24 C 9 23.536406 9.0212735 23.077908 9.0625 22.625 z M 38.9375 22.65625 C 38.976851 23.098888 39 23.547187 39 24 C 39 24.452813 38.976851 24.901112 38.9375 25.34375 L 42.71875 24 L 38.9375 22.65625 z M 35.53125 33.59375 C 34.958293 34.27954 34.309985 34.957363 33.625 35.53125 L 37.25 37.25 L 35.53125 33.59375 z M 12.5 33.625 L 10.78125 37.21875 L 14.375 35.5 C 13.702932 34.935884 13.064116 34.297068 12.5 33.625 z M 22.65625 38.9375 L 24 42.71875 L 25.34375 38.9375 C 24.901112 38.976851 24.452813 39 24 39 C 23.547187 39 23.098888 38.976851 22.65625 38.9375 z " fill="none" fill-opacity="1" stroke="url(#radialGradient4081)" stroke-width="0.84646249" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="4" stroke-dasharray="none" stroke-opacity="1"/>
+ </g>
+ <g>
+ <g>
+ <path transform="matrix(0.778062,-1.061285,1.061287,0.778062,67.47952,3.641324)" d="M -22.5 -17.5 A 9.5 9.5 0 1 1 -41.5,-17.5 A 9.5 9.5 0 1 1 -22.5 -17.5 z" fill="#ffee54" fill-opacity="1" stroke="#fcaf3e" stroke-width="0.75991178" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="4" stroke-dasharray="none" stroke-opacity="1"/>
+ <path transform="matrix(1.244257,-0.167707,0.216642,1.251844,67.61648,40.527)" d="M -22.5 -17.5 A 9.5 9.5 0 1 1 -41.5,-17.5 A 9.5 9.5 0 1 1 -22.5 -17.5 z" fill="url(#radialGradient4020)" fill-opacity="1" stroke="none" stroke-width="1.01737845" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="4" stroke-dasharray="none" stroke-opacity="1"/>
+ <path transform="matrix(0.715791,-0.976349,0.97635,0.715792,64.00044,5.269544)" d="M -22.5 -17.5 A 9.5 9.5 0 1 1 -41.5,-17.5 A 9.5 9.5 0 1 1 -22.5 -17.5 z" fill="none" fill-opacity="1" stroke="url(#linearGradient3168)" stroke-width="0.82601947" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="4" stroke-dasharray="none" stroke-opacity="1"/>
+ </g>
+ </g>
+ </g>
+ </g>
+</svg>
diff --git a/examples/qtquick/canvas/contents/images/gloss.png b/examples/qtquick/canvas/contents/images/gloss.png
new file mode 100755
index 0000000000..5d370cd93d
--- /dev/null
+++ b/examples/qtquick/canvas/contents/images/gloss.png
Binary files differ
diff --git a/examples/qtquick/canvas/contents/images/lineedit.png b/examples/qtquick/canvas/contents/images/lineedit.png
new file mode 100755
index 0000000000..2cc38dc35b
--- /dev/null
+++ b/examples/qtquick/canvas/contents/images/lineedit.png
Binary files differ
diff --git a/examples/qtquick/canvas/contents/images/lineedit.sci b/examples/qtquick/canvas/contents/images/lineedit.sci
new file mode 100644
index 0000000000..054bff78be
--- /dev/null
+++ b/examples/qtquick/canvas/contents/images/lineedit.sci
@@ -0,0 +1,5 @@
+border.left: 10
+border.top: 10
+border.bottom: 10
+border.right: 10
+source: lineedit.png
diff --git a/examples/qtquick/canvas/contents/images/quit.png b/examples/qtquick/canvas/contents/images/quit.png
new file mode 100755
index 0000000000..5bda1b6e0d
--- /dev/null
+++ b/examples/qtquick/canvas/contents/images/quit.png
Binary files differ
diff --git a/examples/qtquick/canvas/contents/images/stripes.png b/examples/qtquick/canvas/contents/images/stripes.png
new file mode 100755
index 0000000000..9f36727ea4
--- /dev/null
+++ b/examples/qtquick/canvas/contents/images/stripes.png
Binary files differ
diff --git a/examples/qtquick/canvas/contents/images/titlebar.png b/examples/qtquick/canvas/contents/images/titlebar.png
new file mode 100755
index 0000000000..51c90082d0
--- /dev/null
+++ b/examples/qtquick/canvas/contents/images/titlebar.png
Binary files differ
diff --git a/examples/qtquick/canvas/contents/images/titlebar.sci b/examples/qtquick/canvas/contents/images/titlebar.sci
new file mode 100644
index 0000000000..0418d94cd6
--- /dev/null
+++ b/examples/qtquick/canvas/contents/images/titlebar.sci
@@ -0,0 +1,5 @@
+border.left: 10
+border.top: 12
+border.bottom: 12
+border.right: 10
+source: titlebar.png
diff --git a/examples/qtquick/canvas/contents/images/toolbutton.png b/examples/qtquick/canvas/contents/images/toolbutton.png
new file mode 100755
index 0000000000..11310013ee
--- /dev/null
+++ b/examples/qtquick/canvas/contents/images/toolbutton.png
Binary files differ
diff --git a/examples/qtquick/canvas/contents/images/toolbutton.sci b/examples/qtquick/canvas/contents/images/toolbutton.sci
new file mode 100644
index 0000000000..9e4f965307
--- /dev/null
+++ b/examples/qtquick/canvas/contents/images/toolbutton.sci
@@ -0,0 +1,5 @@
+border.left: 15
+border.top: 4
+border.bottom: 4
+border.right: 15
+source: toolbutton.png
diff --git a/examples/qtquick/canvas/contents/qt-logo.png b/examples/qtquick/canvas/contents/qt-logo.png
new file mode 100644
index 0000000000..5ab3a1b0c4
--- /dev/null
+++ b/examples/qtquick/canvas/contents/qt-logo.png
Binary files differ