aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols2/wearable/qml/Settings/SettingsPage.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/qml/Settings/SettingsPage.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/qml/Settings/SettingsPage.qml')
-rw-r--r--examples/quickcontrols2/wearable/qml/Settings/SettingsPage.qml41
1 files changed, 23 insertions, 18 deletions
diff --git a/examples/quickcontrols2/wearable/qml/Settings/SettingsPage.qml b/examples/quickcontrols2/wearable/qml/Settings/SettingsPage.qml
index af6561f3..bb347e7d 100644
--- a/examples/quickcontrols2/wearable/qml/Settings/SettingsPage.qml
+++ b/examples/quickcontrols2/wearable/qml/Settings/SettingsPage.qml
@@ -63,6 +63,9 @@ Item {
SwipeViewPage {
id: settingsPage1
+ property alias bluetoothSwitch: bluetoothSwitch
+ property alias wirelessSwitch: wirelessSwitch
+
Column {
anchors.centerIn: parent
spacing: 25
@@ -99,6 +102,9 @@ Item {
SwipeViewPage {
id: settingsPage2
+ property alias brightnessSlider: brightnessSlider
+ property alias darkThemeSwitch: darkThemeSwitch
+
Column {
anchors.centerIn: parent
spacing: 2
@@ -119,19 +125,17 @@ Item {
}
}
Column {
- spacing: 2
+ anchors.horizontalCenter: parent.horizontalCenter
+
Image {
anchors.horizontalCenter: parent.horizontalCenter
- source: UIStyle.themeImagePath("images/contrast")
+ source: UIStyle.themeImagePath("images/theme")
}
- QQC2.Slider {
- id: contrastSlider
+ QQC2.Switch {
+ id: darkThemeSwitch
anchors.horizontalCenter: parent.horizontalCenter
- from: 0
- to: 10
- stepSize: 1
- value: settings.contrast
- onMoved: settings.contrast = value
+ checked: settings.darkTheme
+ onToggled: settings.darkTheme = checked
}
}
}
@@ -142,19 +146,20 @@ Item {
Column {
anchors.centerIn: parent
- spacing: 2
- Row {
- spacing: 50
+ Column {
+ anchors.horizontalCenter: parent.horizontalCenter
+ spacing: 6
+
Image {
- anchors.verticalCenter: parent.verticalCenter
- source: UIStyle.themeImagePath("images/theme")
+ anchors.horizontalCenter: parent.horizontalCenter
+ source: UIStyle.themeImagePath("images/demo-mode")
}
QQC2.Switch {
- id: darkThemeSwitch
- anchors.verticalCenter: parent.verticalCenter
- checked: settings.darkTheme
- onToggled: settings.darkTheme = checked
+ id: demoModeSwitch
+ anchors.horizontalCenter: parent.horizontalCenter
+ checked: settings.demoMode
+ onToggled: settings.demoMode = checked
}
}
}