aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quickcontrols2/wearable/qml/Settings
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quickcontrols2/wearable/qml/Settings')
-rw-r--r--examples/quickcontrols2/wearable/qml/Settings/SettingsPage.qml41
-rw-r--r--examples/quickcontrols2/wearable/qml/Settings/images/contrast-dark.pngbin1386 -> 0 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Settings/images/contrast-dark@2x.pngbin1395 -> 0 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Settings/images/contrast-light.pngbin2347 -> 0 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Settings/images/contrast-light@2x.pngbin1930 -> 0 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Settings/images/demo-mode-dark.pngbin0 -> 1053 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Settings/images/demo-mode-dark@2x.pngbin0 -> 1418 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Settings/images/demo-mode-light.pngbin0 -> 1057 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Settings/images/demo-mode-light@2x.pngbin0 -> 1737 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Settings/images/demo-mode-white.pngbin0 -> 825 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Settings/images/demo-mode-white@2x.pngbin0 -> 1318 bytes
-rw-r--r--examples/quickcontrols2/wearable/qml/Settings/images/demo-mode.svg93
12 files changed, 116 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
}
}
}
diff --git a/examples/quickcontrols2/wearable/qml/Settings/images/contrast-dark.png b/examples/quickcontrols2/wearable/qml/Settings/images/contrast-dark.png
deleted file mode 100644
index 92e17192..00000000
--- a/examples/quickcontrols2/wearable/qml/Settings/images/contrast-dark.png
+++ /dev/null
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Settings/images/contrast-dark@2x.png b/examples/quickcontrols2/wearable/qml/Settings/images/contrast-dark@2x.png
deleted file mode 100644
index d52633ab..00000000
--- a/examples/quickcontrols2/wearable/qml/Settings/images/contrast-dark@2x.png
+++ /dev/null
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Settings/images/contrast-light.png b/examples/quickcontrols2/wearable/qml/Settings/images/contrast-light.png
deleted file mode 100644
index eb528eb8..00000000
--- a/examples/quickcontrols2/wearable/qml/Settings/images/contrast-light.png
+++ /dev/null
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Settings/images/contrast-light@2x.png b/examples/quickcontrols2/wearable/qml/Settings/images/contrast-light@2x.png
deleted file mode 100644
index 92e112f9..00000000
--- a/examples/quickcontrols2/wearable/qml/Settings/images/contrast-light@2x.png
+++ /dev/null
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Settings/images/demo-mode-dark.png b/examples/quickcontrols2/wearable/qml/Settings/images/demo-mode-dark.png
new file mode 100644
index 00000000..571a4645
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Settings/images/demo-mode-dark.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Settings/images/demo-mode-dark@2x.png b/examples/quickcontrols2/wearable/qml/Settings/images/demo-mode-dark@2x.png
new file mode 100644
index 00000000..a8203b35
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Settings/images/demo-mode-dark@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Settings/images/demo-mode-light.png b/examples/quickcontrols2/wearable/qml/Settings/images/demo-mode-light.png
new file mode 100644
index 00000000..0f8fcc75
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Settings/images/demo-mode-light.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Settings/images/demo-mode-light@2x.png b/examples/quickcontrols2/wearable/qml/Settings/images/demo-mode-light@2x.png
new file mode 100644
index 00000000..57282a5a
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Settings/images/demo-mode-light@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Settings/images/demo-mode-white.png b/examples/quickcontrols2/wearable/qml/Settings/images/demo-mode-white.png
new file mode 100644
index 00000000..1f967488
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Settings/images/demo-mode-white.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Settings/images/demo-mode-white@2x.png b/examples/quickcontrols2/wearable/qml/Settings/images/demo-mode-white@2x.png
new file mode 100644
index 00000000..fd0611e6
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Settings/images/demo-mode-white@2x.png
Binary files differ
diff --git a/examples/quickcontrols2/wearable/qml/Settings/images/demo-mode.svg b/examples/quickcontrols2/wearable/qml/Settings/images/demo-mode.svg
new file mode 100644
index 00000000..ad1ce448
--- /dev/null
+++ b/examples/quickcontrols2/wearable/qml/Settings/images/demo-mode.svg
@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="64"
+ height="64"
+ viewBox="0 0 16.933333 16.933333"
+ version="1.1"
+ id="svg8"
+ inkscape:version="0.92.3 (d244b95, 2018-08-02)"
+ sodipodi:docname="demo-mode.svg"
+ inkscape:export-filename="/home/mitch/dev/qt5.12/qtquickcontrols2/examples/quickcontrols2/wearable/qml/Settings/images/demo-mode-light@2x.png"
+ inkscape:export-xdpi="192"
+ inkscape:export-ydpi="192">
+ <defs
+ id="defs2" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="15.839192"
+ inkscape:cx="26.498574"
+ inkscape:cy="25.685519"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ fit-margin-top="1"
+ fit-margin-left="1"
+ fit-margin-right="1"
+ fit-margin-bottom="1"
+ inkscape:window-width="3706"
+ inkscape:window-height="2031"
+ inkscape:window-x="134"
+ inkscape:window-y="55"
+ inkscape:window-maximized="1"
+ inkscape:snap-global="false">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3713"
+ originx="-0.0070880335"
+ originy="-280.58354" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata5">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(-0.00708803,0.51688025)">
+ <path
+ style="fill:#141f3a;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 1.6489221,4.3034973 h 0.7205171 v 7.0102767 c 0.01422,0.27678 0.1921164,0.348966 0.392741,0.392741 H 14.169383 c 0.276028,-0.04241 0.382882,-0.208883 0.423747,-0.423747 V 4.3094031 h 0.692464 v 7.0279949 c -0.111554,0.831949 -0.589986,1.000696 -1.104399,1.104399 H 9.3324693 l 2.2589977,2.258998 c -0.0189,0.375139 -0.204956,0.516261 -0.501999,0.502 L 8.8304698,12.943797 v 1.972563 c -0.051861,0.342631 -0.6681357,0.36382 -0.7323291,0 V 12.949702 L 5.8391425,15.208701 C 5.5142667,15.206145 5.3522558,15.056484 5.3725781,14.742136 L 7.7172116,12.397503 H 2.7415096 C 2.1429244,12.357576 1.6879444,12.049089 1.6444927,11.300486 Z"
+ id="path826"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccccccccccccccccccc" />
+ <rect
+ style="fill:#141f3a;fill-opacity:1;stroke:none;stroke-width:0.2619375;stroke-miterlimit:4;stroke-dasharray:0.523875, 0.2619375;stroke-dashoffset:0"
+ id="rect828"
+ width="16.044523"
+ height="1.9126476"
+ x="0.441401"
+ y="2.0340116"
+ rx="1.0583333"
+ ry="1.0583333" />
+ <path
+ style="fill:#141f3a;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="M 7.8323763,1.681278 V 1.1615701 c 0.1987987,-0.67546179 1.0821701,-0.66495897 1.2992931,0 V 1.681278 Z"
+ id="path830"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccc" />
+ </g>
+</svg>