summaryrefslogtreecommitdiffstats
path: root/src/settingsui/settingsuiplugin
diff options
context:
space:
mode:
authorJuho Annunen <juho.annunen@qt.io>2017-10-11 13:30:52 +0300
committerSami Nurmenniemi <sami.nurmenniemi@qt.io>2017-11-22 10:40:45 +0000
commit3895b8504f65346a1de19aa1ceb9570175337283 (patch)
tree3c97b2b57874bc1d3932350b4db7a779ddd80840 /src/settingsui/settingsuiplugin
parent61e9e8c83e817b3692beae03bd8e683d247207b0 (diff)
Update API and settings UI
Implemented new UI design for Settings and minor changes to API Task-number: QTBUG-63091 Change-Id: Id72e20b53bc33ca0a3068d1e9b664fc5836a1cda Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io> Reviewed-by: Teemu Holappa <teemu.holappa@qt.io>
Diffstat (limited to 'src/settingsui/settingsuiplugin')
-rw-r--r--src/settingsui/settingsuiplugin/icons.qrc22
-rw-r--r--src/settingsui/settingsuiplugin/newIcons/back_icon.svg1
-rw-r--r--src/settingsui/settingsuiplugin/newIcons/bluetooth_icon.svg1
-rw-r--r--src/settingsui/settingsuiplugin/newIcons/close_icon.svg1
-rw-r--r--src/settingsui/settingsuiplugin/newIcons/date-time_icon.svg1
-rw-r--r--src/settingsui/settingsuiplugin/newIcons/detail_icon.svg1
-rw-r--r--src/settingsui/settingsuiplugin/newIcons/display_icon.svg1
-rw-r--r--src/settingsui/settingsuiplugin/newIcons/grid_icon.svg1
-rw-r--r--src/settingsui/settingsuiplugin/newIcons/header_toggle_icon.svg1
-rw-r--r--src/settingsui/settingsuiplugin/newIcons/info_icon.svg1
-rw-r--r--src/settingsui/settingsuiplugin/newIcons/language_icon.svg1
-rw-r--r--src/settingsui/settingsuiplugin/newIcons/mouse_icon.svg1
-rw-r--r--src/settingsui/settingsuiplugin/newIcons/mute_icon.svg1
-rw-r--r--src/settingsui/settingsuiplugin/newIcons/network_icon.svg1
-rw-r--r--src/settingsui/settingsuiplugin/newIcons/pause_icon.svg1
-rw-r--r--src/settingsui/settingsuiplugin/newIcons/play_icon.svg1
-rw-r--r--src/settingsui/settingsuiplugin/newIcons/power_icon.svg1
-rw-r--r--src/settingsui/settingsuiplugin/newIcons/qt_logo_green_rgb.svg20
-rw-r--r--src/settingsui/settingsuiplugin/newIcons/settings_icon.svg1
-rw-r--r--src/settingsui/settingsuiplugin/newIcons/settingsmenu_launcher_icon.svg1
-rw-r--r--src/settingsui/settingsuiplugin/newIcons/stop_icon.svg1
-rw-r--r--src/settingsui/settingsuiplugin/newIcons/touch_icon.svg1
-rw-r--r--src/settingsui/settingsuiplugin/newIcons/volume_icon.svg1
-rw-r--r--src/settingsui/settingsuiplugin/plugin.qrc8
-rw-r--r--src/settingsui/settingsuiplugin/pluginMain.qml358
-rw-r--r--src/settingsui/settingsuiplugin/settingsview.xml20
26 files changed, 344 insertions, 105 deletions
diff --git a/src/settingsui/settingsuiplugin/icons.qrc b/src/settingsui/settingsuiplugin/icons.qrc
index 88bdeac..91c3a76 100644
--- a/src/settingsui/settingsuiplugin/icons.qrc
+++ b/src/settingsui/settingsuiplugin/icons.qrc
@@ -30,5 +30,27 @@
<file>icons/Chevron-left_black_6x.png</file>
<file>icons/Chevron-left_black.png</file>
<file>icons/Power_black_6x.png</file>
+ <file>newIcons/back_icon.svg</file>
+ <file>newIcons/bluetooth_icon.svg</file>
+ <file>newIcons/close_icon.svg</file>
+ <file>newIcons/date-time_icon.svg</file>
+ <file>newIcons/detail_icon.svg</file>
+ <file>newIcons/display_icon.svg</file>
+ <file>newIcons/grid_icon.svg</file>
+ <file>newIcons/header_toggle_icon.svg</file>
+ <file>newIcons/info_icon.svg</file>
+ <file>newIcons/language_icon.svg</file>
+ <file>newIcons/mouse_icon.svg</file>
+ <file>newIcons/mute_icon.svg</file>
+ <file>newIcons/network_icon.svg</file>
+ <file>newIcons/pause_icon.svg</file>
+ <file>newIcons/play_icon.svg</file>
+ <file>newIcons/power_icon.svg</file>
+ <file>newIcons/settings_icon.svg</file>
+ <file>newIcons/settingsmenu_launcher_icon.svg</file>
+ <file>newIcons/stop_icon.svg</file>
+ <file>newIcons/touch_icon.svg</file>
+ <file>newIcons/volume_icon.svg</file>
+ <file>newIcons/qt_logo_green_rgb.svg</file>
</qresource>
</RCC>
diff --git a/src/settingsui/settingsuiplugin/newIcons/back_icon.svg b/src/settingsui/settingsuiplugin/newIcons/back_icon.svg
new file mode 100644
index 0000000..6034bd7
--- /dev/null
+++ b/src/settingsui/settingsuiplugin/newIcons/back_icon.svg
@@ -0,0 +1 @@
+<svg id="back" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>back_icon</title><path d="M26.57,43.5a2.61,2.61,0,0,1-2.1-1.06L10.74,24a2.62,2.62,0,0,1,0-3.12L25.06,1.56a2.62,2.62,0,1,1,4.2,3.12L16.1,22.4,28.67,39.32a2.62,2.62,0,0,1-2.1,4.18Z" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/src/settingsui/settingsuiplugin/newIcons/bluetooth_icon.svg b/src/settingsui/settingsuiplugin/newIcons/bluetooth_icon.svg
new file mode 100644
index 0000000..5dfaa97
--- /dev/null
+++ b/src/settingsui/settingsuiplugin/newIcons/bluetooth_icon.svg
@@ -0,0 +1 @@
+<svg id="bluetooth" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>bluetooth_icon</title><path d="M22.38,43.5a1.79,1.79,0,0,1-1.79-1.79V25.82l-9.08,7.86A1.79,1.79,0,1,1,9.18,31l10.37-9L9.1,13a1.79,1.79,0,0,1,2.34-2.7l9.16,7.92V2.29a1.79,1.79,0,0,1,3-1.35l11.34,9.81a1.79,1.79,0,0,1,0,2.7L25,22l9.88,8.55a1.79,1.79,0,0,1,0,2.7L23.55,43.06A1.79,1.79,0,0,1,22.38,43.5ZM24.17,26V37.81L31,31.9Zm0-19.8V18L31,12.1Z" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/src/settingsui/settingsuiplugin/newIcons/close_icon.svg b/src/settingsui/settingsuiplugin/newIcons/close_icon.svg
new file mode 100644
index 0000000..c98fe51
--- /dev/null
+++ b/src/settingsui/settingsuiplugin/newIcons/close_icon.svg
@@ -0,0 +1 @@
+<svg id="close" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>close_icon</title><path d="M25.5,22,42.09,4.78a2.52,2.52,0,1,0-3.64-3.5L22,18.36,5.55,1.27a2.53,2.53,0,0,0-3.64,3.5L18.49,22,1.91,39.22a2.53,2.53,0,0,0,3.64,3.5L22,25.64,38.45,42.73a2.52,2.52,0,1,0,3.64-3.5Z" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/src/settingsui/settingsuiplugin/newIcons/date-time_icon.svg b/src/settingsui/settingsuiplugin/newIcons/date-time_icon.svg
new file mode 100644
index 0000000..2b86128
--- /dev/null
+++ b/src/settingsui/settingsuiplugin/newIcons/date-time_icon.svg
@@ -0,0 +1 @@
+<svg id="date_time" data-name="date time" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>date-time_icon</title><polygon points="9.98 20.74 6.69 20.74 6.69 24.03 9.98 24.03 9.98 20.74 9.98 20.74" style="fill:#fff"/><polygon points="15.68 20.74 12.39 20.74 12.39 24.03 15.68 24.03 15.68 20.74 15.68 20.74" style="fill:#fff"/><polygon points="21.39 20.74 18.09 20.74 18.09 24.03 21.39 24.03 21.39 20.74 21.39 20.74" style="fill:#fff"/><polygon points="9.98 26.03 6.69 26.03 6.69 29.32 9.98 29.32 9.98 26.03 9.98 26.03" style="fill:#fff"/><polygon points="15.68 26.03 12.39 26.03 12.39 29.32 15.68 29.32 15.68 26.03 15.68 26.03" style="fill:#fff"/><polygon points="21.39 26.03 18.09 26.03 18.09 29.32 21.39 29.32 21.39 26.03 21.39 26.03" style="fill:#fff"/><path d="M38.59,21.72V7.28a1.7,1.7,0,0,0-1.7-1.7H32.08V4.45a1.7,1.7,0,1,0-3.4,0V5.58H10.44V4.45a1.7,1.7,0,1,0-3.4,0V5.58H2a1.7,1.7,0,0,0-1.7,1.7V35A1.7,1.7,0,0,0,2,36.69H24.43v0a10.53,10.53,0,1,0,14.16-15ZM3.74,9H7V10.1a1.7,1.7,0,0,0,3.4,0V9H28.68V10.1a1.7,1.7,0,0,0,3.4,0V9h3.11V15.6H3.74Zm0,24.33v-16H35.19v3.08a11,11,0,0,0-2.08-.2,10.43,10.43,0,0,0-6,1.9V20.74h-3.3V24H25A10.53,10.53,0,0,0,22.9,33.3Zm29.37,6.25A8.84,8.84,0,1,1,42,30.71,8.85,8.85,0,0,1,33.11,39.55Z" style="fill:#fff"/><path d="M39.47,30.71a.87.87,0,0,1-.88.88H33.11a.89.89,0,0,1-.88-.88V25.24a.88.88,0,1,1,1.76,0v4.59h4.6A.88.88,0,0,1,39.47,30.71Z" style="fill:#fff"/><path d="M33.2,31.59h-.09a.81.81,0,0,1-.62-.27.84.84,0,0,0,.62.26Z" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/src/settingsui/settingsuiplugin/newIcons/detail_icon.svg b/src/settingsui/settingsuiplugin/newIcons/detail_icon.svg
new file mode 100644
index 0000000..f0dc4ec
--- /dev/null
+++ b/src/settingsui/settingsuiplugin/newIcons/detail_icon.svg
@@ -0,0 +1 @@
+<svg id="detail" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>detail</title><path d="M42.31,5.08H1.69A1.69,1.69,0,0,0,0,6.77V37.23a1.69,1.69,0,0,0,1.69,1.69H42.31A1.69,1.69,0,0,0,44,37.23V6.77A1.69,1.69,0,0,0,42.31,5.08ZM40.61,26.71H24V8.46H40.61Zm-7.16,8.82H24V28.29h9.43Zm-12.57,0H14.59V28.29h6.29Zm0-27.08V26.71H3.38V8.46ZM3.38,28.29h8.07v7.25H3.38ZM35,35.54V28.29h5.59v7.25Z" style="fill:#fff"/><rect x="6.74" y="11" width="12.57" height="1.57" style="fill:#fff"/><rect x="6.74" y="18.86" width="12.57" height="1.57" style="fill:#fff"/><rect x="6.74" y="14.14" width="12.57" height="1.57" style="fill:#fff"/><rect x="6.74" y="22" width="12.57" height="1.57" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/src/settingsui/settingsuiplugin/newIcons/display_icon.svg b/src/settingsui/settingsuiplugin/newIcons/display_icon.svg
new file mode 100644
index 0000000..598d2ee
--- /dev/null
+++ b/src/settingsui/settingsuiplugin/newIcons/display_icon.svg
@@ -0,0 +1 @@
+<svg id="display" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>display_icon</title><path d="M42.16,32.5H1.83A1.83,1.83,0,0,1,0,30.67V5A1.83,1.83,0,0,1,1.83,3.17H42.16A1.83,1.83,0,0,1,44,5V30.67a1.83,1.83,0,0,1-1.84,1.83ZM3.67,28.84H40.33v-22H3.67v22Z" style="fill:#fff"/><path d="M28.76,40.83H15.24a1.83,1.83,0,1,1,0-3.67H28.76a1.83,1.83,0,1,1,0,3.67Z" style="fill:#fff"/><path d="M17.34,40.29a1.83,1.83,0,0,1-1.83-1.83V31.05a1.83,1.83,0,1,1,3.67,0v7.41a1.83,1.83,0,0,1-1.83,1.83Z" style="fill:#fff"/><path d="M26.66,40.29a1.83,1.83,0,0,1-1.83-1.83V31.05a1.83,1.83,0,1,1,3.67,0v7.41a1.83,1.83,0,0,1-1.83,1.83Z" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/src/settingsui/settingsuiplugin/newIcons/grid_icon.svg b/src/settingsui/settingsuiplugin/newIcons/grid_icon.svg
new file mode 100644
index 0000000..decd8e2
--- /dev/null
+++ b/src/settingsui/settingsuiplugin/newIcons/grid_icon.svg
@@ -0,0 +1 @@
+<svg id="grid" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>grid_icon</title><path d="M42.31,5.08H1.69A1.69,1.69,0,0,0,0,6.77V37.23a1.69,1.69,0,0,0,1.69,1.69H42.31A1.69,1.69,0,0,0,44,37.23V6.77A1.69,1.69,0,0,0,42.31,5.08ZM40.62,21.26H29.19V8.46H40.62Zm-23.79,0V8.46H27.24v12.8Zm10.41,1.3v13H16.83v-13ZM14.88,8.46v12.8H3.39V8.46ZM3.39,22.56H14.88v13H3.39Zm25.81,13v-13H40.62v13Z" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/src/settingsui/settingsuiplugin/newIcons/header_toggle_icon.svg b/src/settingsui/settingsuiplugin/newIcons/header_toggle_icon.svg
new file mode 100644
index 0000000..06d0b6a
--- /dev/null
+++ b/src/settingsui/settingsuiplugin/newIcons/header_toggle_icon.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>header_toggle_icon</title><g style="isolation:isolate"><g id="toggle"><g style="opacity:0.35000000000000003;mix-blend-mode:multiply"><polygon points="3.36 15 23.27 33 42.64 15 3.36 15" style="fill:none;stroke:#09102b;stroke-linejoin:round;stroke-width:2px"/></g><polygon points="2.36 13 22.27 31 41.64 13 2.36 13" style="fill:none;stroke:#fff;stroke-linejoin:round;stroke-width:2px"/></g></g></svg> \ No newline at end of file
diff --git a/src/settingsui/settingsuiplugin/newIcons/info_icon.svg b/src/settingsui/settingsuiplugin/newIcons/info_icon.svg
new file mode 100644
index 0000000..64d24c0
--- /dev/null
+++ b/src/settingsui/settingsuiplugin/newIcons/info_icon.svg
@@ -0,0 +1 @@
+<svg id="info" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>info_icon</title><path d="M21.86,15.59a2,2,0,0,1-1.33-.48A1.69,1.69,0,0,1,20,13.77a1.68,1.68,0,0,1,.56-1.3A1.91,1.91,0,0,1,21.86,12a1.93,1.93,0,0,1,1.28.46,1.65,1.65,0,0,1,.56,1.35,1.7,1.7,0,0,1-.54,1.34,1.88,1.88,0,0,1-1.29.48m1.83,3.83V30.14a2.39,2.39,0,0,1-.53,1.68,1.76,1.76,0,0,1-1.35.57,1.67,1.67,0,0,1-1.32-.58A2.47,2.47,0,0,1,20,30.14V19.53a2.38,2.38,0,0,1,.51-1.66,1.71,1.71,0,0,1,1.32-.56,1.78,1.78,0,0,1,1.35.56,2.16,2.16,0,0,1,.53,1.55" style="fill:#fff"/><path d="M21.89,43.5A21.5,21.5,0,0,1,6.7,6.8,21.5,21.5,0,0,1,37.11,37.2a21.38,21.38,0,0,1-15.21,6.3m0-39.35A17.85,17.85,0,0,0,9.28,34.62,17.85,17.85,0,1,0,34.52,9.38,17.73,17.73,0,0,0,21.9,4.15" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/src/settingsui/settingsuiplugin/newIcons/language_icon.svg b/src/settingsui/settingsuiplugin/newIcons/language_icon.svg
new file mode 100644
index 0000000..f1235c5
--- /dev/null
+++ b/src/settingsui/settingsuiplugin/newIcons/language_icon.svg
@@ -0,0 +1 @@
+<svg id="language" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>language_icon</title><path d="M22,43.5A21.5,21.5,0,1,1,43.5,22,21.52,21.52,0,0,1,22,43.5ZM22,4.12A17.88,17.88,0,1,0,39.88,22,17.9,17.9,0,0,0,22,4.12Z" style="fill:#fff"/><path d="M22,42.6C15.22,42.6,9.7,33.36,9.7,22S15.22,1.41,22,1.41,34.29,10.64,34.29,22,28.78,42.6,22,42.6ZM22,3.22c-5.78,0-10.48,8.43-10.48,18.78S16.22,40.78,22,40.78,32.48,32.36,32.48,22,27.78,3.22,22,3.22Z" style="fill:#fff"/><path d="M22,42.6a.9.9,0,0,1-.91-.91V2.31A.9.9,0,0,1,22,1.41,20.59,20.59,0,0,1,22,42.6ZM22.9,3.24V40.76a18.78,18.78,0,0,0,0-37.53Z" style="fill:#fff"/><path d="M40.41,29.85H3.59a.91.91,0,0,1-.85-.59,20.37,20.37,0,0,1,0-14.52.91.91,0,0,1,.85-.59H40.41a.91.91,0,0,1,.85.59,20.34,20.34,0,0,1,0,14.52.91.91,0,0,1-.85.59ZM4.23,28H39.77a18.45,18.45,0,0,0,0-12.07H4.23A18.49,18.49,0,0,0,4.23,28Z" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/src/settingsui/settingsuiplugin/newIcons/mouse_icon.svg b/src/settingsui/settingsuiplugin/newIcons/mouse_icon.svg
new file mode 100644
index 0000000..5843fe1
--- /dev/null
+++ b/src/settingsui/settingsuiplugin/newIcons/mouse_icon.svg
@@ -0,0 +1 @@
+<svg id="mouse" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 44 44"><defs><clipPath id="clip-path"><polygon points="26.94 20.62 29.12 14.45 30.87 5.33 28.23 5.83 22.8 4.3 18.92 7.24 9.96 3.31 29 -5.98 42.56 8.54 26.94 20.62" style="fill:none"/></clipPath></defs><title>mouse_icon</title><path d="M5,22.1a1.06,1.06,0,0,1,0-1.5l4.23-4.25a1.06,1.06,0,0,1,1.5,0l8.48,8.46h0a1.06,1.06,0,0,1,0,1.5L15,30.56a1.06,1.06,0,0,1-1.5,0L5,22.1Zm5-3.5L7.24,21.35l7,7,2.73-2.74-7-7Z" style="fill:#fff"/><path d="M24.18,5.35a1,1,0,0,1,0,1.36l-4.41,4.41a3.68,3.68,0,0,1,.77.48l4.33-4.44a1,1,0,0,1,1.36,1.36l-4.31,4.42.62.62,4.12-4.23A1,1,0,1,1,28,10.68l-4.15,4.26a6,6,0,0,1,.5.81l4-4a.86.86,0,0,1,1.27,0,1,1,0,0,1,0,1.36L24,18.8,22.73,20,19.5,23.26a2.38,2.38,0,0,1-1.39.66l-6.57-6.56a2.59,2.59,0,0,1,.22-.76l1.38-5a1,1,0,0,1,.26-.44l3.05-3.05a.91.91,0,1,1,1.29,1.29L16.5,10.62l-.22,1.26,6.54-6.54a1,1,0,0,1,1.36,0m1.5-1.5a3.09,3.09,0,0,0-4.36,0l-2.4,2.4a3.07,3.07,0,0,0-4,.34L11.9,9.64A3.12,3.12,0,0,0,11.09,11L9.76,15.89a4.74,4.74,0,0,0-.32,1.19,2.12,2.12,0,0,0,.6,1.79h0l6.56,6.56a2.12,2.12,0,0,0,1.78.6A4.48,4.48,0,0,0,21,24.76l3.23-3.23,1.23-1.23,5.41-5.49a3.09,3.09,0,0,0,0-4.36,3,3,0,0,0-.7-.52,3.08,3.08,0,0,0-1.85-2.51,3.08,3.08,0,0,0-.64-1.31,2.33,2.33,0,0,0-1.14-.53,3.07,3.07,0,0,0-.87-1.74Z" style="fill:#fff"/><g style="clip-path:url(#clip-path)"><path d="M18.34,16.84A9,9,0,0,1,16.4,14c-1.14-2.88,1-6.75,2.41-8.18l4.11-4.11a4.79,4.79,0,0,1,6.63,0l4,4a4.8,4.8,0,0,1,0,6.66l-4.1,4.1c-1.44,1.41-5.3,3.56-8.17,2.42a9,9,0,0,1-2.9-1.95Zm14-10.08L28.4,2.85a3.14,3.14,0,0,0-4.28,0L20,7c-1.32,1.35-2.78,4.51-2,6.37a7.43,7.43,0,0,0,3.92,3.91c1.84.73,5-.73,6.36-2.06l4.1-4.1a3.15,3.15,0,0,0,0-4.32Z" style="fill:#fff"/></g><path d="M37,25.09a1.16,1.16,0,0,1-.51-.12,5.58,5.58,0,0,1-3.22-3.78,7.76,7.76,0,0,1,1.65-6.1c.68-.86,1.4-1.67,2.1-2.44,2.18-2.42,4.06-4.51,3.51-7.11a3.24,3.24,0,0,0-2.21-2.48c-1.87-.62-4.3.1-6.35,1.88a1.16,1.16,0,1,1-1.53-1.76C33.1.82,36.32-.06,39,.84A5.56,5.56,0,0,1,42.76,5c.81,3.76-1.66,6.51-4.05,9.16-.67.75-1.37,1.53-2,2.33a5.5,5.5,0,0,0-1.21,4.14,3.31,3.31,0,0,0,2,2.21A1.17,1.17,0,0,1,37,25.09Z" style="fill:#fff"/><path d="M1.08,35.78h2l1.59,5.57,1.59-5.57h2v7.13H7.13V37.06H7L5.29,42.62H4.08L2.39,37.06H2.24v5.85H1.08Z" style="fill:#fff"/><path d="M9.62,39.38c0-2.38.68-3.71,2.9-3.71s2.89,1.32,2.89,3.71S14.75,43,12.52,43,9.62,41.78,9.62,39.38Zm4.6,0c0-1.77-.32-2.7-1.7-2.7s-1.71.94-1.71,2.7S11.14,42,12.52,42,14.22,41.19,14.22,39.38Z" style="fill:#fff"/><path d="M19.31,42c1,0,1.47-.43,1.47-1.38V35.78h1.17v4.83c0,1.72-.93,2.41-2.63,2.41s-2.61-.7-2.61-2.41V35.78h1.17v4.85C17.86,41.6,18.36,42,19.31,42Z" style="fill:#fff"/><path d="M27.68,36.84s-1.46-.17-2.06-.17c-.87,0-1.32.31-1.32.93s.37.82,1.59,1.15c1.5.42,2,.81,2,2A2.09,2.09,0,0,1,25.54,43a15.19,15.19,0,0,1-2.33-.28l.11-.93s1.41.19,2.14.19,1.29-.4,1.29-1.14-.32-.81-1.41-1.07c-1.54-.4-2.21-.86-2.21-2.1,0-1.44.95-2,2.37-2a15.76,15.76,0,0,1,2.26.25Z" style="fill:#fff"/><path d="M29.18,35.78h4.49v1H30.33v2H33v1H30.33v2.08h3.34v1H29.18Z" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/src/settingsui/settingsuiplugin/newIcons/mute_icon.svg b/src/settingsui/settingsuiplugin/newIcons/mute_icon.svg
new file mode 100644
index 0000000..2ffd61f
--- /dev/null
+++ b/src/settingsui/settingsuiplugin/newIcons/mute_icon.svg
@@ -0,0 +1 @@
+<svg id="mute" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>mute_icon</title><path d="M17.92,40.48A2,2,0,0,1,16.68,40L7.59,32.77H2a2,2,0,0,1-2-2V13.22a2,2,0,0,1,2-2h5.6L16.68,4A2,2,0,0,1,19.9,5.5v33a2,2,0,0,1-2,2ZM4,28.8H8.29a2,2,0,0,1,1.24.44l6.41,5.13V9.64L9.52,14.77a2,2,0,0,1-1.24.44H4V28.8Z" style="fill:#fff"/><path d="M42,32.41a2,2,0,0,1-1.4-.58L23.77,15a2,2,0,0,1,2.81-2.81L43.42,29A2,2,0,0,1,42,32.41Z" style="fill:#fff"/><path d="M25.29,32.52a2,2,0,0,1-1.42-3.37L40.48,12.08a2,2,0,0,1,2.85,2.77L26.71,31.92a2,2,0,0,1-1.42.6Z" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/src/settingsui/settingsuiplugin/newIcons/network_icon.svg b/src/settingsui/settingsuiplugin/newIcons/network_icon.svg
new file mode 100644
index 0000000..6280828
--- /dev/null
+++ b/src/settingsui/settingsuiplugin/newIcons/network_icon.svg
@@ -0,0 +1 @@
+<svg id="network" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>network_icon</title><path d="M8.22,28.71A6.71,6.71,0,1,1,14.93,22a6.72,6.72,0,0,1-6.71,6.71Zm0-10A3.25,3.25,0,1,0,11.47,22a3.25,3.25,0,0,0-3.25-3.25Z" style="fill:#fff"/><path d="M35.78,13.92a6.71,6.71,0,1,1,6.71-6.71,6.72,6.72,0,0,1-6.71,6.71Zm0-10A3.25,3.25,0,1,0,39,7.21,3.25,3.25,0,0,0,35.78,4Z" style="fill:#fff"/><path d="M35.78,43.5a6.71,6.71,0,1,1,6.71-6.71,6.72,6.72,0,0,1-6.71,6.71Zm0-10A3.25,3.25,0,1,0,39,36.79a3.25,3.25,0,0,0-3.25-3.25Z" style="fill:#fff"/><path d="M30.66,35.89a1.73,1.73,0,0,1-.86-.23L12.12,25.46a1.73,1.73,0,0,1,1.73-3L31.52,32.66a1.73,1.73,0,0,1-.87,3.23Z" style="fill:#fff"/><path d="M13,21.77a1.73,1.73,0,0,1-.87-3.23L29.79,8.34a1.73,1.73,0,1,1,1.73,3L13.85,21.54a1.71,1.71,0,0,1-.86.23Z" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/src/settingsui/settingsuiplugin/newIcons/pause_icon.svg b/src/settingsui/settingsuiplugin/newIcons/pause_icon.svg
new file mode 100644
index 0000000..04000f9
--- /dev/null
+++ b/src/settingsui/settingsuiplugin/newIcons/pause_icon.svg
@@ -0,0 +1 @@
+<svg id="pause" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>pause_icon</title><path d="M15.51,43.5H9.76a4.65,4.65,0,0,1-4.64-4.64V5.14A4.65,4.65,0,0,1,9.76.5h5.75a4.65,4.65,0,0,1,4.64,4.64V38.86a4.65,4.65,0,0,1-4.64,4.64ZM9.76,4.55a.6.6,0,0,0-.59.59V38.86a.6.6,0,0,0,.59.59h5.75a.6.6,0,0,0,.59-.59V5.14a.6.6,0,0,0-.59-.59Z" style="fill:#fff"/><path d="M34.24,43.5H28.49a4.65,4.65,0,0,1-4.64-4.64V5.14A4.65,4.65,0,0,1,28.49.5h5.75a4.65,4.65,0,0,1,4.64,4.64V38.86a4.65,4.65,0,0,1-4.64,4.64ZM28.49,4.55a.6.6,0,0,0-.59.59V38.86a.6.6,0,0,0,.59.59h5.75a.6.6,0,0,0,.59-.59V5.14a.6.6,0,0,0-.59-.59Z" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/src/settingsui/settingsuiplugin/newIcons/play_icon.svg b/src/settingsui/settingsuiplugin/newIcons/play_icon.svg
new file mode 100644
index 0000000..ab27771
--- /dev/null
+++ b/src/settingsui/settingsuiplugin/newIcons/play_icon.svg
@@ -0,0 +1 @@
+<svg id="play" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>play_icon</title><path d="M6.58,43.82c-2.4,0-4.08-1.91-4.08-4.65V4.83C2.5,2.09,4.18.18,6.58.18A5.29,5.29,0,0,1,9.22.95L39,18.12A4.56,4.56,0,0,1,41.5,22,4.56,4.56,0,0,1,39,25.88L9.22,43.05a5.28,5.28,0,0,1-2.65.77ZM6.64,4.28a5.24,5.24,0,0,0,0,.55V39.17a1.56,1.56,0,0,0,.08.55,1.74,1.74,0,0,0,.51-.21L36.92,22.33a1.61,1.61,0,0,0,.46-.36c-.06,0-.19-.16-.46-.31L7.18,4.49a1.6,1.6,0,0,0-.54-.22Z" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/src/settingsui/settingsuiplugin/newIcons/power_icon.svg b/src/settingsui/settingsuiplugin/newIcons/power_icon.svg
new file mode 100644
index 0000000..b922c0e
--- /dev/null
+++ b/src/settingsui/settingsuiplugin/newIcons/power_icon.svg
@@ -0,0 +1 @@
+<svg id="power" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>power_icon</title><path d="M22,17.4a1.82,1.82,0,0,1-1.82-1.82V2.3a1.82,1.82,0,0,1,3.65,0V15.57A1.82,1.82,0,0,1,22,17.4Z" style="fill:#fff"/><path d="M22,43.48A19.15,19.15,0,0,1,15.7,6.25,1.82,1.82,0,0,1,16.9,9.7a15.51,15.51,0,1,0,10.19,0,1.82,1.82,0,0,1,1.2-3.45A19.15,19.15,0,0,1,22,43.48Z" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/src/settingsui/settingsuiplugin/newIcons/qt_logo_green_rgb.svg b/src/settingsui/settingsuiplugin/newIcons/qt_logo_green_rgb.svg
new file mode 100644
index 0000000..bdb07d1
--- /dev/null
+++ b/src/settingsui/settingsuiplugin/newIcons/qt_logo_green_rgb.svg
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 20.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ viewBox="0 0 293.4 216.1" style="enable-background:new 0 0 293.4 216.1;" xml:space="preserve">
+<style type="text/css">
+ .st0{fill:#41CD52;}
+ .st1{fill:#FFFFFF;}
+</style>
+<g>
+ <polygon class="st0" points="265.2,0 255,0 40.7,0 40.7,0 0,40.7 0,176.8 0,187.9 0,216.1 28.2,216.1 38.4,216.1 252.7,216.1
+ 252.7,216.1 293.4,175.4 293.4,39.3 293.4,28.2 293.4,0 "/>
+ <path class="st1" d="M109.2,169.2c-19.3,0-32.8-5.2-40.4-15.6c-7.6-10.4-11.4-26.9-11.4-49.3c0-22.5,3.9-39.2,11.6-50.1
+ c7.7-10.9,21.2-16.4,40.2-16.4c19.1,0,32.5,5.4,40.1,16.3c7.7,10.8,11.5,27.5,11.5,50.1c0,14.9-1.6,26.9-4.7,36
+ c-3.2,9.2-8.3,16.2-15.5,21l15.6,25.1l-19.1,8.9l-16.5-27.1C118.2,168.9,114.4,169.2,109.2,169.2z M85.1,140.3
+ c4.2,7.2,12.3,10.9,24.2,10.9s19.9-3.6,24.1-10.7c4.1-7.1,6.2-19.2,6.2-36.1c0-17-2.1-29.3-6.4-37S121,55.9,109.3,55.9
+ c-11.6,0-19.6,3.8-24,11.5c-4.3,7.7-6.5,19.9-6.5,36.8C78.8,121,80.9,133.1,85.1,140.3z"/>
+ <path class="st1" d="M232.4,89.2h-25.6v40.9c0,7.6,0.6,12.6,1.7,15.1s4,3.7,8.5,3.7l15.2-0.6l0.9,16.2c-8.3,1.6-14.6,2.4-19,2.4
+ c-10.5,0-17.7-2.4-21.6-7.2c-3.9-4.8-5.9-13.9-5.9-27.3V89.3h-14.1V72h14.2V45.1h20.1V72h25.6V89.2z"/>
+</g>
+</svg>
diff --git a/src/settingsui/settingsuiplugin/newIcons/settings_icon.svg b/src/settingsui/settingsuiplugin/newIcons/settings_icon.svg
new file mode 100644
index 0000000..7f5dbde
--- /dev/null
+++ b/src/settingsui/settingsuiplugin/newIcons/settings_icon.svg
@@ -0,0 +1 @@
+<svg id="settings" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>settings_icon</title><path d="M41,17.82H35a14.73,14.73,0,0,0-1.47-3.24l4-4a2.38,2.38,0,0,0,0-3.38L35.83,5.53a2.39,2.39,0,0,0-3.38,0l-4,4a14.34,14.34,0,0,0-3.53-1.43V2.89A2.39,2.39,0,0,0,22.49.5H20.1a2.39,2.39,0,0,0-2.39,2.39V8.14a14,14,0,0,0-3.84,1.61L10.49,6.37a2.4,2.4,0,0,0-3.38,0L5.42,8.06a2.4,2.4,0,0,0,0,3.38l3.44,3.44A14.24,14.24,0,0,0,7.28,19H2.79A2.39,2.39,0,0,0,.39,21.4v2.39a2.39,2.39,0,0,0,2.39,2.38h4.8a14,14,0,0,0,1.93,4L6.27,33.4a2.4,2.4,0,0,0,0,3.38L8,38.47a2.4,2.4,0,0,0,3.38,0L15,34.84a13.89,13.89,0,0,0,3.94,1.27v5A2.4,2.4,0,0,0,21.3,43.5h2.39a2.4,2.4,0,0,0,2.39-2.39V35.5a14,14,0,0,0,3.38-1.72l3.85,3.85a2.4,2.4,0,0,0,3.38,0l1.69-1.69a2.38,2.38,0,0,0,0-3.38l-4.21-4.22A14.15,14.15,0,0,0,35.31,25H41a2.39,2.39,0,0,0,2.39-2.39V20.21A2.4,2.4,0,0,0,41,17.82ZM21.3,31.5A9.5,9.5,0,1,1,30.8,22,9.5,9.5,0,0,1,21.3,31.5Z" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/src/settingsui/settingsuiplugin/newIcons/settingsmenu_launcher_icon.svg b/src/settingsui/settingsuiplugin/newIcons/settingsmenu_launcher_icon.svg
new file mode 100644
index 0000000..479a79f
--- /dev/null
+++ b/src/settingsui/settingsuiplugin/newIcons/settingsmenu_launcher_icon.svg
@@ -0,0 +1 @@
+<svg id="settings_menu_launcher" data-name="settings menu launcher" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>settingsmenu_launcher_icon</title><rect y="1.86" width="44" height="9.43" style="fill:#9d9faa"/><rect y="17.57" width="44" height="9.43" style="fill:#9d9faa"/><rect y="33.29" width="44" height="7.86" style="fill:#9d9faa"/><rect y="1.86" width="44" height="9.43" style="fill:#9ca0aa"/><rect y="17.57" width="44" height="9.43" style="fill:#9ca0aa"/><rect y="33.29" width="44" height="7.86" style="fill:#9ca0aa"/></svg> \ No newline at end of file
diff --git a/src/settingsui/settingsuiplugin/newIcons/stop_icon.svg b/src/settingsui/settingsuiplugin/newIcons/stop_icon.svg
new file mode 100644
index 0000000..2eeff5f
--- /dev/null
+++ b/src/settingsui/settingsuiplugin/newIcons/stop_icon.svg
@@ -0,0 +1 @@
+<svg id="stop" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>stop_icon</title><path d="M37.66,44H6.34A6.35,6.35,0,0,1,0,37.66V6.34A6.35,6.35,0,0,1,6.34,0H37.66A6.35,6.35,0,0,1,44,6.34V37.66A6.35,6.35,0,0,1,37.66,44ZM6.34,4.14a2.2,2.2,0,0,0-2.2,2.2V37.66a2.2,2.2,0,0,0,2.2,2.2H37.66a2.2,2.2,0,0,0,2.2-2.2V6.34a2.2,2.2,0,0,0-2.2-2.2Z" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/src/settingsui/settingsuiplugin/newIcons/touch_icon.svg b/src/settingsui/settingsuiplugin/newIcons/touch_icon.svg
new file mode 100644
index 0000000..40ce016
--- /dev/null
+++ b/src/settingsui/settingsuiplugin/newIcons/touch_icon.svg
@@ -0,0 +1 @@
+<svg id="touch" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>touch_icon</title><path d="M10.64,21.23a1.06,1.06,0,0,1,0-1.5l4.23-4.25a1.06,1.06,0,0,1,1.5,0l8.48,8.46h0a1.06,1.06,0,0,1,0,1.5l-4.24,4.25a1.06,1.06,0,0,1-1.5,0l-8.47-8.45Zm5-3.5-2.74,2.74,7,7,2.73-2.74-7-7Z" style="fill:#fff"/><path d="M29.83,4.48a1,1,0,0,1,0,1.36l-4.41,4.41a3.68,3.68,0,0,1,.77.48l.44-.44A1,1,0,0,1,28,11.64l-.42.42.62.62.23-.23a1,1,0,1,1,1.36,1.36l-.25.25a3.68,3.68,0,0,1,.48.76,1,1,0,0,1,1.36,1.36l-1.74,1.74-1.23,1.23-3.23,3.23a2.38,2.38,0,0,1-1.39.66L17.2,16.49a2.52,2.52,0,0,1,.22-.76l1.37-5a1,1,0,0,1,.26-.44l3.05-3.05A.91.91,0,1,1,23.4,8.51L22.15,9.75,21.93,11l6.54-6.54a1,1,0,0,1,1.36,0M31.33,3A3.09,3.09,0,0,0,27,3l-2.4,2.4a3.08,3.08,0,0,0-4,.34L17.55,8.77a3.13,3.13,0,0,0-.81,1.39L15.42,15a4.74,4.74,0,0,0-.32,1.19A2.12,2.12,0,0,0,15.7,18h0l6.57,6.56a2.11,2.11,0,0,0,1.78.6,4.49,4.49,0,0,0,2.61-1.27l3.23-3.23,1.23-1.23,1.74-1.74a3.09,3.09,0,0,0,0-4.36,3,3,0,0,0-.7-.52,3.08,3.08,0,0,0-1.85-2.51A3.09,3.09,0,0,0,29.68,9l1.65-1.65a3.09,3.09,0,0,0,0-4.36Z" style="fill:#fff"/><path d="M6.65,34.69h5.2v1h-2v6.1H8.68v-6.1h-2Z" style="fill:#fff"/><path d="M12.38,38.29c0-2.38.68-3.71,2.9-3.71s2.89,1.32,2.89,3.71-.67,3.64-2.89,3.64S12.38,40.69,12.38,38.29Zm4.6,0c0-1.77-.32-2.7-1.7-2.7s-1.71.94-1.71,2.7.32,2.63,1.71,2.63S17,40.1,17,38.29Z" style="fill:#fff"/><path d="M22.07,40.92c1,0,1.47-.43,1.47-1.38V34.69H24.7v4.83c0,1.72-.93,2.41-2.63,2.41s-2.61-.7-2.61-2.41V34.69h1.17v4.85C20.62,40.5,21.12,40.92,22.07,40.92Z" style="fill:#fff"/><path d="M30.71,41.7a11.23,11.23,0,0,1-2,.23c-2.17,0-2.67-1.24-2.67-3.67s.54-3.68,2.67-3.68a10,10,0,0,1,2,.26l0,.94a13.25,13.25,0,0,0-1.84-.17c-1.31,0-1.63.64-1.63,2.65s.26,2.64,1.66,2.64a13.87,13.87,0,0,0,1.81-.16Z" style="fill:#fff"/><path d="M36.18,38.73H33.1v3.08H31.95V34.69H33.1v3h3.08v-3h1.17v7.13H36.18Z" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/src/settingsui/settingsuiplugin/newIcons/volume_icon.svg b/src/settingsui/settingsuiplugin/newIcons/volume_icon.svg
new file mode 100644
index 0000000..12f944e
--- /dev/null
+++ b/src/settingsui/settingsuiplugin/newIcons/volume_icon.svg
@@ -0,0 +1 @@
+<svg id="volume" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44"><title>volume_icon</title><path d="M33.13,40.13a2,2,0,0,1-1.4-3.39,20.87,20.87,0,0,0,0-29.48,2,2,0,1,1,2.81-2.81,24.85,24.85,0,0,1,0,35.09,2,2,0,0,1-1.4.58Z" style="fill:#fff"/><path d="M27.38,34.38A2,2,0,0,1,26,31a12.72,12.72,0,0,0,0-18,2,2,0,0,1,2.81-2.81,16.69,16.69,0,0,1,0,23.59,2,2,0,0,1-1.4.58Z" style="fill:#fff"/><path d="M20.13,40.48A2,2,0,0,1,18.89,40L9.8,32.77H4.19a2,2,0,0,1-2-2V13.22a2,2,0,0,1,2-2h5.6L18.89,4A2,2,0,0,1,22.12,5.5v33a2,2,0,0,1-2,2ZM6.18,28.8h4.32a2,2,0,0,1,1.24.44l6.41,5.13V9.64l-6.42,5.14a2,2,0,0,1-1.24.44H6.18V28.8Z" style="fill:#fff"/></svg> \ No newline at end of file
diff --git a/src/settingsui/settingsuiplugin/plugin.qrc b/src/settingsui/settingsuiplugin/plugin.qrc
index 58cb4af..9449ab1 100644
--- a/src/settingsui/settingsuiplugin/plugin.qrc
+++ b/src/settingsui/settingsuiplugin/plugin.qrc
@@ -24,5 +24,13 @@
<file>../timedate/TimeDate.qml</file>
<file>../timedate/TimezonesView.qml</file>
<file>settingsview.xml</file>
+ <file>../power/Power.qml</file>
+ <file>../timedate/ManualTime.qml</file>
+ <file>../timedate/CustomComboBox.qml</file>
+ <file>../bluetooth/CustomSwitch.qml</file>
+ <file>../network/NetworkListView.qml</file>
+ <file>../network/PassphraseEnter.qml</file>
+ <file>../locale/TableKey.qml</file>
+ <file>../locale/TableValue.qml</file>
</qresource>
</RCC>
diff --git a/src/settingsui/settingsuiplugin/pluginMain.qml b/src/settingsui/settingsuiplugin/pluginMain.qml
index 3f15c57..e8df0de 100644
--- a/src/settingsui/settingsuiplugin/pluginMain.qml
+++ b/src/settingsui/settingsuiplugin/pluginMain.qml
@@ -32,134 +32,296 @@ import QtQuick.Controls 2.0
import Qt.labs.settings 1.0
import QtQuick.XmlListModel 2.0
import QtDeviceUtilities.LocalDeviceSettings 1.0
+import QtDeviceUtilities.NetworkSettings 1.0
+import QtGraphicalEffects 1.0
+import QtDemoLauncher.QtButtonImageProvider 1.0
-Rectangle {
+Item {
id: root
anchors.fill: parent
- color: "white"
visible: true
property var service
+ property int margin: (root.width / 3 * 2) * 0.05
+ property alias model: xmlModel.source
+ property alias backgroundColor: background.color
+ signal closed()
- ToolBar {
- id: titlebar
- property string title: ""
- width: parent.width
- height: 40
- z: 2
+ Rectangle {
+ id: background
+ anchors.fill:parent
+ color: "#09102b"
+ }
- ToolButton {
- height: parent.height
+ Item {
+ id: header
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.top: parent.top
+ height: parent.height * 0.125
+
+ Image {
+ id: backButton
+ sourceSize.width: parent.width
+ sourceSize.height: parent.height
+ height: parent.height * 0.5
width: height
- contentItem: Image {
- fillMode: Image.PreserveAspectFit
- source: "../icons/Chevron-left_black_6x.png"
+ anchors.left: parent.left
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.margins: parent.height * .25
+ fillMode: Image.PreserveAspectFit
+ source: "../newIcons/back_icon.svg"
+ MouseArea {
anchors.fill: parent
- anchors.margins: parent.height * .2
+ onClicked: {
+ root.closed()
+ }
}
-
- visible: stackView.depth > 1
- onClicked: stackView.pop();
}
- Label {
- id: titleText
- font.pixelSize: 20
- text: stackView.currentItem.title
- horizontalAlignment: Qt.AlignHCenter
- verticalAlignment: Qt.AlignVCenter
- anchors.centerIn: parent
+
+ Text {
+ id: settingsText
+ anchors.left: backButton.right
+ anchors.verticalCenter: parent.verticalCenter
+ font.pixelSize: parent.height * 0.45
+ text: qsTr("Settings")
+ color: "white"
+ font.family: appFont
+ font.styleName: "SemiBold"
}
- ToolButton {
+
+ Item {
+ id: ipItem
+ width: parent.width * 0.25
height: parent.height
- width: height
- contentItem: Image {
- fillMode: Image.PreserveAspectFit
- source: "../icons/Power_black_6x.png"
+ anchors.right: parent.right
+ anchors.rightMargin: root.margin
+ property alias ipAddressText: ipText.text
+ property var lastService
+ property var currentService: NetworkSettingsManager.services.itemFromRow(0)
+ Text {
+ id: ipText
anchors.fill: parent
- anchors.margins: parent.height * .2
+ horizontalAlignment: Text.AlignRight
+ verticalAlignment: Text.AlignVCenter
+ font.pixelSize: parent.height * 0.25
+ color: "white"
+ text: qsTr("Device IP: ")
+ font.family: appFont
+ font.styleName: "SemiBold"
}
- anchors.right: parent.right
- visible: stackView.depth === 1
- onClicked: menu.open();
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ parent.refreshIP()
+ }
+ }
- Menu {
- id: menu
- x: parent.width - width
+ function refreshIP() {
+ var networkCount = NetworkSettingsManager.services.sourceModel.rowCount();
+ var ipAddress = "Not Found";
+ for (var i = 0; i < networkCount; ++i) {
+ var networkService = NetworkSettingsManager.services.itemFromRow(i);
+ var tmp = NetworkSettingsManager.services.itemFromRow(i).ipv4.address;
+ if (tmp !== "" && ipAddress === "Not Found")
+ ipAddress = tmp;
- MenuItem {
- text: qsTr("Reboot")
- onTriggered: LocalDevice.reboot()
+ if (networkService.type === NetworkSettingsType.Wired &&
+ (networkService.status === NetworkSettingsState.Ready ||
+ networkService.status === NetworkSettingsState.Online)) {
+ break;
+ }
}
- MenuItem {
- text: qsTr("Shutdown")
- onTriggered: LocalDevice.powerOff()
+ ipText.text = qsTr("Device IP: ") + ipAddress;
+ }
+
+ Component.onCompleted: {
+ var networkCount = NetworkSettingsManager.services.sourceModel.rowCount();
+ for (var i = 0; i < networkCount; ++i) {
+ NetworkSettingsManager.services.itemFromRow(i).ipv4Changed.connect(refreshIP);
}
+ refreshIP()
}
}
}
-
- StackView {
- id: stackView
- initialItem: mainView
- anchors.top: titlebar.bottom
- anchors.bottom: parent.bottom
+ Item {
+ id: listHolder
+ anchors.top: header.bottom
anchors.left: parent.left
- anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ width: parent.width / 3
+
+ XmlListModel {
+ id: xmlModel
+ source: "settingsview.xml"
+ query: "/xml/settings/item"
+ XmlRole { name: "title"; query: "title/string()"}
+ XmlRole { name: "icon"; query: "icon/string()"}
+ XmlRole { name: "view"; query: "view/string()"}
+ XmlRole { name: "path"; query: "path/string()"}
+ }
+
+ ListView {
+ id: settingsList
+ anchors.fill: parent
- Component {
- id: mainView
+ model: xmlModel
+ delegate: Item {
+ id: delegateItem
+ width: settingsList.width
+ height: settingsList.height * 0.08
- Item {
- property string title: qsTr("Device Settings")
+ property bool isSelected: settingsList.currentIndex == index
- XmlListModel {
- id: xmlModel
- source: "settingsview.xml"
- query: "/xml/settings/item"
- XmlRole { name: "title"; query: "title/string()"}
- XmlRole { name: "icon"; query: "icon/string()"}
- XmlRole { name: "view"; query: "view/string()"}
- XmlRole { name: "path"; query: "path/string()"}
+ Image {
+ id: img
+ sourceSize.width: parent.width
+ sourceSize.height: parent.height
+ source: icon
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.left: parent.left
+ anchors.leftMargin: parent.width * 0.075
+ height: Math.min(parent.width * 0.5, parent.height * 0.6)
+ width: height
+ fillMode: Image.PreserveAspectFit
+ visible: parent.isSelected ? false : true
+ }
+ ColorOverlay {
+ source: img
+ anchors.fill: img
+ visible: parent.isSelected ? true : false
+ color: "#41cd52"
}
- GridView {
- id: grid
+ Label {
+ text: title
+ height: parent.height * 0.75
+ anchors.right: parent.right
+ anchors.left: img.right
+ anchors.leftMargin: parent.width * 0.025
+ anchors.verticalCenter: parent.verticalCenter
+ fontSizeMode: Text.Fit
+ minimumPixelSize: 1
+ font.pixelSize: Math.min(parent.width * 0.25, parent.height)
+ color: parent.isSelected ? "#41cd52" : "white"
+ wrapMode: Text.WordWrap
+ verticalAlignment: Text.AlignVCenter
+ font.family: appFont
+ font.styleName: parent.isSelected ? "Bold" : "Regular"
+ }
+ MouseArea {
+ id: mouseArea
anchors.fill: parent
- anchors.margins: 40
- cellHeight: 133 + spacing
- cellWidth: 117 + spacing
- model: xmlModel
- property int spacing: 20
- delegate: MouseArea {
- width: grid.cellWidth - grid.spacing
- height: grid.cellHeight - grid.spacing
-
- Rectangle {
- anchors.fill: parent
- color: "#d6d6d6"
- radius: 5
- visible: pressed
- }
- Column {
- anchors.fill: parent
- anchors.topMargin: 10
- Image {
- id: image
- source: icon
- anchors.horizontalCenter: parent.horizontalCenter
- width: grid.cellWidth
- fillMode: Image.PreserveAspectFit
- }
- Label {
- text: title
- anchors.horizontalCenter: parent.horizontalCenter
- font.pixelSize: grid.cellHeight * .1
- }
- }
- onClicked: {
- var component = Qt.createComponent(path+'/'+view+'.qml');
- stackView.push(component.createObject(stackView));
- }
+ onClicked: {
+ settingsList.currentIndex = index
+ settingsLoader.source = path + '/' + view + '.qml'
+ }
+ }
+ Component.onCompleted: {
+ if (xmlModel.count == 0) {
+ console.error("Empty xmlModel")
+ return
}
+ settingsLoader.source = xmlModel.get(0).path + '/' + xmlModel.get(0).view + '.qml'
+ }
+ }
+ }
+ }
+
+ Rectangle {
+ id: rightLine
+ width: parent.width * 0.002
+ height: parent.height * 0.8
+ anchors.horizontalCenter: listHolder.right
+ anchors.top: header.bottom
+ color: "#9d9faa"
+ }
+
+ Item {
+ id: loaderItem
+ anchors.top: header.bottom
+ anchors.left: listHolder.right
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+ anchors.bottomMargin: root.margin
+ anchors.leftMargin: root.margin
+ anchors.rightMargin: root.margin
+
+ Loader {
+ id: settingsLoader
+ anchors.fill: parent
+ }
+ }
+
+ Popup {
+ id: shutdownPopup
+ width: parent.width
+ height: parent.height
+ leftPadding: width * 0.3
+ rightPadding: leftPadding
+ topPadding: height * 0.275
+ bottomPadding: topPadding
+
+ property alias powerOffText: poweroffConfirmText.text
+ property alias buttonText: shutdownConfirm.text
+
+ background: Rectangle {
+ color: "#09102b"
+ opacity: 0.9
+ }
+ contentItem: Rectangle {
+ color: "#09102b"
+ border.color: "#9d9faa"
+ border.width: 3
+ Text {
+ id: poweroffConfirmText
+ width: parent.width * 0.75
+ height: parent.height * 0.1
+ anchors.top: parent.top
+ anchors.topMargin: parent.height * 0.175
+ anchors.horizontalCenter: parent.horizontalCenter
+ horizontalAlignment: Text.AlignHCenter
+ verticalAlignment: Text.AlignVCenter
+ fontSizeMode: Text.Fit
+ minimumPixelSize: 1
+ font.pixelSize: height * 0.9
+ color: "white"
+ font.family: appFont
+ font.styleName: "Light"
+ }
+ QtButton {
+ id: shutdownConfirm
+ width: parent.width * 0.5
+ height: parent.height * 0.15
+ anchors.top: poweroffConfirmText.bottom
+ anchors.topMargin: parent.height * 0.15
+ anchors.horizontalCenter: parent.horizontalCenter
+ fillColor: "#41cd52"
+ borderColor: "transparent"
+
+ onClicked: {
+ if (shutdownConfirm.text === qsTr("SHUT DOWN")) {
+ console.log("Powering off!")
+ LocalDevice.powerOff()
+ }
+ else if (shutdownConfirm.text === qsTr("REBOOT")) {
+ console.log("Rebooting!")
+ LocalDevice.reboot()
+ }
+ }
+ }
+ QtButton {
+ id: shutdownCancel
+ width: parent.width * 0.5
+ height: parent.height * 0.15
+ anchors.top: shutdownConfirm.bottom
+ anchors.topMargin: parent.height * 0.1
+ anchors.horizontalCenter: parent.horizontalCenter
+ fillColor: "#9d9faa"
+ borderColor: "transparent"
+ text: qsTr("CANCEL")
+
+ onClicked: {
+ shutdownPopup.close()
}
}
}
diff --git a/src/settingsui/settingsuiplugin/settingsview.xml b/src/settingsui/settingsuiplugin/settingsview.xml
index 23915db..2749cb8 100644
--- a/src/settingsui/settingsuiplugin/settingsview.xml
+++ b/src/settingsui/settingsuiplugin/settingsview.xml
@@ -5,31 +5,37 @@
<title>Network</title>
<view>NetworkSettings</view>
<path>network</path>
- <icon>icons/World_qt_6x.png</icon>
+ <icon>newIcons/network_icon.svg</icon>
</item>
<item>
<title>Display</title>
<view>Display</view>
<path>display</path>
- <icon>icons/Display_qt_6x.png</icon>
+ <icon>newIcons/display_icon.svg</icon>
</item>
<item>
- <title>Date and Time</title>
+ <title>Date &amp; Time</title>
<view>TimeDate</view>
<path>timedate</path>
- <icon>icons/Clock_qt_6x.png</icon>
+ <icon>newIcons/date-time_icon.svg</icon>
</item>
<item>
- <title>Language</title>
+ <title>Language &amp; Region</title>
<view>Language</view>
<path>locale</path>
- <icon>icons/Flag_qt_6x.png</icon>
+ <icon>newIcons/language_icon.svg</icon>
</item>
<item>
<title>Bluetooth</title>
<view>Bluetooth</view>
<path>bluetooth</path>
- <icon>icons/Bluetooth_qt_6x.png</icon>
+ <icon>newIcons/bluetooth_icon.svg</icon>
+ </item>
+ <item>
+ <title>Power</title>
+ <view>Power</view>
+ <path>power</path>
+ <icon>newIcons/power_icon.svg</icon>
</item>
</settings>
</xml>