From a5d615f5b49b29f91f979b4b338f7febbe445ebf Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Thu, 30 Apr 2015 11:43:44 +0200 Subject: Rewrite 'places' example to use qtquickcontrols This is a squash commit of: * add qtquickcontrols window to 'places' example * add MenuBar to 'places' example * replace Slider in 'places' example * add stackView and MessageForm to 'places' example * replace SearchBox in 'places' example * replace SearchCenter dialog in 'places' example * replace SearchBoundingBox dialog in 'places' example * replace SearchBoundingCircle dialog in 'places' example * tune up categoryDelegate in 'places' example * tune up SearchResultDelegate in 'places' example * tune up PlacesDelegate in 'places' example * replace OptionsDialog in 'places' example * remove 'common' controls from location * clean up filenames in 'places' example * update MapComponent in 'places' example * code style formating of places.qml * remove backgroundRect from 'places' example * tune up EditorialPage in 'places' example * tune up ImageView in 'places' example * tune up ReviewPage in 'places' example * tune up SuggestionView in 'places' example * update imports version numbers in 'places' example * change searchBox and busyIndicator * update design in 'places' example Change-Id: I680c8b88f26689cb9728ee61617f7d2d3aa2a172 Reviewed-by: Alex Blasche --- examples/location/common/common.pri | 37 - examples/location/common/common.qrc | 59 -- .../examples/components/BusyIndicator.qml | 55 -- .../QtLocation/examples/components/Button.qml | 107 --- .../QtLocation/examples/components/Checkbox.qml | 65 -- .../QtLocation/examples/components/Fader.qml | 68 -- .../QtLocation/examples/components/IconButton.qml | 81 --- .../QtLocation/examples/components/Menu.qml | 166 ----- .../examples/components/Optionbutton.qml | 80 --- .../QtLocation/examples/components/Slider.qml | 124 ---- .../examples/components/TextWithLabel.qml | 96 --- .../QtLocation/examples/components/TitleBar.qml | 87 --- .../examples/components/style/ButtonStyle.qml | 49 -- .../examples/components/style/HMenuItemStyle.qml | 49 -- .../examples/components/style/VMenuItemStyle.qml | 44 -- .../imports/QtLocation/examples/dialogs/Dialog.qml | 156 ---- .../QtLocation/examples/dialogs/ErrorDialog.qml | 58 -- .../QtLocation/examples/dialogs/InputDialog.qml | 94 --- .../common/imports/QtLocation/examples/qmldir | 13 - examples/location/common/resources/busy.png | Bin 2921 -> 0 bytes examples/location/common/resources/button.png | Bin 666 -> 0 bytes .../location/common/resources/button_pressed.png | Bin 563 -> 0 bytes examples/location/common/resources/catch.png | Bin 530 -> 0 bytes examples/location/common/resources/categories.png | Bin 255 -> 0 bytes .../common/resources/categories_pressed.png | Bin 255 -> 0 bytes examples/location/common/resources/checkbox.png | Bin 410 -> 0 bytes .../common/resources/checkbox_selected.png | Bin 755 -> 0 bytes examples/location/common/resources/cross.png | Bin 1514 -> 0 bytes .../location/common/resources/cross_hovered.png | Bin 1579 -> 0 bytes .../location/common/resources/cross_pressed.png | Bin 1556 -> 0 bytes examples/location/common/resources/hmenuItem.png | Bin 244 -> 0 bytes .../common/resources/hmenuItem_pressed.png | Bin 600 -> 0 bytes examples/location/common/resources/left.png | Bin 290 -> 0 bytes .../location/common/resources/left_pressed.png | Bin 2860 -> 0 bytes examples/location/common/resources/marker.png | Bin 2341 -> 0 bytes .../location/common/resources/marker_hovered.png | Bin 2358 -> 0 bytes .../location/common/resources/marker_selected.png | Bin 2355 -> 0 bytes examples/location/common/resources/node.png | Bin 432 -> 0 bytes .../location/common/resources/node_selected.png | Bin 458 -> 0 bytes .../location/common/resources/option_button.png | Bin 777 -> 0 bytes .../common/resources/option_button_selected.png | Bin 654 -> 0 bytes examples/location/common/resources/pencil.png | Bin 1276 -> 0 bytes .../location/common/resources/pencil_hovered.png | Bin 1201 -> 0 bytes .../location/common/resources/pencil_pressed.png | Bin 1159 -> 0 bytes examples/location/common/resources/quit.png | Bin 2439 -> 0 bytes .../location/common/resources/quit_hovered.png | Bin 2702 -> 0 bytes .../location/common/resources/quit_pressed.png | Bin 2396 -> 0 bytes examples/location/common/resources/right.png | Bin 302 -> 0 bytes .../location/common/resources/right_pressed.png | Bin 2849 -> 0 bytes examples/location/common/resources/scale.png | Bin 176 -> 0 bytes examples/location/common/resources/scale_end.png | Bin 208 -> 0 bytes examples/location/common/resources/search.png | Bin 442 -> 0 bytes .../location/common/resources/search_pressed.png | Bin 490 -> 0 bytes examples/location/common/resources/star.png | Bin 4204 -> 0 bytes examples/location/common/resources/titlebar.png | Bin 889 -> 0 bytes examples/location/common/resources/titlebar.sci | 5 - examples/location/common/resources/vmenuItem.png | Bin 224 -> 0 bytes .../places/content/places/CategoryDelegate.qml | 106 --- .../places/content/places/CategoryView.qml | 87 --- .../places/content/places/EditorialDelegate.qml | 89 --- .../places/content/places/EditorialPage.qml | 93 --- examples/location/places/content/places/Group.qml | 67 -- .../places/content/places/MapComponent.qml | 237 ------- .../places/content/places/OptionsDialog.qml | 120 ---- .../places/content/places/PlaceDelegate.qml | 209 ------ .../places/content/places/PlaceEditorials.qml | 58 -- .../location/places/content/places/PlaceImages.qml | 149 ---- .../places/content/places/PlaceReviews.qml | 58 -- .../location/places/content/places/PlacesUtils.js | 12 - .../location/places/content/places/RatingView.qml | 55 -- .../places/content/places/ReviewDelegate.qml | 101 --- .../location/places/content/places/ReviewPage.qml | 104 --- .../location/places/content/places/SearchBox.qml | 244 ------- .../places/content/places/SearchResultDelegate.qml | 191 ----- .../places/content/places/SearchResultView.qml | 239 ------- examples/location/places/forms/Message.qml | 58 ++ examples/location/places/forms/MessageForm.ui.qml | 106 +++ examples/location/places/forms/PlaceDetails.qml | 127 ++++ .../location/places/forms/PlaceDetailsForm.ui.qml | 285 ++++++++ .../location/places/forms/SearchBoundingBox.qml | 71 ++ .../places/forms/SearchBoundingBoxForm.ui.qml | 163 +++++ .../location/places/forms/SearchBoundingCircle.qml | 69 ++ .../places/forms/SearchBoundingCircleForm.ui.qml | 151 ++++ examples/location/places/forms/SearchCenter.qml | 70 ++ .../location/places/forms/SearchCenterForm.ui.qml | 140 ++++ examples/location/places/forms/SearchOptions.qml | 78 ++ .../location/places/forms/SearchOptionsForm.ui.qml | 159 +++++ examples/location/places/helper.js | 53 ++ examples/location/places/icon.png | Bin 5312 -> 0 bytes examples/location/places/items/MainMenu.qml | 91 +++ examples/location/places/items/MapComponent.qml | 214 ++++++ examples/location/places/items/SearchBar.qml | 122 ++++ examples/location/places/main.cpp | 108 +++ examples/location/places/places.pro | 68 +- examples/location/places/places.qml | 786 ++++++++++----------- examples/location/places/places.qrc | 42 ++ examples/location/places/placeswrapper.qrc | 23 - examples/location/places/qmlplaceswrapper.cpp | 112 --- examples/location/places/resources/categories.png | Bin 0 -> 255 bytes examples/location/places/resources/left.png | Bin 0 -> 290 bytes examples/location/places/resources/marker.png | Bin 0 -> 1051 bytes examples/location/places/resources/right.png | Bin 0 -> 302 bytes examples/location/places/resources/scale.png | Bin 0 -> 176 bytes examples/location/places/resources/scale_end.png | Bin 0 -> 208 bytes examples/location/places/resources/search.png | Bin 0 -> 442 bytes examples/location/places/resources/star.png | Bin 0 -> 4204 bytes .../location/places/views/CategoryDelegate.qml | 105 +++ examples/location/places/views/CategoryView.qml | 71 ++ .../location/places/views/EditorialDelegate.qml | 86 +++ examples/location/places/views/EditorialPage.qml | 114 +++ examples/location/places/views/EditorialView.qml | 57 ++ examples/location/places/views/ImageView.qml | 151 ++++ examples/location/places/views/RatingView.qml | 55 ++ examples/location/places/views/ReviewDelegate.qml | 98 +++ examples/location/places/views/ReviewPage.qml | 123 ++++ examples/location/places/views/ReviewView.qml | 57 ++ .../location/places/views/SearchResultDelegate.qml | 196 +++++ .../location/places/views/SearchResultView.qml | 91 +++ examples/location/places/views/SuggestionView.qml | 67 ++ 119 files changed, 3775 insertions(+), 4304 deletions(-) delete mode 100644 examples/location/common/common.pri delete mode 100644 examples/location/common/common.qrc delete mode 100644 examples/location/common/imports/QtLocation/examples/components/BusyIndicator.qml delete mode 100644 examples/location/common/imports/QtLocation/examples/components/Button.qml delete mode 100644 examples/location/common/imports/QtLocation/examples/components/Checkbox.qml delete mode 100644 examples/location/common/imports/QtLocation/examples/components/Fader.qml delete mode 100644 examples/location/common/imports/QtLocation/examples/components/IconButton.qml delete mode 100644 examples/location/common/imports/QtLocation/examples/components/Menu.qml delete mode 100644 examples/location/common/imports/QtLocation/examples/components/Optionbutton.qml delete mode 100644 examples/location/common/imports/QtLocation/examples/components/Slider.qml delete mode 100644 examples/location/common/imports/QtLocation/examples/components/TextWithLabel.qml delete mode 100644 examples/location/common/imports/QtLocation/examples/components/TitleBar.qml delete mode 100644 examples/location/common/imports/QtLocation/examples/components/style/ButtonStyle.qml delete mode 100644 examples/location/common/imports/QtLocation/examples/components/style/HMenuItemStyle.qml delete mode 100644 examples/location/common/imports/QtLocation/examples/components/style/VMenuItemStyle.qml delete mode 100644 examples/location/common/imports/QtLocation/examples/dialogs/Dialog.qml delete mode 100644 examples/location/common/imports/QtLocation/examples/dialogs/ErrorDialog.qml delete mode 100644 examples/location/common/imports/QtLocation/examples/dialogs/InputDialog.qml delete mode 100644 examples/location/common/imports/QtLocation/examples/qmldir delete mode 100755 examples/location/common/resources/busy.png delete mode 100644 examples/location/common/resources/button.png delete mode 100644 examples/location/common/resources/button_pressed.png delete mode 100644 examples/location/common/resources/catch.png delete mode 100644 examples/location/common/resources/categories.png delete mode 100644 examples/location/common/resources/categories_pressed.png delete mode 100644 examples/location/common/resources/checkbox.png delete mode 100644 examples/location/common/resources/checkbox_selected.png delete mode 100644 examples/location/common/resources/cross.png delete mode 100644 examples/location/common/resources/cross_hovered.png delete mode 100644 examples/location/common/resources/cross_pressed.png delete mode 100644 examples/location/common/resources/hmenuItem.png delete mode 100644 examples/location/common/resources/hmenuItem_pressed.png delete mode 100644 examples/location/common/resources/left.png delete mode 100644 examples/location/common/resources/left_pressed.png delete mode 100644 examples/location/common/resources/marker.png delete mode 100644 examples/location/common/resources/marker_hovered.png delete mode 100644 examples/location/common/resources/marker_selected.png delete mode 100644 examples/location/common/resources/node.png delete mode 100644 examples/location/common/resources/node_selected.png delete mode 100644 examples/location/common/resources/option_button.png delete mode 100644 examples/location/common/resources/option_button_selected.png delete mode 100644 examples/location/common/resources/pencil.png delete mode 100644 examples/location/common/resources/pencil_hovered.png delete mode 100644 examples/location/common/resources/pencil_pressed.png delete mode 100644 examples/location/common/resources/quit.png delete mode 100644 examples/location/common/resources/quit_hovered.png delete mode 100644 examples/location/common/resources/quit_pressed.png delete mode 100644 examples/location/common/resources/right.png delete mode 100644 examples/location/common/resources/right_pressed.png delete mode 100644 examples/location/common/resources/scale.png delete mode 100644 examples/location/common/resources/scale_end.png delete mode 100644 examples/location/common/resources/search.png delete mode 100644 examples/location/common/resources/search_pressed.png delete mode 100644 examples/location/common/resources/star.png delete mode 100644 examples/location/common/resources/titlebar.png delete mode 100644 examples/location/common/resources/titlebar.sci delete mode 100644 examples/location/common/resources/vmenuItem.png delete mode 100644 examples/location/places/content/places/CategoryDelegate.qml delete mode 100644 examples/location/places/content/places/CategoryView.qml delete mode 100644 examples/location/places/content/places/EditorialDelegate.qml delete mode 100644 examples/location/places/content/places/EditorialPage.qml delete mode 100644 examples/location/places/content/places/Group.qml delete mode 100644 examples/location/places/content/places/MapComponent.qml delete mode 100644 examples/location/places/content/places/OptionsDialog.qml delete mode 100644 examples/location/places/content/places/PlaceDelegate.qml delete mode 100644 examples/location/places/content/places/PlaceEditorials.qml delete mode 100644 examples/location/places/content/places/PlaceImages.qml delete mode 100644 examples/location/places/content/places/PlaceReviews.qml delete mode 100644 examples/location/places/content/places/PlacesUtils.js delete mode 100644 examples/location/places/content/places/RatingView.qml delete mode 100644 examples/location/places/content/places/ReviewDelegate.qml delete mode 100644 examples/location/places/content/places/ReviewPage.qml delete mode 100644 examples/location/places/content/places/SearchBox.qml delete mode 100644 examples/location/places/content/places/SearchResultDelegate.qml delete mode 100644 examples/location/places/content/places/SearchResultView.qml create mode 100644 examples/location/places/forms/Message.qml create mode 100644 examples/location/places/forms/MessageForm.ui.qml create mode 100644 examples/location/places/forms/PlaceDetails.qml create mode 100644 examples/location/places/forms/PlaceDetailsForm.ui.qml create mode 100644 examples/location/places/forms/SearchBoundingBox.qml create mode 100644 examples/location/places/forms/SearchBoundingBoxForm.ui.qml create mode 100644 examples/location/places/forms/SearchBoundingCircle.qml create mode 100644 examples/location/places/forms/SearchBoundingCircleForm.ui.qml create mode 100644 examples/location/places/forms/SearchCenter.qml create mode 100644 examples/location/places/forms/SearchCenterForm.ui.qml create mode 100644 examples/location/places/forms/SearchOptions.qml create mode 100644 examples/location/places/forms/SearchOptionsForm.ui.qml create mode 100644 examples/location/places/helper.js delete mode 100644 examples/location/places/icon.png create mode 100644 examples/location/places/items/MainMenu.qml create mode 100644 examples/location/places/items/MapComponent.qml create mode 100644 examples/location/places/items/SearchBar.qml create mode 100644 examples/location/places/main.cpp create mode 100644 examples/location/places/places.qrc delete mode 100644 examples/location/places/placeswrapper.qrc delete mode 100644 examples/location/places/qmlplaceswrapper.cpp create mode 100644 examples/location/places/resources/categories.png create mode 100644 examples/location/places/resources/left.png create mode 100644 examples/location/places/resources/marker.png create mode 100644 examples/location/places/resources/right.png create mode 100644 examples/location/places/resources/scale.png create mode 100644 examples/location/places/resources/scale_end.png create mode 100644 examples/location/places/resources/search.png create mode 100644 examples/location/places/resources/star.png create mode 100644 examples/location/places/views/CategoryDelegate.qml create mode 100644 examples/location/places/views/CategoryView.qml create mode 100644 examples/location/places/views/EditorialDelegate.qml create mode 100644 examples/location/places/views/EditorialPage.qml create mode 100644 examples/location/places/views/EditorialView.qml create mode 100644 examples/location/places/views/ImageView.qml create mode 100644 examples/location/places/views/RatingView.qml create mode 100644 examples/location/places/views/ReviewDelegate.qml create mode 100644 examples/location/places/views/ReviewPage.qml create mode 100644 examples/location/places/views/ReviewView.qml create mode 100644 examples/location/places/views/SearchResultDelegate.qml create mode 100644 examples/location/places/views/SearchResultView.qml create mode 100644 examples/location/places/views/SuggestionView.qml diff --git a/examples/location/common/common.pri b/examples/location/common/common.pri deleted file mode 100644 index 30ede711..00000000 --- a/examples/location/common/common.pri +++ /dev/null @@ -1,37 +0,0 @@ - -QML_IMPORT_PATH += $$PWD/imports - -RESOURCES += \ - $$PWD/common.qrc - -commonresources.files += $$PWD/resources/* - -qmlcomponents.files += \ - $$PWD/imports/QtLocation/examples/components/TextWithLabel.qml \ - $$PWD/imports/QtLocation/examples/components/Button.qml \ - $$PWD/imports/QtLocation/examples/components/Checkbox.qml \ - $$PWD/imports/QtLocation/examples/components/Fader.qml \ - $$PWD/imports/QtLocation/examples/components/Optionbutton.qml \ - $$PWD/imports/QtLocation/examples/components/Slider.qml \ - $$PWD/imports/QtLocation/examples/components/TitleBar.qml \ - $$PWD/imports/QtLocation/examples/components/ButtonRow.qml \ - $$PWD/imports/QtLocation/examples/components/Menu.qml \ - $$PWD/imports/QtLocation/examples/components/IconButton.qml \ - $$PWD/imports/QtLocation/examples/components/BusyIndicator.qml -OTHER_FILES += $$qmlcomponents.files - -qmlcomponentsstyle.files += \ - $$PWD/imports/QtLocation/examples/components/style/Style.qml \ - $$PWD/imports/QtLocation/examples/components/style/ButtonStyle.qml \ - $$PWD/imports/QtLocation/examples/components/style/HMenuItemStyle.qml \ - $$PWD/imports/QtLocation/examples/components/style/VMenuItemStyle.qml -OTHER_FILES += $$qmlcomponentsstyle.files - -qmldialogs.files += \ - $$PWD/imports/QtLocation/examples/dialogs/Dialog.qml \ - $$PWD/imports/QtLocation/examples/dialogs/InputDialog.qml \ - $$PWD/imports/QtLocation/examples/dialogs/ErrorDialog.qml -OTHER_FILES += $$qmldialogs.files - -qmldir.files += $$PWD/imports/QtLocation/examples/qmldir -OTHER_FILES += $$qmldir.files diff --git a/examples/location/common/common.qrc b/examples/location/common/common.qrc deleted file mode 100644 index bfd79b73..00000000 --- a/examples/location/common/common.qrc +++ /dev/null @@ -1,59 +0,0 @@ - - - imports/QtLocation/examples/qmldir - imports/QtLocation/examples/components/style/ButtonStyle.qml - imports/QtLocation/examples/components/style/HMenuItemStyle.qml - imports/QtLocation/examples/components/style/VMenuItemStyle.qml - imports/QtLocation/examples/components/BusyIndicator.qml - imports/QtLocation/examples/components/Button.qml - imports/QtLocation/examples/components/Checkbox.qml - imports/QtLocation/examples/components/Fader.qml - imports/QtLocation/examples/components/IconButton.qml - imports/QtLocation/examples/components/Menu.qml - imports/QtLocation/examples/components/Optionbutton.qml - imports/QtLocation/examples/components/Slider.qml - imports/QtLocation/examples/components/TextWithLabel.qml - imports/QtLocation/examples/components/TitleBar.qml - imports/QtLocation/examples/dialogs/Dialog.qml - imports/QtLocation/examples/dialogs/InputDialog.qml - imports/QtLocation/examples/dialogs/ErrorDialog.qml - resources/busy.png - resources/button_pressed.png - resources/button.png - resources/catch.png - resources/categories_pressed.png - resources/categories.png - resources/checkbox_selected.png - resources/checkbox.png - resources/cross_hovered.png - resources/cross_pressed.png - resources/cross.png - resources/hmenuItem_pressed.png - resources/hmenuItem.png - resources/left_pressed.png - resources/left.png - resources/marker_hovered.png - resources/marker_selected.png - resources/marker.png - resources/node_selected.png - resources/node.png - resources/option_button_selected.png - resources/option_button.png - resources/pencil_hovered.png - resources/pencil_pressed.png - resources/pencil.png - resources/quit_hovered.png - resources/quit_pressed.png - resources/quit.png - resources/right_pressed.png - resources/right.png - resources/scale_end.png - resources/scale.png - resources/search_pressed.png - resources/search.png - resources/star.png - resources/titlebar.png - resources/titlebar.sci - resources/vmenuItem.png - - diff --git a/examples/location/common/imports/QtLocation/examples/components/BusyIndicator.qml b/examples/location/common/imports/QtLocation/examples/components/BusyIndicator.qml deleted file mode 100644 index 9174290d..00000000 --- a/examples/location/common/imports/QtLocation/examples/components/BusyIndicator.qml +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** 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 The Qt Company Ltd 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/location/common/imports/QtLocation/examples/components/Button.qml b/examples/location/common/imports/QtLocation/examples/components/Button.qml deleted file mode 100644 index b34f66fe..00000000 --- a/examples/location/common/imports/QtLocation/examples/components/Button.qml +++ /dev/null @@ -1,107 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** 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 The Qt Company Ltd 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/location/common/imports/QtLocation/examples/components/Checkbox.qml b/examples/location/common/imports/QtLocation/examples/components/Checkbox.qml deleted file mode 100644 index 6fba11ef..00000000 --- a/examples/location/common/imports/QtLocation/examples/components/Checkbox.qml +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** 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 The Qt Company Ltd 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/location/common/imports/QtLocation/examples/components/Fader.qml b/examples/location/common/imports/QtLocation/examples/components/Fader.qml deleted file mode 100644 index 3babbad7..00000000 --- a/examples/location/common/imports/QtLocation/examples/components/Fader.qml +++ /dev/null @@ -1,68 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** 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 The Qt Company Ltd 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/location/common/imports/QtLocation/examples/components/IconButton.qml b/examples/location/common/imports/QtLocation/examples/components/IconButton.qml deleted file mode 100644 index 91cb17c6..00000000 --- a/examples/location/common/imports/QtLocation/examples/components/IconButton.qml +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** 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 The Qt Company Ltd 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/location/common/imports/QtLocation/examples/components/Menu.qml b/examples/location/common/imports/QtLocation/examples/components/Menu.qml deleted file mode 100644 index 9691dd33..00000000 --- a/examples/location/common/imports/QtLocation/examples/components/Menu.qml +++ /dev/null @@ -1,166 +0,0 @@ -/**************************************************************************** -** -** Copyright (C) 2015 The Qt Company Ltd. -** Contact: http://www.qt.io/licensing/ -** -** 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 The Qt Company Ltd 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