From 94055f5398b01a58624b3dc91f2f04027ec2a4b5 Mon Sep 17 00:00:00 2001 From: zheng_wenlong Date: Thu, 22 Nov 2018 14:39:39 +0900 Subject: add testqt source --- app/forms/Geocode.qml | 81 ---------------- app/forms/GeocodeForm.ui.qml | 173 ----------------------------------- app/forms/Locale.qml | 82 ----------------- app/forms/LocaleForm.ui.qml | 153 ------------------------------- app/forms/Message.qml | 58 ------------ app/forms/MessageForm.ui.qml | 106 --------------------- app/forms/ReverseGeocode.qml | 75 --------------- app/forms/ReverseGeocodeForm.ui.qml | 140 ---------------------------- app/forms/RouteAddress.qml | 136 --------------------------- app/forms/RouteAddressForm.ui.qml | 167 --------------------------------- app/forms/RouteCoordinate.qml | 79 ---------------- app/forms/RouteCoordinateForm.ui.qml | 173 ----------------------------------- app/forms/RouteList.qml | 87 ------------------ app/forms/RouteListDelegate.qml | 82 ----------------- app/forms/RouteListHeader.qml | 84 ----------------- 15 files changed, 1676 deletions(-) delete mode 100644 app/forms/Geocode.qml delete mode 100644 app/forms/GeocodeForm.ui.qml delete mode 100644 app/forms/Locale.qml delete mode 100644 app/forms/LocaleForm.ui.qml delete mode 100644 app/forms/Message.qml delete mode 100644 app/forms/MessageForm.ui.qml delete mode 100644 app/forms/ReverseGeocode.qml delete mode 100644 app/forms/ReverseGeocodeForm.ui.qml delete mode 100644 app/forms/RouteAddress.qml delete mode 100644 app/forms/RouteAddressForm.ui.qml delete mode 100644 app/forms/RouteCoordinate.qml delete mode 100644 app/forms/RouteCoordinateForm.ui.qml delete mode 100644 app/forms/RouteList.qml delete mode 100644 app/forms/RouteListDelegate.qml delete mode 100644 app/forms/RouteListHeader.qml (limited to 'app/forms') diff --git a/app/forms/Geocode.qml b/app/forms/Geocode.qml deleted file mode 100644 index 9e27325..0000000 --- a/app/forms/Geocode.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.5 -import QtPositioning 5.5 - -GeocodeForm { - - property variant address - signal showPlace(variant address) - signal closeForm() - - goButton.onClicked: { - // fill out the Address element - address.street = street.text - address.city = city.text - address.state = state.text - address.country = country.text - address.postalCode = postalCode.text - showPlace(address) - } - - clearButton.onClicked: { - street.text = "" - city.text = "" - state.text = "" - country.text = "" - postalCode.text = "" - } - - cancelButton.onClicked: { - closeForm() - } - - Component.onCompleted: { - street.text = address.street - city.text = address.city - state.text = address.state - country.text = address.country - postalCode.text = address.postalCode - } -} - - diff --git a/app/forms/GeocodeForm.ui.qml b/app/forms/GeocodeForm.ui.qml deleted file mode 100644 index 3ed715a..0000000 --- a/app/forms/GeocodeForm.ui.qml +++ /dev/null @@ -1,173 +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.5 -import QtQuick.Controls 1.4 -import QtQuick.Layouts 1.2 - -Item { - property alias goButton: goButton - property alias clearButton: clearButton - property alias postalCode: postalCode - property alias street: street - property alias city: city - property alias state: state - property alias country: country - property alias cancelButton: cancelButton - Rectangle { - id: tabRectangle - y: 20 - height: tabTitle.height * 2 - color: "#46a2da" - anchors.rightMargin: 0 - anchors.leftMargin: 0 - anchors.left: parent.left - anchors.right: parent.right - - Label { - id: tabTitle - color: "#ffffff" - text: qsTr("Geocode") - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - } - } - - Item { - id: item2 - anchors.rightMargin: 20 - anchors.leftMargin: 20 - anchors.bottomMargin: 20 - anchors.topMargin: 20 - anchors.bottom: parent.bottom - anchors.left: parent.left - anchors.right: parent.right - anchors.top: tabRectangle.bottom - - - GridLayout { - id: gridLayout3 - anchors.rightMargin: 0 - anchors.bottomMargin: 0 - anchors.leftMargin: 0 - anchors.topMargin: 0 - rowSpacing: 10 - rows: 1 - columns: 2 - anchors.fill: parent - - Label { - id: label2 - text: qsTr("Street") - } - - TextField { - id: street - Layout.fillWidth: true - } - - Label { - id: label3 - text: qsTr("City") - } - - TextField { - id: city - Layout.fillWidth: true - } - - Label { - id: label4 - text: qsTr("State") - } - - TextField { - id: state - Layout.fillWidth: true - } - - Label { - id: label5 - text: qsTr("Country") - } - - TextField { - id: country - Layout.fillWidth: true - } - - Label { - id: label6 - text: qsTr("Postal Code") - } - - TextField { - id: postalCode - Layout.fillWidth: true - } - - RowLayout { - id: rowLayout1 - Layout.columnSpan: 2 - Layout.alignment: Qt.AlignRight - - Button { - id: goButton - text: qsTr("Proceed") - } - - Button { - id: clearButton - text: qsTr("Clear") - } - - Button { - id: cancelButton - text: qsTr("Cancel") - } - } - - Item { - Layout.fillHeight: true - Layout.columnSpan: 2 - } - } - } -} diff --git a/app/forms/Locale.qml b/app/forms/Locale.qml deleted file mode 100644 index 6e76c98..0000000 --- a/app/forms/Locale.qml +++ /dev/null @@ -1,82 +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.5 -import QtPositioning 5.5 - -LocaleForm { - property string locale - signal selectLanguage(string language) - signal closeForm() - - goButton.onClicked: { - - if (!languageGroup.current) return - - if (otherRadioButton.checked) { - selectLanguage(language.text) - } else { - selectLanguage(languageGroup.current.text) - } - } - - clearButton.onClicked: { - language.text = "" - } - - cancelButton.onClicked: { - closeForm() - } - - Component.onCompleted: { - switch (locale) { - case "en": - enRadioButton.checked = true; - break - case "fr": - frRadioButton.checked = true; - break - default: - otherRadioButton.checked = true; - language.text = locale - break - } - } -} diff --git a/app/forms/LocaleForm.ui.qml b/app/forms/LocaleForm.ui.qml deleted file mode 100644 index 91a0847..0000000 --- a/app/forms/LocaleForm.ui.qml +++ /dev/null @@ -1,153 +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.5 -import QtQuick.Controls 1.4 -import QtQuick.Layouts 1.2 - -Item { - property alias clearButton: clearButton - property alias goButton: goButton - property alias cancelButton: cancelButton - property alias tabTitle: tabTitle - property alias languageGroup: languageGroup - property alias enRadioButton: enRadioButton - property alias frRadioButton: frRadioButton - property alias otherRadioButton: otherRadioButton - property alias language: language - - Rectangle { - id: tabRectangle - y: 20 - height: tabTitle.height * 2 - color: "#46a2da" - anchors.rightMargin: 0 - anchors.leftMargin: 0 - anchors.left: parent.left - anchors.right: parent.right - - Label { - id: tabTitle - color: "#ffffff" - text: "Locale" - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - } - } - - Item { - id: item2 - anchors.rightMargin: 20 - anchors.leftMargin: 20 - anchors.bottomMargin: 20 - anchors.topMargin: 20 - anchors.bottom: parent.bottom - anchors.left: parent.left - anchors.right: parent.right - anchors.top: tabRectangle.bottom - - GridLayout { - id: gridLayout3 - anchors.rightMargin: 0 - anchors.bottomMargin: 0 - anchors.leftMargin: 0 - anchors.topMargin: 0 - rowSpacing: 10 - rows: 1 - columns: 2 - anchors.fill: parent - - ExclusiveGroup { id: languageGroup } - RadioButton { - id: enRadioButton - text: qsTr("en") - exclusiveGroup: languageGroup - Layout.columnSpan: 2 - } - - RadioButton { - id: frRadioButton - text: qsTr("fr") - exclusiveGroup: languageGroup - Layout.columnSpan: 2 - } - - RadioButton { - id: otherRadioButton - text: qsTr("Other") - exclusiveGroup: languageGroup - } - - TextField { - id: language - Layout.fillWidth: true - placeholderText: qsTr("") - } - - RowLayout { - id: rowLayout1 - Layout.columnSpan: 2 - Layout.alignment: Qt.AlignRight - - Button { - id: goButton - text: qsTr("Proceed") - } - - Button { - id: clearButton - text: qsTr("Clear") - } - - Button { - id: cancelButton - text: qsTr("Cancel") - } - } - - Item { - Layout.fillHeight: true - Layout.columnSpan: 2 - } - - - } - } -} diff --git a/app/forms/Message.qml b/app/forms/Message.qml deleted file mode 100644 index 5d12c1f..0000000 --- a/app/forms/Message.qml +++ /dev/null @@ -1,58 +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.5 - -MessageForm { - property string title - property string message - property variant backPage - - signal closeForm(variant backPage) - - button.onClicked: { - closeForm(backPage) - } - - Component.onCompleted: { - messageText.text = message - messageTitle.text = title - } -} diff --git a/app/forms/MessageForm.ui.qml b/app/forms/MessageForm.ui.qml deleted file mode 100644 index a300841..0000000 --- a/app/forms/MessageForm.ui.qml +++ /dev/null @@ -1,106 +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.5 -import QtQuick.Controls 1.4 -import QtQuick.Layouts 1.2 - -Item { - id: root - property alias messageText: messageText - property alias messageTitle: messageTitle - property alias button: button - - Rectangle { - id: tabRectangle - y: 20 - height: messageTitle.height * 2 - color: "#46a2da" - anchors.rightMargin: 0 - anchors.leftMargin: 0 - anchors.left: parent.left - anchors.right: parent.right - - Label { - id: messageTitle - color: "#ffffff" - text: qsTr("type") - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - } - } - - Item { - anchors.rightMargin: 20 - anchors.leftMargin: 20 - anchors.bottomMargin: 20 - anchors.topMargin: 20 - anchors.bottom: parent.bottom - anchors.left: parent.left - anchors.right: parent.right - anchors.top: tabRectangle.bottom - - ColumnLayout { - id: columnLayout1 - spacing: 20 - anchors.fill: parent - - Label { - id: messageText - text: qsTr("message") - Layout.fillWidth: true - horizontalAlignment: Text.AlignHCenter - wrapMode: Text.WordWrap - textFormat: Text.RichText - } - - Button { - id: button - text: qsTr("OK") - Layout.alignment: Qt.AlignHCenter - } - - Item { - Layout.fillHeight: true - } - } - } -} - diff --git a/app/forms/ReverseGeocode.qml b/app/forms/ReverseGeocode.qml deleted file mode 100644 index 9e3cd65..0000000 --- a/app/forms/ReverseGeocode.qml +++ /dev/null @@ -1,75 +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.5 -import QtPositioning 5.5 - -//Reverse Geocode Dialog -ReverseGeocodeForm { - property string title; - property variant coordinate - signal showPlace(variant coordinate) - signal closeForm() - - goButton.onClicked: { - var coordinate = QtPositioning.coordinate(parseFloat(latitude.text), - parseFloat(longitude.text)); - if (coordinate.isValid) { - showPlace(coordinate) - } - } - - clearButton.onClicked: { - latitude.text = "" - longitude.text = "" - } - - cancelButton.onClicked: { - closeForm() - } - - Component.onCompleted: { - latitude.text = "" + coordinate.latitude - longitude.text = "" + coordinate.longitude - if (title.length != 0) { - tabTitle.text = title; - } - } -} diff --git a/app/forms/ReverseGeocodeForm.ui.qml b/app/forms/ReverseGeocodeForm.ui.qml deleted file mode 100644 index 29eaec9..0000000 --- a/app/forms/ReverseGeocodeForm.ui.qml +++ /dev/null @@ -1,140 +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.5 -import QtQuick.Controls 1.4 -import QtQuick.Layouts 1.2 - -Item { - property alias clearButton: clearButton - property alias goButton: goButton - property alias longitude: longitude - property alias latitude: latitude - property alias cancelButton: cancelButton - property alias tabTitle: tabTitle - Rectangle { - id: tabRectangle - y: 20 - height: tabTitle.height * 2 - color: "#46a2da" - anchors.rightMargin: 0 - anchors.leftMargin: 0 - anchors.left: parent.left - anchors.right: parent.right - - Label { - id: tabTitle - color: "#ffffff" - text: qsTr("Reverse Geocode") - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - } - } - - Item { - id: item2 - anchors.rightMargin: 20 - anchors.leftMargin: 20 - anchors.bottomMargin: 20 - anchors.topMargin: 20 - anchors.bottom: parent.bottom - anchors.left: parent.left - anchors.right: parent.right - anchors.top: tabRectangle.bottom - - GridLayout { - id: gridLayout3 - anchors.rightMargin: 0 - anchors.bottomMargin: 0 - anchors.leftMargin: 0 - anchors.topMargin: 0 - rowSpacing: 10 - rows: 1 - columns: 2 - anchors.fill: parent - - Label { - id: label2 - text: qsTr("Latitude") - } - - TextField { - id: latitude - Layout.fillWidth: true - } - - Label { - id: label3 - text: qsTr("Longitude") - } - - TextField { - id: longitude - Layout.fillWidth: true - placeholderText: qsTr("") - } - - RowLayout { - id: rowLayout1 - Layout.columnSpan: 2 - Layout.alignment: Qt.AlignRight - - Button { - id: goButton - text: qsTr("Proceed") - } - - Button { - id: clearButton - text: qsTr("Clear") - } - - Button { - id: cancelButton - text: qsTr("Cancel") - } - } - Item { - Layout.fillHeight: true - Layout.columnSpan: 2 - } - } - } -} diff --git a/app/forms/RouteAddress.qml b/app/forms/RouteAddress.qml deleted file mode 100644 index b8b8897..0000000 --- a/app/forms/RouteAddress.qml +++ /dev/null @@ -1,136 +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.5 -import QtLocation 5.6 -import QtPositioning 5.5 - -RouteAddressForm { - property alias plugin : tempGeocodeModel.plugin; - property variant toAddress; - property variant fromCoordinate; - signal showMessage(string topic, string message) - signal showRoute(variant startCoordinate,variant endCoordinate) - signal closeForm() - - goButton.onClicked: { - tempGeocodeModel.reset() - toAddress.country = toCountry.text - toAddress.street = toStreet.text - toAddress.city = toCity.text - toAddress.state = toState.text - tempGeocodeModel.startCoordinate = fromCoordinate - tempGeocodeModel.endCoordinate = QtPositioning.coordinate() - tempGeocodeModel.query = fromCoordinate - tempGeocodeModel.update(); - goButton.enabled = false; - } - - clearButton.onClicked: { - toStreet.text = "" - toCity.text = "" - toState.text = "" - toCountry.text = "" - } - - cancelButton.onClicked: { - closeForm() - } - - Component.onCompleted: { - toStreet.text = toAddress.street - toCity.text = toAddress.city - toState.text = toAddress.state - toCountry.text = toAddress.country - } - - GeocodeModel { - id: tempGeocodeModel - - property int success: 0 - property variant startCoordinate - property variant endCoordinate - - onCountChanged: { - if (success == 1 && count == 1) { - query = toAddress - update(); - } - } - - onStatusChanged: { - if ((status == GeocodeModel.Ready) && count >= 1) { - success++ - if (success == 1) { - startCoordinate.latitude = get(0).coordinate.latitude - startCoordinate.longitude = get(0).coordinate.longitude - } - if (success == 2) { - endCoordinate.latitude = get(0).coordinate.latitude - endCoordinate.longitude = get(0).coordinate.longitude - success = 0 - if (startCoordinate.isValid && endCoordinate.isValid) - showRoute(startCoordinate,endCoordinate) - else - goButton.enabled = true - } - } else if ((status == GeocodeModel.Ready) || (status == GeocodeModel.Error)) { - var st = (success == 0 ) ? "start" : "end" - success = 0 - if ((status == GeocodeModel.Ready) && (count == 0 )) { - showMessage(qsTr("Geocode Error"),qsTr("Unsuccessful geocode")); - goButton.enabled = true; - } - else if (status == GeocodeModel.Error) { - showMessage(qsTr("Geocode Error"), - qsTr("Unable to find location for the") + " " + - st + " " +qsTr("point")) - goButton.enabled = true; - } - else if ((status == GeocodeModel.Ready) && (count > 1 )) { - showMessage(qsTr("Ambiguous geocode"), - count + " " + qsTr("results found for the") + - " " + st + " " +qsTr("point, please specify location")) - goButton.enabled = true; - } - } - } - } -} diff --git a/app/forms/RouteAddressForm.ui.qml b/app/forms/RouteAddressForm.ui.qml deleted file mode 100644 index a0ace76..0000000 --- a/app/forms/RouteAddressForm.ui.qml +++ /dev/null @@ -1,167 +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.5 -import QtQuick.Controls 1.4 -import QtQuick.Layouts 1.2 - -Item { - property alias toStreet: toStreet - property alias toCity: toCity - property alias toState: toState - property alias toCountry: toCountry - property alias goButton: goButton - property alias clearButton: clearButton - property alias cancelButton: cancelButton - - Rectangle { - id: tabRectangle - y: 20 - height: tabTitle.height * 2 - color: "#46a2da" - anchors.rightMargin: 0 - anchors.leftMargin: 0 - anchors.left: parent.left - anchors.right: parent.right - - Label { - id: tabTitle - color: "#ffffff" - text: qsTr("Route Address") - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - } - } - - Item { - id: item2 - anchors.rightMargin: 20 - anchors.leftMargin: 20 - anchors.bottomMargin: 20 - anchors.topMargin: 20 - anchors.bottom: parent.bottom - anchors.left: parent.left - anchors.right: parent.right - anchors.top: tabRectangle.bottom - - GridLayout { - id: gridLayout3 - rowSpacing: 10 - rows: 1 - columns: 2 - anchors.fill: parent - - Label { - id: label6 - text: qsTr("To") - font.bold: true - anchors.horizontalCenter: parent.horizontalCenter - Layout.columnSpan: 2 - } - - Label { - id: label4 - text: qsTr("Street") - } - - TextField { - id: toStreet - Layout.fillWidth: true - } - - Label { - id: label5 - text: qsTr("City") - } - - TextField { - id: toCity - Layout.fillWidth: true - } - - Label { - id: label9 - text: qsTr("State") - } - - TextField { - id: toState - Layout.fillWidth: true - } - - Label { - id: label8 - text: qsTr("Country") - } - - TextField { - id: toCountry - Layout.fillWidth: true - } - - RowLayout { - id: rowLayout1 - Layout.columnSpan: 2 - Layout.alignment: Qt.AlignRight - - Button { - id: goButton - text: qsTr("Proceed") - } - - Button { - id: clearButton - text: qsTr("Clear") - } - - Button { - id: cancelButton - text: qsTr("Cancel") - } - } - - Item { - Layout.fillHeight: true - Layout.columnSpan: 2 - } - } - } -} diff --git a/app/forms/RouteCoordinate.qml b/app/forms/RouteCoordinate.qml deleted file mode 100644 index f195ac7..0000000 --- a/app/forms/RouteCoordinate.qml +++ /dev/null @@ -1,79 +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.5 -import QtPositioning 5.5 - -RouteCoordinateForm { - property variant toCoordinate - property variant fromCoordinate - signal showRoute(variant startCoordinate,variant endCoordinate) - signal closeForm() - - goButton.onClicked: { - var startCoordinate = QtPositioning.coordinate(parseFloat(fromLatitude.text), - parseFloat(fromLongitude.text)); - var endCoordinate = QtPositioning.coordinate(parseFloat(toLatitude.text), - parseFloat(toLongitude.text)); - if (startCoordinate.isValid && endCoordinate.isValid) { - goButton.enabled = false; - showRoute(startCoordinate,endCoordinate) - } - } - - clearButton.onClicked: { - fromLatitude.text = "" - fromLongitude.text = "" - toLatitude.text = "" - toLongitude.text = "" - } - - cancelButton.onClicked: { - closeForm() - } - - Component.onCompleted: { - fromLatitude.text = "" + fromCoordinate.latitude - fromLongitude.text = "" + fromCoordinate.longitude - toLatitude.text = "" + toCoordinate.latitude - toLongitude.text = "" + toCoordinate.longitude - } -} - diff --git a/app/forms/RouteCoordinateForm.ui.qml b/app/forms/RouteCoordinateForm.ui.qml deleted file mode 100644 index bd492d3..0000000 --- a/app/forms/RouteCoordinateForm.ui.qml +++ /dev/null @@ -1,173 +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.5 -import QtQuick.Controls 1.4 -import QtQuick.Layouts 1.2 - -Item { - property alias fromLatitude: fromLatitude - property alias fromLongitude: fromLongitude - property alias toLatitude: toLatitude - property alias toLongitude: toLongitude - property alias clearButton: clearButton - property alias goButton: goButton - property alias cancelButton: cancelButton - - Rectangle { - id: tabRectangle - y: 20 - height: tabTitle.height * 2 - color: "#46a2da" - anchors.rightMargin: 0 - anchors.leftMargin: 0 - anchors.left: parent.left - anchors.right: parent.right - - Label { - id: tabTitle - color: "#ffffff" - text: qsTr("Route Coordinates") - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - } - } - - Item { - id: item2 - anchors.rightMargin: 20 - anchors.leftMargin: 20 - anchors.bottomMargin: 20 - anchors.topMargin: 20 - anchors.bottom: parent.bottom - anchors.left: parent.left - anchors.right: parent.right - anchors.top: tabRectangle.bottom - - GridLayout { - id: gridLayout3 - rowSpacing: 10 - rows: 1 - columns: 2 - anchors.fill: parent - - Label { - id: label1 - text: qsTr("From") - anchors.horizontalCenter: parent.horizontalCenter - font.bold: true - Layout.columnSpan : 2 - } - - Label { - id: label2 - text: qsTr("Latitude") - } - - TextField { - id: fromLatitude - Layout.fillWidth: true - } - - Label { - id: label3 - text: qsTr("Longitude") - } - - TextField { - id: fromLongitude - Layout.fillWidth: true - } - - Label { - id: label6 - text: qsTr("To") - anchors.horizontalCenter: parent.horizontalCenter - font.bold: true - Layout.columnSpan: 2 - } - - Label { - id: label4 - text: qsTr("Latitude") - } - - TextField { - id: toLatitude - Layout.fillWidth: true - } - - Label { - id: label5 - text: qsTr("Longitude") - } - - TextField { - id: toLongitude - Layout.fillWidth: true - } - - RowLayout { - id: rowLayout1 - Layout.columnSpan: 2 - Layout.alignment: Qt.AlignRight - Button { - id: goButton - text: qsTr("Proceed") - } - - Button { - id: clearButton - text: qsTr("Clear") - } - - Button { - id: cancelButton - text: qsTr("Cancel") - } - } - Item { - Layout.fillHeight: true - Layout.columnSpan: 2 - } - } - } -} diff --git a/app/forms/RouteList.qml b/app/forms/RouteList.qml deleted file mode 100644 index 27fa572..0000000 --- a/app/forms/RouteList.qml +++ /dev/null @@ -1,87 +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.5 -import QtQuick.Controls 1.4 -import "../helper.js" as Helper - -//! [routeinfomodel0] -ListView { -//! [routeinfomodel0] - property variant routeModel - property string totalTravelTime - property string totalDistance - signal closeForm() -//! [routeinfomodel1] - interactive: true - model: ListModel { id: routeInfoModel } - header: RouteListHeader {} - delegate: RouteListDelegate{ - routeIndex.text: index + 1 - routeInstruction.text: instruction - routeDistance.text: distance - } -//! [routeinfomodel1] - footer: Button { - anchors.horizontalCenter: parent.horizontalCenter - text: qsTr("Close") - onClicked: { - closeForm() - } - } - - Component.onCompleted: { - //! [routeinfomodel2] - routeInfoModel.clear() - if (routeModel.count > 0) { - for (var i = 0; i < routeModel.get(0).segments.length; i++) { - routeInfoModel.append({ - "instruction": routeModel.get(0).segments[i].maneuver.instructionText, - "distance": Helper.formatDistance(routeModel.get(0).segments[i].maneuver.distanceToNextInstruction) - }); - } - } - //! [routeinfomodel2] - totalTravelTime = routeModel.count == 0 ? "" : Helper.formatTime(routeModel.get(0).travelTime) - totalDistance = routeModel.count == 0 ? "" : Helper.formatDistance(routeModel.get(0).distance) - } -//! [routeinfomodel3] -} -//! [routeinfomodel3] diff --git a/app/forms/RouteListDelegate.qml b/app/forms/RouteListDelegate.qml deleted file mode 100644 index 2dc9981..0000000 --- a/app/forms/RouteListDelegate.qml +++ /dev/null @@ -1,82 +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.5 -import QtQuick.Controls 1.4 -import QtQuick.Layouts 1.2 - -Item { - id: root - property bool checked: false - property alias routeInstruction: instructionLabel - property alias routeDistance: distanceLabel - property alias routeIndex: indexLabel - - width: parent.width - height: indexLabel.height * 2 - - RowLayout { - spacing: 10 - anchors.left: parent.left - anchors.leftMargin: 30 - anchors.verticalCenter: parent.verticalCenter - Label { - id: indexLabel - } - Label { - id: instructionLabel - wrapMode: Text.Wrap - } - Label { - id: distanceLabel - } - } - - Rectangle { - anchors.left: parent.left - anchors.right: parent.right - anchors.margins: 15 - height: 1 - color: "#46a2da" - } -} - - - diff --git a/app/forms/RouteListHeader.qml b/app/forms/RouteListHeader.qml deleted file mode 100644 index 383f892..0000000 --- a/app/forms/RouteListHeader.qml +++ /dev/null @@ -1,84 +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.5 -import QtQuick.Controls 1.4 - -Item { - property alias travelTime: travelTimeLabel - property alias distance: distanceLabel - width: parent.width - height: tabTitle.height * 3.0 - - Rectangle { - id: tabRectangle - y: tabTitle.height - height: tabTitle.height * 2 - 1 - color: "#46a2da" - anchors.left: parent.left - anchors.right: parent.right - - Label { - id: tabTitle - color: "#ffffff" - text: qsTr("Route Information") - anchors.verticalCenter: parent.verticalCenter - anchors.horizontalCenter: parent.horizontalCenter - } - - Label { - id: travelTimeLabel - text: totalTravelTime - color: "#ffffff" - font.bold: true - anchors.left: parent.left - anchors.verticalCenter: parent.verticalCenter - } - - Label { - id: distanceLabel - text: totalDistance - color: "#ffffff" - font.bold: true - anchors.right: parent.right - anchors.verticalCenter: parent.verticalCenter - } - } -} -- cgit 1.2.3-korg