From 31bf214d734c6d7ac8773eb97911219825579ae5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Ryyn=C3=A4nen?= Date: Fri, 2 Dec 2016 13:53:22 +0200 Subject: Added IoT SensorTag demo to tradeshow iot-sensortag folder added. This is project originally from consultacy repo, moved to here. It's a cross-platform app that shown multiple data values from TI CC2650 SensorTag. Change-Id: I648464ed9a8253e5069bc6fd59e8b92128b60adc Reviewed-by: Maurice Kalinowski --- .../resources/base/AirPressureChart.qml | 82 ++++++ .../iot-sensortag/resources/base/BaseChart.qml | 119 +++++++++ .../iot-sensortag/resources/base/BottomToolbar.qml | 54 ++++ .../iot-sensortag/resources/base/ChartPage.qml | 70 ++++++ .../iot-sensortag/resources/base/CircularGauge.qml | 132 ++++++++++ .../iot-sensortag/resources/base/GyroChart.qml | 218 ++++++++++++++++ .../iot-sensortag/resources/base/HumidityChart.qml | 159 ++++++++++++ .../iot-sensortag/resources/base/LightChart.qml | 126 ++++++++++ .../iot-sensortag/resources/base/LocationPage.qml | 103 ++++++++ .../resources/base/MagnetometerChart.qml | 226 +++++++++++++++++ .../resources/base/ObjectTemperatureChart.qml | 125 +++++++++ .../iot-sensortag/resources/base/SensorTag.qml | 252 +++++++++++++++++++ .../resources/base/TemperatureChart.qml | 278 +++++++++++++++++++++ .../iot-sensortag/resources/base/TopToolbar.qml | 196 +++++++++++++++ .../base/fonts/titilliumweb/TitilliumWeb-Bold.ttf | Bin 0 -> 59908 bytes .../fonts/titilliumweb/TitilliumWeb-Regular.ttf | Bin 0 -> 63752 bytes .../fonts/titilliumweb/TitilliumWeb-SemiBold.ttf | Bin 0 -> 63044 bytes tradeshow/iot-sensortag/resources/base/main.qml | 72 ++++++ .../iot-sensortag/resources/large/MainLarge.qml | 177 +++++++++++++ .../iot-sensortag/resources/large/StyleLarge.qml | 59 +++++ .../large/images/AirPressure/AirPre_base_gauge.png | Bin 0 -> 32850 bytes .../AmbientTemperature/ambTemp_display_amb.png | Bin 0 -> 7084 bytes .../resources/large/images/General/icon_sensor.png | Bin 0 -> 932 bytes .../resources/large/images/General/separator.png | Bin 0 -> 1269 bytes .../large/images/Humidity/humidity_base_gauge.png | Bin 0 -> 40846 bytes .../large/images/Humidity/humidity_max_hum.png | Bin 0 -> 1855 bytes .../large/images/Humidity/humidity_min_hum.png | Bin 0 -> 1926 bytes .../large/images/Light/light_base_gauge.png | Bin 0 -> 21149 bytes .../large/images/Light/light_brightness.png | Bin 0 -> 11928 bytes .../ObjectTemperature/objTemp_base_circle.png | Bin 0 -> 49793 bytes .../ObjectTemperature/objTemp_display_obj.png | Bin 0 -> 24610 bytes .../iot-sensortag/resources/medium/MainMedium.qml | 177 +++++++++++++ .../iot-sensortag/resources/medium/StyleMedium.qml | 59 +++++ .../images/AirPressure/AirPre_base_gauge.png | Bin 0 -> 23594 bytes .../AmbientTemperature/ambTemp_display_amb.png | Bin 0 -> 4744 bytes .../medium/images/General/icon_sensor.png | Bin 0 -> 691 bytes .../resources/medium/images/General/separator.png | Bin 0 -> 966 bytes .../medium/images/Humidity/humidity_base_gauge.png | Bin 0 -> 29413 bytes .../medium/images/Humidity/humidity_max_hum.png | Bin 0 -> 1356 bytes .../medium/images/Humidity/humidity_min_hum.png | Bin 0 -> 1432 bytes .../medium/images/Light/light_base_gauge.png | Bin 0 -> 15242 bytes .../medium/images/Light/light_brightness.png | Bin 0 -> 8479 bytes .../ObjectTemperature/objTemp_base_circle.png | Bin 0 -> 35320 bytes .../ObjectTemperature/objTemp_display_obj.png | Bin 0 -> 17544 bytes .../iot-sensortag/resources/small/MainSmall.qml | 193 ++++++++++++++ .../iot-sensortag/resources/small/StyleSmall.qml | 59 +++++ .../small/images/AirPressure/AirPre_base_gauge.png | Bin 0 -> 15022 bytes .../AmbientTemperature/ambTemp_display_amb.png | Bin 0 -> 2890 bytes .../resources/small/images/General/icon_sensor.png | Bin 0 -> 489 bytes .../resources/small/images/General/separator.png | Bin 0 -> 662 bytes .../small/images/Humidity/humidity_base_gauge.png | Bin 0 -> 18601 bytes .../small/images/Humidity/humidity_max_hum.png | Bin 0 -> 880 bytes .../small/images/Humidity/humidity_min_hum.png | Bin 0 -> 940 bytes .../small/images/Light/light_base_gauge.png | Bin 0 -> 9677 bytes .../small/images/Light/light_brightness.png | Bin 0 -> 5375 bytes .../ObjectTemperature/objTemp_base_circle.png | Bin 0 -> 21226 bytes .../ObjectTemperature/objTemp_display_obj.png | Bin 0 -> 11591 bytes .../small/images/Toolbar/icon_topbar_cloud.png | Bin 0 -> 535 bytes .../small/images/Toolbar/icon_topbar_sensor.png | Bin 0 -> 586 bytes .../resources/small/images/Toolbar/topbar_all.png | Bin 0 -> 1840 bytes 60 files changed, 2936 insertions(+) create mode 100644 tradeshow/iot-sensortag/resources/base/AirPressureChart.qml create mode 100644 tradeshow/iot-sensortag/resources/base/BaseChart.qml create mode 100644 tradeshow/iot-sensortag/resources/base/BottomToolbar.qml create mode 100644 tradeshow/iot-sensortag/resources/base/ChartPage.qml create mode 100644 tradeshow/iot-sensortag/resources/base/CircularGauge.qml create mode 100644 tradeshow/iot-sensortag/resources/base/GyroChart.qml create mode 100644 tradeshow/iot-sensortag/resources/base/HumidityChart.qml create mode 100644 tradeshow/iot-sensortag/resources/base/LightChart.qml create mode 100644 tradeshow/iot-sensortag/resources/base/LocationPage.qml create mode 100644 tradeshow/iot-sensortag/resources/base/MagnetometerChart.qml create mode 100644 tradeshow/iot-sensortag/resources/base/ObjectTemperatureChart.qml create mode 100644 tradeshow/iot-sensortag/resources/base/SensorTag.qml create mode 100644 tradeshow/iot-sensortag/resources/base/TemperatureChart.qml create mode 100644 tradeshow/iot-sensortag/resources/base/TopToolbar.qml create mode 100755 tradeshow/iot-sensortag/resources/base/fonts/titilliumweb/TitilliumWeb-Bold.ttf create mode 100755 tradeshow/iot-sensortag/resources/base/fonts/titilliumweb/TitilliumWeb-Regular.ttf create mode 100755 tradeshow/iot-sensortag/resources/base/fonts/titilliumweb/TitilliumWeb-SemiBold.ttf create mode 100644 tradeshow/iot-sensortag/resources/base/main.qml create mode 100644 tradeshow/iot-sensortag/resources/large/MainLarge.qml create mode 100644 tradeshow/iot-sensortag/resources/large/StyleLarge.qml create mode 100644 tradeshow/iot-sensortag/resources/large/images/AirPressure/AirPre_base_gauge.png create mode 100644 tradeshow/iot-sensortag/resources/large/images/AmbientTemperature/ambTemp_display_amb.png create mode 100644 tradeshow/iot-sensortag/resources/large/images/General/icon_sensor.png create mode 100644 tradeshow/iot-sensortag/resources/large/images/General/separator.png create mode 100644 tradeshow/iot-sensortag/resources/large/images/Humidity/humidity_base_gauge.png create mode 100644 tradeshow/iot-sensortag/resources/large/images/Humidity/humidity_max_hum.png create mode 100644 tradeshow/iot-sensortag/resources/large/images/Humidity/humidity_min_hum.png create mode 100644 tradeshow/iot-sensortag/resources/large/images/Light/light_base_gauge.png create mode 100644 tradeshow/iot-sensortag/resources/large/images/Light/light_brightness.png create mode 100644 tradeshow/iot-sensortag/resources/large/images/ObjectTemperature/objTemp_base_circle.png create mode 100644 tradeshow/iot-sensortag/resources/large/images/ObjectTemperature/objTemp_display_obj.png create mode 100644 tradeshow/iot-sensortag/resources/medium/MainMedium.qml create mode 100644 tradeshow/iot-sensortag/resources/medium/StyleMedium.qml create mode 100644 tradeshow/iot-sensortag/resources/medium/images/AirPressure/AirPre_base_gauge.png create mode 100644 tradeshow/iot-sensortag/resources/medium/images/AmbientTemperature/ambTemp_display_amb.png create mode 100644 tradeshow/iot-sensortag/resources/medium/images/General/icon_sensor.png create mode 100644 tradeshow/iot-sensortag/resources/medium/images/General/separator.png create mode 100644 tradeshow/iot-sensortag/resources/medium/images/Humidity/humidity_base_gauge.png create mode 100644 tradeshow/iot-sensortag/resources/medium/images/Humidity/humidity_max_hum.png create mode 100644 tradeshow/iot-sensortag/resources/medium/images/Humidity/humidity_min_hum.png create mode 100644 tradeshow/iot-sensortag/resources/medium/images/Light/light_base_gauge.png create mode 100644 tradeshow/iot-sensortag/resources/medium/images/Light/light_brightness.png create mode 100644 tradeshow/iot-sensortag/resources/medium/images/ObjectTemperature/objTemp_base_circle.png create mode 100644 tradeshow/iot-sensortag/resources/medium/images/ObjectTemperature/objTemp_display_obj.png create mode 100644 tradeshow/iot-sensortag/resources/small/MainSmall.qml create mode 100644 tradeshow/iot-sensortag/resources/small/StyleSmall.qml create mode 100644 tradeshow/iot-sensortag/resources/small/images/AirPressure/AirPre_base_gauge.png create mode 100644 tradeshow/iot-sensortag/resources/small/images/AmbientTemperature/ambTemp_display_amb.png create mode 100644 tradeshow/iot-sensortag/resources/small/images/General/icon_sensor.png create mode 100644 tradeshow/iot-sensortag/resources/small/images/General/separator.png create mode 100644 tradeshow/iot-sensortag/resources/small/images/Humidity/humidity_base_gauge.png create mode 100644 tradeshow/iot-sensortag/resources/small/images/Humidity/humidity_max_hum.png create mode 100644 tradeshow/iot-sensortag/resources/small/images/Humidity/humidity_min_hum.png create mode 100644 tradeshow/iot-sensortag/resources/small/images/Light/light_base_gauge.png create mode 100644 tradeshow/iot-sensortag/resources/small/images/Light/light_brightness.png create mode 100644 tradeshow/iot-sensortag/resources/small/images/ObjectTemperature/objTemp_base_circle.png create mode 100644 tradeshow/iot-sensortag/resources/small/images/ObjectTemperature/objTemp_display_obj.png create mode 100644 tradeshow/iot-sensortag/resources/small/images/Toolbar/icon_topbar_cloud.png create mode 100644 tradeshow/iot-sensortag/resources/small/images/Toolbar/icon_topbar_sensor.png create mode 100644 tradeshow/iot-sensortag/resources/small/images/Toolbar/topbar_all.png (limited to 'tradeshow/iot-sensortag/resources') diff --git a/tradeshow/iot-sensortag/resources/base/AirPressureChart.qml b/tradeshow/iot-sensortag/resources/base/AirPressureChart.qml new file mode 100644 index 0000000..df10674 --- /dev/null +++ b/tradeshow/iot-sensortag/resources/base/AirPressureChart.qml @@ -0,0 +1,82 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the examples of Qt for Device Creation. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, 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 SensorTag.DataProvider 1.0 + +BaseChart { + property string airPressureTxt + + antialiasing: true + title: qsTr("Air Pressure") + + onSensorChanged: if (sensor) { + sensor.barometer_hPaChanged.connect(this, function() { airPressureTxt = sensor.barometerHPa.toFixed(1); }); + } + + content: Item { + id: container + + anchors.fill: parent + + Image { + source: pathPrefix + "AirPressure/AirPre_base_gauge.png" + anchors.centerIn: parent + + Text { + id: pressureText + + text: airPressureTxt + "\nhPa" + horizontalAlignment: Text.AlignHCenter + anchors.centerIn: parent + color: "white" + } + } + } +} diff --git a/tradeshow/iot-sensortag/resources/base/BaseChart.qml b/tradeshow/iot-sensortag/resources/base/BaseChart.qml new file mode 100644 index 0000000..d148acf --- /dev/null +++ b/tradeshow/iot-sensortag/resources/base/BaseChart.qml @@ -0,0 +1,119 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the examples of Qt for Device Creation. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, 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 1.0 +import SensorTag.DataProvider 1.0 + +Item { + id: baseChart + + property var sensor: null + property string title + property alias contentItem: loader.item + property alias content: loader.sourceComponent + property bool rightSide: false + property alias titlePaneHeight: titleIcon.height + property bool hasData: baseChart.sensor ? baseChart.sensor.state === SensorTagData.Connected : false + + signal clicked + + Image { + id: titleIcon + + anchors.top: parent.top + source: pathPrefix + "General/icon_sensor.png" + } + + Text { + color: "white" + text: title.toUpperCase() + font.pixelSize: Style.indicatorTitleFontSize + anchors.left: titleIcon.right + anchors.leftMargin: 14 + anchors.top: parent.top + anchors.topMargin: -8 + } + + Loader { + id: loader + + anchors.top: titleIcon.bottom + anchors.bottom: separator.bottom + anchors.bottomMargin: 16 + anchors.left: parent.left + anchors.right: parent.right + } + + Image { + id: separator + + source: pathPrefix + "General/separator.png" + anchors.bottom: parent.bottom + transform: Rotation { + origin.x: separator.width / 2 + origin.y: separator.height / 2 + axis.x: 0 + axis.y: 1 + axis.z: 0 + angle: rightSide ? 180 : 0 + } + } + + MouseArea { + anchors.fill: parent + onClicked: baseChart.clicked() + } + + Rectangle { + anchors.fill: parent + visible: baseChart.sensor ? baseChart.sensor.state !== SensorTagData.Connected : true + opacity: 0.3 + } +} diff --git a/tradeshow/iot-sensortag/resources/base/BottomToolbar.qml b/tradeshow/iot-sensortag/resources/base/BottomToolbar.qml new file mode 100644 index 0000000..1c6f2f1 --- /dev/null +++ b/tradeshow/iot-sensortag/resources/base/BottomToolbar.qml @@ -0,0 +1,54 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the examples of Qt for Device Creation. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, 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 { + +} diff --git a/tradeshow/iot-sensortag/resources/base/ChartPage.qml b/tradeshow/iot-sensortag/resources/base/ChartPage.qml new file mode 100644 index 0000000..8a58246 --- /dev/null +++ b/tradeshow/iot-sensortag/resources/base/ChartPage.qml @@ -0,0 +1,70 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the examples of Qt for Device Creation. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, 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 + +Flickable{ + id: view + + contentWidth: col.width + contentHeight: col.height + + Column { + id: col + width: view.width + + TemperatureChart{} + ObjectTemperatureChart{} + HumidityChart{} + LightChart{} + AirPressureChart{} + MagnetometerChart{} + } +} + diff --git a/tradeshow/iot-sensortag/resources/base/CircularGauge.qml b/tradeshow/iot-sensortag/resources/base/CircularGauge.qml new file mode 100644 index 0000000..5ee5b53 --- /dev/null +++ b/tradeshow/iot-sensortag/resources/base/CircularGauge.qml @@ -0,0 +1,132 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the examples of Qt for Device Creation. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, 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 QtGraphicalEffects 1.0 + +Item { + id: gauge + + property real min: 0 + property real max: 360 + property real value: 20 + property real stepCount: 18 + property bool discreteSteps: true + + property alias background: bgLoader.sourceComponent + property alias foreground: fgLoader.sourceComponent + + property real increment: 360 / stepCount + + function incrementStep() { + if (value < max - increment) + value += increment + } + + function decrementStep() { + if (value > min + increment) + value -= increment; + } + + width: bgLoader.item.width + height: bgLoader.item.height + onValueChanged: maskCanvas.requestPaint() + + Loader { + id: bgLoader + } + + Loader { + id: fgLoader + + visible: false + } + + Item { + id: mask + + property real range: max - min + property real offsetAngle: -77 + property real startAngle: mask.offsetAngle / 360 * Math.PI * 2 + property real angleStep: Math.PI * 2 / stepCount + + width: fgLoader.item.width + height: fgLoader.item.height + visible: false + + Canvas { + id: maskCanvas + + anchors.fill: parent + onPaint: { + var ctx = getContext("2d"); + + // could optimize this by clearing only when decrementing value + ctx.clearRect(0, 0, width, height); + + var endAngle = mask.startAngle + (value - min) / mask.range * Math.PI * 2; + if (discreteSteps) + endAngle = Math.floor(endAngle / mask.angleStep) * mask.angleStep; + ctx.beginPath(); + ctx.arc(Math.floor(width / 2), Math.floor(height / 2), mask.width / 2, mask.startAngle, endAngle); + ctx.lineTo(mask.width / 2, mask.height / 2) + ctx.closePath(); + ctx.fill(); + } + } + } + + OpacityMask { + width: mask.width + height: mask.height + source: fgLoader.item + maskSource: mask + anchors.centerIn: gauge + } +} diff --git a/tradeshow/iot-sensortag/resources/base/GyroChart.qml b/tradeshow/iot-sensortag/resources/base/GyroChart.qml new file mode 100644 index 0000000..681d218 --- /dev/null +++ b/tradeshow/iot-sensortag/resources/base/GyroChart.qml @@ -0,0 +1,218 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the examples of Qt for Device Creation. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, 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 QtCharts 2.1 +import SensorTag.DataProvider 1.0 + +BaseChart { + id: gyroHolderRect + + // Replace with actual gyro properties + property int gyroSeriesIndex: 0 + property int maxGyroReadings: 24 + + readonly property color chartColor: "#15bdff" + readonly property color gridColor: "#005b80" + readonly property string xColor: "#15bdff" + readonly property string yColor: "white" + readonly property string zColor: "fuchsia" + readonly property color textColor: "white" + + onSensorChanged: { + if (sensor) { + sensor.rotationValuesChanged.connect(contentItem.updateRotation); + } + } + + title: qsTr("Gyroscope") + rightSide: true + + content: Item { + anchors.fill: parent + + function updateRotation() { + gyroSeriesX.append(gyroSeriesIndex, sensor.rotationX); + gyroSeriesY.append(gyroSeriesIndex, sensor.rotationY); + gyroSeriesZ.append(gyroSeriesIndex, sensor.rotationZ); + + if (gyroSeriesIndex >= maxGyroReadings) { + gyroSeriesX.remove(gyroSeriesX.at(gyroSeriesIndex-maxGyroReadings)); + gyroSeriesY.remove(gyroSeriesY.at(gyroSeriesIndex-maxGyroReadings)); + gyroSeriesZ.remove(gyroSeriesZ.at(gyroSeriesIndex-maxGyroReadings)); + valueAxisX.min++; + valueAxisX.max++; + } + gyroSeriesIndex++; + } + + ChartView { + id: chartView + + anchors.top: parent.top + anchors.bottom: parent.bottom + anchors.bottomMargin: 8 + anchors.left: parent.left + anchors.leftMargin: -40 + anchors.right: parent.right + anchors.rightMargin: -28 + antialiasing: true + backgroundColor: "transparent" + legend.visible: false + margins.top: 0 + margins.right: 0 + + // Hide the value axis labels; labels are drawn separately. + ValueAxis { + id: valueAxisX + labelsVisible: false + min: 0 + max: maxGyroReadings + 1 + tickCount: 13 + minorTickCount: 1 + color: chartColor + gridLineColor: gridColor + minorGridLineColor: gridColor + } + + ValueAxis { + id: valueAxisY + labelsVisible: false + min: 0 + max: 360 + tickCount: 11 + minorTickCount: 1 + color: chartColor + gridLineColor: gridColor + minorGridLineColor: gridColor + } + + Column { + id: col + + property int step: (valueAxisY.max - valueAxisY.min) / (valueAxisY.tickCount - 1) + + spacing: -7 + + y: chartView.plotArea.y - 10 + x: 30 + + Repeater { + model: valueAxisY.tickCount + + Text { + text: valueAxisY.max - index * col.step + horizontalAlignment: Text.AlignRight + width: 50 + color: textColor + } + } + } + + ScatterSeries { + id: gyroSeriesX + axisX: valueAxisX + axisY: valueAxisY + color: xColor + borderWidth: 0 + markerSize: 6 + name: "Gyro X" + } + ScatterSeries { + id: gyroSeriesY + axisX: valueAxisX + axisY: valueAxisY + color: yColor + borderWidth: 0 + markerSize: 6 + name: "Gyro Y" + } + ScatterSeries { + id: gyroSeriesZ + axisX: valueAxisX + axisY: valueAxisY + color: zColor + borderWidth: 0 + markerSize: 6 + name: "Gyro Z" + } + } + + Row { + id: xLabelRow + anchors.bottom: parent.bottom + anchors.bottomMargin: 28 + anchors.left: parent.left + anchors.leftMargin: chartView.plotArea.x - 40 + anchors.right: parent.right + + Text { + id: xLabel + horizontalAlignment: Text.AlignHCenter + text: "Roll
" + (sensor ? sensor.rotationX : 0) + lineHeight: 0.7 + width: (gyroHolderRect.width - xLabelRow.x) / 3 + } + + Text { + horizontalAlignment: Text.AlignHCenter + text: "Pitch
" + (sensor ? sensor.rotationY : 0) + lineHeight: 0.7 + width: xLabel.width + } + + Text { + horizontalAlignment: Text.AlignHCenter + text: "Yaw
" + (sensor ? sensor.rotationZ : 0) + lineHeight: 0.7 + width: xLabel.width + } + } + } +} diff --git a/tradeshow/iot-sensortag/resources/base/HumidityChart.qml b/tradeshow/iot-sensortag/resources/base/HumidityChart.qml new file mode 100644 index 0000000..0a74a68 --- /dev/null +++ b/tradeshow/iot-sensortag/resources/base/HumidityChart.qml @@ -0,0 +1,159 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the examples of Qt for Device Creation. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, 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 2.0 +import QtQuick.Controls.Styles 1.4 +import QtCharts 2.1 +import SensorTag.DataProvider 1.0 +import QtQuick.Extras 1.4 + +BaseChart { + property int humiditySeriesIndex: 0 + property int maxNumOfHumiReadings: 30 + property real humidityValue: 0 + + antialiasing: true + title: qsTr("Humidity") + + onSensorChanged: if (sensor) { + sensor.relativeHumidityChanged.connect(contentItem.getMaxOchMinHum) + } + + content: Item { + anchors.fill: parent + + property alias humiText: humidityMainText.text + property real maxHumi: 0 + property real minHumi: 1000 + + function getMaxOchMinHum() + { + humidityValue = sensor.relativeHumidity; + contentItem.humiText = humidityValue.toFixed(1) + " %"; + + if (humidityValue > contentItem.maxHumi) + { + contentItem.maxHumi = humidityValue + } + + if (humidityValue < contentItem.minHumi) + { + contentItem.minHumi = humidityValue; + } + } + + Image { + id: humidityMainImg + + source: pathPrefix + "Humidity/humidity_base_gauge.png" + anchors.left: parent.left + anchors.leftMargin: 8 + anchors.bottom: parent.bottom + + Text { + id: humidityMainText + + anchors.centerIn: parent + color: "white" + } + } + + Image { + source: pathPrefix + "Humidity/humidity_min_hum.png" + anchors.left: humidityMainImg.right + anchors.leftMargin: -11 + anchors.bottom: humidityMainImg.bottom + + Text { + anchors.bottom: parent.top + anchors.horizontalCenter: parent.horizontalCenter + anchors.horizontalCenterOffset: -10 + text: "min" + color: "white" + } + + Text{ + anchors.right: parent.right + anchors.rightMargin: 10 + anchors.verticalCenter: parent.verticalCenter + anchors.verticalCenterOffset: 10 + text: minHumi.toFixed(1) + " %" + font.pixelSize: 12 + horizontalAlignment: Text.AlignRight + color: "white" + } + } + + Image { + source: pathPrefix + "Humidity/humidity_max_hum.png" + anchors.left: humidityMainImg.right + anchors.leftMargin: -22 + anchors.top: humidityMainImg.top + + Text { + anchors.top: parent.top + anchors.horizontalCenter: parent.horizontalCenter + anchors.horizontalCenterOffset: -10 + text: "max" + color: "white" + } + + Text{ + anchors.right: parent.right + anchors.rightMargin: 10 + anchors.verticalCenter: parent.verticalCenter + text: maxHumi.toFixed(1) + "%" + font.pixelSize: 14 + horizontalAlignment: Text.AlignRight + color: "white" + } + } + } +} diff --git a/tradeshow/iot-sensortag/resources/base/LightChart.qml b/tradeshow/iot-sensortag/resources/base/LightChart.qml new file mode 100644 index 0000000..34da38a --- /dev/null +++ b/tradeshow/iot-sensortag/resources/base/LightChart.qml @@ -0,0 +1,126 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the examples of Qt for Device Creation. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, 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 SensorTag.DataProvider 1.0 + +BaseChart { + height: view.height * 0.4 + width: view.width + antialiasing: true + title: qsTr("Light Intensity") + rightSide: true + + onSensorChanged: if (sensor) { + sensor.lightIntensityChanged.connect(contentItem.getLightText) + } + + content: Item { + id: container + + anchors.fill: parent + + property alias lightText: lightMainText.text + property alias lightImg: brightnessImg + property real lightValue: 0 + property real maxLightValue: 1 + property real normalizedLightValue: 0 + + function getLightText() + { + lightValue = sensor.lightIntensityLux; + contentItem.lightText = lightValue.toFixed(1); + + if (lightValue > maxLightValue) + { + maxLightValue = lightValue; + } + normalizedLightValue = lightValue / maxLightValue; + lightImg.opacity = normalizedLightValue; + } + + Image { + id: lightMainImg + + source: pathPrefix + "Light/light_base_gauge.png" + anchors.top: parent.top + anchors.topMargin: 16 + anchors.left: container.left + anchors.leftMargin: 12 + + Behavior on opacity { + NumberAnimation { + duration: 500 + } + } + + Text { + id: lightMainText + + anchors.centerIn: parent + color: "white" + } + } + + Image { + id: brightnessImg + + source: pathPrefix + "Light/light_brightness.png" + anchors.left: lightMainImg.right + anchors.leftMargin: 24 + anchors.verticalCenter: lightMainImg.verticalCenter + + Behavior on opacity { + NumberAnimation { + duration: 500 + } + } + } + } +} diff --git a/tradeshow/iot-sensortag/resources/base/LocationPage.qml b/tradeshow/iot-sensortag/resources/base/LocationPage.qml new file mode 100644 index 0000000..e479ce2 --- /dev/null +++ b/tradeshow/iot-sensortag/resources/base/LocationPage.qml @@ -0,0 +1,103 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the examples of Qt for Device Creation. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, 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.6 +import QtPositioning 5.5 +import QtLocation 5.6 + +Rectangle { + id: locationMain + property string location: "Home" + property string address: "Home address" + + Plugin { + id: myPlugin + name: "osm" + //specify plugin parameters as necessary + //PluginParameter {...} + //PluginParameter {...} + //... + } + + GeocodeModel { + id: addressProvider + plugin: myPlugin + autoUpdate: false + onLocationsChanged: { + if (count) + locationMain.address = get(0).address.text; + else + console.log("no matches"); + } + } + + PositionSource { + id: positionProvider + updateInterval: 1000 + active: true + + onPositionChanged: { + var coord = positionProvider.position.coordinate; + addressProvider.query = coord; + addressProvider.update(); + locationMain.location = "Coordinate: N" + coord.latitude + " E" + coord.longitude; + console.log(locationMain.location); + } + } + Column { + anchors.left: parent.left + anchors.top: parent.top + Text { + text: locationMain.location + } + Text { + text: locationMain.address + } + } +} diff --git a/tradeshow/iot-sensortag/resources/base/MagnetometerChart.qml b/tradeshow/iot-sensortag/resources/base/MagnetometerChart.qml new file mode 100644 index 0000000..0f18f87 --- /dev/null +++ b/tradeshow/iot-sensortag/resources/base/MagnetometerChart.qml @@ -0,0 +1,226 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the examples of Qt for Device Creation. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, 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 QtCharts 2.1 +import SensorTag.DataProvider 1.0 + +BaseChart { + id: magnetHolderRect + + property int magneticSeriesIndex: 0 + property int maxNumOfMagnReadings: 24 + + readonly property color chartColor: "#15bdff" + readonly property string xColor: "green" + readonly property string yColor: "purple" + readonly property string zColor: "yellow" + readonly property color textColor: "white" + + onSensorChanged: if (sensor) sensor.magnetometerMicroTChanged.connect(contentItem.updateMagneticGraph) + + title: qsTr("Magnetometer") + rightSide: true + + content: Item { + anchors.fill: parent + + function updateMagneticGraph() + { + magnSeriesX.append(magneticSeriesIndex, sensor.magnetometerMicroT_xAxis); + magnSeriesY.append(magneticSeriesIndex, sensor.magnetometerMicroT_yAxis); + magnSeriesZ.append(magneticSeriesIndex, sensor.magnetometerMicroT_zAxis); + + if (magneticSeriesIndex >= maxNumOfMagnReadings) { + magnSeriesX.remove(magnSeriesX.at(magneticSeriesIndex-maxNumOfMagnReadings)); + magnSeriesY.remove(magnSeriesY.at(magneticSeriesIndex-maxNumOfMagnReadings)); + magnSeriesZ.remove(magnSeriesY.at(magneticSeriesIndex-maxNumOfMagnReadings)); + valueAxisX.min++; + valueAxisX.max++; + } + magneticSeriesIndex++; + } + + Text { + id: historyLabel + text: "MAGNETIC FIELD HISTORY" + color: textColor + anchors.top: parent.top + anchors.topMargin: 16 + anchors.left: parent.left + anchors.leftMargin: chartView.plotArea.x - 40 + } + + ChartView { + id: chartView + + anchors.top: historyLabel.bottom + anchors.topMargin: -26 + anchors.bottom: parent.bottom + anchors.bottomMargin: 8 + anchors.left: parent.left + anchors.leftMargin: -40 + anchors.right: parent.right + anchors.rightMargin: -28 + antialiasing: true + backgroundColor: "transparent" + legend.visible: false + margins.top: 0 + margins.right: 0 + + // Hide the value axis labels; labels are drawn separately. + ValueAxis { + id: valueAxisX + labelsVisible: false + gridVisible: false + min: 0 + max: maxNumOfMagnReadings + 1 + tickCount: 2 + color: chartColor + } + + ValueAxis { + id: valueAxisY + + min: 0 + max: 1000 + color: chartColor + gridLineColor: "darkgray" + labelsVisible: false + tickCount: 11 + } + + Column { + id: col + + property int step: (valueAxisY.max - valueAxisY.min) / (valueAxisY.tickCount - 1) + + spacing: -9 + y: chartView.plotArea.y - 10 + x: 30 + + Repeater { + model: valueAxisY.tickCount + + Text { + text: valueAxisY.max - index * col.step + horizontalAlignment: Text.AlignRight + width: 50 + color: textColor + } + } + } + + SplineSeries { + id: magnSeriesX + axisX: valueAxisX + axisY: valueAxisY + width: 1 + color: xColor + name: "Magnet X" + } + SplineSeries { + id: magnSeriesY + axisX: valueAxisX + axisY: valueAxisY + width: 1 + color: yColor + name: "Magnet Y" + } + SplineSeries { + id: magnSeriesZ + axisX: valueAxisX + axisY: valueAxisY + width: 1 + color: zColor + name: "Magnet Z" + } + } + + Text { + text: "µT" + anchors.top: xLabelRow.top + anchors.right: xLabelRow.left + anchors.rightMargin: 8 + color: textColor + width: 20 + font.pixelSize: 14 + } + + Row { + id: xLabelRow + anchors.bottom: parent.bottom + anchors.bottomMargin: 28 + anchors.left: historyLabel.left + anchors.right: parent.right + + Text { + id: xLabel + horizontalAlignment: Text.AlignHCenter + text: "X
" + (sensor ? sensor.magnetometerMicroT_xAxis : 0) + lineHeight: 0.7 + width: (magnetHolderRect.width - xLabelRow.x) / 3 + } + + Text { + horizontalAlignment: Text.AlignHCenter + text: "Y
" + (sensor ? sensor.magnetometerMicroT_yAxis : 0) + lineHeight: 0.7 + width: xLabel.width + } + + Text { + horizontalAlignment: Text.AlignHCenter + text: "Z
" + (sensor ? sensor.magnetometerMicroT_zAxis : 0) + lineHeight: 0.7 + width: xLabel.width + } + } + } +} diff --git a/tradeshow/iot-sensortag/resources/base/ObjectTemperatureChart.qml b/tradeshow/iot-sensortag/resources/base/ObjectTemperatureChart.qml new file mode 100644 index 0000000..e0e612e --- /dev/null +++ b/tradeshow/iot-sensortag/resources/base/ObjectTemperatureChart.qml @@ -0,0 +1,125 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the examples of Qt for Device Creation. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, 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 SensorTag.DataProvider 1.0 + +BaseChart { + id: objTempHolderRect + + property real minValue: Number.MAX_VALUE + property real maxValue: Number.MIN_VALUE + property real value + + function updateTemps(){ + value = sensor.infraredCelsiusTemperature.toFixed(1); + if (minValue > value) + minValue = value; + if (maxValue < value) + maxValue = value; + } + + title: qsTr("Object Temperature") + + onSensorChanged: if (sensor) { + sensor.infraredCelsiusTemperatureChanged.connect(updateTemps) + } + + content: Item { + id: container + + anchors.fill: parent + + CircularGauge { + id: gauge + + min: 10 + max: 40 + value: objTempHolderRect.value + anchors.centerIn: parent + background: Image { + source: pathPrefix + "ObjectTemperature/objTemp_base_circle.png" + } + foreground: Image { + source: pathPrefix + "ObjectTemperature/objTemp_display_obj.png" + } + } + + Text { + text: (minValue !== Number.MAX_VALUE ? minValue : "--") + "\nLowest" + lineHeight: 0.7 + width: 60 + horizontalAlignment: Text.Center + color: "white" + anchors.bottom: gauge.bottom + anchors.bottomMargin: 24 + anchors.right: gauge.left + anchors.rightMargin: 12 + } + + Text { + text: value + color: "white" + anchors.centerIn: gauge + } + + Text { + text: "Highest\n" + (maxValue !== Number.MIN_VALUE ? maxValue : "--") + lineHeight: 0.8 + width: 60 + horizontalAlignment: Text.Center + color: "white" + anchors.top: gauge.top + anchors.topMargin: 24 + anchors.left: gauge.right + anchors.leftMargin: 12 + } + + } +} diff --git a/tradeshow/iot-sensortag/resources/base/SensorTag.qml b/tradeshow/iot-sensortag/resources/base/SensorTag.qml new file mode 100644 index 0000000..a8d38d5 --- /dev/null +++ b/tradeshow/iot-sensortag/resources/base/SensorTag.qml @@ -0,0 +1,252 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the examples of Qt for Device Creation. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, 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.7 +import Qt3D.Core 2.0 +import Qt3D.Render 2.0 +import Qt3D.Input 2.0 +import Qt3D.Extras 2.0 +import SensorTag.DataProvider 1.0 + +Entity { + id: sceneRoot + + Camera { + id: camera + projectionType: CameraLens.PerspectiveProjection + fieldOfView: 45 + aspectRatio: 16/9 + nearPlane : 0.1 + farPlane : 1000.0 + position: Qt.vector3d( 1.0, 1.0, 1.0 ) + upVector: Qt.vector3d( 1.0, -1.0, 1.0 ) + viewCenter: Qt.vector3d( 0.0, 0.0, 0.0 ) + } + + OrbitCameraController { + camera: camera + } + + components: [ + RenderSettings { + activeFrameGraph: ForwardRenderer { + clearColor: Qt.rgba(0, 0, 0, 1) + camera: camera + } + }, + InputSettings { } + ] + + Mesh { + id: innerTorusMesh + source: "3dModel/innerRing.obj" + } + +// PhongMaterial { +// id: temperatureLightMaterial +// ambient: sensor ? sensor.lightIntensityColor : Qt.rgba(0, 0, 0) +// diffuse: sensor ? sensor.temperatureColor : Qt.rgba(0, 0, 0) +// } + +// TorusMesh { +// id: innerTorusMesh +// radius: 5 +// minorRadius: 1 +// rings: 40 +// slices: 10 +// } + + Transform { + id: innerTorusTransform + rotationX: sensor ? sensor.gyroscopeX_degPerSec : 0 + scale3D: Qt.vector3d(1, 1, 1) +// Behavior on rotationX { +// NumberAnimation { +// easing.type: Easing.Linear +// duration: 1000 +// } +// } + } + + SimpleMaterial { + id: temperatureLightMaterial + + diffuse: "texture/gyroscopeSmall.jpg" + } + +// DiffuseMapMaterial { +// id: temperatureLightMaterial + +// diffuse: "qrc:/resources/base/texture/gyroscope.png" +// ambient: Qt.rgba(1, 1, 1) +// //diffuse: Qt.rgba(1, 1, 1) +// } + +// Entity { +// id: innerTorusEntity + +// components: [ innerTorusMesh, temperatureLightMaterial, innerTorusTransform ] +// } + + + Mesh { + id: middleTorusMesh + source: "3dModel/centerRing.obj" + } + +// TorusMesh { +// id: middleTorusMesh +// radius: 8 +// minorRadius: 1 +// rings: 40 +// slices: 10 +// } + + Transform { + id: middleTorusTransform + rotationY: sensor ? sensor.gyroscopeY_degPerSec : 0 + scale3D: Qt.vector3d(1, 1, 1) +// Behavior on rotationY { +// NumberAnimation { +// easing.type: Easing.Linear +// duration: 1000 +// } +// } + } + +// Entity { +// id: middleTorusEntity + +// components: [ middleTorusMesh,temperatureLightMaterial, middleTorusTransform ] +// } + + Mesh { + id: outerTorusMesh + source: "3dModel/outerRing.obj" + } + +// TorusMesh { +// id: outerTorusMesh +// radius: 11 +// minorRadius: 1 +// rings: 40 +// slices: 10 +// } + + Transform { + id: outerTorusTransform + /* First rotate on X axis, 90-degree rotation over Y will end up with the result we wish to have. */ + rotationX: sensor ? sensor.gyroscopeZ_degPerSec : 0 + rotationY: 90 + scale3D: Qt.vector3d(1, 1, 1) +// Behavior on rotationX { +// NumberAnimation { +// easing.type: Easing.Linear +// duration: 1000 +// } +// } + } + + Entity { + id: outerTorusEntity + + components: [ outerTorusMesh, temperatureLightMaterial, outerTorusTransform ] + + Entity { + id: middleTorusEntity + + components: [ middleTorusMesh,temperatureLightMaterial, middleTorusTransform ] + + Entity { + id: innerTorusEntity + + components: [ innerTorusMesh, temperatureLightMaterial, innerTorusTransform ] + } + } + } + +// TorusMesh { +// id: scaleDiskMesh +// radius: 16 +// minorRadius: 2 +// rings: 40 +// slices: 6 +// } + + Mesh { + id: scaleDiskMesh + + source: "3dModel/center.obj" + } + + Transform { + id: scaleDiskTrasform + /* First rotate on X axis, 90-degree rotation over Y will end up with the result we wish to have. */ + rotationY: 70 + //scale3D: Qt.vector3d(1, 1, 0.1) + } + +// PhongMaterial { +// id: scaleDiskMaterial +// ambient: Qt.rgba(0.2, 0.2, 0.2, 1) +// diffuse: Qt.rgba(1, 1, 1, 1) +// shininess: 0.2 +// } + +// SimpleMaterial { +// id: temperatureLightMaterial + +// diffuse: "texture/gyroscope.png" +// } + + Entity { + id: scaleDiskEntity + components: [ scaleDiskMesh, temperatureLightMaterial, scaleDiskTrasform ] + } +} diff --git a/tradeshow/iot-sensortag/resources/base/TemperatureChart.qml b/tradeshow/iot-sensortag/resources/base/TemperatureChart.qml new file mode 100644 index 0000000..0e0b94c --- /dev/null +++ b/tradeshow/iot-sensortag/resources/base/TemperatureChart.qml @@ -0,0 +1,278 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the examples of Qt for Device Creation. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, 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.7 +import QtCharts 2.1 +import SensorTag.DataProvider 1.0 + +BaseChart { + id: tempHolderRect + + property int temperatureSeriesIndex: 0 + property int maxNumOfTempReadings: 240 + property real minimum: 10 + property real maximum: 40 + + property real minValue: Number.MAX_VALUE + property real maxValue: Number.MIN_VALUE + readonly property real avgValue: (maxValue - minValue) / 2 + property real value + + readonly property color legendColor: "white" + readonly property color chartColor: "#15bdff" + + onSensorChanged: if (sensor) { + sensor.barometerCelsiusTemperatureChanged.connect(contentItem.updateTemperatureGraph) + } + + title: qsTr("Temperature") + + content: Item { + anchors.fill: parent + + function updateTemperatureGraph() { + avgTempSeries.append(temperatureSeriesIndex, sensor.barometerCelsiusTemperature); + + if (temperatureSeriesIndex >= maxNumOfTempReadings) { + avgTempSeries.remove(avgTempSeries.at(temperatureSeriesIndex-maxNumOfTempReadings)); + valueAxisX.min++; + valueAxisX.max++; + } + temperatureSeriesIndex++; + + var value = sensor.barometerCelsiusTemperature; + if (minValue > value) + minValue = value; + if (maxValue < value) + maxValue = value; + } + + Item { + id: valueReading + + anchors.right: parent.right + anchors.top: chartView.top + anchors.topMargin: chartView.plotArea.y - 16 + width: childrenRect.width + height: childrenRect.height + + Text { + id: highValue + + text: "Highest\n" + (maxValue !== Number.MIN_VALUE ? maxValue : "--") + lineHeight: 0.7 + width: 60 + horizontalAlignment: Text.Center + anchors.horizontalCenter: reading.horizontalCenter + color: "white" + } + + Image { + id: reading + + source: pathPrefix + "AmbientTemperature/ambTemp_display_amb.png" + anchors.top: highValue.bottom + anchors.topMargin: 10 + + Text { + anchors.centerIn: parent + text: sensor.barometerCelsiusTemperature + color: "white" + } + } + + Text { + text: (minValue !== Number.MAX_VALUE ? minValue : "--") + "\nLowest" + lineHeight: 0.8 + width: 60 + horizontalAlignment: Text.Center + color: "white" + anchors.top: reading.bottom + anchors.topMargin: 6 + anchors.horizontalCenter: reading.horizontalCenter + } + + Text { + text: "Avg\n" + sensor.barometerTemperatureAverage.toFixed(1) + lineHeight: 0.8 + width: 60 + horizontalAlignment: Text.Center + color: "white" + anchors.left: reading.right + anchors.verticalCenter: reading.verticalCenter + } + } + + ChartView { + id: chartView + + anchors.top: parent.top + anchors.bottom: parent.bottom + anchors.bottomMargin: xLegend.height + 8 + anchors.left: parent.left + anchors.leftMargin: -25 + anchors.right: valueReading.left + anchors.rightMargin: -20 + antialiasing: true + backgroundColor: "transparent" + legend.visible: false + margins.top: 0 + margins.bottom: 0 + margins.left: 0 + + // Hide the value axis labels; labels are drawn separately. + ValueAxis { + id: valueAxisX + + labelsVisible: false + min: 0 + max: maxNumOfTempReadings + 1 + tickCount: 6 + labelsColor: legendColor + color: chartColor + gridLineColor: chartColor + } + + ValueAxis { + id: valueAxisY + + labelsVisible: false + min: minimum + max: maximum + tickCount: 7 + color: chartColor + gridLineColor: chartColor + } + + LineSeries { + id: avgTempSeries + + axisX: valueAxisX + axisY: valueAxisY + color: chartColor + width: 1 + useOpenGL: true + } + + Column { + id: col + property int step: (valueAxisY.max - valueAxisY.min) / (valueAxisY.tickCount - 1) + spacing: (valueAxisY.tickCount - 0.7) / 2 + y: chartView.plotArea.y - 10 + x: 24 + z: 5 + + Repeater { + model: valueAxisY.tickCount + + Text { + text: valueAxisY.max - index * col.step + horizontalAlignment: Text.AlignRight + width: 20 + color: legendColor + font: fontMetrics.font + } + } + } + + Row { + id: xLegend + + x: chartView.plotArea.x + y: chartView.plotArea.y + chartView.plotArea.height + height + 6 + spacing: (chartView.plotArea.width) / (valueAxisX.tickCount - 0.7) + 1 + + Repeater { + model: valueAxisX.tickCount + + // Enclosing Text inside Item allows layouting Text correctly on the axis + Item { + width: 1 + height: 1 + + Text { + id: legendText + + text: index + color: legendColor + anchors.horizontalCenter: parent.horizontalCenter + font: fontMetrics.font + } + } + } + } + + Text { + text: "°C" + anchors.top: parent.top + anchors.topMargin: chartView.plotArea.y - height - 4 + anchors.right: col.right + color: legendColor + font: fontMetrics.font + } + + Text { + text: "h" + anchors.top: xLegend.top + x: chartView.plotArea.x + chartView.plotArea.width + 16 + color: legendColor + font: fontMetrics.font + } + } + } + + // Create TextMetrics to allow easy use of the same font in the ChartView + TextMetrics { + id: fontMetrics + + font.family: "Titillium Web" + font.pixelSize: 14 + text: "m" + } +} diff --git a/tradeshow/iot-sensortag/resources/base/TopToolbar.qml b/tradeshow/iot-sensortag/resources/base/TopToolbar.qml new file mode 100644 index 0000000..f3e7e2b --- /dev/null +++ b/tradeshow/iot-sensortag/resources/base/TopToolbar.qml @@ -0,0 +1,196 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the examples of Qt for Device Creation. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, 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 SensorTag.DataProvider 1.0 +import Style 1.0 + +Item { + id: topToolbar + + height: 100 + width: implicitWidth + + Rectangle { + id: sensorList + + property alias listModelCount: list.count + + width: 200 + height: 200 + x: sensorItem.x + y: parent.height + color: "darkgray" + visible: false + + ListView { + id: list + anchors.fill: parent + model: dataProviderPool.dataProviders + delegate: Text { + text: providerId + color: modelData.state === SensorTagData.Connected ? "blue" : "lightsteelblue" + } + } + } + + Item { + id: cloudItem + height: topToolbar.height + anchors.top: parent.top + anchors.left: parent.left + anchors.leftMargin: 8 + width: icon.width + cloudText.width + 3 * anchors.leftMargin + opacity: dataProviderPool.name === "Cloud" || dataProviderPool.name === "Demo" ? 1.0 : 0.0 + + Image { + id: icon + width: 58 + height: 40 + anchors.top: parent.top + anchors.margins: 8 + source: pathPrefix + "Toolbar/icon_topbar_cloud.png" + } + + Text { + id: cloudText + color: "white" + text: "CLOUD" + width: contentWidth + font.pixelSize: Style.topToolbarSmallFontSize + anchors.verticalCenter: icon.verticalCenter + anchors.left: icon.right + anchors.margins: 8 + } + } + + Item { + id: sensorItem + height: topToolbar.height + anchors.top: parent.top + anchors.left: cloudItem.right + Image { + id: sensorIcon + + width: 40 + height: 40 + anchors.top: parent.top + anchors.margins: 8 + source: pathPrefix + "Toolbar/icon_topbar_sensor.png" + + Text { + anchors.centerIn: parent + text: sensorList.listModelCount + color: "white" + font.pixelSize: Style.topToolbarSmallFontSize + } + } + + Text { + id: sensorButton + + color: "white" + text: "SENSORS" + font.pixelSize: Style.topToolbarSmallFontSize + anchors.verticalCenter: sensorIcon.verticalCenter + anchors.left: sensorIcon.right + anchors.margins: 8 + + MouseArea { + anchors.fill: parent + onClicked: sensorList.visible = !sensorList.visible + } + } + } + + Text { + text: Qt.formatDateTime(new Date, "dddd, MMMM d, yyyy") + color: "white" + anchors.bottom: parent.bottom + anchors.bottomMargin: 16 + anchors.right: timeLabel.left + anchors.rightMargin: 16 + horizontalAlignment: Text.AlignRight + font.pixelSize: Style.topToolbarSmallFontSize + font.capitalization: Font.AllUppercase + } + + Text { + id: timeLabel + text: Qt.formatTime(new Date, "HH:mm") + color: "white" + font.pixelSize: Style.topToolbarLargeFontSize + anchors.horizontalCenter: parent.horizontalCenter + anchors.bottom: parent.bottom + } + + Text { + text: "UTC/GMT" + color: "white" + anchors.left: timeLabel.right + anchors.leftMargin: 16 + anchors.bottom: parent.bottom + anchors.bottomMargin: 16 + font.pixelSize: Style.topToolbarSmallFontSize + Component.onCompleted: { + var date = new Date + var offsetString = -date.getTimezoneOffset() / 60 + if (offsetString < 0) + text = text + "-" + else + text = text + "+" + text = text + offsetString + } + } + + Image { + anchors.bottom: parent.bottom + source: pathPrefix + "Toolbar/topbar_all.png" + } +} diff --git a/tradeshow/iot-sensortag/resources/base/fonts/titilliumweb/TitilliumWeb-Bold.ttf b/tradeshow/iot-sensortag/resources/base/fonts/titilliumweb/TitilliumWeb-Bold.ttf new file mode 100755 index 0000000..0af0fe7 Binary files /dev/null and b/tradeshow/iot-sensortag/resources/base/fonts/titilliumweb/TitilliumWeb-Bold.ttf differ diff --git a/tradeshow/iot-sensortag/resources/base/fonts/titilliumweb/TitilliumWeb-Regular.ttf b/tradeshow/iot-sensortag/resources/base/fonts/titilliumweb/TitilliumWeb-Regular.ttf new file mode 100755 index 0000000..6da8219 Binary files /dev/null and b/tradeshow/iot-sensortag/resources/base/fonts/titilliumweb/TitilliumWeb-Regular.ttf differ diff --git a/tradeshow/iot-sensortag/resources/base/fonts/titilliumweb/TitilliumWeb-SemiBold.ttf b/tradeshow/iot-sensortag/resources/base/fonts/titilliumweb/TitilliumWeb-SemiBold.ttf new file mode 100755 index 0000000..dfdcdbe Binary files /dev/null and b/tradeshow/iot-sensortag/resources/base/fonts/titilliumweb/TitilliumWeb-SemiBold.ttf differ diff --git a/tradeshow/iot-sensortag/resources/base/main.qml b/tradeshow/iot-sensortag/resources/base/main.qml new file mode 100644 index 0000000..8f092ba --- /dev/null +++ b/tradeshow/iot-sensortag/resources/base/main.qml @@ -0,0 +1,72 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the examples of Qt for Device Creation. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, 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.6 +import QtQuick.Window 2.0 +import SensorTag.DataProvider 1.0 + +Window { + id: mainWindow + + property alias contentFile: contentLoader.source + property DataProviderPool dataProviderPool + + // Size defaults to the small display + width: 1920 + height: 1080 + visible: true + color: "black" + + Loader { + id: contentLoader + + anchors.fill: parent + anchors.centerIn: parent + } +} diff --git a/tradeshow/iot-sensortag/resources/large/MainLarge.qml b/tradeshow/iot-sensortag/resources/large/MainLarge.qml new file mode 100644 index 0000000..d855c0e --- /dev/null +++ b/tradeshow/iot-sensortag/resources/large/MainLarge.qml @@ -0,0 +1,177 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the examples of Qt for Device Creation. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, 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.6 +import SensorTag.DataProvider 1.0 +import "../base" + +Item { + id: main + + width: 1920 + height: 1080 + + Component.onCompleted: { + dataProviderPool.startScanning() + } + + Connections { + target: dataProviderPool + onScanFinished: { + ambientTemp.sensor = dataProviderPool.getProvider(SensorTagData.AmbientTemperature); + objectTemp.sensor = dataProviderPool.getProvider(SensorTagData.ObjectTemperature); + humidity.sensor = dataProviderPool.getProvider(SensorTagData.Humidity); + //airPressure.sensor = dataProviderPool.getProvider(SensorTagData.AirPressure); + light.sensor = dataProviderPool.getProvider(SensorTagData.Light); + magnetometer.sensor = dataProviderPool.getProvider(SensorTagData.Magnetometer); + rotation.sensor = dataProviderPool.getProvider(SensorTagData.Rotation); + } + } + + Column { + id: leftPane + + property int indicatorHeight: height / 4 - spacing + + anchors.left: parent.left + anchors.leftMargin: 8 + anchors.top: main.top + anchors.bottom: main.bottom + width: 360 + spacing: 16 + + TemperatureChart { + id: ambientTemp + + width: leftPane.width + height: leftPane.indicatorHeight + } + + ObjectTemperatureChart { + id: objectTemp + + width: leftPane.width + height: leftPane.indicatorHeight + } + + HumidityChart { + id: humidity + + width: leftPane.width + height: leftPane.indicatorHeight + } + +// AirPressureChart { +// id: airPressure + +// width: leftPane.width +// height: leftPane.indicatorHeight +// } + } + + Column { + id: rightPane + + anchors.right: parent.right + anchors.rightMargin: 8 + anchors.top: main.top + anchors.bottom: main.bottom + width: 360 + spacing: 16 + + LightChart { + id: light + + width: rightPane.width + height: leftPane.height / 4 + } + + MagnetometerChart { + id: magnetometer + + width: rightPane.width + height: leftPane.height / 4 + } + + GyroPage { + id: rotation + + width: rightPane.width + height: leftPane.height / 4 + onClicked: mainContainer.source = "../base/GyroPage.qml" + } + } + + Loader { + id: mainContainer + + anchors.top: topToolbar.bottom + anchors.left: leftPane.right + anchors.leftMargin: 32 + anchors.right: rightPane.left + anchors.rightMargin: 32 + anchors.bottom: bottomToolbar.top + } + + TopToolbar { + id: topToolbar + + anchors.left: leftPane.right + anchors.right: rightPane.left + } + + BottomToolbar { + id: bottomToolbar + + anchors.left: leftPane.right + anchors.right: rightPane.left + anchors.bottom: main.bottom + height: 30 + } +} diff --git a/tradeshow/iot-sensortag/resources/large/StyleLarge.qml b/tradeshow/iot-sensortag/resources/large/StyleLarge.qml new file mode 100644 index 0000000..e4d439d --- /dev/null +++ b/tradeshow/iot-sensortag/resources/large/StyleLarge.qml @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the examples of Qt for Device Creation. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, 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$ +** +****************************************************************************/ +pragma Singleton +import QtQuick 2.0 + +QtObject { + property int indicatorTitleFontSize: 22 + property int indicatorTitleSize: 41 + + property int topToolbarSmallFontSize: 20 + property int topToolbarLargeFontSize: 62 +} diff --git a/tradeshow/iot-sensortag/resources/large/images/AirPressure/AirPre_base_gauge.png b/tradeshow/iot-sensortag/resources/large/images/AirPressure/AirPre_base_gauge.png new file mode 100644 index 0000000..30a24b8 Binary files /dev/null and b/tradeshow/iot-sensortag/resources/large/images/AirPressure/AirPre_base_gauge.png differ diff --git a/tradeshow/iot-sensortag/resources/large/images/AmbientTemperature/ambTemp_display_amb.png b/tradeshow/iot-sensortag/resources/large/images/AmbientTemperature/ambTemp_display_amb.png new file mode 100644 index 0000000..5a4bcf0 Binary files /dev/null and b/tradeshow/iot-sensortag/resources/large/images/AmbientTemperature/ambTemp_display_amb.png differ diff --git a/tradeshow/iot-sensortag/resources/large/images/General/icon_sensor.png b/tradeshow/iot-sensortag/resources/large/images/General/icon_sensor.png new file mode 100644 index 0000000..8157ef7 Binary files /dev/null and b/tradeshow/iot-sensortag/resources/large/images/General/icon_sensor.png differ diff --git a/tradeshow/iot-sensortag/resources/large/images/General/separator.png b/tradeshow/iot-sensortag/resources/large/images/General/separator.png new file mode 100644 index 0000000..4dae4f8 Binary files /dev/null and b/tradeshow/iot-sensortag/resources/large/images/General/separator.png differ diff --git a/tradeshow/iot-sensortag/resources/large/images/Humidity/humidity_base_gauge.png b/tradeshow/iot-sensortag/resources/large/images/Humidity/humidity_base_gauge.png new file mode 100644 index 0000000..0d0331c Binary files /dev/null and b/tradeshow/iot-sensortag/resources/large/images/Humidity/humidity_base_gauge.png differ diff --git a/tradeshow/iot-sensortag/resources/large/images/Humidity/humidity_max_hum.png b/tradeshow/iot-sensortag/resources/large/images/Humidity/humidity_max_hum.png new file mode 100644 index 0000000..381c4dd Binary files /dev/null and b/tradeshow/iot-sensortag/resources/large/images/Humidity/humidity_max_hum.png differ diff --git a/tradeshow/iot-sensortag/resources/large/images/Humidity/humidity_min_hum.png b/tradeshow/iot-sensortag/resources/large/images/Humidity/humidity_min_hum.png new file mode 100644 index 0000000..c3f9442 Binary files /dev/null and b/tradeshow/iot-sensortag/resources/large/images/Humidity/humidity_min_hum.png differ diff --git a/tradeshow/iot-sensortag/resources/large/images/Light/light_base_gauge.png b/tradeshow/iot-sensortag/resources/large/images/Light/light_base_gauge.png new file mode 100644 index 0000000..6a68729 Binary files /dev/null and b/tradeshow/iot-sensortag/resources/large/images/Light/light_base_gauge.png differ diff --git a/tradeshow/iot-sensortag/resources/large/images/Light/light_brightness.png b/tradeshow/iot-sensortag/resources/large/images/Light/light_brightness.png new file mode 100644 index 0000000..45b1e2b Binary files /dev/null and b/tradeshow/iot-sensortag/resources/large/images/Light/light_brightness.png differ diff --git a/tradeshow/iot-sensortag/resources/large/images/ObjectTemperature/objTemp_base_circle.png b/tradeshow/iot-sensortag/resources/large/images/ObjectTemperature/objTemp_base_circle.png new file mode 100644 index 0000000..a506d2a Binary files /dev/null and b/tradeshow/iot-sensortag/resources/large/images/ObjectTemperature/objTemp_base_circle.png differ diff --git a/tradeshow/iot-sensortag/resources/large/images/ObjectTemperature/objTemp_display_obj.png b/tradeshow/iot-sensortag/resources/large/images/ObjectTemperature/objTemp_display_obj.png new file mode 100644 index 0000000..bc320ac Binary files /dev/null and b/tradeshow/iot-sensortag/resources/large/images/ObjectTemperature/objTemp_display_obj.png differ diff --git a/tradeshow/iot-sensortag/resources/medium/MainMedium.qml b/tradeshow/iot-sensortag/resources/medium/MainMedium.qml new file mode 100644 index 0000000..d855c0e --- /dev/null +++ b/tradeshow/iot-sensortag/resources/medium/MainMedium.qml @@ -0,0 +1,177 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the examples of Qt for Device Creation. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, 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.6 +import SensorTag.DataProvider 1.0 +import "../base" + +Item { + id: main + + width: 1920 + height: 1080 + + Component.onCompleted: { + dataProviderPool.startScanning() + } + + Connections { + target: dataProviderPool + onScanFinished: { + ambientTemp.sensor = dataProviderPool.getProvider(SensorTagData.AmbientTemperature); + objectTemp.sensor = dataProviderPool.getProvider(SensorTagData.ObjectTemperature); + humidity.sensor = dataProviderPool.getProvider(SensorTagData.Humidity); + //airPressure.sensor = dataProviderPool.getProvider(SensorTagData.AirPressure); + light.sensor = dataProviderPool.getProvider(SensorTagData.Light); + magnetometer.sensor = dataProviderPool.getProvider(SensorTagData.Magnetometer); + rotation.sensor = dataProviderPool.getProvider(SensorTagData.Rotation); + } + } + + Column { + id: leftPane + + property int indicatorHeight: height / 4 - spacing + + anchors.left: parent.left + anchors.leftMargin: 8 + anchors.top: main.top + anchors.bottom: main.bottom + width: 360 + spacing: 16 + + TemperatureChart { + id: ambientTemp + + width: leftPane.width + height: leftPane.indicatorHeight + } + + ObjectTemperatureChart { + id: objectTemp + + width: leftPane.width + height: leftPane.indicatorHeight + } + + HumidityChart { + id: humidity + + width: leftPane.width + height: leftPane.indicatorHeight + } + +// AirPressureChart { +// id: airPressure + +// width: leftPane.width +// height: leftPane.indicatorHeight +// } + } + + Column { + id: rightPane + + anchors.right: parent.right + anchors.rightMargin: 8 + anchors.top: main.top + anchors.bottom: main.bottom + width: 360 + spacing: 16 + + LightChart { + id: light + + width: rightPane.width + height: leftPane.height / 4 + } + + MagnetometerChart { + id: magnetometer + + width: rightPane.width + height: leftPane.height / 4 + } + + GyroPage { + id: rotation + + width: rightPane.width + height: leftPane.height / 4 + onClicked: mainContainer.source = "../base/GyroPage.qml" + } + } + + Loader { + id: mainContainer + + anchors.top: topToolbar.bottom + anchors.left: leftPane.right + anchors.leftMargin: 32 + anchors.right: rightPane.left + anchors.rightMargin: 32 + anchors.bottom: bottomToolbar.top + } + + TopToolbar { + id: topToolbar + + anchors.left: leftPane.right + anchors.right: rightPane.left + } + + BottomToolbar { + id: bottomToolbar + + anchors.left: leftPane.right + anchors.right: rightPane.left + anchors.bottom: main.bottom + height: 30 + } +} diff --git a/tradeshow/iot-sensortag/resources/medium/StyleMedium.qml b/tradeshow/iot-sensortag/resources/medium/StyleMedium.qml new file mode 100644 index 0000000..e4d439d --- /dev/null +++ b/tradeshow/iot-sensortag/resources/medium/StyleMedium.qml @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the examples of Qt for Device Creation. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, 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$ +** +****************************************************************************/ +pragma Singleton +import QtQuick 2.0 + +QtObject { + property int indicatorTitleFontSize: 22 + property int indicatorTitleSize: 41 + + property int topToolbarSmallFontSize: 20 + property int topToolbarLargeFontSize: 62 +} diff --git a/tradeshow/iot-sensortag/resources/medium/images/AirPressure/AirPre_base_gauge.png b/tradeshow/iot-sensortag/resources/medium/images/AirPressure/AirPre_base_gauge.png new file mode 100644 index 0000000..2f1d658 Binary files /dev/null and b/tradeshow/iot-sensortag/resources/medium/images/AirPressure/AirPre_base_gauge.png differ diff --git a/tradeshow/iot-sensortag/resources/medium/images/AmbientTemperature/ambTemp_display_amb.png b/tradeshow/iot-sensortag/resources/medium/images/AmbientTemperature/ambTemp_display_amb.png new file mode 100644 index 0000000..cad440a Binary files /dev/null and b/tradeshow/iot-sensortag/resources/medium/images/AmbientTemperature/ambTemp_display_amb.png differ diff --git a/tradeshow/iot-sensortag/resources/medium/images/General/icon_sensor.png b/tradeshow/iot-sensortag/resources/medium/images/General/icon_sensor.png new file mode 100644 index 0000000..49cc090 Binary files /dev/null and b/tradeshow/iot-sensortag/resources/medium/images/General/icon_sensor.png differ diff --git a/tradeshow/iot-sensortag/resources/medium/images/General/separator.png b/tradeshow/iot-sensortag/resources/medium/images/General/separator.png new file mode 100644 index 0000000..dbd25a4 Binary files /dev/null and b/tradeshow/iot-sensortag/resources/medium/images/General/separator.png differ diff --git a/tradeshow/iot-sensortag/resources/medium/images/Humidity/humidity_base_gauge.png b/tradeshow/iot-sensortag/resources/medium/images/Humidity/humidity_base_gauge.png new file mode 100644 index 0000000..494a0e6 Binary files /dev/null and b/tradeshow/iot-sensortag/resources/medium/images/Humidity/humidity_base_gauge.png differ diff --git a/tradeshow/iot-sensortag/resources/medium/images/Humidity/humidity_max_hum.png b/tradeshow/iot-sensortag/resources/medium/images/Humidity/humidity_max_hum.png new file mode 100644 index 0000000..c4a7d7b Binary files /dev/null and b/tradeshow/iot-sensortag/resources/medium/images/Humidity/humidity_max_hum.png differ diff --git a/tradeshow/iot-sensortag/resources/medium/images/Humidity/humidity_min_hum.png b/tradeshow/iot-sensortag/resources/medium/images/Humidity/humidity_min_hum.png new file mode 100644 index 0000000..75b83d1 Binary files /dev/null and b/tradeshow/iot-sensortag/resources/medium/images/Humidity/humidity_min_hum.png differ diff --git a/tradeshow/iot-sensortag/resources/medium/images/Light/light_base_gauge.png b/tradeshow/iot-sensortag/resources/medium/images/Light/light_base_gauge.png new file mode 100644 index 0000000..9c66fbb Binary files /dev/null and b/tradeshow/iot-sensortag/resources/medium/images/Light/light_base_gauge.png differ diff --git a/tradeshow/iot-sensortag/resources/medium/images/Light/light_brightness.png b/tradeshow/iot-sensortag/resources/medium/images/Light/light_brightness.png new file mode 100644 index 0000000..fc8e82a Binary files /dev/null and b/tradeshow/iot-sensortag/resources/medium/images/Light/light_brightness.png differ diff --git a/tradeshow/iot-sensortag/resources/medium/images/ObjectTemperature/objTemp_base_circle.png b/tradeshow/iot-sensortag/resources/medium/images/ObjectTemperature/objTemp_base_circle.png new file mode 100644 index 0000000..86c966f Binary files /dev/null and b/tradeshow/iot-sensortag/resources/medium/images/ObjectTemperature/objTemp_base_circle.png differ diff --git a/tradeshow/iot-sensortag/resources/medium/images/ObjectTemperature/objTemp_display_obj.png b/tradeshow/iot-sensortag/resources/medium/images/ObjectTemperature/objTemp_display_obj.png new file mode 100644 index 0000000..77d53f3 Binary files /dev/null and b/tradeshow/iot-sensortag/resources/medium/images/ObjectTemperature/objTemp_display_obj.png differ diff --git a/tradeshow/iot-sensortag/resources/small/MainSmall.qml b/tradeshow/iot-sensortag/resources/small/MainSmall.qml new file mode 100644 index 0000000..4044b32 --- /dev/null +++ b/tradeshow/iot-sensortag/resources/small/MainSmall.qml @@ -0,0 +1,193 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the examples of Qt for Device Creation. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, 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.6 +import SensorTag.DataProvider 1.0 +import "../base" + +Item { + id: main + + anchors.fill: parent + + Component.onCompleted: { + dataProviderPool.startScanning() + } + + Connections { + target: dataProviderPool + onScanFinished: { + ambientTemp.sensor = dataProviderPool.getProvider(SensorTagData.AmbientTemperature); + objectTemp.sensor = dataProviderPool.getProvider(SensorTagData.ObjectTemperature); + humidity.sensor = dataProviderPool.getProvider(SensorTagData.Humidity); + airPressure.sensor = dataProviderPool.getProvider(SensorTagData.AirPressure); + light.sensor = dataProviderPool.getProvider(SensorTagData.Light); + magnetometer.sensor = dataProviderPool.getProvider(SensorTagData.Magnetometer); + rotation.sensor = dataProviderPool.getProvider(SensorTagData.Rotation); + } + } + + TopToolbar { + id: topToolbar + + anchors.top: main.top + anchors.left: main.left + anchors.right: main.right + } + + Column { + id: leftPane + + property int indicatorHeight: (height - 3 * spacing) / 4 + + anchors.left: parent.left + anchors.leftMargin: 8 + anchors.top: topToolbar.bottom + anchors.bottom: main.bottom + width: 360 + spacing: 16 + + TemperatureChart { + id: ambientTemp + + width: leftPane.width + height: leftPane.indicatorHeight + } + + ObjectTemperatureChart { + id: objectTemp + + width: leftPane.width + height: leftPane.indicatorHeight + } + + HumidityChart { + id: humidity + + width: leftPane.width + height: leftPane.indicatorHeight + } + + AirPressureChart { + id: airPressure + + width: leftPane.width + height: leftPane.indicatorHeight + } + } + + Column { + id: rightPane + + anchors.right: parent.right + anchors.rightMargin: 8 + anchors.top: topToolbar.bottom + anchors.bottom: main.bottom + width: 360 + spacing: 16 + + LightChart { + id: light + + width: rightPane.width + height: leftPane.height / 4 + } + + MagnetometerChart { + id: magnetometer + + width: rightPane.width + height: leftPane.height * 0.3 + } + + GyroChart { + id: rotation + + width: rightPane.width + height: leftPane.height * 0.3 + onClicked: { + //mainContainer.source = "../base/GyroPage.qml"; + gyroConnection.enabled = true; + } + + Connections { + id: gyroConnection + + target: mainContainer + enabled: false + onStatusChanged: { + if (status == Loader.Ready) { + mainContainer.item.sensor = rotation.sensor; + gyroConnection.enabled = false; + } + } + } + } + } + + Loader { + id: mainContainer + + anchors.top: topToolbar.bottom + anchors.left: leftPane.right + anchors.leftMargin: 32 + anchors.right: rightPane.left + anchors.rightMargin: 32 + anchors.bottom: bottomToolbar.top + } + + BottomToolbar { + id: bottomToolbar + + anchors.left: leftPane.right + anchors.right: rightPane.left + anchors.bottom: main.bottom + height: 30 + } +} diff --git a/tradeshow/iot-sensortag/resources/small/StyleSmall.qml b/tradeshow/iot-sensortag/resources/small/StyleSmall.qml new file mode 100644 index 0000000..e4d439d --- /dev/null +++ b/tradeshow/iot-sensortag/resources/small/StyleSmall.qml @@ -0,0 +1,59 @@ +/**************************************************************************** +** +** Copyright (C) 2017 The Qt Company Ltd. +** Contact: https://www.qt.io/licensing/ +** +** This file is part of the examples of Qt for Device Creation. +** +** $QT_BEGIN_LICENSE:BSD$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and The Qt Company. For licensing terms +** and conditions see https://www.qt.io/terms-conditions. For further +** information use the contact form at https://www.qt.io/contact-us. +** +** BSD License Usage +** Alternatively, 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$ +** +****************************************************************************/ +pragma Singleton +import QtQuick 2.0 + +QtObject { + property int indicatorTitleFontSize: 22 + property int indicatorTitleSize: 41 + + property int topToolbarSmallFontSize: 20 + property int topToolbarLargeFontSize: 62 +} diff --git a/tradeshow/iot-sensortag/resources/small/images/AirPressure/AirPre_base_gauge.png b/tradeshow/iot-sensortag/resources/small/images/AirPressure/AirPre_base_gauge.png new file mode 100644 index 0000000..16b819b Binary files /dev/null and b/tradeshow/iot-sensortag/resources/small/images/AirPressure/AirPre_base_gauge.png differ diff --git a/tradeshow/iot-sensortag/resources/small/images/AmbientTemperature/ambTemp_display_amb.png b/tradeshow/iot-sensortag/resources/small/images/AmbientTemperature/ambTemp_display_amb.png new file mode 100644 index 0000000..64f15a6 Binary files /dev/null and b/tradeshow/iot-sensortag/resources/small/images/AmbientTemperature/ambTemp_display_amb.png differ diff --git a/tradeshow/iot-sensortag/resources/small/images/General/icon_sensor.png b/tradeshow/iot-sensortag/resources/small/images/General/icon_sensor.png new file mode 100644 index 0000000..e7aed60 Binary files /dev/null and b/tradeshow/iot-sensortag/resources/small/images/General/icon_sensor.png differ diff --git a/tradeshow/iot-sensortag/resources/small/images/General/separator.png b/tradeshow/iot-sensortag/resources/small/images/General/separator.png new file mode 100644 index 0000000..59fbb96 Binary files /dev/null and b/tradeshow/iot-sensortag/resources/small/images/General/separator.png differ diff --git a/tradeshow/iot-sensortag/resources/small/images/Humidity/humidity_base_gauge.png b/tradeshow/iot-sensortag/resources/small/images/Humidity/humidity_base_gauge.png new file mode 100644 index 0000000..3ecd62d Binary files /dev/null and b/tradeshow/iot-sensortag/resources/small/images/Humidity/humidity_base_gauge.png differ diff --git a/tradeshow/iot-sensortag/resources/small/images/Humidity/humidity_max_hum.png b/tradeshow/iot-sensortag/resources/small/images/Humidity/humidity_max_hum.png new file mode 100644 index 0000000..8bff102 Binary files /dev/null and b/tradeshow/iot-sensortag/resources/small/images/Humidity/humidity_max_hum.png differ diff --git a/tradeshow/iot-sensortag/resources/small/images/Humidity/humidity_min_hum.png b/tradeshow/iot-sensortag/resources/small/images/Humidity/humidity_min_hum.png new file mode 100644 index 0000000..416e376 Binary files /dev/null and b/tradeshow/iot-sensortag/resources/small/images/Humidity/humidity_min_hum.png differ diff --git a/tradeshow/iot-sensortag/resources/small/images/Light/light_base_gauge.png b/tradeshow/iot-sensortag/resources/small/images/Light/light_base_gauge.png new file mode 100644 index 0000000..8bc33a9 Binary files /dev/null and b/tradeshow/iot-sensortag/resources/small/images/Light/light_base_gauge.png differ diff --git a/tradeshow/iot-sensortag/resources/small/images/Light/light_brightness.png b/tradeshow/iot-sensortag/resources/small/images/Light/light_brightness.png new file mode 100644 index 0000000..e47ce5f Binary files /dev/null and b/tradeshow/iot-sensortag/resources/small/images/Light/light_brightness.png differ diff --git a/tradeshow/iot-sensortag/resources/small/images/ObjectTemperature/objTemp_base_circle.png b/tradeshow/iot-sensortag/resources/small/images/ObjectTemperature/objTemp_base_circle.png new file mode 100644 index 0000000..cdf7961 Binary files /dev/null and b/tradeshow/iot-sensortag/resources/small/images/ObjectTemperature/objTemp_base_circle.png differ diff --git a/tradeshow/iot-sensortag/resources/small/images/ObjectTemperature/objTemp_display_obj.png b/tradeshow/iot-sensortag/resources/small/images/ObjectTemperature/objTemp_display_obj.png new file mode 100644 index 0000000..53ac672 Binary files /dev/null and b/tradeshow/iot-sensortag/resources/small/images/ObjectTemperature/objTemp_display_obj.png differ diff --git a/tradeshow/iot-sensortag/resources/small/images/Toolbar/icon_topbar_cloud.png b/tradeshow/iot-sensortag/resources/small/images/Toolbar/icon_topbar_cloud.png new file mode 100644 index 0000000..b443a48 Binary files /dev/null and b/tradeshow/iot-sensortag/resources/small/images/Toolbar/icon_topbar_cloud.png differ diff --git a/tradeshow/iot-sensortag/resources/small/images/Toolbar/icon_topbar_sensor.png b/tradeshow/iot-sensortag/resources/small/images/Toolbar/icon_topbar_sensor.png new file mode 100644 index 0000000..c7ef624 Binary files /dev/null and b/tradeshow/iot-sensortag/resources/small/images/Toolbar/icon_topbar_sensor.png differ diff --git a/tradeshow/iot-sensortag/resources/small/images/Toolbar/topbar_all.png b/tradeshow/iot-sensortag/resources/small/images/Toolbar/topbar_all.png new file mode 100644 index 0000000..85d85dc Binary files /dev/null and b/tradeshow/iot-sensortag/resources/small/images/Toolbar/topbar_all.png differ -- cgit v1.2.3