aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols2/wearable/wearable.qml
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2018-09-13 15:19:03 +0200
committerMitch Curtis <mitch.curtis@qt.io>2018-09-27 11:39:51 +0000
commitfba7e3cf5c8ad287ceaaeb381989159d8baa96ec (patch)
tree9538bd874c1acc836f0fa73f85491cc973f95469 /examples/quickcontrols2/wearable/wearable.qml
parentfb6763fddfce329924ccb3678fbdf7875978a7ca (diff)
wearable: add demo modev5.12.0-beta1
This change adds a switch in the settings page that enables demo mode. In this mode, each screen and UI control will be visited and interacted with in a loop until the screen is tapped, at which point it returns to the launcher page. Change-Id: Icb306e23985d8c1f82725a95ed7f2e34b3d6c03f Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'examples/quickcontrols2/wearable/wearable.qml')
-rw-r--r--examples/quickcontrols2/wearable/wearable.qml24
1 files changed, 23 insertions, 1 deletions
diff --git a/examples/quickcontrols2/wearable/wearable.qml b/examples/quickcontrols2/wearable/wearable.qml
index 62f138bb..ea84adca 100644
--- a/examples/quickcontrols2/wearable/wearable.qml
+++ b/examples/quickcontrols2/wearable/wearable.qml
@@ -65,9 +65,9 @@ QQC2.ApplicationWindow {
id: settings
property bool wireless
property bool bluetooth
- property int contrast
property int brightness
property bool darkTheme
+ property bool demoMode
}
Binding {
@@ -115,4 +115,26 @@ QQC2.ApplicationWindow {
onLaunched: stackView.push(page)
}
}
+
+ DemoMode {
+ stackView: stackView
+ }
+
+ DemoModeIndicator {
+ id: demoModeIndicator
+ y: settings.demoMode ? -height : -height * 2
+ anchors.horizontalCenter: parent.horizontalCenter
+ height: header.height
+ z: window.header.z + 1
+ }
+
+ MouseArea {
+ enabled: settings.demoMode
+ anchors.fill: parent
+ onClicked: {
+ // Stop demo mode and return to the launcher page.
+ settings.demoMode = false
+ stackView.pop(null)
+ }
+ }
}