summaryrefslogtreecommitdiff
path: root/examples/declarative/common/imports
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@digia.com>2013-11-18 10:24:19 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-18 11:53:15 +0100
commit02e88e8349b4c516c855f2f373838a29e9d3e1bb (patch)
treed439538d57af42be14e22377d347eebdc3973dae /examples/declarative/common/imports
parent898f292736ced9ae83e7fad2da3006196dfaa8c7 (diff)
downloadqtlocation-02e88e8349b4c516c855f2f373838a29e9d3e1bb.tar.gz
Reorder example dir structure according to Qt convention
Causes undesirable example structure in Qt release package Task-number: QTBUG-34907 Change-Id: I47e2205aa6faef388792146b36cf6ae6cae863da Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'examples/declarative/common/imports')
-rw-r--r--examples/declarative/common/imports/QtLocation/examples/components/BusyIndicator.qml55
-rw-r--r--examples/declarative/common/imports/QtLocation/examples/components/Button.qml107
-rw-r--r--examples/declarative/common/imports/QtLocation/examples/components/Checkbox.qml65
-rw-r--r--examples/declarative/common/imports/QtLocation/examples/components/Fader.qml68
-rw-r--r--examples/declarative/common/imports/QtLocation/examples/components/IconButton.qml81
-rw-r--r--examples/declarative/common/imports/QtLocation/examples/components/Menu.qml166
-rw-r--r--examples/declarative/common/imports/QtLocation/examples/components/Optionbutton.qml80
-rw-r--r--examples/declarative/common/imports/QtLocation/examples/components/Slider.qml123
-rw-r--r--examples/declarative/common/imports/QtLocation/examples/components/TextWithLabel.qml96
-rw-r--r--examples/declarative/common/imports/QtLocation/examples/components/TitleBar.qml87
-rw-r--r--examples/declarative/common/imports/QtLocation/examples/components/style/ButtonStyle.qml49
-rw-r--r--examples/declarative/common/imports/QtLocation/examples/components/style/HMenuItemStyle.qml49
-rw-r--r--examples/declarative/common/imports/QtLocation/examples/components/style/VMenuItemStyle.qml44
-rw-r--r--examples/declarative/common/imports/QtLocation/examples/dialogs/Dialog.qml156
-rw-r--r--examples/declarative/common/imports/QtLocation/examples/dialogs/ErrorDialog.qml58
-rw-r--r--examples/declarative/common/imports/QtLocation/examples/dialogs/InputDialog.qml94
-rw-r--r--examples/declarative/common/imports/QtLocation/examples/qmldir13
17 files changed, 0 insertions, 1391 deletions
diff --git a/examples/declarative/common/imports/QtLocation/examples/components/BusyIndicator.qml b/examples/declarative/common/imports/QtLocation/examples/components/BusyIndicator.qml
deleted file mode 100644
index 188b3d18..00000000
--- a/examples/declarative/common/imports/QtLocation/examples/components/BusyIndicator.qml
+++ /dev/null
@@ -1,55 +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 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 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
-
-Image {
- id: root
-
- source: "../../../../resources/busy.png"
-
- RotationAnimation on rotation {
- loops: Animation.Infinite
- from: 0
- to: 360
- duration: 500
- running: root.visible
- }
-}
diff --git a/examples/declarative/common/imports/QtLocation/examples/components/Button.qml b/examples/declarative/common/imports/QtLocation/examples/components/Button.qml
deleted file mode 100644
index e98f8651..00000000
--- a/examples/declarative/common/imports/QtLocation/examples/components/Button.qml
+++ /dev/null
@@ -1,107 +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 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 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
-import "style"
-
-Item {
- id: container
-
- signal clicked
-
- property alias text: buttonText.text
- property alias color: buttonText.color
- property alias paintedWidth: buttonText.paintedWidth
- property alias paintedHeight: buttonText.paintedHeight
- property bool checked: false
- property bool enabled: true
- property ButtonStyle style: ButtonStyle{}
-
- width: buttonText.width * 1.2
- height: buttonText.height * 1.2
-
- function disable() {
- enabled = false;
- }
-
- function enable() {
- enabled = true;
- }
-
- BorderImage {
- id: buttonImage
- source: container.style.background
- anchors.fill: parent
- }
-
- MouseArea {
- id: mouseRegion
- anchors.fill: buttonImage
- hoverEnabled: false
- onClicked: { container.clicked() }
- }
- Text {
- id: buttonText
- color: checked ? container.style.fontcolor_selected : container.style.fontcolor_normal
- anchors.centerIn: buttonImage; font.bold: true; font.pixelSize: 14
- style: Text.Normal
- anchors.baseline: parent.bottom
- anchors.baselineOffset: -6
- }
-
- states: [
- State {
- name: "Pressed"
- when: mouseRegion.pressed == true
- PropertyChanges { target: buttonImage; source: container.style.pressedBackground }
- },
- State {
- name: "Hovered"
- when: mouseRegion.containsMouse
- PropertyChanges{ target: buttonImage; source: container.style.disabledBackground }
- },
- State {
- name: "Disabled"
- when: !enabled
- PropertyChanges{ target: buttonText; color: "dimgray" }
- PropertyChanges{ target: mouseRegion; enabled: false }
- }
- ]
-}
diff --git a/examples/declarative/common/imports/QtLocation/examples/components/Checkbox.qml b/examples/declarative/common/imports/QtLocation/examples/components/Checkbox.qml
deleted file mode 100644
index d0526797..00000000
--- a/examples/declarative/common/imports/QtLocation/examples/components/Checkbox.qml
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the 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 Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.0
-
-Item {
- id: checkbox
- property bool selected: false
- property alias text: checkboxText.text
- height: checkboxText.height
-
- Row {
- id: checkboxRow
- spacing: 3
- anchors.fill: parent
- Image {
- source: checkbox.selected ? "../../../../resources/checkbox_selected.png" : "../../../../resources/checkbox.png"
- }
- Text {
- id: checkboxText
- font.pixelSize: 14
- color: "#242424"
- }
- }
- MouseArea {
- anchors.fill: parent
- onClicked: { checkbox.selected = !checkbox.selected }
- }
-}
diff --git a/examples/declarative/common/imports/QtLocation/examples/components/Fader.qml b/examples/declarative/common/imports/QtLocation/examples/components/Fader.qml
deleted file mode 100644
index 482bc365..00000000
--- a/examples/declarative/common/imports/QtLocation/examples/components/Fader.qml
+++ /dev/null
@@ -1,68 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the 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 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: fader
- anchors.fill: parent
- opacity: 0.7
- color: "darkgrey"
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- hoverEnabled: false
- }
-
- Component.onCompleted: {
- var globalXY
- var root = parent
-
- if (root != null) {
- while (root.parent) root = root.parent
- width = root.width; height = root.height;
- globalXY = mapFromItem(root, root.x, root.y);
- } else {
- globalXY = mapFromItem(null, 0, 0);
- }
- x = globalXY.x;
- y = globalXY.y;
- }
-}
diff --git a/examples/declarative/common/imports/QtLocation/examples/components/IconButton.qml b/examples/declarative/common/imports/QtLocation/examples/components/IconButton.qml
deleted file mode 100644
index d426203f..00000000
--- a/examples/declarative/common/imports/QtLocation/examples/components/IconButton.qml
+++ /dev/null
@@ -1,81 +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 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 Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Item {
- id: root
-
- property url source
- property url hoveredSource: source
- property url pressedSource: source
-
- signal clicked
-
- width: childrenRect.width
- height: childrenRect.height
-
- Image {
- id: image
-
- source: parent.source
- height: sourceSize.height
-
- MouseArea {
- id: mouseRegion
- hoverEnabled: false
- anchors.fill: parent
- onClicked: root.clicked()
- }
-
- states: [
- State {
- name: "Pressed"
- when: mouseRegion.pressed
- PropertyChanges { target: image; source: pressedSource }
- },
- State {
- name: "Hover"
- when: mouseRegion.containsMouse
- PropertyChanges { target: image; source: hoveredSource }
- }
- ]
- }
-}
diff --git a/examples/declarative/common/imports/QtLocation/examples/components/Menu.qml b/examples/declarative/common/imports/QtLocation/examples/components/Menu.qml
deleted file mode 100644
index 0fed3c4a..00000000
--- a/examples/declarative/common/imports/QtLocation/examples/components/Menu.qml
+++ /dev/null
@@ -1,166 +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 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 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
-
-Grid {
- id: menu
- enabled: opacity > 0 ? true : false
-
- property bool horizontalOrientation: true
- property list <Button> buttons
- width: parent.width
- height: horizontalOrientation ? 40 : ((children.length > 0) ? children[0].height * children.length : 0)
- spacing: 0
- property string exclusiveButton: ""
- property bool exclusive: false
- property bool autoWidth: false
- opacity: 1
- rows: (horizontalOrientation) ? 1 : children.length
- columns: (horizontalOrientation) ? children.length : 1
- signal clicked(string button)
-
- onChildrenChanged: {
- resizeItems()
- }
-
- onExclusiveChanged: {
- if (exclusive){
- if (children.length > 0) exclusiveButton = children[0].text
- }
- else
- exclusiveButton = ""
- }
-
- onExclusiveButtonChanged:{
- if (exclusive) {
- for (var i = 0; i<children.length; i++){
- if (children[i].text == exclusiveButton){
- children[i].checked = true
- break
- }
- }
- }
- }
-
- function addItem(caption) {
- var button, myArray
- if (horizontalOrientation)
- button = Qt.createQmlObject ('import "style"; Button {height: menu.height; onClicked: {menu.itemClicked(text)} style: HMenuItemStyle {}}', menu)
- else
- button = Qt.createQmlObject ('import "style"; Button {height: 35; width: menu.width; onClicked: {menu.itemClicked(text)} style: VMenuItemStyle {}}', menu)
- button.text = caption
-
- myArray = new Array()
- for (var i = 0; i<children.length; i++){
- myArray.push(children[i])
- }
- myArray.push(button)
- children = myArray
-
- return button
- }
-
- function deleteItem(caption){
- var myArray
-
- myArray = new Array()
- for (var i = 0; i<children.length; i++){
- if (children[i].text != caption)
- myArray.push(children[i])
- }
- children = myArray
- }
-
- function clear() {
- children = []
- exclusiveButton = ""
- }
-
- function disableItem(caption){
- for (var i = 0; i<children.length; i++){
- if (children[i].text == caption){
- children[i].disable()
- break
- }
- }
- }
-
- function enableItem(caption){
- for (var i = 0; i<children.length; i++){
- if (children[i].text == caption){
- children[i].enable()
- break
- }
- }
- }
-
- function resizeItems(){
- if (horizontalOrientation) {
- for (var i = 0; i<children.length; i++)
- children[i].width = parent.width/children.length - spacing
- } else if (autoWidth) {
- if (children.length > 0) {
- var maxWidth = children[0].paintedWidth
- for (var i = 1; i<children.length; i++){
- if (children[i].paintedWidth > maxWidth) {
- maxWidth = children[i].paintedWidth
- }
- }
- menu.width = maxWidth + 20
- }
- for (var i = 0; i < children.length; i++)
- children[i].width = menu.width;
- }
- }
-
- function itemClicked(text){
- if (exclusive && text != exclusiveButton) {
- for (var i = 0; i<children.length; i++){
- if (children[i].text == exclusiveButton){
- children[i].checked = false
- break
- }
- }
- exclusiveButton = text
- }
- clicked(text)
- }
-}
diff --git a/examples/declarative/common/imports/QtLocation/examples/components/Optionbutton.qml b/examples/declarative/common/imports/QtLocation/examples/components/Optionbutton.qml
deleted file mode 100644
index 208301da..00000000
--- a/examples/declarative/common/imports/QtLocation/examples/components/Optionbutton.qml
+++ /dev/null
@@ -1,80 +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 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 Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 2.0
-
-Item {
- id: optionbutton
-
- signal clicked
-
- property bool selected: false
- property alias text: optionbuttonText.text
- property bool toggle: false
-
- height: optionbuttonText.height
-
- Row {
- id: optionbuttonRow
- spacing: 3
- anchors.fill: parent
- Image {
- source: optionbutton.selected ? "../../../../resources/option_button_selected.png" : "../../../../resources/option_button.png"
- }
- Text {
- id: optionbuttonText
- font.pixelSize: 14
- color: "#242424"
- }
- }
- MouseArea {
- anchors.fill: parent
- onClicked: {
- if (toggle) {
- if (optionbutton.selected)
- optionbutton.selected = false
- else
- optionbutton.selected = true
- } else {
- optionbutton.selected = true
- }
- optionbutton.clicked()
- }
- }
-}
diff --git a/examples/declarative/common/imports/QtLocation/examples/components/Slider.qml b/examples/declarative/common/imports/QtLocation/examples/components/Slider.qml
deleted file mode 100644
index 1a337425..00000000
--- a/examples/declarative/common/imports/QtLocation/examples/components/Slider.qml
+++ /dev/null
@@ -1,123 +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 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 Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Item {
- id: slider;
- height: 10
- property real value // value is read/write.
- property real minimum: 0
- property real maximum: 1
- property int length: width - handle.width
-
- Rectangle {
- anchors.fill: parent
- border.width: 1;
- border.color: "lightgrey"
- radius: 8
- color: "white"
- opacity: 1
- }
-
- Rectangle {
- anchors.left: parent.left
- anchors.leftMargin: 4
- anchors.top: parent.top
- anchors.topMargin: (parent.height - height)/2
- height: 3
- width: handle.x - x
- color: "#1c94fc"
- }
-
-
- Rectangle {
- id: labelRect
- width: label.width
- height: label.height + 4
- radius: 4
- smooth: true
- color: "white"
- border.color: "lightgrey"
- anchors.bottom: handle.top
- anchors.bottomMargin: 4
- x: Math.max(Math.min(handle.x + (handle.width - width )/2, slider.width - width),0)
- visible: mouseRegion.pressed
- Text{
- id: label
- color: "darkgrey"
- text: slider.value.toFixed(2)
- width: font.pointSize * 3.5
- anchors.horizontalCenter: labelRect.horizontalCenter
- horizontalAlignment: Text.AlignHCenter
- anchors.baseline: parent.bottom
- anchors.baselineOffset: -6
- font.pixelSize: 14
- }
- }
-
- Rectangle {
- id: handle;
- smooth: true
- width: 26;
- y: (slider.height - height)/2;
- x: (slider.value - slider.minimum) * slider.length / (slider.maximum - slider.minimum)
-
- height: width; radius: width/2
- gradient: normalGradient
- border.width: 2
- border.color: "white"
-
- Gradient {
- id: normalGradient
- GradientStop { position: 0.0; color: "#b0b0b0" }
- GradientStop { position: 0.66; color: "#909090" }
- GradientStop { position: 1.0; color: "#545454" }
- }
-
- MouseArea {
- id: mouseRegion
- hoverEnabled: false
- anchors.fill: parent; drag.target: parent
- drag.axis: Drag.XAxis; drag.minimumX: 0; drag.maximumX: slider.length
- onPositionChanged: { slider.value = (slider.maximum - slider.minimum) * handle.x / slider.length + slider.minimum; }
- }
- }
-}
diff --git a/examples/declarative/common/imports/QtLocation/examples/components/TextWithLabel.qml b/examples/declarative/common/imports/QtLocation/examples/components/TextWithLabel.qml
deleted file mode 100644
index 7b4d9aba..00000000
--- a/examples/declarative/common/imports/QtLocation/examples/components/TextWithLabel.qml
+++ /dev/null
@@ -1,96 +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 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 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
-
-Row {
- id: textWithLabel
- height: inputRectangle.height
-
- property alias label: label.text
- property alias text: inputField.text
- property alias labelWidth: label.width
- property alias font: inputField.font
- property alias busy: busyIndicator.visible
-
- Text {
- id: label;
- width:65;
- enabled: textWithLabel.enabled
- color: enabled ? "#242424" : "lightgrey"
- anchors.verticalCenter: parent.verticalCenter
-
- font.pixelSize: 14
- }
-
- Rectangle {
- id: inputRectangle
- width: textWithLabel.width - label.width; height: inputField.font.pixelSize * 1.5
- color: enabled ? "white" : "ghostwhite"
-
- radius: 5
- TextInput {
- id: inputField
- width: parent.width - anchors.leftMargin
- enabled: textWithLabel.enabled
- color: enabled ? "#242424" : "lightgrey"
- horizontalAlignment: Text.AlignLeft
-
- anchors {
- left: parent.left;
- verticalCenter: parent.verticalCenter;
- leftMargin: 5
- }
- font.pixelSize: 14
-
- BusyIndicator {
- id: busyIndicator
- height: parent.height * 0.8
- width: height
- anchors.verticalCenter: parent.verticalCenter
- anchors.rightMargin: parent.height * 0.1
- anchors.topMargin: parent.height * 0.1
- anchors.top: parent.top
- anchors.right: parent.right
- visible: false
- }
- }
- }
-}
diff --git a/examples/declarative/common/imports/QtLocation/examples/components/TitleBar.qml b/examples/declarative/common/imports/QtLocation/examples/components/TitleBar.qml
deleted file mode 100644
index 0e67fd9a..00000000
--- a/examples/declarative/common/imports/QtLocation/examples/components/TitleBar.qml
+++ /dev/null
@@ -1,87 +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 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 Digia Plc and its Subsidiary(-ies) nor the names
-** of its contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.0
-
-Item {
- id: titleBar
-
- property alias text:titleText.text
- property alias hoverEnabled: mouseRegion.hoverEnabled
- property alias font: titleText.font
- signal clicked
-
- BorderImage { source: "../../../../resources/titlebar.sci"; width: parent.width; height: parent.height + 14; y: -7 }
-
- Image {
- id: quitButton
- anchors.right: parent.right; anchors.rightMargin: 10
- anchors.verticalCenter: parent.verticalCenter
- source: "../../../../resources/quit.png"
- MouseArea {
- id: mouseRegion
- hoverEnabled: false
- anchors.fill: parent
- onClicked: { titleBar.clicked(); }
- }
- }
-
- Text {
- id: titleText
- anchors {
- left: parent.left; leftMargin: 10; verticalCenter: parent.verticalCenter
- }
- elide: Text.ElideLeft
- font.bold: true; font.pixelSize: 14; color: "white"; style: Text.Raised; styleColor: "dimgrey"
- }
-
- states: [
- State {
- name: "Pressed"
- when: mouseRegion.pressed
- PropertyChanges { target: quitButton; source: "../../../../resources/quit_pressed.png" }
- },
- State {
- name: "Hover"
- when: mouseRegion.containsMouse
- PropertyChanges { target: quitButton; source: "../../../../resources/quit_hovered.png" }
- }
- ]
-}
diff --git a/examples/declarative/common/imports/QtLocation/examples/components/style/ButtonStyle.qml b/examples/declarative/common/imports/QtLocation/examples/components/style/ButtonStyle.qml
deleted file mode 100644
index d93fee11..00000000
--- a/examples/declarative/common/imports/QtLocation/examples/components/style/ButtonStyle.qml
+++ /dev/null
@@ -1,49 +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 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 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
-
-QtObject {
- id: buttonStyle
- property string background: "../../../../resources/button.png"
- property string pressedBackground: "../../../../resources/button_pressed.png"
- property string disabledBackground: "../../../../resources/button.png"
- property color fontcolor_normal: "white"
- property color fontcolor_selected: "#1c94fc"
-}
diff --git a/examples/declarative/common/imports/QtLocation/examples/components/style/HMenuItemStyle.qml b/examples/declarative/common/imports/QtLocation/examples/components/style/HMenuItemStyle.qml
deleted file mode 100644
index 588fdb39..00000000
--- a/examples/declarative/common/imports/QtLocation/examples/components/style/HMenuItemStyle.qml
+++ /dev/null
@@ -1,49 +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 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 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
-
-ButtonStyle {
- background: "../../../../resources/hmenuItem.png"
- pressedBackground: "../../../../resources/hmenuItem_pressed.png"
- disabledBackground: "../../../../resources/hmenuItem.png"
- fontcolor_normal: "#242424"
- fontcolor_selected: "#1c94fc"
-}
diff --git a/examples/declarative/common/imports/QtLocation/examples/components/style/VMenuItemStyle.qml b/examples/declarative/common/imports/QtLocation/examples/components/style/VMenuItemStyle.qml
deleted file mode 100644
index be7c245d..00000000
--- a/examples/declarative/common/imports/QtLocation/examples/components/style/VMenuItemStyle.qml
+++ /dev/null
@@ -1,44 +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 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 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
-
-HMenuItemStyle {
- background: "../../../../resources/vmenuItem.png"
-}
diff --git a/examples/declarative/common/imports/QtLocation/examples/dialogs/Dialog.qml b/examples/declarative/common/imports/QtLocation/examples/dialogs/Dialog.qml
deleted file mode 100644
index 5ed5cfca..00000000
--- a/examples/declarative/common/imports/QtLocation/examples/dialogs/Dialog.qml
+++ /dev/null
@@ -1,156 +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 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 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
-import "../components"
-
-Item {
- id: dialog
-
- signal goButtonClicked
- signal cancelButtonClicked
- signal clearButtonClicked
-
- property alias title: titleBar.text
-
- property int gap: 10
- property bool showButtons: true
- property Item item
-
- opacity: 0
- anchors.fill: parent
- enabled: opacity > 0 ? true : false
-
- Fader {}
-
- onItemChanged: {
- if (item)
- item.parent = dataRect;
- }
-
- Rectangle {
- id: dialogRectangle
-
- property int maximumDialogHeight: {
- if (dialog.opacity === 0 ||
- (Qt.inputMethod.keyboardRectangle.width === 0 && Qt.inputMethod.keyboardRectangle.height === 0)) {
- return dialog.height;
- } else {
- return dialog.mapFromItem(null, Qt.inputMethod.keyboardRectangle.x, Qt.inputMethod.keyboardRectangle.y).y
- }
- }
- property int maximumContentHeight: maximumDialogHeight - titleBar.height - buttons.height - gap*1.5
-
- color: "#ECECEC"
- opacity: parent.opacity
-
- height: dataRect.height + titleBar.height + buttons.height + gap*1.5
- y: (maximumDialogHeight - height) / 2
- anchors.left: parent.left
- anchors.leftMargin: gap/2
- anchors.right: parent.right
- anchors.rightMargin: gap/2
-
- radius: 5
-
- TitleBar {
- id: titleBar;
-
- height: 40
- anchors.top: parent.top
- anchors.left: parent.left
- anchors.right: parent.right
-
- opacity: 0.9
- onClicked: {
- Qt.inputMethod.hide();
- dialog.cancelButtonClicked();
- }
-
- }
-
- Rectangle {
- id: dataRect
- color: "#ECECEC"
- radius: 5
-
- anchors.top: titleBar.bottom
- anchors.left: dialogRectangle.left
- anchors.right: dialogRectangle.right
- anchors.margins: gap/2
- height: Math.min(dialogRectangle.maximumContentHeight, item ? item.implicitHeight : 0)
-
- Binding {
- target: item
- property: "anchors.fill"
- value: dataRect
- }
- Binding {
- target: item
- property: "anchors.margins"
- value: gap/2
- }
- }
-
- Row {
- id: buttons
- anchors.top: dataRect.bottom
- anchors.topMargin: gap/2
- anchors.horizontalCenter: parent.horizontalCenter
- spacing: gap/3
- height: 32
- visible: showButtons
- Button {
- id: buttonClearAll
- text: "Clear"
- width: 80
- height: parent.height
- onClicked: dialog.clearButtonClicked()
- }
- Button {
- id: buttonGo
- text: "Go!"
- width: 80
- height: parent.height
- onClicked: dialog.goButtonClicked()
- }
- }
- }
-}
diff --git a/examples/declarative/common/imports/QtLocation/examples/dialogs/ErrorDialog.qml b/examples/declarative/common/imports/QtLocation/examples/dialogs/ErrorDialog.qml
deleted file mode 100644
index f2fc5a25..00000000
--- a/examples/declarative/common/imports/QtLocation/examples/dialogs/ErrorDialog.qml
+++ /dev/null
@@ -1,58 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
-** Contact: http://www.qt-project.org/legal
-**
-** This file is part of the 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 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
-
-Dialog {
- id: errorRoot
-
- property string text
- opacity: 0
- showButtons:false
-
- item: Text {
- id: errorText
- text: errorRoot.text
- }
-
- onCancelButtonClicked: {
- opacity = 0;
- }
-}
diff --git a/examples/declarative/common/imports/QtLocation/examples/dialogs/InputDialog.qml b/examples/declarative/common/imports/QtLocation/examples/dialogs/InputDialog.qml
deleted file mode 100644
index a905186e..00000000
--- a/examples/declarative/common/imports/QtLocation/examples/dialogs/InputDialog.qml
+++ /dev/null
@@ -1,94 +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 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 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
-import "../components"
-
-Dialog {
- id: dialog
-
- property alias dialogModel: dialogModel
- property alias length: dialogModel.count
-
- property int listItemHeight: 21
-
- onClearButtonClicked: {
- for (var i = 0; i < length; ++i)
- dialogModel.set(i, { "inputText": "" });
- }
-
- item: ListView {
- id: listview
-
- model: dialogModel
- delegate: listDelegate
- spacing: gap/2
- clip: true
- snapMode: ListView.SnapToItem
- implicitHeight: (listItemHeight + gap/2)*length + gap/2
- interactive: height < implicitHeight
- width: parent.width
- }
-
- function setModel(objects) {
- dialogModel.clear();
- for (var i = 0; i < objects.length; ++i) {
- dialogModel.append({ "labelText": objects[i][0], "inputText": objects[i][1] });
- }
- }
-
- ListModel {
- id: dialogModel
- }
-
- Component {
- id: listDelegate
-
- TextWithLabel {
- id: textWithLabel
- label: labelText
- text: inputText
- width: parent ? parent.width : 0
- labelWidth: 95
-
- onTextChanged: dialogModel.set(index, {"inputText": text})
- }
- }
-}
diff --git a/examples/declarative/common/imports/QtLocation/examples/qmldir b/examples/declarative/common/imports/QtLocation/examples/qmldir
deleted file mode 100644
index 9089f6c0..00000000
--- a/examples/declarative/common/imports/QtLocation/examples/qmldir
+++ /dev/null
@@ -1,13 +0,0 @@
-BusyIndicator 5.0 components/BusyIndicator.qml
-Button 5.0 components/Button.qml
-Checkbox 5.0 components/Checkbox.qml
-Fader 5.0 components/Fader.qml
-IconButton 5.0 components/IconButton.qml
-Menu 5.0 components/Menu.qml
-Optionbutton 5.0 components/Optionbutton.qml
-Slider 5.0 components/Slider.qml
-TextWithLabel 5.0 components/TextWithLabel.qml
-TitleBar 5.0 components/TitleBar.qml
-Dialog 5.0 dialogs/Dialog.qml
-ErrorDialog 5.0 dialogs/ErrorDialog.qml
-InputDialog 5.0 dialogs/InputDialog.qml