diff options
Diffstat (limited to 'tradeshow/iot-sensortag/resources')
43 files changed, 532 insertions, 619 deletions
diff --git a/tradeshow/iot-sensortag/resources/base/AccelChart.qml b/tradeshow/iot-sensortag/resources/base/AccelChart.qml index 10a7758..d037ff1 100644 --- a/tradeshow/iot-sensortag/resources/base/AccelChart.qml +++ b/tradeshow/iot-sensortag/resources/base/AccelChart.qml @@ -90,6 +90,7 @@ BaseChart { anchors.centerIn: parent text: (index == 0) ? acceXValue : ((index == 1) ? acceYValue : acceZValue) color: "white" + font.pixelSize: 26 } } diff --git a/tradeshow/iot-sensortag/resources/base/AltitudeChart.qml b/tradeshow/iot-sensortag/resources/base/AltitudeChart.qml index 2c05bc7..20a8a0e 100644 --- a/tradeshow/iot-sensortag/resources/base/AltitudeChart.qml +++ b/tradeshow/iot-sensortag/resources/base/AltitudeChart.qml @@ -152,6 +152,7 @@ BaseChart { anchors.centerIn: parent anchors.horizontalCenterOffset: 74 color: "white" + font.pixelSize: 26 } } } diff --git a/tradeshow/iot-sensortag/resources/base/BaseChart.qml b/tradeshow/iot-sensortag/resources/base/BaseChart.qml index d144916..bc850fc 100644 --- a/tradeshow/iot-sensortag/resources/base/BaseChart.qml +++ b/tradeshow/iot-sensortag/resources/base/BaseChart.qml @@ -54,7 +54,7 @@ import SensorTag.DataProvider 1.0 Item { id: baseChart - property var sensor: null + property var sensor: singleSensorSource property string title property alias contentItem: loader.item property alias content: loader.sourceComponent @@ -74,7 +74,7 @@ Item { Image { id: titleIcon - + visible: Style.uiStyle == "small" anchors.top: parent.top source: pathPrefix + "General/icon_sensor.png" } @@ -148,6 +148,7 @@ Item { axis.z: 0 angle: rightSide ? 180 : 0 } + visible: Style.uiStyle == "small" } MouseArea { diff --git a/tradeshow/iot-sensortag/resources/base/GyroChart.qml b/tradeshow/iot-sensortag/resources/base/GyroChart.qml index 78ee163..f09ef6b 100644 --- a/tradeshow/iot-sensortag/resources/base/GyroChart.qml +++ b/tradeshow/iot-sensortag/resources/base/GyroChart.qml @@ -92,7 +92,6 @@ BaseChart { anchors.left: parent.left anchors.leftMargin: -20 anchors.right: parent.right - anchors.rightMargin: -15 antialiasing: true backgroundColor: "transparent" legend.visible: false @@ -160,6 +159,7 @@ BaseChart { color: "white" anchors.left: parent.left anchors.bottom: parent.bottom + font.pixelSize: 26 } Text { @@ -171,6 +171,7 @@ BaseChart { anchors.left: coordText.right anchors.leftMargin: 16 anchors.bottom: parent.bottom + font.pixelSize: 26 } } } diff --git a/tradeshow/iot-sensortag/resources/base/HumidityChart.qml b/tradeshow/iot-sensortag/resources/base/HumidityChart.qml index 60d1ee7..869288a 100644 --- a/tradeshow/iot-sensortag/resources/base/HumidityChart.qml +++ b/tradeshow/iot-sensortag/resources/base/HumidityChart.qml @@ -48,8 +48,6 @@ ** ****************************************************************************/ 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 @@ -104,6 +102,7 @@ BaseChart { text: "Max\n" + maxHumi.toFixed(0) + " %" lineHeight: 0.8 color: "white" + font.pixelSize: 26 } Text { @@ -113,6 +112,7 @@ BaseChart { text: "Min\n" + minHumi.toFixed(0) + " %" lineHeight: 0.8 color: "white" + font.pixelSize: 26 } } } diff --git a/tradeshow/iot-sensortag/resources/base/MagnetometerChart.qml b/tradeshow/iot-sensortag/resources/base/MagnetometerChart.qml index cf4a409..2b2ccac 100644 --- a/tradeshow/iot-sensortag/resources/base/MagnetometerChart.qml +++ b/tradeshow/iot-sensortag/resources/base/MagnetometerChart.qml @@ -57,7 +57,6 @@ BaseChart { property int maxNumOfMagnReadings: 24 - readonly property color chartColor: "#15bdff" readonly property string xColor: "#4db300" readonly property string yColor: "white" readonly property string zColor: "#f64405" @@ -154,6 +153,7 @@ BaseChart { color: (index == 0) ? xColor : ((index == 1) ? yColor : zColor) anchors.left: parent.left anchors.bottom: parent.bottom + font.pixelSize: 26 } Text { @@ -165,6 +165,7 @@ BaseChart { anchors.left: coordText.right anchors.leftMargin: 16 anchors.bottom: parent.bottom + font.pixelSize: 26 } } } diff --git a/tradeshow/iot-sensortag/resources/base/ObjectTemperatureChart.qml b/tradeshow/iot-sensortag/resources/base/ObjectTemperatureChart.qml index ffba32b..a594257 100644 --- a/tradeshow/iot-sensortag/resources/base/ObjectTemperatureChart.qml +++ b/tradeshow/iot-sensortag/resources/base/ObjectTemperatureChart.qml @@ -89,6 +89,7 @@ BaseChart { anchors.centerIn: gauge anchors.horizontalCenterOffset: -120 anchors.verticalCenterOffset: 60 + font.pixelSize: 26 } Text { @@ -107,6 +108,7 @@ BaseChart { anchors.centerIn: gauge anchors.horizontalCenterOffset: 120 anchors.verticalCenterOffset: -30 + font.pixelSize: 26 } } } diff --git a/tradeshow/iot-sensortag/resources/base/RotationPage.qml b/tradeshow/iot-sensortag/resources/base/RotationPage.qml index eee47c1..a153c80 100644 --- a/tradeshow/iot-sensortag/resources/base/RotationPage.qml +++ b/tradeshow/iot-sensortag/resources/base/RotationPage.qml @@ -53,7 +53,7 @@ import SensorTag.DataProvider 1.0 Item { id: dialerRoot - property var sensor + property var sensor : singleSensorSource property var rotationUpdateInterval: sensor ? sensor.rotationUpdateInterval : 0 property int sensorState: sensor ? sensor.state : SensorTagData.Disconnected diff --git a/tradeshow/iot-sensortag/resources/base/SensorSettings.qml b/tradeshow/iot-sensortag/resources/base/SensorSettings.qml index c9c326a..5302816 100644 --- a/tradeshow/iot-sensortag/resources/base/SensorSettings.qml +++ b/tradeshow/iot-sensortag/resources/base/SensorSettings.qml @@ -53,152 +53,162 @@ import Style 1.0 import SensorTag.DataProvider 1.0 Rectangle { - id: mainRect + id: sourceSelector + property alias sensorCount : sensorListView.count + property color selectedBackgroundColor : "#15bdff" + property color deselectedBackgroundColor: "transparent" + + color: "transparent" + width: 800 + height: 800 + anchors.horizontalCenter: parent.horizontalCenter + + function createSensorConnection() { + clickBait.deactivate() + + var currentPool = getCurrentPool(); + if (currentPool.dataProviders[sensorListView.currentIndex] === singleSensorSource) { + console.log("Same data provider selected, nothing to change...") + return; + } - property alias listModelCount: list.count + if (singleSensorSource) + singleSensorSource.endDataFetching(); + // UI gets information about the intended setup of the + // sensor even though they have not been really discovered yet + if (currentPool) { + singleSensorSource = currentPool.dataProviders[sensorListView.currentIndex] + currentPool.currentProviderIndex = sensorListView.currentIndex - width: 620 - height: 480 - color: "black" + seriesStorage.setDataProviderPool(currentPool); + seriesStorage.dataProviderPoolChanged(); - Text { - id: titleText - color: "white" - text: "SENSOR SETTINGS" - font.pixelSize: Style.indicatorTitleFontSize - anchors.horizontalCenter: parent.horizontalCenter - anchors.top: parent.top - anchors.topMargin: 8 + singleSensorSource.startDataFetching() + } } Image { - id: icon - - anchors.top: titleText.bottom - anchors.horizontalCenter: parent.horizontalCenter - anchors.margins: 8 - source: pathPrefix + "Toolbar/icon_topbar_sensor.png" + source: "images/bg_blue.jpg" + anchors.fill: parent } - ListView { - id: list - anchors.top: icon.bottom - anchors.topMargin: 16 - anchors.left: parent.left - anchors.leftMargin: 30 - anchors.right: parent.right - anchors.rightMargin: 30 - orientation: ListView.Horizontal - model: dataProviderPool.dataProviders - height: parent.height - clip: true - snapMode: ListView.SnapToItem - boundsBehavior: Flickable.StopAtBounds - - function getTagTypeStr(tagType) { - var tagStr = ""; - if (tagType & SensorTagData.AmbientTemperature) - tagStr += "Ambient Temperature\n"; - if (tagType & SensorTagData.ObjectTemperature) - tagStr += "Object Temperature\n"; - if (tagType & SensorTagData.Humidity) - tagStr += "Humidity\n"; - if (tagType & SensorTagData.Altitude) - tagStr += "Altitude\n"; - if (tagType & SensorTagData.Light) - tagStr += "Light\n"; - if (tagType & SensorTagData.Rotation) - tagStr += "Gyroscope\n"; - if (tagType & SensorTagData.Magnetometer) - tagStr += "Magnetometer\n"; - if (tagType & SensorTagData.Accelometer) - tagStr += "Accelometer\n"; - - return tagStr; + Image { + id: separator + source: pathPrefix + "General/separator.png" + anchors.top: parent.top + width: parent.width + transform: Rotation { + origin.x: separator.width / 2 + origin.y: separator.height / 2 + angle: 180 } + } - delegate: Item { - id: listItem - width: mainRect.width / 3 - height: childrenRect.height - - ColumnLayout { - spacing: 8 - - Text { - anchors.top: parent.top - anchors.left: parent.left - anchors.right: parent.right - horizontalAlignment: Text.AlignHCenter - text: providerId - color: "white" - font.pixelSize: 16 - elide: Text.ElideMiddle - } - - BlinkingIcon { - id: sensorIcon - - property bool canBlink: modelData.state === SensorTagData.Scanning - - onCanBlinkChanged: { - if (canBlink) - sensorIcon.startBlinking(); - else - sensorIcon.stopBlinking(); - } - - source: pathPrefix + "Toolbar/icon_topbar_sensor.png" - anchors.horizontalCenter: parent.horizontalCenter - - Component.onDestruction: { - sensorIcon.stopBlinking() - } - - MouseArea { - anchors.fill: parent - onClicked: { - if (modelData.state === SensorTagData.Connected) - dataProviderPool.disconnectProvider(modelData.providerId); - else if (modelData.state === SensorTagData.NotFound) - dataProviderPool.startScanning(); - else if (modelData.state === SensorTagData.Scanning) - dataProviderPool.disconnectProvider(modelData.providerId) - else - modelData.startServiceScan(); - } - } - } + Rectangle { + id: buttonRect + anchors.top: separator.bottom + anchors.margins: 20 + color: "transparent" + width: parent.width - 20 + height: 40 + + Rectangle { + border.color: "white" + color: localSelected ? sourceSelector.selectedBackgroundColor : sourceSelector.deselectedBackgroundColor + anchors.top: parent.top + anchors.left: parent.left + width: parent.width / 2 + height: 30 + Text { + text: "Local" + anchors.centerIn: parent + color: "white" + font.pixelSize: 26 + } + } - Text { - Layout.alignment: Qt.AlignHCenter - text: modelData.state === SensorTagData.NotFound ? "\nNOT FOUND" - : (modelData.state === SensorTagData.Disconnected) ? "\nDISCONNECTED" - : (modelData.state === SensorTagData.Scanning) ? "\nCONNECTING" - : (modelData.state === SensorTagData.Connected) ? "\nCONNECTED" - : "Error" - color: "white" - font.pixelSize: 14 - } + Rectangle { + border.color: "white" + color: !localSelected ? sourceSelector.selectedBackgroundColor : sourceSelector.deselectedBackgroundColor + anchors.top: parent.top + anchors.right: parent.right + width: parent.width / 2 + height: 30 + Text { + text: "Remote" + anchors.centerIn: parent + color: "white" + font.pixelSize: 26 + } + } - Item { - height: 30 - width: 10 - } + MouseArea { + anchors.fill: parent + onClicked: localSelected = !localSelected + } + } - Text { - color: "white" - text: "Provides data for:" - font.pixelSize: 14 - } + ListView { + id: sensorListView + model: localSelected ? (localProviderPool ? localProviderPool.dataProviders : 0) + : (remoteProviderPool ? remoteProviderPool.dataProviders : 0) + + width: buttonRect.width + anchors.top: buttonRect.bottom + anchors.bottom: connectButton.top + focus: true + clip: true - Text { - color: "white" - lineHeight: 0.7 - text: list.getTagTypeStr(modelData.tagType()) - font.pixelSize: 14 + delegate: Rectangle { + border.color: "white" + color: ListView.isCurrentItem ? sourceSelector.selectedBackgroundColor + : sourceSelector.deselectedBackgroundColor + radius: 5 + height: 30 + width: parent.width + Text { + text: providerId + anchors.centerIn: parent + color: "white" + font.pixelSize: 26 + } + MouseArea { + anchors.fill: parent + onClicked: sensorListView.currentIndex = index + onDoubleClicked: { + sensorListView.currentIndex = index + createSensorConnection() } } } } + + Rectangle { + id: connectButton + width: buttonRect.width / 2 + height: 30 + anchors.bottom: bottomSeparator.top + anchors.right: parent.right + color: sensorListView.currentIndex != -1 ? sourceSelector.selectedBackgroundColor : "transparent" + border.color: "white" + Text { + text: "Connect" + anchors.centerIn: parent + color: "white" + font.pixelSize: 26 + } + MouseArea { + id: connectButtonArea + anchors.fill: parent + enabled: sensorListView.currentIndex != -1 + onClicked: createSensorConnection() + } + } + + Image { + id: bottomSeparator + source: pathPrefix + "General/separator.png" + anchors.bottom: parent.bottom + width: parent.width + } } diff --git a/tradeshow/iot-sensortag/resources/base/TemperatureChart.qml b/tradeshow/iot-sensortag/resources/base/TemperatureChart.qml index dbad24b..7a90dea 100644 --- a/tradeshow/iot-sensortag/resources/base/TemperatureChart.qml +++ b/tradeshow/iot-sensortag/resources/base/TemperatureChart.qml @@ -106,6 +106,7 @@ BaseChart { anchors.horizontalCenter: reading.horizontalCenter anchors.top: parent.top color: "white" + font.pixelSize: 26 } Image { @@ -132,6 +133,7 @@ BaseChart { color: "white" anchors.bottom: parent.bottom anchors.horizontalCenter: reading.horizontalCenter + font.pixelSize: 26 } Text { @@ -143,6 +145,7 @@ BaseChart { color: "white" anchors.right: parent.right anchors.verticalCenter: reading.verticalCenter + font.pixelSize: 26 } } diff --git a/tradeshow/iot-sensortag/resources/base/TopToolbar.qml b/tradeshow/iot-sensortag/resources/base/TopToolbar.qml index fd5054d..bb0ecf9 100644 --- a/tradeshow/iot-sensortag/resources/base/TopToolbar.qml +++ b/tradeshow/iot-sensortag/resources/base/TopToolbar.qml @@ -57,63 +57,45 @@ Item { height: 100 width: implicitWidth - CloudSettings { - id: cloudSettings - - x: cloudItem.x - y: topToolbar.height - visible: false - } + property alias topbar: topbar + property alias date: dateLabel SensorSettings { id: sensorList x: sensorItem.x y: topToolbar.height - visible: false + width: Math.min(mainWindow.width, 800) + height: mainWindow.height - topToolbar.height + visible: true } - 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" - } - + Image { + id: logWindow + source: "images/bg_blue.jpg" + x: sensorItem.x + y: topToolbar.height + width: Math.min(mainWindow.width, 600) + height: Math.min(mainWindow.height - topToolbar.height, 400) + anchors.horizontalCenter: parent.horizontalCenter + visible: false Text { - id: cloudText + clip: true color: "white" - text: "CLOUD" - width: contentWidth - font.pixelSize: Style.topToolbarSmallFontSize - anchors.verticalCenter: icon.verticalCenter - anchors.left: icon.right - anchors.margins: 8 - } - - MouseArea { + font.pixelSize: 26 + text: mainWindow.loggingOutput ? mainWindow.loggingOutput : "...debug..." anchors.fill: parent - onClicked: clickBait.activate(cloudSettings) + anchors.margins: 15 } } + Item { id: sensorItem height: topToolbar.height anchors.top: parent.top - anchors.left: cloudItem.right + anchors.left: parent.left //cloudItem.right + anchors.leftMargin: 8 width: sensorIcon.width + sensorButton.width + 3 * anchors.leftMargin Image { @@ -127,7 +109,7 @@ Item { Text { anchors.centerIn: parent - text: sensorList.listModelCount + text: sensorList.sensorCount color: "white" font.pixelSize: Style.topToolbarSmallFontSize } @@ -151,6 +133,7 @@ Item { } Text { + id: dateLabel property bool showAddress : false text: showAddress ? mainWindow.addresses : Qt.formatDateTime(new Date, "dddd, MMMM d, yyyy") color: "white" @@ -161,6 +144,7 @@ Item { horizontalAlignment: Text.AlignRight font.pixelSize: Style.topToolbarSmallFontSize font.capitalization: Font.AllUppercase + visible: rotationMain.visible MouseArea { anchors.fill: parent onClicked: parent.showAddress = !parent.showAddress @@ -174,6 +158,10 @@ Item { font.pixelSize: Style.topToolbarLargeFontSize anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.bottom + MouseArea { + anchors.fill: parent + onClicked: clickBait.activate(logWindow) + } } Timer { @@ -184,8 +172,10 @@ Item { } Text { + id: utcGmt text: "UTC/GMT" color: "white" + visible: dateLabel.visible anchors.left: timeLabel.right anchors.leftMargin: 16 anchors.bottom: parent.bottom @@ -203,6 +193,7 @@ Item { } Image { + id: topbar anchors.bottom: parent.bottom anchors.bottomMargin: -18 source: pathPrefix + "Toolbar/topbar_all.png" @@ -233,4 +224,6 @@ Item { deactivate(); } } + + Component.onCompleted: clickBait.activate(sensorList) } diff --git a/tradeshow/iot-sensortag/resources/base/main.qml b/tradeshow/iot-sensortag/resources/base/main.qml index 6d492d5..05b0f21 100644 --- a/tradeshow/iot-sensortag/resources/base/main.qml +++ b/tradeshow/iot-sensortag/resources/base/main.qml @@ -48,22 +48,35 @@ ** ****************************************************************************/ import QtQuick 2.6 +import QtQuick.Controls 1.4 import QtQuick.Window 2.0 import SensorTag.DataProvider 1.0 import SensorTag.SeriesStorage 1.0 +import Style 1.0 -Window { +ApplicationWindow { id: mainWindow + property var singleSensorSource : null property alias contentFile: contentLoader.source - property DataProviderPool dataProviderPool + property DataProviderPool localProviderPool + property DataProviderPool remoteProviderPool property SeriesStorage seriesStorage property real globalBlinkOpacity: 1.0 property string addresses : "" + property bool localSelected : true + property var loggingOutput : null + + function getCurrentPool() { + if (localSelected) + return localProviderPool + else + return remoteProviderPool + } // Size defaults to the small display - width: 1920 - height: 1080 + width: Style.width + height: Style.height visible: true color: "black" @@ -74,13 +87,11 @@ Window { Loader { id: contentLoader - + visible: true anchors.fill: parent anchors.centerIn: parent } - - function startBlink() { flash.blinkers++; } diff --git a/tradeshow/iot-sensortag/resources/large/MainLarge.qml b/tradeshow/iot-sensortag/resources/large/MainLarge.qml deleted file mode 100644 index d855c0e..0000000 --- a/tradeshow/iot-sensortag/resources/large/MainLarge.qml +++ /dev/null @@ -1,177 +0,0 @@ -/**************************************************************************** -** -** 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/images/AirPressure/AirPre_base_gauge.png b/tradeshow/iot-sensortag/resources/large/images/AirPressure/AirPre_base_gauge.png Binary files differdeleted file mode 100644 index 30a24b8..0000000 --- a/tradeshow/iot-sensortag/resources/large/images/AirPressure/AirPre_base_gauge.png +++ /dev/null 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 Binary files differdeleted file mode 100644 index 5a4bcf0..0000000 --- a/tradeshow/iot-sensortag/resources/large/images/AmbientTemperature/ambTemp_display_amb.png +++ /dev/null diff --git a/tradeshow/iot-sensortag/resources/large/images/General/icon_sensor.png b/tradeshow/iot-sensortag/resources/large/images/General/icon_sensor.png Binary files differdeleted file mode 100644 index 8157ef7..0000000 --- a/tradeshow/iot-sensortag/resources/large/images/General/icon_sensor.png +++ /dev/null diff --git a/tradeshow/iot-sensortag/resources/large/images/General/separator.png b/tradeshow/iot-sensortag/resources/large/images/General/separator.png Binary files differdeleted file mode 100644 index 4dae4f8..0000000 --- a/tradeshow/iot-sensortag/resources/large/images/General/separator.png +++ /dev/null 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 Binary files differdeleted file mode 100644 index 0d0331c..0000000 --- a/tradeshow/iot-sensortag/resources/large/images/Humidity/humidity_base_gauge.png +++ /dev/null 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 Binary files differdeleted file mode 100644 index 381c4dd..0000000 --- a/tradeshow/iot-sensortag/resources/large/images/Humidity/humidity_max_hum.png +++ /dev/null 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 Binary files differdeleted file mode 100644 index c3f9442..0000000 --- a/tradeshow/iot-sensortag/resources/large/images/Humidity/humidity_min_hum.png +++ /dev/null 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 Binary files differdeleted file mode 100644 index 6a68729..0000000 --- a/tradeshow/iot-sensortag/resources/large/images/Light/light_base_gauge.png +++ /dev/null diff --git a/tradeshow/iot-sensortag/resources/large/images/Light/light_brightness.png b/tradeshow/iot-sensortag/resources/large/images/Light/light_brightness.png Binary files differdeleted file mode 100644 index 45b1e2b..0000000 --- a/tradeshow/iot-sensortag/resources/large/images/Light/light_brightness.png +++ /dev/null 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 Binary files differdeleted file mode 100644 index a506d2a..0000000 --- a/tradeshow/iot-sensortag/resources/large/images/ObjectTemperature/objTemp_base_circle.png +++ /dev/null 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 Binary files differdeleted file mode 100644 index bc320ac..0000000 --- a/tradeshow/iot-sensortag/resources/large/images/ObjectTemperature/objTemp_display_obj.png +++ /dev/null diff --git a/tradeshow/iot-sensortag/resources/medium/MainMedium.qml b/tradeshow/iot-sensortag/resources/medium/MainMedium.qml deleted file mode 100644 index d855c0e..0000000 --- a/tradeshow/iot-sensortag/resources/medium/MainMedium.qml +++ /dev/null @@ -1,177 +0,0 @@ -/**************************************************************************** -** -** 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 deleted file mode 100644 index e4d439d..0000000 --- a/tradeshow/iot-sensortag/resources/medium/StyleMedium.qml +++ /dev/null @@ -1,59 +0,0 @@ -/**************************************************************************** -** -** 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 Binary files differdeleted file mode 100644 index 2f1d658..0000000 --- a/tradeshow/iot-sensortag/resources/medium/images/AirPressure/AirPre_base_gauge.png +++ /dev/null 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 Binary files differdeleted file mode 100644 index cad440a..0000000 --- a/tradeshow/iot-sensortag/resources/medium/images/AmbientTemperature/ambTemp_display_amb.png +++ /dev/null diff --git a/tradeshow/iot-sensortag/resources/medium/images/General/icon_sensor.png b/tradeshow/iot-sensortag/resources/medium/images/General/icon_sensor.png Binary files differdeleted file mode 100644 index 49cc090..0000000 --- a/tradeshow/iot-sensortag/resources/medium/images/General/icon_sensor.png +++ /dev/null diff --git a/tradeshow/iot-sensortag/resources/medium/images/General/separator.png b/tradeshow/iot-sensortag/resources/medium/images/General/separator.png Binary files differdeleted file mode 100644 index dbd25a4..0000000 --- a/tradeshow/iot-sensortag/resources/medium/images/General/separator.png +++ /dev/null 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 Binary files differdeleted file mode 100644 index 494a0e6..0000000 --- a/tradeshow/iot-sensortag/resources/medium/images/Humidity/humidity_base_gauge.png +++ /dev/null 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 Binary files differdeleted file mode 100644 index c4a7d7b..0000000 --- a/tradeshow/iot-sensortag/resources/medium/images/Humidity/humidity_max_hum.png +++ /dev/null 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 Binary files differdeleted file mode 100644 index 75b83d1..0000000 --- a/tradeshow/iot-sensortag/resources/medium/images/Humidity/humidity_min_hum.png +++ /dev/null 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 Binary files differdeleted file mode 100644 index 9c66fbb..0000000 --- a/tradeshow/iot-sensortag/resources/medium/images/Light/light_base_gauge.png +++ /dev/null diff --git a/tradeshow/iot-sensortag/resources/medium/images/Light/light_brightness.png b/tradeshow/iot-sensortag/resources/medium/images/Light/light_brightness.png Binary files differdeleted file mode 100644 index fc8e82a..0000000 --- a/tradeshow/iot-sensortag/resources/medium/images/Light/light_brightness.png +++ /dev/null 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 Binary files differdeleted file mode 100644 index 86c966f..0000000 --- a/tradeshow/iot-sensortag/resources/medium/images/ObjectTemperature/objTemp_base_circle.png +++ /dev/null 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 Binary files differdeleted file mode 100644 index 77d53f3..0000000 --- a/tradeshow/iot-sensortag/resources/medium/images/ObjectTemperature/objTemp_display_obj.png +++ /dev/null diff --git a/tradeshow/iot-sensortag/resources/small/MainSmall.qml b/tradeshow/iot-sensortag/resources/small/MainSmall.qml index 83835e3..7528b6b 100644 --- a/tradeshow/iot-sensortag/resources/small/MainSmall.qml +++ b/tradeshow/iot-sensortag/resources/small/MainSmall.qml @@ -55,30 +55,20 @@ Item { id: main function startRescan(sensor) { - if (sensor.state === SensorTagData.NotFound) - dataProviderPool.startScanning(); - else if (sensor.state === SensorTagData.Scanning) - dataProviderPool.disconnectProvider(sensor.providerId) - else if (sensor.state !== SensorTagData.Connected) - sensor.startServiceScan(); + // ### Only do this magic when a local device is connected +// if (sensor.state === SensorTagData.NotFound) +// dataProviderPool.startScanning(); +// else if (sensor.state === SensorTagData.Scanning) +// dataProviderPool.disconnectProvider(sensor.providerId) +// else if (sensor.state !== SensorTagData.Connected) +// sensor.startServiceScan(); } anchors.fill: parent Component.onCompleted: { - dataProviderPool.startScanning(); - - // UI gets information about the intended setup of the - // sensor even though they have not been really discovered yet - 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); - accelometer.sensor = dataProviderPool.getProvider(SensorTagData.Accelometer); - rotationMain.sensor = dataProviderPool.getProvider(SensorTagData.Rotation); + localProviderPool.startScanning(); + remoteProviderPool.startScanning(); } Column { @@ -172,6 +162,7 @@ Item { RotationPage { id: rotationMain + visible: main.width > (leftPane.width + rightPane.width + 800) anchors.top: topToolbar.bottom anchors.left: leftPane.right anchors.leftMargin: 32 diff --git a/tradeshow/iot-sensortag/resources/small/StyleSmall.qml b/tradeshow/iot-sensortag/resources/small/StyleSmall.qml index e4d439d..aa19262 100644 --- a/tradeshow/iot-sensortag/resources/small/StyleSmall.qml +++ b/tradeshow/iot-sensortag/resources/small/StyleSmall.qml @@ -56,4 +56,9 @@ QtObject { property int topToolbarSmallFontSize: 20 property int topToolbarLargeFontSize: 62 + + property int height: 1080 + property int width: 1920 + + property string uiStyle: "small" // "watch",... } diff --git a/tradeshow/iot-sensortag/resources/watch/MainWatch.qml b/tradeshow/iot-sensortag/resources/watch/MainWatch.qml new file mode 100644 index 0000000..5a500a2 --- /dev/null +++ b/tradeshow/iot-sensortag/resources/watch/MainWatch.qml @@ -0,0 +1,301 @@ +/**************************************************************************** +** +** 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 QtQuick.Layouts 1.3 +import QtQuick.Controls 2.2 +import SensorTag.DataProvider 1.0 +import "../base" + +Item { + id: main + + function startRescan(sensor) { + // ### Only do this magic when a local device is connected +// if (sensor.state === SensorTagData.NotFound) +// dataProviderPool.startScanning(); +// else if (sensor.state === SensorTagData.Scanning) +// dataProviderPool.disconnectProvider(sensor.providerId) +// else if (sensor.state !== SensorTagData.Connected) +// sensor.startServiceScan(); + } + + anchors.fill: parent + + Component.onCompleted: { + localProviderPool.startScanning(); + remoteProviderPool.startScanning(); + } + + property int titleFontSize: 22 + + SwipeView { + id: swipePane + currentIndex: 5 + anchors.left: main.left + anchors.leftMargin: 8 + anchors.top: topToolbar.bottom + anchors.bottom: main.bottom + width: main.width + height: main.height + + Item { + RotationPage { + scale: 0.35 + width: swipePane.width + height: swipePane.height + } + } + + Item { + Text { + text: qsTr("Ambient Temperature") + anchors.fill: parent + color: "white" + font.pixelSize: titleFontSize + } + TemperatureChart { + id: ambientTemp + width: swipePane.width + height: swipePane.height + onClicked: main.startRescan(sensor) + scale: 0.85 + title: "" + } + } + + Item { + Text { + text: qsTr("Object Temperature") + anchors.fill: parent + color: "white" + font.pixelSize: titleFontSize + } + ObjectTemperatureChart { + id: objectTemp + anchors.fill: parent + anchors.leftMargin: -40 + onClicked: main.startRescan(sensor) + scale: 0.8 + title: "" + } + } + + Item { + Text { + text: qsTr("Humidity") + anchors.fill: parent + color: "white" + font.pixelSize: titleFontSize + } + HumidityChart { + id: humidity + onClicked: main.startRescan(sensor) + title: "" + scale: 0.80 + anchors.fill: parent + anchors.leftMargin: -40 + anchors.topMargin: 17 + } + } + + Item { + Text { + text: qsTr("Altitude") + anchors.fill: parent + color: "white" + font.pixelSize: titleFontSize + } + AltitudeChart { + id: airPressure + width: swipePane.width + height: swipePane.height + onClicked: main.startRescan(sensor) + title: "" + scale: 0.80 + } + } + + Item { + Text { + text: qsTr("Light Intensity") + anchors.fill: parent + color: "white" + font.pixelSize: titleFontSize + } + LightChart { + id: light + height: swipePane.height + width: swipePane.width*1.1 + scale: 0.70 + onClicked: main.startRescan(sensor) + title: "" + } + } + + Item { + Text { + text: qsTr("Magnetometer") + anchors.fill: parent + color: "white" + font.pixelSize: titleFontSize + } + MagnetometerChart { + id: magnetometer + width: swipePane.width + height: swipePane.height + onClicked: main.startRescan(sensor) + title: "" + } + } + + Item { + Text { + text: qsTr("Gyroscope") + anchors.fill: parent + color: "white" + font.pixelSize: titleFontSize + } + GyroChart { + id: rotation + width: swipePane.width + height: swipePane.height + onClicked: main.startRescan(sensor) + title: "" + } + } + + Item { + Text { + text: qsTr("Accelometer") + anchors.fill: parent + color: "white" + font.pixelSize: titleFontSize + } + AccelChart { + id: accelometer + width: swipePane.width + height: swipePane.height + onClicked: main.startRescan(sensor) + title: "" + } + } + + Item { + Text { + text: qsTr("About") + anchors.fill: parent + color: "white" + font.pixelSize: titleFontSize + } + + Rectangle { + id: aboutView + width: swipePane.width + height: swipePane.height + color: "transparent" + + ColumnLayout { + id: aboutLayout + width: parent.width * 0.8 + height: parent.width * 0.8 + anchors.centerIn: parent + + Image { + source: "images/BuiltWithQt.png" + fillMode: Image.PreserveAspectFit + width: parent.width + Layout.maximumWidth: parent.width - 20 + Layout.maximumHeight: 100 + anchors.horizontalCenter: parent.horizontalCenter + } + + Text { + id: qtLinkLabel + color: "white" + text: "Visit us at http://qt.io" + anchors.horizontalCenter: parent.horizontalCenter + font.pixelSize: Style.indicatorTitleSize + } + + Text { + color: "white" + text: "qt.io/demos/IoTScale" + anchors.horizontalCenter: parent.horizontalCenter + font.pixelSize: Style.indicatorTitleSize + } + } + } + } + + } + + TopToolbar { + id: topToolbar + anchors.top: main.top + anchors.left: main.left + anchors.right: main.right + height: 48 + topbar.visible: false + date.visible: false + Image { + id: quit + source: "images/Toolbar/exit_button.png" + fillMode: Image.PreserveAspectFit + anchors.top: parent.top + anchors.right: parent.right + anchors.margins: 5 + scale: 0.7 + MouseArea { + anchors.fill: parent + onClicked: Qt.quit() + } + } + } +} diff --git a/tradeshow/iot-sensortag/resources/large/StyleLarge.qml b/tradeshow/iot-sensortag/resources/watch/StyleWatch.qml index e4d439d..857b0f1 100644 --- a/tradeshow/iot-sensortag/resources/large/StyleLarge.qml +++ b/tradeshow/iot-sensortag/resources/watch/StyleWatch.qml @@ -52,8 +52,13 @@ import QtQuick 2.0 QtObject { property int indicatorTitleFontSize: 22 - property int indicatorTitleSize: 41 + property int indicatorTitleSize: 20 - property int topToolbarSmallFontSize: 20 - property int topToolbarLargeFontSize: 62 + property int topToolbarSmallFontSize: 10 + property int topToolbarLargeFontSize: 30 + + property int height: 320 + property int width: 320 + + property string uiStyle: "watch" } diff --git a/tradeshow/iot-sensortag/resources/watch/images/BuiltWithQt.png b/tradeshow/iot-sensortag/resources/watch/images/BuiltWithQt.png Binary files differnew file mode 100644 index 0000000..7e56de7 --- /dev/null +++ b/tradeshow/iot-sensortag/resources/watch/images/BuiltWithQt.png diff --git a/tradeshow/iot-sensortag/resources/watch/images/Toolbar/exit_button.png b/tradeshow/iot-sensortag/resources/watch/images/Toolbar/exit_button.png Binary files differnew file mode 100644 index 0000000..06f2ebe --- /dev/null +++ b/tradeshow/iot-sensortag/resources/watch/images/Toolbar/exit_button.png |