aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/tutorials/gettingStartedQml/parts/part1
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/tutorials/gettingStartedQml/parts/part1')
-rw-r--r--examples/quick/tutorials/gettingStartedQml/parts/part1/Button.qml97
-rw-r--r--examples/quick/tutorials/gettingStartedQml/parts/part1/EditMenu.qml76
-rw-r--r--examples/quick/tutorials/gettingStartedQml/parts/part1/FileMenu.qml91
-rw-r--r--examples/quick/tutorials/gettingStartedQml/parts/part1/SimpleButton.qml73
-rw-r--r--examples/quick/tutorials/gettingStartedQml/parts/part1/pics/qml-texteditor1_button.pngbin1670 -> 0 bytes
-rw-r--r--examples/quick/tutorials/gettingStartedQml/parts/part1/pics/qml-texteditor1_editmenu.pngbin6177 -> 0 bytes
-rw-r--r--examples/quick/tutorials/gettingStartedQml/parts/part1/pics/qml-texteditor1_filemenu.pngbin6062 -> 0 bytes
-rw-r--r--examples/quick/tutorials/gettingStartedQml/parts/part1/pics/qml-texteditor1_simplebutton.pngbin1055 -> 0 bytes
-rw-r--r--examples/quick/tutorials/gettingStartedQml/parts/part1/qml-texteditor.qmlproject14
9 files changed, 0 insertions, 351 deletions
diff --git a/examples/quick/tutorials/gettingStartedQml/parts/part1/Button.qml b/examples/quick/tutorials/gettingStartedQml/parts/part1/Button.qml
deleted file mode 100644
index 3f362c6066..0000000000
--- a/examples/quick/tutorials/gettingStartedQml/parts/part1/Button.qml
+++ /dev/null
@@ -1,97 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQml module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Rectangle {
-
- //identifier of the item
- id: button
-
- property string label: "button label"
-
- //these properties act as constants, useable outside this QML file
- property int buttonHeight: 75
- property int buttonWidth: 150
-
- //the color highlight when the mouse hovers on the rectangle
- property color onHoverColor: "gold"
- property color borderColor: "white"
-
- //buttonColor is set to the button's main color
- property color buttonColor: "lightblue"
-
- //set appearance properties
- radius: 10
- antialiasing: true
- border{color: "white"; width: 3}
- width: buttonWidth; height: buttonHeight
-
- Text{
- id: buttonLabel
- anchors.centerIn: parent
- text: label
- }
-
- //buttonClick() is callable and a signal handler, onButtonClick is automatically created
- signal buttonClick()
- onButtonClick: {
- console.log(buttonLabel.text + " clicked" )
- }
-
- //define the clickable area to be the whole rectangle
- MouseArea{
- id: buttonMouseArea
- anchors.fill: parent //stretch the area to the parent's dimension
- onClicked: buttonClick()
-
- //if true, then onEntered and onExited called if mouse hovers in the mouse area
- //if false, a button must be clicked to detect the mouse hover
- hoverEnabled: true
-
- //display a border if the mouse hovers on the button mouse area
- onEntered: parent.border.color = onHoverColor
- //remove the border if the mouse exits the button mouse area
- onExited: parent.border.color = borderColor
- }
-
- //change the color of the button when pressed
- color: buttonMouseArea.pressed ? Qt.darker(buttonColor, 1.5) : buttonColor
-}
diff --git a/examples/quick/tutorials/gettingStartedQml/parts/part1/EditMenu.qml b/examples/quick/tutorials/gettingStartedQml/parts/part1/EditMenu.qml
deleted file mode 100644
index 76a13be022..0000000000
--- a/examples/quick/tutorials/gettingStartedQml/parts/part1/EditMenu.qml
+++ /dev/null
@@ -1,76 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQml module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Rectangle {
- id: editMenu
- height: 480; width:1000
- color: "powderblue"
- property string menuName:"Edit"
-
- Rectangle{
- id:actionContainer
- color:"transparent"
- anchors.centerIn: parent
-
- width: parent.width; height: parent.height / 5
- Row{
- anchors.centerIn: parent
- spacing: parent.width/6
- Button{
- id: loadButton
- buttonColor: "lightgrey"
- label: "Cut"
- }
-
- Button{
- buttonColor: "grey"
- id: saveButton
- label: "Paste"
- }
- Button{
- id: exitButton
- label: "Select All"
- buttonColor: "darkgrey"
- }
- }
- }
-}
diff --git a/examples/quick/tutorials/gettingStartedQml/parts/part1/FileMenu.qml b/examples/quick/tutorials/gettingStartedQml/parts/part1/FileMenu.qml
deleted file mode 100644
index 61124eaefc..0000000000
--- a/examples/quick/tutorials/gettingStartedQml/parts/part1/FileMenu.qml
+++ /dev/null
@@ -1,91 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQml module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Rectangle {
- id: fileMenu
-
- //the menuName is accessible from outside this QML file
- property string menuName: "File"
-
- //generous amount of screen space that will allow the buttons to fit
- height: 480; width:1000
-
- color: "#6C646A"
-
- //a sub-rectangle allows the flexibility of setting the row area
- Rectangle{
- id:actionContainer
-
- //make this rectangle invisible
- color:"transparent"
- anchors.centerIn: parent
-
- //the height is a good proportion that creates more space at the top of the row of buttons
- width: parent.width; height: parent.height / 5
-
- Row{
- anchors.centerIn: parent
- spacing: parent.width/6
- Button{
- id: loadButton
- buttonColor: "lightgrey"
- label: "Load"
- }
-
- Button{
- buttonColor: "grey"
- id: saveButton
- label: "Save"
- }
- Button{
- id: exitButton
- label: "Exit"
- buttonColor: "darkgrey"
-
- //exit the application if the exitButton is clicked
- onButtonClick:{
- Qt.quit()
- }
- }
- }
- }
-}
diff --git a/examples/quick/tutorials/gettingStartedQml/parts/part1/SimpleButton.qml b/examples/quick/tutorials/gettingStartedQml/parts/part1/SimpleButton.qml
deleted file mode 100644
index 2cf7f52da5..0000000000
--- a/examples/quick/tutorials/gettingStartedQml/parts/part1/SimpleButton.qml
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the QtQml module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Rectangle {
-
- //identifier of the item
- id: simplebutton
-
- //the rectangle's fill color
- color: "grey"
-
- //dimensions of the button
- width: 150; height: 75
-
- //A text element contains functionalities for creating texts
- Text {
- id: buttonLabel
-
- //center the text inside the parent
- anchors.centerIn: parent
-
- //text property binds to the label displayed on the button
- text: "button label"
- }
-
- //define the clickable area to be the whole rectangle
- MouseArea {
- id: buttonMouseArea
- anchors.fill: parent //anchor all sides of the mouse area to the rectangle's anchors
-
- //onClicked handles valid mouse button clicks
- onClicked: console.log(buttonLabel.text + " clicked" )
- }
-}
diff --git a/examples/quick/tutorials/gettingStartedQml/parts/part1/pics/qml-texteditor1_button.png b/examples/quick/tutorials/gettingStartedQml/parts/part1/pics/qml-texteditor1_button.png
deleted file mode 100644
index aab64bcf39..0000000000
--- a/examples/quick/tutorials/gettingStartedQml/parts/part1/pics/qml-texteditor1_button.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/tutorials/gettingStartedQml/parts/part1/pics/qml-texteditor1_editmenu.png b/examples/quick/tutorials/gettingStartedQml/parts/part1/pics/qml-texteditor1_editmenu.png
deleted file mode 100644
index d3ff66f2fd..0000000000
--- a/examples/quick/tutorials/gettingStartedQml/parts/part1/pics/qml-texteditor1_editmenu.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/tutorials/gettingStartedQml/parts/part1/pics/qml-texteditor1_filemenu.png b/examples/quick/tutorials/gettingStartedQml/parts/part1/pics/qml-texteditor1_filemenu.png
deleted file mode 100644
index f2e2b0d990..0000000000
--- a/examples/quick/tutorials/gettingStartedQml/parts/part1/pics/qml-texteditor1_filemenu.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/tutorials/gettingStartedQml/parts/part1/pics/qml-texteditor1_simplebutton.png b/examples/quick/tutorials/gettingStartedQml/parts/part1/pics/qml-texteditor1_simplebutton.png
deleted file mode 100644
index 21ce50929b..0000000000
--- a/examples/quick/tutorials/gettingStartedQml/parts/part1/pics/qml-texteditor1_simplebutton.png
+++ /dev/null
Binary files differ
diff --git a/examples/quick/tutorials/gettingStartedQml/parts/part1/qml-texteditor.qmlproject b/examples/quick/tutorials/gettingStartedQml/parts/part1/qml-texteditor.qmlproject
deleted file mode 100644
index 2bb4016996..0000000000
--- a/examples/quick/tutorials/gettingStartedQml/parts/part1/qml-texteditor.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: "."
- }
-}