aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols2/wearable/qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quickcontrols2/wearable/qml')
-rw-r--r--examples/quickcontrols2/wearable/qml/Alarms/AlarmsPage.qml111
-rw-r--r--examples/quickcontrols2/wearable/qml/Alarms/images/alarms.pngbin0 -> 19340 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Fitness/FitnessPage.qml130
-rw-r--r--examples/quickcontrols2/wearable/qml/Fitness/fitness.js65
-rw-r--r--examples/quickcontrols2/wearable/qml/Fitness/images/fitness.pngbin0 -> 19110 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Fitness/images/man-running.pngbin0 -> 16047 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Fitness/images/man-walking.pngbin0 -> 16062 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/LauncherPage.qml192
-rw-r--r--examples/quickcontrols2/wearable/qml/NaviButton.qml83
-rw-r--r--examples/quickcontrols2/wearable/qml/Navigation/NavigationPage.qml118
-rw-r--r--examples/quickcontrols2/wearable/qml/Navigation/RouteElement.qml95
-rw-r--r--examples/quickcontrols2/wearable/qml/Navigation/images/end.pngbin0 -> 16408 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Navigation/images/leftturn.pngbin0 -> 16111 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Navigation/images/marker.pngbin0 -> 16408 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Navigation/images/rightturn.pngbin0 -> 16077 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Navigation/images/route.pngbin0 -> 19411 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Navigation/images/start.pngbin0 -> 16411 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Navigation/images/straight.pngbin0 -> 15727 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Navigation/images/uturn.pngbin0 -> 3254 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Navigation/navigation.js131
-rw-r--r--examples/quickcontrols2/wearable/qml/Navigation/walk_route.json1
-rw-r--r--examples/quickcontrols2/wearable/qml/Notifications/NotificationsPage.qml112
-rw-r--r--examples/quickcontrols2/wearable/qml/Notifications/images/avatarf.pngbin0 -> 16396 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Notifications/images/avatarm.pngbin0 -> 16198 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Notifications/images/missedcall.pngbin0 -> 2833 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Notifications/images/notifications.pngbin0 -> 19625 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Notifications/notifications.js72
-rw-r--r--examples/quickcontrols2/wearable/qml/Settings/SettingsPage.qml152
-rw-r--r--examples/quickcontrols2/wearable/qml/Settings/images/bluetooth.pngbin0 -> 2770 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Settings/images/brightness.pngbin0 -> 2692 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Settings/images/contrast.pngbin0 -> 2347 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Settings/images/settings.pngbin0 -> 19715 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Settings/images/wifi.pngbin0 -> 16308 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Style/PageIndicator.qml89
-rw-r--r--examples/quickcontrols2/wearable/qml/Style/Slider.qml86
-rw-r--r--examples/quickcontrols2/wearable/qml/Style/Switch.qml86
-rw-r--r--examples/quickcontrols2/wearable/qml/Style/UIStyle.qml84
-rw-r--r--examples/quickcontrols2/wearable/qml/Style/qmldir1
-rw-r--r--examples/quickcontrols2/wearable/qml/Weather/WeatherPage.qml296
-rw-r--r--examples/quickcontrols2/wearable/qml/Weather/images/humidity.pngbin0 -> 16450 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Weather/images/pressure.pngbin0 -> 16902 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Weather/images/sunrise.pngbin0 -> 16534 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Weather/images/sunset.pngbin0 -> 16586 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Weather/images/temperature.pngbin0 -> 2004 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Weather/images/weather.pngbin0 -> 19281 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Weather/images/wind.pngbin0 -> 16440 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Weather/weather.js77
-rw-r--r--examples/quickcontrols2/wearable/qml/Weather/weather.json1
-rw-r--r--examples/quickcontrols2/wearable/qml/WorldClock/Clock.qml186
-rw-r--r--examples/quickcontrols2/wearable/qml/WorldClock/WorldClockPage.qml107
-rw-r--r--examples/quickcontrols2/wearable/qml/WorldClock/images/center.pngbin0 -> 765 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/WorldClock/images/clock-night.pngbin0 -> 25619 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/WorldClock/images/clock.pngbin0 -> 15616 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/WorldClock/images/second.pngbin0 -> 1015 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/WorldClock/images/swissdaydial.pngbin0 -> 7999 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/WorldClock/images/swissdayhour.pngbin0 -> 1088 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/WorldClock/images/swissdayminute.pngbin0 -> 1109 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/WorldClock/images/swissnightdial.pngbin0 -> 8899 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/WorldClock/images/swissnighthour.pngbin0 -> 1117 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/WorldClock/images/swissnightminute.pngbin0 -> 1063 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/WorldClock/images/swissseconds.pngbin0 -> 2752 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/WorldClock/images/watch.pngbin0 -> 19015 bytes
62 files changed, 2275 insertions, 0 deletions
diff --git a/examples/quickcontrols2/wearable/qml/Alarms/AlarmsPage.qml b/examples/quickcontrols2/wearable/qml/Alarms/AlarmsPage.qml
new file mode 100644
index 00000000..e07908ee
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Alarms/AlarmsPage.qml
@@ -0,0 +1,111 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $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.Controls 2.0 as QQC2
+import "../Style"
+
+Item {
+ QQC2.SwipeView {
+ id: svAlarmsContainer
+
+ anchors.fill: parent
+
+ Repeater {
+ model: ListModel {
+ ListElement { name: qsTr("Week Days"); state: true; time: "06:00 AM" }
+ ListElement { name: qsTr("Week Ends"); state: false; time: "07:30 AM" }
+ }
+
+ Item {
+ Column {
+ spacing: 30
+ anchors.centerIn: parent
+
+ QQC2.Switch {
+ id: stateSwitch
+ checked: model.state
+ anchors.left: nameLabel.right
+ }
+
+ Text {
+ text: model.time
+ anchors.horizontalCenter: parent.horizontalCenter
+ verticalAlignment: Text.AlignVCenter
+ height: UIStyle.fontSizeXL
+ font.bold: stateSwitch.checked
+ font.pixelSize: stateSwitch.checked ? UIStyle.fontSizeXL : UIStyle.fontSizeL
+ font.letterSpacing: 4
+ color: UIStyle.colorQtGray1
+ }
+
+ Text {
+ id: nameLabel
+ text: model.name
+ anchors.horizontalCenter: parent.horizontalCenter
+ font.pixelSize: UIStyle.fontSizeS
+ font.italic: true
+ font.bold: true
+ font.letterSpacing: 1
+ color: UIStyle.colorQtGray2
+ }
+ }
+ }
+ }
+ }
+
+ QQC2.PageIndicator {
+ count: svAlarmsContainer.count
+ currentIndex: svAlarmsContainer.currentIndex
+
+ anchors.bottom: svAlarmsContainer.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+}
diff --git a/examples/quickcontrols2/wearable/qml/Alarms/images/alarms.png b/examples/quickcontrols2/wearable/qml/Alarms/images/alarms.png
new file mode 100644
index 00000000..00ec663e
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Alarms/images/alarms.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Fitness/FitnessPage.qml b/examples/quickcontrols2/wearable/qml/Fitness/FitnessPage.qml
new file mode 100644
index 00000000..b3b0a0c5
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Fitness/FitnessPage.qml
@@ -0,0 +1,130 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $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.Controls 2.0 as QQ2
+import "../Style"
+import "fitness.js" as FitnessData
+
+Item {
+ QQ2.SwipeView {
+ id: svFitnessContainer
+
+ anchors.fill: parent
+
+ Item {
+ id: fitnessPage1
+
+ Column {
+ anchors.centerIn: parent
+ spacing: 15
+
+ Text {
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: qsTr("Steps: ") + FitnessData.getSteps()
+ font.italic: true
+ font.pixelSize: UIStyle.fontSizeM
+ color: UIStyle.colorQtGray1
+ }
+ Image {
+ anchors.horizontalCenter: parent.horizontalCenter
+ source: "images/man-walking.png"
+ }
+ Text {
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: qsTr("Calories: ") + FitnessData.getCalories()
+ font.pixelSize: UIStyle.fontSizeS
+ font.italic: true
+ color: UIStyle.colorQtGray3
+ }
+ }
+ }
+
+ Item {
+ id: fitnessPage2
+
+ Column {
+ anchors.centerIn: parent
+ spacing: 15
+
+ Text {
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: qsTr("Distance: ")
+ + FitnessData.getDistance()
+ + qsTr(" miles")
+ font.italic: true
+ font.pixelSize: UIStyle.fontSizeM
+ color: UIStyle.colorQtGray1
+ }
+ Image {
+ anchors.horizontalCenter: parent.horizontalCenter
+ source: "images/man-running.png"
+ }
+ Text {
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: qsTr("Time: ")
+ + FitnessData.getTime()
+ + qsTr(" mins")
+ font.pixelSize: UIStyle.fontSizeS
+ font.italic: true
+ color: UIStyle.colorQtGray3
+ }
+ }
+ }
+ }
+
+ QQ2.PageIndicator {
+ count: svFitnessContainer.count
+ currentIndex: svFitnessContainer.currentIndex
+
+ anchors.bottom: svFitnessContainer.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+}
diff --git a/examples/quickcontrols2/wearable/qml/Fitness/fitness.js b/examples/quickcontrols2/wearable/qml/Fitness/fitness.js
new file mode 100644
index 00000000..7e159e2a
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Fitness/fitness.js
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $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$
+**
+****************************************************************************/
+
+function getSteps() {
+ return 105;
+}
+
+function getCalories() {
+ return 150;
+}
+
+function getDistance() {
+ return 10;
+}
+
+function getTime() {
+ return "00:30";
+}
diff --git a/examples/quickcontrols2/wearable/qml/Fitness/images/fitness.png b/examples/quickcontrols2/wearable/qml/Fitness/images/fitness.png
new file mode 100644
index 00000000..a8789a61
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Fitness/images/fitness.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Fitness/images/man-running.png b/examples/quickcontrols2/wearable/qml/Fitness/images/man-running.png
new file mode 100644
index 00000000..5efab6e2
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Fitness/images/man-running.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Fitness/images/man-walking.png b/examples/quickcontrols2/wearable/qml/Fitness/images/man-walking.png
new file mode 100644
index 00000000..01add534
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Fitness/images/man-walking.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/LauncherPage.qml b/examples/quickcontrols2/wearable/qml/LauncherPage.qml
new file mode 100644
index 00000000..6ff118df
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/LauncherPage.qml
@@ -0,0 +1,192 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $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.Controls 2.0 as QQC2
+import "Style"
+
+PathView {
+ id: circularView
+
+ signal launched(string page)
+
+ readonly property int cX: width / 2
+ readonly property int cY: height / 2
+ readonly property int itemSize: size / 4
+ readonly property int size: Math.min(width - 80, height)
+ readonly property int radius: size / 2 - itemSize / 3
+
+ snapMode: PathView.SnapToItem
+
+ model: ListModel {
+ ListElement {
+ title: qsTr("World Clock")
+ icon: "WorldClock/images/watch.png"
+ page: "WorldClock/WorldClockPage.qml"
+ }
+ ListElement {
+ title: qsTr("Navigation")
+ icon: "Navigation/images/route.png"
+ page: "Navigation/NavigationPage.qml"
+ }
+ ListElement {
+ title: qsTr("Weather")
+ icon: "Weather/images/weather.png"
+ page: "Weather/WeatherPage.qml"
+ }
+ ListElement {
+ title: qsTr("Fitness")
+ icon: "Fitness/images/fitness.png"
+ page: "Fitness/FitnessPage.qml"
+ }
+ ListElement {
+ title: qsTr("Notifications")
+ icon: "Notifications/images/notifications.png"
+ page: "Notifications/NotificationsPage.qml"
+ }
+ ListElement {
+ title: qsTr("Alarm")
+ icon: "Alarms/images/alarms.png"
+ page: "Alarms/AlarmsPage.qml"
+ }
+ ListElement {
+ title: qsTr("Settings")
+ icon: "Settings/images/settings.png"
+ page: "Settings/SettingsPage.qml"
+ }
+ }
+
+ delegate: QQC2.AbstractButton {
+ text: model.title
+ opacity: PathView.itemOpacity
+
+ contentItem: Image {
+ source: model.icon
+ fillMode: Image.Pad
+ sourceSize.width: circularView.itemSize
+ sourceSize.height: circularView.itemSize
+ }
+
+ background: Rectangle {
+ radius: width / 2
+ color: "transparent"
+
+ border.width: 3
+ border.color: parent.PathView.isCurrentItem ?
+ "transparent"
+ : UIStyle.colorQtGray4
+ }
+
+ onClicked: {
+ if (PathView.isCurrentItem)
+ circularView.launched(Qt.resolvedUrl(page))
+ else
+ circularView.currentIndex = index
+ }
+ }
+
+ path: Path {
+ startX: circularView.cX
+ startY: circularView.cY
+ PathAttribute {
+ name: "itemOpacity"
+ value: 1.0
+ }
+ PathLine {
+ x: circularView.cX + circularView.radius
+ y: circularView.cY
+ }
+ PathAttribute {
+ name: "itemOpacity"
+ value: 0.7
+ }
+ PathArc {
+ x: circularView.cX - circularView.radius
+ y: circularView.cY
+ radiusX: circularView.radius
+ radiusY: circularView.radius
+ useLargeArc: true
+ direction: PathArc.Clockwise
+ }
+ PathAttribute {
+ name: "itemOpacity"
+ value: 0.5
+ }
+ PathArc {
+ x: circularView.cX + circularView.radius
+ y: circularView.cY
+ radiusX: circularView.radius
+ radiusY: circularView.radius
+ useLargeArc: true
+ direction: PathArc.Clockwise
+ }
+ PathAttribute {
+ name: "itemOpacity"
+ value: 0.3
+ }
+ }
+
+ Text {
+ id: appTitle
+
+ property Item currentItem: circularView.currentItem
+
+ visible: currentItem ? currentItem.PathView.itemOpacity === 1.0 : 0
+
+ text: currentItem ? currentItem.text : ""
+ anchors.centerIn: parent
+ anchors.verticalCenterOffset: (circularView.itemSize + height) / 2
+
+ font.bold: true
+ font.pixelSize: circularView.itemSize / 3
+ font.letterSpacing: 1
+ color: UIStyle.colorQtGray1
+ }
+}
diff --git a/examples/quickcontrols2/wearable/qml/NaviButton.qml b/examples/quickcontrols2/wearable/qml/NaviButton.qml
new file mode 100644
index 00000000..7a8f7c14
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/NaviButton.qml
@@ -0,0 +1,83 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $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.Controls 2.0 as QQC2
+import "Style"
+
+QQC2.AbstractButton {
+ id: button
+
+ property int edge: Qt.TopEdge
+ property alias imageSource: image.source
+
+ contentItem: Image {
+ id: image
+ fillMode: Image.Pad
+ sourceSize { width: 40; height: 40 } // ### TODO: resize the image
+ }
+
+ background: Rectangle {
+ height: button.height * 4
+ width: height
+ radius: width / 2
+
+ anchors.horizontalCenter: button.horizontalCenter
+ anchors.top: edge === Qt.BottomEdge ? button.top : undefined
+ anchors.bottom: edge === Qt.TopEdge ? button.bottom : undefined
+
+ color: UIStyle.colorQtGray2
+ }
+
+ transform: Translate {
+ Behavior on y { NumberAnimation { } }
+ y: enabled ? 0 : edge === Qt.TopEdge ? -button.height : button.height
+ }
+}
diff --git a/examples/quickcontrols2/wearable/qml/Navigation/NavigationPage.qml b/examples/quickcontrols2/wearable/qml/Navigation/NavigationPage.qml
new file mode 100644
index 00000000..bdc3e494
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Navigation/NavigationPage.qml
@@ -0,0 +1,118 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $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 "../Style"
+import "navigation.js" as NavigationData
+
+Item {
+ Column {
+ anchors.fill: parent
+ anchors.margins: 2
+ spacing: 2
+
+ Rectangle {
+ anchors.horizontalCenter: parent.horizontalCenter
+ width: parent.width
+ height: titleRow.height
+
+ color: UIStyle.colorQtGray9
+
+ Row {
+ id: titleRow
+ spacing: 10
+ anchors.centerIn: parent
+
+ Image {
+ anchors.verticalCenter: parent.verticalCenter
+ source: "images/route.png"
+ fillMode: Image.PreserveAspectCrop
+ }
+ Text {
+ anchors.verticalCenter: parent.verticalCenter
+ text: qsTr("Walking")
+ font.pixelSize: UIStyle.fontSizeM
+ font.letterSpacing: 2
+ color: UIStyle.colorQtGray2
+ }
+ }
+ }
+
+ ListModel {
+ id: routeModel
+ }
+
+ ListView {
+ id: routeView
+
+ width: parent.width
+ height: parent.height - titleRow.height - parent.spacing
+ property var imageList: ["straight.png",
+ "leftturn.png",
+ "rightturn.png",
+ "uturn.png",
+ "start.png",
+ "end.png"]
+
+ clip: true
+ focus: true
+ boundsBehavior: Flickable.StopAtBounds
+ snapMode: ListView.SnapToItem
+ model: routeModel
+ delegate: RouteElement {
+ width: routeView.width
+ height: routeView.height
+ }
+ }
+ }
+ Component.onCompleted: {
+ NavigationData.requestNavigationRoute(routeModel)
+ }
+}
diff --git a/examples/quickcontrols2/wearable/qml/Navigation/RouteElement.qml b/examples/quickcontrols2/wearable/qml/Navigation/RouteElement.qml
new file mode 100644
index 00000000..79928012
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Navigation/RouteElement.qml
@@ -0,0 +1,95 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $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 "../Style"
+
+Rectangle {
+ color: UIStyle.colorQtGray8
+
+ Row {
+ spacing: 5
+ width: parent.width - 80
+ anchors.centerIn: parent
+
+ Image {
+ id: img
+ anchors.verticalCenter: parent.verticalCenter
+ source: "images/" + navImage
+ fillMode: Image.PreserveAspectFit
+ }
+
+ Column {
+ spacing: 5
+ width: parent.width - img.width
+ anchors.verticalCenter: parent.verticalCenter
+
+ Text {
+ width: parent.width
+ wrapMode: Text.WordWrap
+ text: navInstruction
+ font.pixelSize: UIStyle.fontSizeS
+ verticalAlignment: Text.AlignVCenter
+ padding: 1
+ color: UIStyle.colorQtGray1
+ }
+
+ Text {
+ width: parent.width
+ wrapMode: Text.WordWrap
+ text: navAuxInfo
+ font.pixelSize: UIStyle.fontSizeXS
+ verticalAlignment: Text.AlignVCenter
+ padding: 1
+ color: UIStyle.colorQtGray2
+ }
+ }
+ }
+}
diff --git a/examples/quickcontrols2/wearable/qml/Navigation/images/end.png b/examples/quickcontrols2/wearable/qml/Navigation/images/end.png
new file mode 100644
index 00000000..3006c0f3
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Navigation/images/end.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Navigation/images/leftturn.png b/examples/quickcontrols2/wearable/qml/Navigation/images/leftturn.png
new file mode 100644
index 00000000..3c416304
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Navigation/images/leftturn.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Navigation/images/marker.png b/examples/quickcontrols2/wearable/qml/Navigation/images/marker.png
new file mode 100644
index 00000000..3006c0f3
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Navigation/images/marker.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Navigation/images/rightturn.png b/examples/quickcontrols2/wearable/qml/Navigation/images/rightturn.png
new file mode 100644
index 00000000..a29ec694
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Navigation/images/rightturn.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Navigation/images/route.png b/examples/quickcontrols2/wearable/qml/Navigation/images/route.png
new file mode 100644
index 00000000..b8ac9d7e
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Navigation/images/route.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Navigation/images/start.png b/examples/quickcontrols2/wearable/qml/Navigation/images/start.png
new file mode 100644
index 00000000..1adf0ac8
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Navigation/images/start.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Navigation/images/straight.png b/examples/quickcontrols2/wearable/qml/Navigation/images/straight.png
new file mode 100644
index 00000000..e3c5bb5c
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Navigation/images/straight.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Navigation/images/uturn.png b/examples/quickcontrols2/wearable/qml/Navigation/images/uturn.png
new file mode 100644
index 00000000..b6917f67
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Navigation/images/uturn.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Navigation/navigation.js b/examples/quickcontrols2/wearable/qml/Navigation/navigation.js
new file mode 100644
index 00000000..0414731d
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Navigation/navigation.js
@@ -0,0 +1,131 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $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$
+**
+****************************************************************************/
+
+function requestNavigationRoute(rModel) {
+ var xhr = new XMLHttpRequest;
+ xhr.open("GET", "walk_route.json");
+ xhr.onreadystatechange = function () {
+ if (xhr.readyState === XMLHttpRequest.DONE) {
+ var a = JSON.parse(xhr.responseText);
+ var steps = a.routes[0].legs[0].steps;
+
+ for (var step in steps) {
+ var maneuver = steps[step].maneuver;
+ var duration = steps[step].duration;
+ var distance = steps[step].distance;
+
+ rModel.append({
+ navInstruction: maneuver.instruction,
+ navImage: getNavigationImage(
+ maneuver.type,
+ maneuver.modifier,
+ routeView.imageList),
+ navAuxInfo: getAuxInfo(distance,
+ duration)
+ });
+ }
+ }
+ }
+ xhr.send();
+}
+
+function getNavigationImage(maneuverType, maneuverModifier, imageList) {
+ var imageToReturn;
+ if (maneuverType === "depart") {
+ imageToReturn = imageList[4];
+ } else if (maneuverType === "arrive") {
+ imageToReturn = imageList[5];
+ } else if (maneuverType === "turn") {
+ if (maneuverModifier.search("left") >= 0)
+ imageToReturn = imageList[1];
+ else if (maneuverModifier.search("right") >= 0)
+ imageToReturn = imageList[2];
+ else
+ imageToReturn = imageList[0];
+ } else {
+ if (maneuverModifier === "uturn") {
+ imageToReturn = imageList[3];
+ } else {
+ imageToReturn = imageList[0];
+ }
+ }
+
+ return imageToReturn;
+}
+
+function getAuxInfo(distInMeters, timeInSecs) {
+ var distance = convertDistance(distInMeters);
+ if (distance.length > 0)
+ return "Distance: " + distance + "\nTime: " + formatSeconds(
+ timeInSecs);
+ else
+ return "";
+}
+
+function convertDistance(meter) {
+ var dist = "";
+ var feet = (meter * 0.3048).toPrecision(6);
+ var miles = (meter * 0.000621371).toPrecision(6);
+
+ if (Math.floor(miles) > 1) {
+ dist += Math.floor(miles) + " mi";
+ feet = ((miles - Math.floor(miles)) * 0.3048).toPrecision(6);
+ }
+ if (Math.floor(feet) > 1)
+ dist += Math.floor(feet) + " ft";
+
+ return dist
+}
+
+function formatSeconds(seconds) {
+ var date = new Date(1970, 0, 1);
+ date.setSeconds(seconds);
+ return date.toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/, "$1");
+}
diff --git a/examples/quickcontrols2/wearable/qml/Navigation/walk_route.json b/examples/quickcontrols2/wearable/qml/Navigation/walk_route.json
new file mode 100644
index 00000000..e69b5cc1
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Navigation/walk_route.json
@@ -0,0 +1 @@
+{"routes":[{"legs":[{"steps":[{"intersections":[{"out":0,"entry":[true],"bearings":[144],"location":[-122.394553,37.795984]},{"out":1,"location":[-122.393896,37.795268],"bearings":[60,150,225,330],"entry":[true,true,true,false],"in":3},{"out":1,"location":[-122.393179,37.79453],"bearings":[60,135,180,225,315],"entry":[true,true,true,true,false],"in":4},{"out":1,"location":[-122.393072,37.79443],"bearings":[45,135,225,315],"entry":[true,true,true,false],"in":3},{"out":1,"location":[-122.392787,37.79415],"bearings":[60,135,315],"entry":[true,true,false],"in":2},{"out":1,"location":[-122.392537,37.793915],"bearings":[45,135,225,315],"entry":[true,true,true,false],"in":3},{"out":0,"location":[-122.392448,37.793831],"bearings":[135,225,315],"entry":[true,true,false],"in":2}],"geometry":"{_ueF|d`jVRQdB}ARQh@g@XUVWVW^a@RUv@w@l@q@PQNQ","maneuver":{"bearing_after":144,"location":[-122.394553,37.795984],"bearing_before":0,"type":"depart","instruction":"Head southeast on The Embarcadero"},"duration":230.8,"distance":314.8,"name":"The Embarcadero","mode":"walking"},{"intersections":[{"out":2,"location":[-122.392361,37.793748],"bearings":[45,135,225,315],"entry":[true,true,true,false],"in":3}],"geometry":"}qteFfw_jVHJBDHJ","maneuver":{"bearing_after":225,"type":"turn","modifier":"right","bearing_before":140,"location":[-122.392361,37.793748],"instruction":"Turn right"},"duration":13.2,"distance":18.5,"name":"","mode":"walking"},{"intersections":[{"out":1,"location":[-122.39251,37.793631],"bearings":[45,135,225,315],"entry":[false,true,true,true],"in":0},{"out":1,"location":[-122.391284,37.792459],"bearings":[45,150,225,330],"entry":[true,true,true,false],"in":3},{"out":1,"location":[-122.391217,37.792342],"bearings":[45,165,225,330],"entry":[true,true,true,false],"in":3},{"out":1,"location":[-122.391165,37.792231],"bearings":[45,165,225,345],"entry":[true,true,true,false],"in":3},{"out":0,"location":[-122.390884,37.791536],"bearings":[150,285,345],"entry":[true,true,false],"in":2},{"out":1,"location":[-122.390254,37.790827],"bearings":[45,135,210,315],"entry":[true,true,true,false],"in":3},{"out":1,"location":[-122.390144,37.790745],"bearings":[45,135,225,315],"entry":[true,true,true,false],"in":3},{"out":1,"location":[-122.390038,37.790665],"bearings":[45,135,240,315],"entry":[true,true,true,false],"in":3},{"out":0,"location":[-122.389245,37.790036],"bearings":[135,225,315],"entry":[true,true,false],"in":2},{"out":1,"location":[-122.38871,37.789596],"bearings":[45,150,210,315],"entry":[true,true,true,false],"in":3},{"out":1,"location":[-122.388618,37.789494],"bearings":[45,150,225,330],"entry":[true,true,true,false],"in":3},{"out":1,"location":[-122.388527,37.789394],"bearings":[45,150,225,330],"entry":[true,true,true,false],"in":3},{"out":1,"location":[-122.388005,37.787907],"bearings":[0,180,270],"entry":[false,true,true],"in":0},{"out":1,"location":[-122.387985,37.787622],"bearings":[0,180,240],"entry":[false,true,true],"in":0},{"out":2,"location":[-122.388005,37.787197],"bearings":[0,90,180,270],"entry":[false,true,true,true],"in":0},{"out":2,"location":[-122.388015,37.787093],"bearings":[0,90,180,270],"entry":[false,true,true,true],"in":0},{"out":2,"location":[-122.388022,37.786994],"bearings":[0,90,180,285],"entry":[false,true,true,true],"in":0},{"out":1,"location":[-122.388163,37.785186],"bearings":[0,180,315],"entry":[false,true,true],"in":0},{"out":1,"location":[-122.388184,37.784944],"bearings":[0,180,315],"entry":[false,true,true],"in":0},{"out":2,"location":[-122.388191,37.784855],"bearings":[0,90,180,270],"entry":[false,true,true,true],"in":0},{"out":2,"location":[-122.388198,37.784748],"bearings":[0,90,180,270],"entry":[false,true,true,true],"in":0},{"out":2,"location":[-122.388207,37.784633],"bearings":[0,90,180,270],"entry":[false,true,true,true],"in":0},{"out":2,"location":[-122.388309,37.783373],"bearings":[0,60,180,270],"entry":[false,true,true,true],"in":0},{"out":1,"location":[-122.388376,37.782545],"bearings":[0,180,315],"entry":[false,true,true],"in":0},{"out":1,"location":[-122.388394,37.782316],"bearings":[0,180,315],"entry":[false,true,true],"in":0}],"geometry":"eqteFdx_jVf@k@\\a@|@iAV[FGJMPOTOPKDAPITItAa@r@WXOXQXSTUTWRYNUNS|B}CdAwAPSTQRQ\\W^Q\\KZIrB]^EPCH?\\CZ?Z?\\?XBT@R?~IZF?H@f@@N@T@V@zFRbDLl@@pADV@","maneuver":{"bearing_after":139,"type":"turn","modifier":"left","bearing_before":226,"location":[-122.39251,37.793631],"instruction":"Turn left onto The Embarcadero"},"duration":1055.9,"distance":1450.3,"name":"The Embarcadero","mode":"walking"},{"intersections":[{"out":2,"location":[-122.388431,37.781791],"bearings":[0,90,180,285],"entry":[false,true,true,true],"in":0},{"out":2,"location":[-122.389672,37.779922],"bearings":[45,135,225,315],"entry":[false,true,true,true],"in":0},{"out":1,"location":[-122.390803,37.77905],"bearings":[45,225,315],"entry":[false,true,true],"in":0},{"out":2,"location":[-122.391916,37.778155],"bearings":[45,135,225,315],"entry":[false,true,true,true],"in":0},{"out":2,"location":[-122.393073,37.777251],"bearings":[45,75,225,315],"entry":[false,true,true,true],"in":0}],"geometry":"egreFt~~iVR@bABXDVDXHVNXNXVVZp@|@z@hAnCvDLRNTHLFJbArAzApBdB`CTZZb@\\b@@@pCvD","maneuver":{"bearing_after":183,"type":"new name","modifier":"straight","bearing_before":183,"location":[-122.388431,37.781791],"instruction":"Continue straight onto King Street"},"duration":567.4,"distance":782.5,"name":"King Street","mode":"walking"},{"intersections":[{"out":3,"location":[-122.394003,37.776513],"bearings":[45,135,225,300],"entry":[false,true,true,true],"in":0},{"out":2,"location":[-122.394218,37.776486],"bearings":[45,135,225,315],"entry":[false,true,true,true],"in":0}],"geometry":"efqeFna`jVGJ?NJNNR","maneuver":{"bearing_after":313,"type":"turn","modifier":"straight","bearing_before":225,"location":[-122.394003,37.776513],"instruction":"Go straight"},"duration":26.1,"distance":36.2,"name":"","mode":"walking"},{"intersections":[{"out":2,"location":[-122.394321,37.776405],"bearings":[45,180,315],"entry":[false,true,true],"in":0},{"out":1,"location":[-122.394729,37.776487],"bearings":[45,180],"entry":[false,true],"in":0}],"geometry":"qeqeFnc`jVe@p@A@V\\DF","maneuver":{"bearing_after":315,"type":"turn","modifier":"right","bearing_before":225,"location":[-122.394321,37.776405],"instruction":"Turn right"},"duration":39.9,"distance":55.6,"name":"","mode":"walking"},{"intersections":[{"in":0,"entry":[true],"bearings":[45],"location":[-122.394768,37.776455]}],"geometry":"{eqeFhf`jV","maneuver":{"bearing_after":0,"type":"arrive","modifier":"straight","bearing_before":225,"location":[-122.394729,37.776487],"instruction":"You have arrived at your destination, straight ahead"},"duration":0,"distance":0,"name":"","mode":"walking"}],"summary":"The Embarcadero, King Street","duration":1933.3,"distance":2657.8}],"geometry":"{_ueF|d`jV|LuLV\\`EyElHaD~I_LvB_AdGk@he@|AbBd@bZl`@R~@g@r@\\d@","duration":1933.3,"distance":2657.8}],"waypoints":[{"name":"The Embarcadero","location":[-122.394553,37.795984]},{"name":"","location":[-122.394768,37.776455]}],"code":"Ok"}
diff --git a/examples/quickcontrols2/wearable/qml/Notifications/NotificationsPage.qml b/examples/quickcontrols2/wearable/qml/Notifications/NotificationsPage.qml
new file mode 100644
index 00000000..d5bec2f8
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Notifications/NotificationsPage.qml
@@ -0,0 +1,112 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $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.Controls 2.0 as QQC2
+import "../Style"
+import "notifications.js" as NotificationData
+
+ListView {
+ id: missedCallsView
+
+ clip: true
+ focus: true
+ boundsBehavior: Flickable.StopAtBounds
+ snapMode: ListView.SnapToItem
+
+ model: ListModel {
+ id: missedCallsList
+ }
+
+ Image {
+ id: missedCallIcon
+ width: parent.width / 2
+ anchors.right: parent.horizontalCenter
+ anchors.verticalCenter: parent.verticalCenter
+ source: "images/missedcall.png"
+ fillMode: Image.Pad
+ }
+
+ delegate: Item {
+ height: missedCallsView.height
+ width: missedCallsView.width / 2
+ anchors.left: parent.horizontalCenter
+
+ Column {
+ spacing: 15
+ anchors.verticalCenter: parent.verticalCenter
+
+ Image {
+ anchors.horizontalCenter: parent.horizontalCenter
+ source: qsTr("images/avatar%1.png").arg(model.gender)
+ }
+
+ Text {
+ text: model.name
+ anchors.horizontalCenter: parent.horizontalCenter
+ font.bold: true
+ font.pixelSize: UIStyle.fontSizeS
+ color: UIStyle.colorQtGray1
+ }
+
+ Text {
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: date + " " + time
+ font.pixelSize: UIStyle.fontSizeXS
+ font.italic: true
+ color: UIStyle.colorQtGray2
+ }
+ }
+ }
+
+ Component.onCompleted: {
+ NotificationData.populateData(missedCallsList)
+ }
+}
diff --git a/examples/quickcontrols2/wearable/qml/Notifications/images/avatarf.png b/examples/quickcontrols2/wearable/qml/Notifications/images/avatarf.png
new file mode 100644
index 00000000..c88edc60
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Notifications/images/avatarf.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Notifications/images/avatarm.png b/examples/quickcontrols2/wearable/qml/Notifications/images/avatarm.png
new file mode 100644
index 00000000..f7abb4c9
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Notifications/images/avatarm.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Notifications/images/missedcall.png b/examples/quickcontrols2/wearable/qml/Notifications/images/missedcall.png
new file mode 100644
index 00000000..d05f17b3
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Notifications/images/missedcall.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Notifications/images/notifications.png b/examples/quickcontrols2/wearable/qml/Notifications/images/notifications.png
new file mode 100644
index 00000000..c5c3ffb2
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Notifications/images/notifications.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Notifications/notifications.js b/examples/quickcontrols2/wearable/qml/Notifications/notifications.js
new file mode 100644
index 00000000..8716c56f
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Notifications/notifications.js
@@ -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 the Qt Toolkit.
+**
+** $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$
+**
+****************************************************************************/
+
+function populateData(listData) {
+ listData.append({
+ name: "John Doe",
+ gender: "m",
+ date: "02/15/2017",
+ time: "09:20 am"
+ });
+
+ listData.append({
+ name: "Jane Worldege",
+ gender: "f",
+ date: "02/06/2017",
+ time: "10:15 am"
+ });
+
+ listData.append({
+ name: "Jennifer Wang",
+ gender: "f",
+ date: "02/03/2017",
+ time: "05:16 pm"
+ });
+}
diff --git a/examples/quickcontrols2/wearable/qml/Settings/SettingsPage.qml b/examples/quickcontrols2/wearable/qml/Settings/SettingsPage.qml
new file mode 100644
index 00000000..48f3a3d6
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Settings/SettingsPage.qml
@@ -0,0 +1,152 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $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.Controls 2.0 as QQC2
+import Qt.labs.settings 1.0
+import "../Style"
+
+Item {
+
+ Settings {
+ id: settings
+ property alias wireless: wirelessSwitch.checked
+ property alias bluetooth: bluetoothSwitch.checked
+ property alias contrast: contrastSlider.value
+ property alias brightness: brightnessSlider.value
+ }
+
+ QQC2.SwipeView {
+ id: svSettingsContainer
+
+ anchors.fill: parent
+
+ Item {
+ id: settingsPage1
+
+ Column {
+ anchors.centerIn: parent
+ spacing: 25
+
+ Row {
+ spacing: 50
+ Image {
+ anchors.verticalCenter: parent.verticalCenter
+ source: "images/bluetooth.png"
+ }
+ QQC2.Switch {
+ id: bluetoothSwitch
+ anchors.verticalCenter: parent.verticalCenter
+ checked: settings.bluetooth
+ }
+ }
+ Row {
+ spacing: 50
+ Image {
+ anchors.verticalCenter: parent.verticalCenter
+ source: "images/wifi.png"
+ }
+ QQC2.Switch {
+ id: wirelessSwitch
+ anchors.verticalCenter: parent.verticalCenter
+ checked: settings.wireless
+ }
+ }
+ }
+ }
+
+ Item {
+ id: settingsPage2
+
+ Column {
+ anchors.centerIn: parent
+ spacing: 2
+
+ Column {
+ Image {
+ anchors.horizontalCenter: parent.horizontalCenter
+ source: "images/brightness.png"
+ }
+ QQC2.Slider {
+ id: brightnessSlider
+ anchors.horizontalCenter: parent.horizontalCenter
+ from: 0
+ to: 5
+ stepSize: 1
+ value: settings.brightness
+ }
+ }
+ Column {
+ spacing: 2
+ Image {
+ anchors.horizontalCenter: parent.horizontalCenter
+ source: "images/contrast.png"
+ }
+ QQC2.Slider {
+ id: contrastSlider
+ anchors.horizontalCenter: parent.horizontalCenter
+ from: 0
+ to: 10
+ stepSize: 1
+ value: settings.contrast
+ }
+ }
+ }
+ }
+ }
+
+ QQC2.PageIndicator {
+ count: svSettingsContainer.count
+ currentIndex: svSettingsContainer.currentIndex
+
+ anchors.bottom: svSettingsContainer.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+}
diff --git a/examples/quickcontrols2/wearable/qml/Settings/images/bluetooth.png b/examples/quickcontrols2/wearable/qml/Settings/images/bluetooth.png
new file mode 100644
index 00000000..2b2d0e7e
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Settings/images/bluetooth.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Settings/images/brightness.png b/examples/quickcontrols2/wearable/qml/Settings/images/brightness.png
new file mode 100644
index 00000000..846a896c
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Settings/images/brightness.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Settings/images/contrast.png b/examples/quickcontrols2/wearable/qml/Settings/images/contrast.png
new file mode 100644
index 00000000..eb528eb8
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Settings/images/contrast.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Settings/images/settings.png b/examples/quickcontrols2/wearable/qml/Settings/images/settings.png
new file mode 100644
index 00000000..c42f7dc6
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Settings/images/settings.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Settings/images/wifi.png b/examples/quickcontrols2/wearable/qml/Settings/images/wifi.png
new file mode 100644
index 00000000..42c92516
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Settings/images/wifi.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Style/PageIndicator.qml b/examples/quickcontrols2/wearable/qml/Style/PageIndicator.qml
new file mode 100644
index 00000000..6a92c42f
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Style/PageIndicator.qml
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $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.Templates 2.0 as T
+import "."
+
+T.PageIndicator {
+ id: control
+
+ implicitWidth: contentItem.implicitWidth + leftPadding + rightPadding
+ implicitHeight: contentItem.implicitHeight + topPadding + bottomPadding
+
+ spacing: 6
+ padding: 6
+ bottomPadding: 7
+
+ delegate: Rectangle {
+ implicitWidth: 8
+ implicitHeight: 8
+
+ radius: width / 2
+ color: UIStyle.colorQtGray3
+
+ opacity: index === control.currentIndex ? 1.0 : 0.35
+
+ Behavior on opacity {
+ OpacityAnimator {
+ duration: 100
+ }
+ }
+ }
+
+ contentItem: Row {
+ spacing: control.spacing
+
+ Repeater {
+ model: control.count
+ delegate: control.delegate
+ }
+ }
+}
diff --git a/examples/quickcontrols2/wearable/qml/Style/Slider.qml b/examples/quickcontrols2/wearable/qml/Style/Slider.qml
new file mode 100644
index 00000000..86f28abe
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Style/Slider.qml
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $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.Templates 2.0 as T
+import "."
+
+T.Slider {
+ id: control
+
+ implicitWidth: 200
+ implicitHeight: 26
+
+ handle: Rectangle {
+ x: control.visualPosition * (control.width - width)
+ y: (control.height - height) / 2
+ width: 20
+ height: 15
+
+ radius: 5
+ color: control.pressed ? "#f0f0f0" : "#f6f6f6"
+ border.color: UIStyle.colorQtGray7
+ }
+
+ background: Rectangle {
+ y: (control.height - height) / 2
+ height: 4
+ radius: 2
+ color: UIStyle.colorQtGray3
+
+ Rectangle {
+ width: control.visualPosition * parent.width
+ height: parent.height
+ color: UIStyle.colorQtAuxGreen2
+ radius: 2
+ }
+ }
+}
+
diff --git a/examples/quickcontrols2/wearable/qml/Style/Switch.qml b/examples/quickcontrols2/wearable/qml/Style/Switch.qml
new file mode 100644
index 00000000..a1dad07a
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Style/Switch.qml
@@ -0,0 +1,86 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $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.Templates 2.0 as T
+import "."
+
+T.Switch {
+ id: control
+
+ implicitWidth: 48
+ implicitHeight: 26
+
+ indicator: Rectangle {
+ x: control.visualPosition * (control.width - width)
+ y: (control.height - height) / 2
+ width: 26
+ height: 26
+
+ radius: 13
+ color: control.down ? UIStyle.colorQtGray6 : UIStyle.colorQtGray10
+ border.color: !control.checked ? "#999999"
+ : (control.down ? UIStyle.colorQtAuxGreen2
+ : UIStyle.colorQtAuxGreen1)
+
+ Behavior on x {
+ enabled: !control.pressed
+ SmoothedAnimation { velocity: 200 }
+ }
+ }
+
+ background: Rectangle {
+ radius: 13
+ color: control.checked ? UIStyle.colorQtAuxGreen2 : "#E6173D"
+ border.color: control.checked ? UIStyle.colorQtAuxGreen2
+ : UIStyle.colorQtGray6
+ }
+}
+
diff --git a/examples/quickcontrols2/wearable/qml/Style/UIStyle.qml b/examples/quickcontrols2/wearable/qml/Style/UIStyle.qml
new file mode 100644
index 00000000..98971233
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Style/UIStyle.qml
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $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
+
+pragma Singleton
+
+QtObject {
+ id: uiStyle
+
+ // Font Sizes
+ readonly property int fontSizeXXS: 10
+ readonly property int fontSizeXS: 15
+ readonly property int fontSizeS: 20
+ readonly property int fontSizeM: 25
+ readonly property int fontSizeL: 30
+ readonly property int fontSizeXL: 35
+ readonly property int fontSizeXXL: 40
+
+ // Color Scheme
+ // Green
+ readonly property color colorQtPrimGreen: "#41cd52"
+ readonly property color colorQtAuxGreen1: "#21be2b"
+ readonly property color colorQtAuxGreen2: "#17a81a"
+
+ // Gray
+ readonly property color colorQtGray1: "#09102b"
+ readonly property color colorQtGray2: "#222840"
+ readonly property color colorQtGray3: "#3a4055"
+ readonly property color colorQtGray4: "#53586b"
+ readonly property color colorQtGray5: "#53586b"
+ readonly property color colorQtGray6: "#848895"
+ readonly property color colorQtGray7: "#9d9faa"
+ readonly property color colorQtGray8: "#b5b7bf"
+ readonly property color colorQtGray9: "#cecfd5"
+ readonly property color colorQtGray10: "#f3f3f4"
+}
diff --git a/examples/quickcontrols2/wearable/qml/Style/qmldir b/examples/quickcontrols2/wearable/qml/Style/qmldir
new file mode 100644
index 00000000..a04072be
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Style/qmldir
@@ -0,0 +1 @@
+singleton UIStyle 1.0 UIStyle.qml
diff --git a/examples/quickcontrols2/wearable/qml/Weather/WeatherPage.qml b/examples/quickcontrols2/wearable/qml/Weather/WeatherPage.qml
new file mode 100644
index 00000000..2ef0133c
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Weather/WeatherPage.qml
@@ -0,0 +1,296 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $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.Controls 2.0 as QQC2
+import "../Style"
+import "weather.js" as WeatherData
+
+Item {
+ QQC2.SwipeView {
+ id: svWeatherContainer
+
+ anchors.fill: parent
+
+ Item {
+ id: weatherPage1
+
+ Row {
+ anchors.centerIn: parent
+ spacing: 2
+
+ Image {
+ anchors.verticalCenter: parent.verticalCenter
+ source: "images/temperature.png"
+ }
+
+ Column {
+ anchors.verticalCenter: parent.verticalCenter
+ spacing: 40
+
+ Text {
+ text: (wDataCntr.weatherData
+ && wDataCntr.weatherData.main
+ && wDataCntr.weatherData.main.temp) ?
+ qsTr("Avg: ")
+ + String(wDataCntr.weatherData.main.temp)
+ + " °F" : "N/A"
+ font.pixelSize: UIStyle.fontSizeM
+ font.letterSpacing: 1
+ color: UIStyle.colorQtGray1
+ }
+
+ Text {
+ text: (wDataCntr.weatherData
+ && wDataCntr.weatherData.main
+ && wDataCntr.weatherData.main.temp_min) ?
+ qsTr("Min: ")
+ + String(wDataCntr.weatherData.main.temp_min)
+ + " °F" : "N/A"
+ font.pixelSize: UIStyle.fontSizeM
+ font.letterSpacing: 1
+ color: UIStyle.colorQtGray1
+ }
+
+ Text {
+ text: (wDataCntr.weatherData
+ && wDataCntr.weatherData.main
+ && wDataCntr.weatherData.main.temp_max) ?
+ qsTr("Max: ")
+ + String(wDataCntr.weatherData.main.temp_max)
+ + " °F " : "N/A"
+ font.pixelSize: UIStyle.fontSizeM
+ font.letterSpacing: 1
+ color: UIStyle.colorQtGray1
+ }
+ }
+ }
+ }
+
+ Item {
+ id: weatherPage2
+
+ Column {
+ spacing: 40
+ anchors.centerIn: parent
+
+ Row {
+ spacing: 20
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ Image {
+ id: wImg
+ anchors.verticalCenter: parent.verticalCenter
+ source: "images/wind.png"
+ }
+
+ Text {
+ anchors.verticalCenter: parent.verticalCenter
+ text: (wDataCntr.weatherData
+ && wDataCntr.weatherData.wind
+ && wDataCntr.weatherData.wind.speed) ?
+ String(wDataCntr.weatherData.wind.speed)
+ + " mph" : "N/A"
+ font.pixelSize: UIStyle.fontSizeM
+ font.letterSpacing: 1
+ color: UIStyle.colorQtGray1
+ }
+ }
+
+ Row {
+ spacing: 20
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ Image {
+ id: hImg
+ anchors.verticalCenter: parent.verticalCenter
+ source: "images/humidity.png"
+ }
+
+ Text {
+ anchors.verticalCenter: parent.verticalCenter
+ text: (wDataCntr.weatherData
+ && wDataCntr.weatherData.main
+ && wDataCntr.weatherData.main.humidity) ?
+ String(wDataCntr.weatherData.main.humidity)
+ + " %" : "N/A"
+ font.pixelSize: UIStyle.fontSizeM
+ font.letterSpacing: 1
+ color: UIStyle.colorQtGray1
+ }
+ }
+ }
+ }
+
+ Item {
+ id: weatherPage3
+
+ Row {
+ anchors.centerIn: parent
+ spacing: 10
+
+ Image {
+ anchors.verticalCenter: parent.verticalCenter
+ source: "images/pressure.png"
+ }
+
+ Column {
+ anchors.verticalCenter: parent.verticalCenter
+ spacing: 40
+
+ Text {
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: (wDataCntr.weatherData
+ && wDataCntr.weatherData.main
+ && wDataCntr.weatherData.main.pressure) ?
+ String(wDataCntr.weatherData.main.pressure)
+ + " hPa" : "N/A"
+ font.pixelSize: UIStyle.fontSizeM
+ font.letterSpacing: 1
+ color: UIStyle.colorQtGray1
+ }
+
+ Text {
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: (wDataCntr.weatherData
+ && wDataCntr.weatherData.main
+ && wDataCntr.weatherData.main.sea_level) ?
+ String(wDataCntr.weatherData.main.sea_level)
+ + " hPa" : "N/A"
+ font.pixelSize: UIStyle.fontSizeM
+ font.letterSpacing: 1
+ color: UIStyle.colorQtGray1
+ }
+
+ Text {
+ anchors.horizontalCenter: parent.horizontalCenter
+ text: (wDataCntr.weatherData
+ && wDataCntr.weatherData.main
+ && wDataCntr.weatherData.main.grnd_level) ?
+ String(wDataCntr.weatherData.main.grnd_level)
+ + " hPa" : "N/A"
+ font.pixelSize: UIStyle.fontSizeM
+ font.letterSpacing: 1
+ color: UIStyle.colorQtGray1
+ }
+ }
+ }
+ }
+
+ Item {
+ id: weatherPage4
+
+ Column {
+ spacing: 40
+ anchors.centerIn: parent
+
+ Row {
+ spacing: 30
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ Image {
+ anchors.verticalCenter: parent.verticalCenter
+ source: "images/sunrise.png"
+ }
+
+ Text {
+ anchors.verticalCenter: parent.verticalCenter
+ text: (wDataCntr.weatherData
+ && wDataCntr.weatherData.sys
+ && wDataCntr.weatherData.sys.sunrise) ?
+ WeatherData.getTimeHMS(wDataCntr.weatherData.sys.sunrise)
+ : "N/A"
+ font.pixelSize: UIStyle.fontSizeM
+ font.letterSpacing: 1
+ color: UIStyle.colorQtGray1
+ }
+ }
+
+ Row {
+ spacing: 30
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ Image {
+ anchors.verticalCenter: parent.verticalCenter
+ source: "images/sunset.png"
+ }
+
+ Text {
+ anchors.verticalCenter: parent.verticalCenter
+ text: (wDataCntr.weatherData
+ && wDataCntr.weatherData.sys
+ && wDataCntr.weatherData.sys.sunset) ?
+ WeatherData.getTimeHMS(wDataCntr.weatherData.sys.sunset)
+ : "N/A"
+ font.pixelSize: UIStyle.fontSizeM
+ font.letterSpacing: 1
+ color: UIStyle.colorQtGray1
+ }
+ }
+ }
+ }
+ }
+
+ QtObject {
+ id: wDataCntr
+ property var weatherData
+ }
+
+ QQC2.PageIndicator {
+ count: svWeatherContainer.count
+ currentIndex: svWeatherContainer.currentIndex
+
+ anchors.bottom: svWeatherContainer.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+ Component.onCompleted: {
+ WeatherData.requestWeatherData(wDataCntr)
+ }
+}
diff --git a/examples/quickcontrols2/wearable/qml/Weather/images/humidity.png b/examples/quickcontrols2/wearable/qml/Weather/images/humidity.png
new file mode 100644
index 00000000..ef9ed9de
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Weather/images/humidity.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Weather/images/pressure.png b/examples/quickcontrols2/wearable/qml/Weather/images/pressure.png
new file mode 100644
index 00000000..7850609e
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Weather/images/pressure.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Weather/images/sunrise.png b/examples/quickcontrols2/wearable/qml/Weather/images/sunrise.png
new file mode 100644
index 00000000..70a9a969
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Weather/images/sunrise.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Weather/images/sunset.png b/examples/quickcontrols2/wearable/qml/Weather/images/sunset.png
new file mode 100644
index 00000000..01bb9ec8
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Weather/images/sunset.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Weather/images/temperature.png b/examples/quickcontrols2/wearable/qml/Weather/images/temperature.png
new file mode 100644
index 00000000..5d7faa99
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Weather/images/temperature.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Weather/images/weather.png b/examples/quickcontrols2/wearable/qml/Weather/images/weather.png
new file mode 100644
index 00000000..0530d47b
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Weather/images/weather.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Weather/images/wind.png b/examples/quickcontrols2/wearable/qml/Weather/images/wind.png
new file mode 100644
index 00000000..c728fcc0
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Weather/images/wind.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Weather/weather.js b/examples/quickcontrols2/wearable/qml/Weather/weather.js
new file mode 100644
index 00000000..b3bf4465
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Weather/weather.js
@@ -0,0 +1,77 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $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$
+**
+****************************************************************************/
+
+function requestWeatherData(cntr) {
+ var xhr = new XMLHttpRequest;
+ xhr.open("GET", "weather.json");
+ xhr.onreadystatechange = function () {
+ if (xhr.readyState === XMLHttpRequest.DONE) {
+ cntr.weatherData = JSON.parse(xhr.responseText)
+ }
+ }
+ xhr.send();
+}
+
+function getTimeHMS(utcTime) {
+ var date = new Date(utcTime * 1000);
+ // Hours part from the timestamp
+ var hours = date.getHours();
+ var ampm = Math.floor((hours / 12)) ? " PM" : " AM";
+ hours = (hours % 12);
+
+ // Minutes part from the timestamp
+ var minutes = "0" + date.getMinutes();
+ // Seconds part from the timestamp
+ var seconds = "0" + date.getSeconds();
+
+ // Will display time in 10:30:23 format
+ return hours % 12 + ':' + minutes.substr(-2) + ':' + seconds.substr(-2)
+ + ampm;
+}
diff --git a/examples/quickcontrols2/wearable/qml/Weather/weather.json b/examples/quickcontrols2/wearable/qml/Weather/weather.json
new file mode 100644
index 00000000..2cce95c6
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Weather/weather.json
@@ -0,0 +1 @@
+{"coord":{"lon":-122.42,"lat":37.77},"weather":[{"id":803,"main":"Clouds","description":"broken clouds","icon":"04n"}],"base":"stations","main":{"temp":45.22,"pressure":1020.17,"humidity":88,"temp_min":36.92,"temp_max":58.92,"sea_level":1028.19,"grnd_level":1020.17},"wind":{"speed":6.73,"deg":201.002},"clouds":{"all":68},"dt":1476412232,"sys":{"message":0.012,"country":"US","sunrise":1476454666,"sunset":1476495156},"id":5391959,"name":"San Francisco","cod":200}
diff --git a/examples/quickcontrols2/wearable/qml/WorldClock/Clock.qml b/examples/quickcontrols2/wearable/qml/WorldClock/Clock.qml
new file mode 100644
index 00000000..a6e67e8c
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/WorldClock/Clock.qml
@@ -0,0 +1,186 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $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 "../Style"
+
+Item {
+ id: clock
+
+ property int hours
+ property int minutes
+ property int seconds
+ property real shift: timeShift
+ property bool night: false
+ property bool internationalTime: true //Unset for local time
+
+ function getWatchFaceImage(imageName) {
+ return "images/" + imageName
+ }
+
+ function timeChanged() {
+ var date = new Date
+ hours = internationalTime ? date.getUTCHours() + Math.floor(
+ clock.shift) : date.getHours()
+ night = (hours < 7 || hours > 19)
+ minutes = internationalTime ?
+ date.getUTCMinutes() + ((clock.shift % 1) * 60) : date.getMinutes()
+ seconds = date.getUTCSeconds()
+ }
+
+ Timer {
+ interval: 100
+ running: true
+ repeat: true
+ onTriggered: clock.timeChanged()
+ }
+
+ Item {
+ anchors.centerIn: parent
+
+ width: 200
+ height: 220
+
+ Rectangle {
+ color: clock.night ? UIStyle.colorQtGray1 : UIStyle.colorQtGray10
+ radius: width / 2
+ width: parent.width
+ height: parent.width
+ }
+
+ Image {
+ id: background
+ source: getWatchFaceImage("swissdaydial.png")
+ visible: clock.night == false
+ }
+ Image {
+ source: getWatchFaceImage("swissnightdial.png")
+ visible: clock.night == true
+ }
+
+ Image {
+ x: 92.5
+ y: 27
+ source: getWatchFaceImage(clock.night ?
+ "swissnighthour.png"
+ : "swissdayhour.png")
+ transform: Rotation {
+ id: hourRotation
+ origin.x: 7.5
+ origin.y: 73
+ angle: (clock.hours * 30) + (clock.minutes * 0.5)
+ Behavior on angle {
+ SpringAnimation {
+ spring: 2
+ damping: 0.2
+ modulus: 360
+ }
+ }
+ }
+ }
+
+ Image {
+ x: 93.5
+ y: 17
+ source: getWatchFaceImage(clock.night ?
+ "swissnightminute.png"
+ : "swissdayminute.png")
+ transform: Rotation {
+ id: minuteRotation
+ origin.x: 6.5
+ origin.y: 83
+ angle: clock.minutes * 6
+ Behavior on angle {
+ SpringAnimation {
+ spring: 2
+ damping: 0.2
+ modulus: 360
+ }
+ }
+ }
+ }
+
+ Image {
+ x: 97.5
+ y: 20
+ source: getWatchFaceImage("second.png")
+ transform: Rotation {
+ id: secondRotation
+ origin.x: 2.5
+ origin.y: 80
+ angle: clock.seconds * 6
+ Behavior on angle {
+ SpringAnimation {
+ spring: 2
+ damping: 0.2
+ modulus: 360
+ }
+ }
+ }
+ }
+
+ Image {
+ anchors.centerIn: background
+ source: getWatchFaceImage("center.png")
+ }
+
+ Text {
+ id: cityLabel
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: 2
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ text: cityName
+ color: UIStyle.colorQtGray1
+ font.pixelSize: UIStyle.fontSizeXS
+ font.letterSpacing: 2
+ }
+ }
+}
diff --git a/examples/quickcontrols2/wearable/qml/WorldClock/WorldClockPage.qml b/examples/quickcontrols2/wearable/qml/WorldClock/WorldClockPage.qml
new file mode 100644
index 00000000..cdf96bf2
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/WorldClock/WorldClockPage.qml
@@ -0,0 +1,107 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $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.Controls 2.0 as QQC2
+import "../Style"
+
+Item {
+ QQC2.SwipeView {
+ id: svWatchContainer
+
+ anchors.fill: parent
+
+ ListModel {
+ id: placesList
+ ListElement {
+ cityName: "New York"
+ timeShift: -4
+ }
+ ListElement {
+ cityName: "London"
+ timeShift: 0
+ }
+ ListElement {
+ cityName: "Oslo"
+ timeShift: 1
+ }
+ ListElement {
+ cityName: "Mumbai"
+ timeShift: 5.5
+ }
+ ListElement {
+ cityName: "Tokyo"
+ timeShift: 9
+ }
+ ListElement {
+ cityName: "Brisbane"
+ timeShift: 10
+ }
+ ListElement {
+ cityName: "Los Angeles"
+ timeShift: -8
+ }
+ }
+
+ Repeater {
+ model: placesList
+ delegate: Clock {
+ }
+ }
+ }
+
+ QQC2.PageIndicator {
+ count: svWatchContainer.count
+ currentIndex: svWatchContainer.currentIndex
+
+ anchors.bottom: svWatchContainer.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+ }
+}
diff --git a/examples/quickcontrols2/wearable/qml/WorldClock/images/center.png b/examples/quickcontrols2/wearable/qml/WorldClock/images/center.png
new file mode 100644
index 00000000..7fbd802a
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/WorldClock/images/center.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/WorldClock/images/clock-night.png b/examples/quickcontrols2/wearable/qml/WorldClock/images/clock-night.png
new file mode 100644
index 00000000..698f57a5
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/WorldClock/images/clock-night.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/WorldClock/images/clock.png b/examples/quickcontrols2/wearable/qml/WorldClock/images/clock.png
new file mode 100644
index 00000000..6e1c6eed
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/WorldClock/images/clock.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/WorldClock/images/second.png b/examples/quickcontrols2/wearable/qml/WorldClock/images/second.png
new file mode 100644
index 00000000..eee07efb
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/WorldClock/images/second.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/WorldClock/images/swissdaydial.png b/examples/quickcontrols2/wearable/qml/WorldClock/images/swissdaydial.png
new file mode 100644
index 00000000..64136618
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/WorldClock/images/swissdaydial.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/WorldClock/images/swissdayhour.png b/examples/quickcontrols2/wearable/qml/WorldClock/images/swissdayhour.png
new file mode 100644
index 00000000..255985d2
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/WorldClock/images/swissdayhour.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/WorldClock/images/swissdayminute.png b/examples/quickcontrols2/wearable/qml/WorldClock/images/swissdayminute.png
new file mode 100644
index 00000000..bc6992f8
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/WorldClock/images/swissdayminute.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/WorldClock/images/swissnightdial.png b/examples/quickcontrols2/wearable/qml/WorldClock/images/swissnightdial.png
new file mode 100644
index 00000000..e2590af4
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/WorldClock/images/swissnightdial.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/WorldClock/images/swissnighthour.png b/examples/quickcontrols2/wearable/qml/WorldClock/images/swissnighthour.png
new file mode 100644
index 00000000..1c6a6131
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/WorldClock/images/swissnighthour.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/WorldClock/images/swissnightminute.png b/examples/quickcontrols2/wearable/qml/WorldClock/images/swissnightminute.png
new file mode 100644
index 00000000..3353ba2c
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/WorldClock/images/swissnightminute.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/WorldClock/images/swissseconds.png b/examples/quickcontrols2/wearable/qml/WorldClock/images/swissseconds.png
new file mode 100644
index 00000000..66b4f3fa
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/WorldClock/images/swissseconds.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/WorldClock/images/watch.png b/examples/quickcontrols2/wearable/qml/WorldClock/images/watch.png
new file mode 100644
index 00000000..299858b7
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/WorldClock/images/watch.png
Binary files differ