From c40611e0ec7a161d9bbdf3845684c27b031aa77a Mon Sep 17 00:00:00 2001 From: Andrew O'Doherty Date: Wed, 22 Nov 2017 12:56:45 +0100 Subject: iot-sensortag: Create a quit button SmartWatch demo SmartWatch demo requires a button to exit the application Change-Id: I64f366d70960e868bcf9f4c644f81a145edd44b6 Reviewed-by: Maurice Kalinowski --- tradeshow/iot-sensortag/resources/base/TopToolbar.qml | 1 + tradeshow/iot-sensortag/resources/watch/MainWatch.qml | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/tradeshow/iot-sensortag/resources/base/TopToolbar.qml b/tradeshow/iot-sensortag/resources/base/TopToolbar.qml index 3c92c05..bb0ecf9 100644 --- a/tradeshow/iot-sensortag/resources/base/TopToolbar.qml +++ b/tradeshow/iot-sensortag/resources/base/TopToolbar.qml @@ -175,6 +175,7 @@ Item { id: utcGmt text: "UTC/GMT" color: "white" + visible: dateLabel.visible anchors.left: timeLabel.right anchors.leftMargin: 16 anchors.bottom: parent.bottom diff --git a/tradeshow/iot-sensortag/resources/watch/MainWatch.qml b/tradeshow/iot-sensortag/resources/watch/MainWatch.qml index 801c38b..5fd6153 100644 --- a/tradeshow/iot-sensortag/resources/watch/MainWatch.qml +++ b/tradeshow/iot-sensortag/resources/watch/MainWatch.qml @@ -236,5 +236,18 @@ Item { 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() + } + } } } -- cgit v1.2.3 From aefe74b98d1079544cf5cd1334a6e849b03417c3 Mon Sep 17 00:00:00 2001 From: Maurice Kalinowski Date: Fri, 15 Dec 2017 10:38:07 +0100 Subject: iot-sensortag: Fix build against 5.10.0 Before the final release the Qt Mqtt API has been updated. Change-Id: I6f9e3e9cc5db16fe87d3493f12703194e9f14654 Reviewed-by: Lorenz Haas Reviewed-by: Oliver Wolff Reviewed-by: Alex Blasche --- tradeshow/iot-sensortag/mqttdataprovider.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tradeshow/iot-sensortag/mqttdataprovider.cpp b/tradeshow/iot-sensortag/mqttdataprovider.cpp index 8985f02..16bc096 100644 --- a/tradeshow/iot-sensortag/mqttdataprovider.cpp +++ b/tradeshow/iot-sensortag/mqttdataprovider.cpp @@ -108,7 +108,7 @@ void MqttDataProvider::reset() void MqttDataProvider::messageReceived(const QMqttMessage &msg) { - parseMessage(msg.payload(), msg.topic()); + parseMessage(msg.payload(), msg.topic().name()); if (!m_pollTimer->isActive()) m_pollTimer->start(); } -- cgit v1.2.3 From f2967d09e2d7ac3805e4a1370ba88a9715ff72c2 Mon Sep 17 00:00:00 2001 From: Maurice Kalinowski Date: Fri, 15 Dec 2017 10:37:27 +0100 Subject: iot-sensortag: Add an About tab For the watch UI it is helpful to provide an About to visualize it is a Qt application. Change-Id: I83779c038dcaac12ca873b53f4d82d0e801233f2 Reviewed-by: Andrew O'Doherty Reviewed-by: Oliver Wolff Reviewed-by: Alex Blasche --- .../iot-sensortag/resources/watch/MainWatch.qml | 48 +++++++++++++++++++++ .../resources/watch/images/BuiltWithQt.png | Bin 0 -> 22172 bytes tradeshow/iot-sensortag/uiwatch.qrc | 1 + 3 files changed, 49 insertions(+) create mode 100644 tradeshow/iot-sensortag/resources/watch/images/BuiltWithQt.png diff --git a/tradeshow/iot-sensortag/resources/watch/MainWatch.qml b/tradeshow/iot-sensortag/resources/watch/MainWatch.qml index 5fd6153..5a500a2 100644 --- a/tradeshow/iot-sensortag/resources/watch/MainWatch.qml +++ b/tradeshow/iot-sensortag/resources/watch/MainWatch.qml @@ -226,6 +226,54 @@ Item { 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 { diff --git a/tradeshow/iot-sensortag/resources/watch/images/BuiltWithQt.png b/tradeshow/iot-sensortag/resources/watch/images/BuiltWithQt.png new file mode 100644 index 0000000..7e56de7 Binary files /dev/null and b/tradeshow/iot-sensortag/resources/watch/images/BuiltWithQt.png differ diff --git a/tradeshow/iot-sensortag/uiwatch.qrc b/tradeshow/iot-sensortag/uiwatch.qrc index 74093da..5167663 100644 --- a/tradeshow/iot-sensortag/uiwatch.qrc +++ b/tradeshow/iot-sensortag/uiwatch.qrc @@ -30,5 +30,6 @@ resources/small/images/Gyro/gyro_ring2.png resources/small/images/Gyro/gyro_ring3.png resources/small/images/Gyro/gyro_outer.png + resources/watch/images/BuiltWithQt.png -- cgit v1.2.3 From f8bbf6dd890c1d111bda52bf83e8c6c90213844e Mon Sep 17 00:00:00 2001 From: Mikko Gronoff Date: Thu, 25 Jan 2018 15:13:53 +0200 Subject: Doc: Bump version to 5.10.1 Change-Id: I5e2c5e2003744f1e46a38953720316cdc0da6e66 Reviewed-by: Tarja Sundqvist --- doc/b2qt-demos.qdoc | 4 ++-- doc/b2qt-demos.qdocconf | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/b2qt-demos.qdoc b/doc/b2qt-demos.qdoc index b9fd565..1a14796 100644 --- a/doc/b2qt-demos.qdoc +++ b/doc/b2qt-demos.qdoc @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2016 The Qt Company Ltd. +** Copyright (C) 2018 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the examples of Qt for Device Creation. @@ -50,7 +50,7 @@ /*! \page index.html - \title Qt 5.10.0 for Device Creation Examples and Demos + \title Qt 5.10.1 for Device Creation Examples and Demos \SDK has a number of examples and demos. These are included in the \B2Q images, available in the launcher that is run by default at diff --git a/doc/b2qt-demos.qdocconf b/doc/b2qt-demos.qdocconf index 2f4b125..51931cb 100644 --- a/doc/b2qt-demos.qdocconf +++ b/doc/b2qt-demos.qdocconf @@ -5,8 +5,8 @@ outputencoding = UTF-8 sourceencoding = UTF-8 project = QtforDeviceCreationDemos -description = Qt 5.10.0 for Device Creation Examples and Demos -version = 5.10.0 +description = Qt 5.10.1 for Device Creation Examples and Demos +version = 5.10.1 sourcedirs = . imagedirs += images @@ -21,9 +21,9 @@ exampledirs = .. qhp.projects = QtforDeviceCreationDemos qhp.QtforDeviceCreationDemos.file = b2qt-demos.qhp -qhp.QtforDeviceCreationDemos.namespace = org.qt-project.b2qt-demos.5100 +qhp.QtforDeviceCreationDemos.namespace = org.qt-project.b2qt-demos.5101 qhp.QtforDeviceCreationDemos.virtualFolder = b2qt-demos -qhp.QtforDeviceCreationDemos.indexTitle = Qt 5.10.0 for Device Creation Examples and Demos +qhp.QtforDeviceCreationDemos.indexTitle = Qt 5.10.1 for Device Creation Examples and Demos qhp.QtforDeviceCreationDemos.indexRoot = qhp.QtforDeviceCreationDemos.subprojects = demos @@ -35,4 +35,4 @@ manifestmeta.b2qt.names = "QtforDeviceCreationDemos/*" macro.B2Q = "Boot to Qt" macro.SDK = "Qt for Device Creation" -navigation.landingpage = "Qt 5.10.0 for Device Creation Examples and Demos" +navigation.landingpage = "Qt 5.10.1 for Device Creation Examples and Demos" -- cgit v1.2.3