From b17dc9b509243d72cb6448dcf5be5b8f91c52502 Mon Sep 17 00:00:00 2001 From: wang_zhiqiang Date: Thu, 30 May 2019 11:19:55 +0800 Subject: update Change-Id: Ic603b7cb155254f9b4166cf9902bbc7b519798da --- LICENSE | 202 ------- autobuild/agl/autobuild | 58 -- autobuild/linux/autobuild | 62 -- interfaces/LICENSE | 54 ++ launcher/LICENSE | 54 ++ launcher/launcher.pro | 11 +- launcher/qml/ChangeItemPosition.js | 89 +++ launcher/qml/IconItem.qml | 179 +++--- launcher/qml/Launcher.qml | 631 ++++++++++++++++----- launcher/qml/TopShortcutArea.qml | 57 -- launcher/qml/TopShortcutIcon.qml | 69 --- launcher/qml/UninstallDialog.qml | 158 ------ .../qml/images/AGL_HMI_Blue_Background_Car-01.png | Bin 785945 -> 0 bytes launcher/qml/images/DividingLine.svg | 62 -- launcher/qml/images/TopShortcut/hvac.svg | 600 -------------------- launcher/qml/images/TopShortcut/hvac_active.svg | 614 -------------------- launcher/qml/images/TopShortcut/launcher.svg | 73 --- .../qml/images/TopShortcut/launcher_active.svg | 82 --- launcher/qml/images/TopShortcut/mediaplayer.svg | 50 -- .../qml/images/TopShortcut/mediaplayer_active.svg | 63 -- launcher/qml/images/TopShortcut/navigation.svg | 77 --- .../qml/images/TopShortcut/navigation_active.svg | 90 --- launcher/qml/images/TopShortcut/sdl_usb.svg | 311 ---------- launcher/qml/images/TopShortcut/sdl_usb_active.svg | 278 --------- launcher/qml/images/TopShortcut/topshortcut.qrc | 16 - launcher/qml/images/TopShortcut/video.svg | 109 ---- launcher/qml/images/TopShortcut/video_active.svg | 126 ---- launcher/qml/images/background.png | Bin 828668 -> 0 bytes launcher/qml/images/blank_active.png | Bin 0 -> 68320 bytes launcher/qml/images/blank_active.svg | 133 ----- launcher/qml/images/blank_inactive.png | Bin 0 -> 868 bytes launcher/qml/images/blank_inactive.svg | 76 --- launcher/qml/images/browser_active.png | Bin 0 -> 68979 bytes launcher/qml/images/browser_active.svg | 231 -------- launcher/qml/images/browser_inactive.png | Bin 0 -> 1949 bytes launcher/qml/images/browser_inactive.svg | 165 ------ launcher/qml/images/center_background.png | Bin 0 -> 278523 bytes launcher/qml/images/connectivity_active.png | Bin 0 -> 78821 bytes launcher/qml/images/connectivity_active.svg | 231 -------- launcher/qml/images/connectivity_inactive.png | Bin 0 -> 6171 bytes launcher/qml/images/connectivity_inactive.svg | 169 ------ launcher/qml/images/dashboard_active.png | Bin 0 -> 74200 bytes launcher/qml/images/dashboard_active.svg | 174 ------ launcher/qml/images/dashboard_inactive.png | Bin 0 -> 4775 bytes launcher/qml/images/dashboard_inactive.svg | 94 --- launcher/qml/images/hud.png | Bin 6277 -> 0 bytes launcher/qml/images/hvac_active.png | Bin 0 -> 74342 bytes launcher/qml/images/hvac_active.svg | 411 -------------- launcher/qml/images/hvac_inactive.png | Bin 0 -> 5202 bytes launcher/qml/images/hvac_inactive.svg | 349 ------------ launcher/qml/images/images.qrc | 73 +-- launcher/qml/images/mediaplayer_active.png | Bin 0 -> 72606 bytes launcher/qml/images/mediaplayer_active.svg | 172 ------ launcher/qml/images/mediaplayer_inactive.png | Bin 0 -> 3854 bytes launcher/qml/images/mediaplayer_inactive.svg | 111 ---- launcher/qml/images/meterdisplay.png | Bin 7545 -> 0 bytes launcher/qml/images/mixer_active.png | Bin 0 -> 72342 bytes launcher/qml/images/mixer_active.svg | 370 ------------ launcher/qml/images/mixer_inactive.png | Bin 0 -> 3282 bytes launcher/qml/images/mixer_inactive.svg | 308 ---------- launcher/qml/images/music_active.png | Bin 0 -> 72606 bytes launcher/qml/images/music_active.svg | 172 ------ launcher/qml/images/music_inactive.png | Bin 0 -> 3854 bytes launcher/qml/images/music_inactive.svg | 111 ---- launcher/qml/images/navigation_active.png | Bin 0 -> 82996 bytes launcher/qml/images/navigation_active.svg | 245 -------- launcher/qml/images/navigation_inactive.png | Bin 0 -> 9335 bytes launcher/qml/images/navigation_inactive.svg | 183 ------ launcher/qml/images/phone_active.png | Bin 0 -> 77864 bytes launcher/qml/images/phone_active.svg | 155 ----- launcher/qml/images/phone_inactive.png | Bin 0 -> 4962 bytes launcher/qml/images/phone_inactive.svg | 93 --- launcher/qml/images/plus_active.svg | 180 ------ launcher/qml/images/plus_inactive.svg | 88 --- launcher/qml/images/poi_active.png | Bin 0 -> 79835 bytes launcher/qml/images/poi_active.svg | 352 ------------ launcher/qml/images/poi_inactive.png | Bin 0 -> 6367 bytes launcher/qml/images/poi_inactive.svg | 314 ---------- launcher/qml/images/radio_active.png | Bin 0 -> 73543 bytes launcher/qml/images/radio_active.svg | 383 ------------- launcher/qml/images/radio_inactive.png | Bin 0 -> 3680 bytes launcher/qml/images/radio_inactive.svg | 321 ----------- launcher/qml/images/rse.png | Bin 10640 -> 0 bytes launcher/qml/images/sdl_active.svg | 140 ----- launcher/qml/images/sdl_inactive.svg | 83 --- launcher/qml/images/settings_active.png | Bin 0 -> 77571 bytes launcher/qml/images/settings_active.svg | 176 ------ launcher/qml/images/settings_inactive.png | Bin 0 -> 4975 bytes launcher/qml/images/settings_inactive.svg | 114 ---- .../qml/images/top_three_shortcut_background.png | Bin 1452 -> 0 bytes launcher/qml/images/uninstall.png | Bin 1357 -> 0 bytes launcher/qml/images/video_active.svg | 177 ------ launcher/qml/images/video_inactive.svg | 111 ---- launcher/qml/images/videoplayer_active.png | Bin 0 -> 72440 bytes launcher/qml/images/videoplayer_inactive.png | Bin 0 -> 3339 bytes launcher/qml/images/weather_active.png | Bin 0 -> 88254 bytes launcher/qml/images/weather_inactive.png | Bin 0 -> 21222 bytes launcher/qml/images/webbrowser_active.svg | 231 -------- launcher/qml/images/webbrowser_inactive.svg | 165 ------ launcher/qml/qml.qrc | 4 +- launcher/src/applicationmodel.cpp | 114 ++-- launcher/src/applicationmodel.h | 5 +- launcher/src/homescreenhandler.cpp | 221 -------- launcher/src/homescreenhandler.h | 62 -- launcher/src/main.cpp | 36 +- launcher/src/shortcutappmodel.cpp | 169 ------ launcher/src/shortcutappmodel.h | 53 -- package/config.xml | 1 + package/icon.svg | 352 +++++++++--- 109 files changed, 1146 insertions(+), 10907 deletions(-) delete mode 100644 LICENSE delete mode 100755 autobuild/agl/autobuild delete mode 100644 autobuild/linux/autobuild create mode 100644 interfaces/LICENSE create mode 100644 launcher/LICENSE create mode 100644 launcher/qml/ChangeItemPosition.js delete mode 100644 launcher/qml/TopShortcutArea.qml delete mode 100644 launcher/qml/TopShortcutIcon.qml delete mode 100644 launcher/qml/UninstallDialog.qml delete mode 100644 launcher/qml/images/AGL_HMI_Blue_Background_Car-01.png delete mode 100644 launcher/qml/images/DividingLine.svg delete mode 100644 launcher/qml/images/TopShortcut/hvac.svg delete mode 100644 launcher/qml/images/TopShortcut/hvac_active.svg delete mode 100644 launcher/qml/images/TopShortcut/launcher.svg delete mode 100644 launcher/qml/images/TopShortcut/launcher_active.svg delete mode 100644 launcher/qml/images/TopShortcut/mediaplayer.svg delete mode 100644 launcher/qml/images/TopShortcut/mediaplayer_active.svg delete mode 100644 launcher/qml/images/TopShortcut/navigation.svg delete mode 100644 launcher/qml/images/TopShortcut/navigation_active.svg delete mode 100644 launcher/qml/images/TopShortcut/sdl_usb.svg delete mode 100644 launcher/qml/images/TopShortcut/sdl_usb_active.svg delete mode 100644 launcher/qml/images/TopShortcut/topshortcut.qrc delete mode 100644 launcher/qml/images/TopShortcut/video.svg delete mode 100644 launcher/qml/images/TopShortcut/video_active.svg delete mode 100644 launcher/qml/images/background.png create mode 100644 launcher/qml/images/blank_active.png delete mode 100644 launcher/qml/images/blank_active.svg create mode 100644 launcher/qml/images/blank_inactive.png delete mode 100644 launcher/qml/images/blank_inactive.svg create mode 100644 launcher/qml/images/browser_active.png delete mode 100644 launcher/qml/images/browser_active.svg create mode 100644 launcher/qml/images/browser_inactive.png delete mode 100644 launcher/qml/images/browser_inactive.svg create mode 100644 launcher/qml/images/center_background.png create mode 100644 launcher/qml/images/connectivity_active.png delete mode 100644 launcher/qml/images/connectivity_active.svg create mode 100644 launcher/qml/images/connectivity_inactive.png delete mode 100644 launcher/qml/images/connectivity_inactive.svg create mode 100644 launcher/qml/images/dashboard_active.png delete mode 100644 launcher/qml/images/dashboard_active.svg create mode 100644 launcher/qml/images/dashboard_inactive.png delete mode 100644 launcher/qml/images/dashboard_inactive.svg delete mode 100644 launcher/qml/images/hud.png create mode 100644 launcher/qml/images/hvac_active.png delete mode 100644 launcher/qml/images/hvac_active.svg create mode 100644 launcher/qml/images/hvac_inactive.png delete mode 100644 launcher/qml/images/hvac_inactive.svg create mode 100644 launcher/qml/images/mediaplayer_active.png delete mode 100644 launcher/qml/images/mediaplayer_active.svg create mode 100644 launcher/qml/images/mediaplayer_inactive.png delete mode 100644 launcher/qml/images/mediaplayer_inactive.svg delete mode 100644 launcher/qml/images/meterdisplay.png create mode 100644 launcher/qml/images/mixer_active.png delete mode 100644 launcher/qml/images/mixer_active.svg create mode 100644 launcher/qml/images/mixer_inactive.png delete mode 100644 launcher/qml/images/mixer_inactive.svg create mode 100644 launcher/qml/images/music_active.png delete mode 100644 launcher/qml/images/music_active.svg create mode 100644 launcher/qml/images/music_inactive.png delete mode 100644 launcher/qml/images/music_inactive.svg create mode 100644 launcher/qml/images/navigation_active.png delete mode 100644 launcher/qml/images/navigation_active.svg create mode 100644 launcher/qml/images/navigation_inactive.png delete mode 100644 launcher/qml/images/navigation_inactive.svg create mode 100644 launcher/qml/images/phone_active.png delete mode 100644 launcher/qml/images/phone_active.svg create mode 100644 launcher/qml/images/phone_inactive.png delete mode 100644 launcher/qml/images/phone_inactive.svg delete mode 100644 launcher/qml/images/plus_active.svg delete mode 100644 launcher/qml/images/plus_inactive.svg create mode 100644 launcher/qml/images/poi_active.png delete mode 100644 launcher/qml/images/poi_active.svg create mode 100644 launcher/qml/images/poi_inactive.png delete mode 100644 launcher/qml/images/poi_inactive.svg create mode 100644 launcher/qml/images/radio_active.png delete mode 100644 launcher/qml/images/radio_active.svg create mode 100644 launcher/qml/images/radio_inactive.png delete mode 100644 launcher/qml/images/radio_inactive.svg delete mode 100644 launcher/qml/images/rse.png delete mode 100644 launcher/qml/images/sdl_active.svg delete mode 100644 launcher/qml/images/sdl_inactive.svg create mode 100644 launcher/qml/images/settings_active.png delete mode 100644 launcher/qml/images/settings_active.svg create mode 100644 launcher/qml/images/settings_inactive.png delete mode 100644 launcher/qml/images/settings_inactive.svg delete mode 100644 launcher/qml/images/top_three_shortcut_background.png delete mode 100644 launcher/qml/images/uninstall.png delete mode 100644 launcher/qml/images/video_active.svg delete mode 100644 launcher/qml/images/video_inactive.svg create mode 100644 launcher/qml/images/videoplayer_active.png create mode 100644 launcher/qml/images/videoplayer_inactive.png create mode 100644 launcher/qml/images/weather_active.png create mode 100644 launcher/qml/images/weather_inactive.png delete mode 100644 launcher/qml/images/webbrowser_active.svg delete mode 100644 launcher/qml/images/webbrowser_inactive.svg delete mode 100644 launcher/src/homescreenhandler.cpp delete mode 100644 launcher/src/homescreenhandler.h delete mode 100644 launcher/src/shortcutappmodel.cpp delete mode 100644 launcher/src/shortcutappmodel.h diff --git a/LICENSE b/LICENSE deleted file mode 100644 index d645695..0000000 --- a/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/autobuild/agl/autobuild b/autobuild/agl/autobuild deleted file mode 100755 index e87a1c3..0000000 --- a/autobuild/agl/autobuild +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/make -f -# Copyright (C) 2015 - 2018 "IoT.bzh" -# Author "Romain Forlot" -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -THISFILE := $(lastword $(MAKEFILE_LIST)) -BUILD_DIR := $(abspath $(dir $(THISFILE))/../../build) -DEST := ${BUILD_DIR} - -.PHONY: all clean distclean configure build package help - -all: help - -help: - @echo "List of targets available:" - @echo "" - @echo "- all" - @echo "- clean" - @echo "- distclean" - @echo "- configure" - @echo "- build: compilation, link and prepare files for package into a widget" - @echo "- package: output a widget file '*.wgt'" - @echo "- install: install in your INSTALL_ROOT directory" - @echo "" - @echo "Usage: ./autobuild/agl/autobuild package DEST=${HOME}/opt" - @echo "Don't use your build dir as DEST as wgt file is generated at this location" - -clean: - @([ -d ${BUILD_DIR} ] && make -C ${BUILD_DIR} ${CLEAN_ARGS} clean) || echo Nothing to clean - -distclean: - @([ -d ${BUILD_DIR} ] && make -C ${BUILD_DIR} distclean) || echo Nothing to distclean - -configure: - @[ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR} - @[ -f ${BUILD_DIR}/Makefile ] || (cd ${BUILD_DIR} && qmake ${CONFIGURE_ARGS} ..) - -build: configure - @make -C ${BUILD_DIR} ${BUILD_ARGS} all - -package: build - @if [ "${DEST}" != "${BUILD_DIR}/$@" ]; then \ - mkdir -p ${DEST} && cp ${BUILD_DIR}/$@/*.wgt ${DEST}; \ - fi - -install: build - @make -C ${BUILD_DIR} ${INSTALL_ARGS} install diff --git a/autobuild/linux/autobuild b/autobuild/linux/autobuild deleted file mode 100644 index 569d692..0000000 --- a/autobuild/linux/autobuild +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/make -f -# Copyright (C) 2015 - 2018 "IoT.bzh" -# Author "Romain Forlot" -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -THISFILE := $(lastword $(MAKEFILE_LIST)) -BUILD_DIR := $(abspath $(dir $(THISFILE))/../../build) -DEST := ${BUILD_DIR} - -.PHONY: all clean distclean configure build package help update - -all: help - -help: - @echo "List of targets available:" - @echo "" - @echo "- all - @echo "- clean" - @echo "- distclean" - @echo "- configure" - @echo "- build: compilation, link and prepare files for package into a widget" - @echo "- package: output a widget file '*.wgt'" - @echo "- install: install in your defined DEST directory" - @echo "" - @echo "Usage: ./autobuild/agl/autobuild package DEST=${HOME}/opt" - @echo "Don't use your build dir as DEST as wgt file is generated at this location" - - clean: - @([ -d ${BUILD_DIR} ] && make -C ${BUILD_DIR} ${CLEAN_ARGS} clean) || echo Nothing to clean - -distclean: - @[ -d ${DEST} ] && find ${DEST} -name "*.wgt" -delete - @([ -d ${BUILD_DIR} ] && make -C ${BUILD_DIR} distclean) || echo Nothing to distclean - -configure: - @[ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR} - @[ -f ${BUILD_DIR}/Makefile ] || (cd ${BUILD_DIR} && qmake ${CONFIGURE_ARGS} ..) - -build: configure - @make -C ${BUILD_DIR} ${BUILD_ARGS} all - -package: build - @if [ "${DEST}" != "${BUILD_DIR}/$@" ]; then \ - mkdir -p ${DEST} && cp ${BUILD_DIR}/$@/*.wgt ${DEST}; \ - fi - -install: build - @if [ "${DEST}" != "${BUILD_DIR}" ]; then \ - mkdir -p ${DEST} && cp -rf ${BUILD_DIR}/package/root/* ${DEST}; \ - fi - diff --git a/interfaces/LICENSE b/interfaces/LICENSE new file mode 100644 index 0000000..31c692a --- /dev/null +++ b/interfaces/LICENSE @@ -0,0 +1,54 @@ +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + You must give any other recipients of the Work or Derivative Works a copy of this License; and + You must cause any modified files to carry prominent notices stating that You changed the files; and + You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS diff --git a/launcher/LICENSE b/launcher/LICENSE new file mode 100644 index 0000000..31c692a --- /dev/null +++ b/launcher/LICENSE @@ -0,0 +1,54 @@ +Apache License + +Version 2.0, January 2004 + +http://www.apache.org/licenses/ + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: + + You must give any other recipients of the Work or Derivative Works a copy of this License; and + You must cause any modified files to carry prominent notices stating that You changed the files; and + You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. + + You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS diff --git a/launcher/launcher.pro b/launcher/launcher.pro index a9bd6dc..7fd1319 100644 --- a/launcher/launcher.pro +++ b/launcher/launcher.pro @@ -1,5 +1,5 @@ # Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH -# Copyright (c) 2018,2019 TOYOTA MOTOR CORPORATION +# Copyright (c) 2018 TOYOTA MOTOR CORPORATION # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -26,21 +26,16 @@ SOURCES += \ src/main.cpp \ src/applicationmodel.cpp \ src/appinfo.cpp \ - src/applicationlauncher.cpp \ - src/homescreenhandler.cpp \ - src/shortcutappmodel.cpp + src/applicationlauncher.cpp HEADERS += \ src/applicationlauncher.h \ src/applicationmodel.h \ - src/appinfo.h \ - src/homescreenhandler.h \ - src/shortcutappmodel.h + src/appinfo.h OTHER_FILES += \ README.md RESOURCES += \ - qml/images/TopShortcut/topshortcut.qrc \ qml/images/images.qrc \ qml/qml.qrc diff --git a/launcher/qml/ChangeItemPosition.js b/launcher/qml/ChangeItemPosition.js new file mode 100644 index 0000000..9fae07c --- /dev/null +++ b/launcher/qml/ChangeItemPosition.js @@ -0,0 +1,89 @@ +function next() { + repeater.currentItem += 1; + if (repeater.currentItem > repeater.count - 1) + { + repeater.currentItem = 0; + } + var count = 0; + + for (var i = 0; i < repeater.count; i++) + { + var item = repeater.itemAt(i); + item.currentState -= 1; + if ( item.currentState < 1 ) + { + item.currentState = repeater.count; + } + if ( item.currentState >= 1 && item.currentState <= 10 ) + { + item.state = "pos" + item.currentState + } else if ( item.currentState === 15 ){ + item.state = "pos11"; + } else if ( item.currentState === 16 ){ + item.state = "pos12"; + } else if ( item.currentState === 17 ){ + item.state = "pos13"; + } else if ( item.currentState >= 18 ){ + item.state = "pos0"; + } else { + item.state = "pos10"; + } + } +} + +function prev() { + repeater.currentItem -= 1; + if (repeater.currentItem < 0) + { + repeater.currentItem = repeater.count - 1; + } + var count = repeater.count; + for (var i = 0; i < repeater.count; i++) + { + var item = repeater.itemAt(i); + item.currentState += 1; + if ( item.currentState > repeater.count ) + { + item.currentState = 1; + } + if ( item.currentState >= 1 && item.currentState <= 10 ) + { + item.state = "pos" + item.currentState + } else if ( item.currentState === 15 ){ + item.state = "pos11"; + } else if ( item.currentState === 16 ){ + item.state = "pos12"; + } else if ( item.currentState === 17 ){ + item.state = "pos13"; + } else if ( item.currentState >= 18 ){ + item.state = "pos0"; + } else { + item.state = "pos10"; + } + } +} + +function move(pos, item) { + var distance = firstPox - pos; + if(distance > 200) { + next() + firstPox = pos + iconMoved = true + item.iconReleased() + } else if (distance < -200) { + prev() + firstPox = pos + iconMoved = true + item.iconReleased() + } +} + +function getCenterItem() { + var item; + for (var i = 0; i < repeater.count; i++) + { + item = repeater.itemAt(i) + if (item.state === "pos5" || item.state === "pos14") + return item + } +} diff --git a/launcher/qml/IconItem.qml b/launcher/qml/IconItem.qml index c15a3da..6bb7ed6 100644 --- a/launcher/qml/IconItem.qml +++ b/launcher/qml/IconItem.qml @@ -17,104 +17,121 @@ import QtQuick 2.0 import QtQuick.Controls 2.0 import QtGraphicalEffects 1.0 +import "ChangeItemPosition.js" as Cip Item { id: main - width: 320 - height: 320 + width: 300 + height: 300 property string icon: model.icon + property int pid: -1 + property bool isBlank: false + property bool isPressing: false + + Timer { + id: launchTimer + interval: 650 + repeat: false + onTriggered: { + launchApp() + } + } Item { id: container - parent: loc - x: main.x - y: main.y width: main.width height: main.height + MouseArea { + anchors.fill: parent + onClicked: { + if(main.state === "pos14") { + launchApp() + } else if(main.state === "pos4") { + Cip.prev() + launchTimer.start() + } else if(main.state === "pos3") { + Cip.prev() + Cip.prev() + launchTimer.start() + } else if(main.state === "pos2") { + Cip.prev() + Cip.prev() + Cip.prev() + launchTimer.start() + } else if(main.state === "pos1") { + Cip.prev() + Cip.prev() + Cip.prev() + Cip.prev() + launchTimer.start() + } else if(main.state === "pos6") { + Cip.next() + launchTimer.start() + } else if(main.state === "pos7") { + Cip.next() + Cip.next() + launchTimer.start() + } else if(main.state === "pos8") { + Cip.next() + Cip.next() + Cip.next() + launchTimer.start() + } else if(main.state === "pos9") { + Cip.next() + Cip.next() + Cip.next() + Cip.next() + launchTimer.start() + } + } + } Image { id: item - anchors.top: parent.top - anchors.topMargin: 20 - anchors.horizontalCenter: parent.horizontalCenter - width: 220 - height: width - source: './images/%1_%2.svg'.arg(model.icon).arg(loc.pressed && (loc.index === model.index || loc.currentId === model.id) ? 'active' : 'inactive') - antialiasing: item.state !== '' - + anchors.fill: parent + source: './images/%1_active.png'.arg(model.icon) property string initial: model.name.substring(0,1).toUpperCase() + property bool hasIcon: model.icon !== 'blank' - Item { - id: title - width: 125 - height: 125 + Label { + style: Text.Outline + styleColor: 'white' + color: 'transparent' + font.pixelSize: 225 anchors.centerIn: parent - Repeater { - delegate: Label { - style: Text.Outline - styleColor: 'red' - color: 'transparent' - font.pixelSize: 125 - anchors.centerIn: parent - anchors.horizontalCenterOffset: model.index / 3 - 1 - anchors.verticalCenterOffset: model.index % 3 - 1 - text: item.initial - } - model: main.icon === 'blank' ? 9 : 0 - } - layer.enabled: true - layer.effect: LinearGradient { - gradient: Gradient { - GradientStop { position: -0.5; color: "#6BFBFF" } - GradientStop { position: +1.5; color: "#00ADDC" } - } - } + anchors.verticalCenterOffset: -50 + text: item.initial + visible: item.hasIcon ? false : true } - } - Label { - id: name - anchors.top: item.bottom - anchors.left: parent.left - anchors.right: parent.right - anchors.margins: 20 - font.pixelSize: 25 - font.letterSpacing: 5 - wrapMode: Text.WordWrap - horizontalAlignment: Text.AlignHCenter - color: "white" - text: qsTr(model.name.toUpperCase()) - } - Behavior on x { enabled: item.state !== 'active'; NumberAnimation { duration: 400; easing.type: Easing.OutCubic } } - Behavior on y { enabled: item.state !== 'active'; NumberAnimation { duration: 400; easing.type: Easing.OutCubic } } - SequentialAnimation on rotation { - NumberAnimation { to: 5; duration: 100 } - NumberAnimation { to: -5; duration: 200 } - NumberAnimation { to: 0; duration: 100 } - running: loc.currentId !== '' && item.state !== 'active' - loops: Animation.Infinite; alwaysRunToEnd: true - } - states: [ - State { - name: 'active' - when: loc.currentId == model.id - PropertyChanges { - target: container - x: loc.mouseX - width/2 - y: loc.mouseY - height/2 - scale: 1.15 - z: 10 - } - }, - State { - when: loc.currentId !== '' - PropertyChanges { - target: container - scale: 0.85 - opacity: 0.75 - } + Label { + id: name + anchors.bottom: item.bottom + anchors.left: parent.left + anchors.right: parent.right + anchors.margins: 20 + font.pixelSize: 25 + font.letterSpacing: 5 + wrapMode: Text.WordWrap + horizontalAlignment: Text.AlignHCenter + color: "white" + text: qsTr(model.name.toUpperCase()) } - ] - transitions: Transition { NumberAnimation { properties: 'scale, opacity, x, y'; duration: 150; easing.type: Easing.OutCubic} } + + } + } + function iconPressed() { + item.source = './images/%1_inactive.png'.arg(model.icon) + } + function iconReleased() { + item.source = './images/%1_active.png'.arg(model.icon) + } + function launchApp() { +// pid = launcher.launch(model.id) +// if (1 < pid) { +// } else { +// console.warn("app cannot be launched!") +// } + homescreenHandler.tapShortcut(model.name) } } diff --git a/launcher/qml/Launcher.qml b/launcher/qml/Launcher.qml index bab1933..522e1ce 100644 --- a/launcher/qml/Launcher.qml +++ b/launcher/qml/Launcher.qml @@ -1,7 +1,7 @@ /* * Copyright (C) 2016 The Qt Company Ltd. * Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH - * Copyright (c) 2018,2019 TOYOTA MOTOR CORPORATION + * Copyright (c) 2018 TOYOTA MOTOR CORPORATION * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -19,179 +19,498 @@ import QtQuick 2.6 import QtQuick.Layouts 1.1 import QtQuick.Controls 2.0 import AppModel 1.0 +import "ChangeItemPosition.js" as Cip ApplicationWindow { - width: container.width * container.scale - height: container.height * container.scale + id: root + width: 1920 + height: 720 property int pid: -1 + property int firstPox: -1 + property bool iconMoved: false - Item { - id: container - anchors.centerIn: parent - width: 1080 - height: 1920 -// scale: screenInfo.scale_factor() - - Image { - id: topshortcutArea - x: 197 - y: 0 - width: 588 - height: 215 - source: './images/top_three_shortcut_background.png' - TopShortcutArea { - anchors.fill: parent - } + Timer { + id: timer + interval: 650 + repeat: false + onTriggered: { + var centerItem = Cip.getCenterItem() + centerItem.state = "pos14" + centerImage.opacity = 1.0 } + } - Image { - id: meterDisplay - x: 0 - y: 1704 - width: 270 - height: 215 - source: './images/meterdisplay.png' - } - Image { - id: hud - anchors.left: meterDisplay.right - anchors.top: meterDisplay.top - width: 270 - height: 215 - source: './images/hud.png' - } - Image { - id: rse - anchors.left: hud.right - anchors.top: hud.top - width: 270 - height: 215 - source: './images/rse.png' - } - Image { - id: uninstall - anchors.left: rse.right - anchors.top: rse.top - width: 270 - height: 215 - source: './images/uninstall.png' - } + Repeater { + id: repeater + model: ApplicationModel { id: applicationModel } - Image { - anchors.fill: parent - source: './images/background.png' - } + property int currentItem + + IconItem { + id: rect1 + property int currentState: 1 + + width: 300 + height: 300 + anchors.topMargin: 230 - GridView { - id: grid - anchors { - topMargin: 60 + 218; bottomMargin: 0 - leftMargin: 60; rightMargin: 60 - fill: parent + smooth: true + + anchors.centerIn: parent + + Behavior on opacity { + NumberAnimation { duration: 200 } } - contentHeight: 320 - flickableDirection: Flickable.AutoFlickDirection - snapMode: GridView.SnapOneRow - visible: true - cellWidth: 320 - cellHeight: 320 - interactive: false - - model: ApplicationModel { id: applicationModel } - delegate: IconItem { - width: grid.cellWidth - height: grid.cellHeight + + Behavior on z { + NumberAnimation { duration: 300 } } + transform: [ + Rotation { + id: rotate + angle: 0 + origin.y: 150 + origin.x: 150 + axis { x: 0; y: 1; z: 0 } + Behavior on angle { + NumberAnimation { easing.overshoot: 1; easing.type: Easing.OutBack; duration: 600 } + } + }, + Translate { + id: trans + x: 0 + y: 0 + Behavior on x { + NumberAnimation { easing.overshoot: 1; easing.type: Easing.OutBack; duration: 600 } + } + Behavior on y { + NumberAnimation { easing.overshoot: 1; easing.type: Easing.OutBack; duration: 600 } + } + }, + Scale { + id: scale + origin.x: 150 + origin.y: 150 + xScale: 1 + yScale: 1 + Behavior on xScale { + NumberAnimation { easing.overshoot: 1; easing.type: Easing.OutBack; duration: 600 } + } + Behavior on yScale { + NumberAnimation { easing.overshoot: 1; easing.type: Easing.OutBack; duration: 600 } + } + } + ] - Connections { - target: homescreenHandler - onAppListUpdate: { - console.warn("applist update in Launcher.qml") - applicationModel.updateApplist(info); + states: [ + State { + name: "pos0" + PropertyChanges { + target: rotate + angle: 80 + } + PropertyChanges { + target: trans + x: -1050 + y: 270 + } + PropertyChanges { + target: rect1 + z: 0 + opacity: 0 + } + PropertyChanges { + target: scale + xScale: 1.2 + yScale: 1.2 + } + }, + State { + name: "pos1" + PropertyChanges { + target: rotate + angle: 75 + } + PropertyChanges { + target: trans + x: -700 + y: 0 + } + PropertyChanges { + target: rect1 + z: 0 + opacity: 1 + } + PropertyChanges { + target: scale + xScale: 1.2 + yScale: 1.2 + } + }, + State { + name: "pos2" + PropertyChanges { + target: rotate + angle: 60 + } + PropertyChanges { + target: trans + x: -820 + y: 0 + } + PropertyChanges { + target: rect1 + z: 0 + opacity: 1 + } + PropertyChanges { + target: scale + xScale: 0.79 + yScale: 0.79 + } + }, + State { + name: "pos3" + PropertyChanges { + target: rotate + angle: 40 + } + PropertyChanges { + target: trans + x: -780 + y: 0 + } + PropertyChanges { + target: rect1 + z: 0 + opacity: 1 + } + PropertyChanges { + target: scale + xScale: 0.55 + yScale: 0.55 + } + }, + State { + name: "pos4" + PropertyChanges { + target: rotate + angle: 15 + } + PropertyChanges { + target: trans + x: -470 + y: 0 + } + PropertyChanges { + target: rect1 + z: 0 + opacity: 1 + } + PropertyChanges { + target: scale + xScale: 0.45 + yScale: 0.45 + } + }, + State { + name: "pos5" + PropertyChanges { + target: rotate + angle: 0 + } + PropertyChanges { + target: trans + x: 0 + y: 0 + } + PropertyChanges { + target: rect1 + z: 1 + opacity: 1 + } + PropertyChanges { + target: scale + xScale: 0.42 + yScale: 0.42 + } + }, + State { + name: "pos6" + PropertyChanges { + target: rotate + angle: -15 + } + PropertyChanges { + target: trans + x: 470 + y: 0 + } + PropertyChanges { + target: rect1 + z: 0 + opacity: 1 + } + PropertyChanges { + target: scale + xScale: 0.45 + yScale: 0.45 + } + }, + State { + name: "pos7" + PropertyChanges { + target: rotate + angle: -40 + } + PropertyChanges { + target: trans + x: 780 + y: 0 + } + PropertyChanges { + target: rect1 + z: 0 + opacity: 1 + } + PropertyChanges { + target: scale + xScale: 0.55 + yScale: 0.55 + } + }, + State { + name: "pos8" + PropertyChanges { + target: rotate + angle: -60 + } + PropertyChanges { + target: trans + x: 820 + y: 0 + } + PropertyChanges { + target: rect1 + z: 0 + opacity: 1 + } + PropertyChanges { + target: scale + xScale: 0.79 + yScale: 0.79 + } + }, + State { + name: "pos9" + PropertyChanges { + target: rotate + angle: -75 + } + PropertyChanges { + target: trans + x: 700 + y: 0 + } + PropertyChanges { + target: rect1 + z: 0 + opacity: 1 + } + PropertyChanges { + target: scale + xScale: 1.2 + yScale: 1.2 + } + }, + State { + name: "pos10" + PropertyChanges { + target: rotate + angle: -80 + } + PropertyChanges { + target: trans + x: 1050 + y: 270 + } + PropertyChanges { + target: rect1 + z: 0 + opacity: 0 + } + PropertyChanges { + target: scale + xScale: 1.2 + yScale: 1.2 + } + }, + State { + name: "pos11" + PropertyChanges { + target: rotate + angle: 0 + } + PropertyChanges { + target: trans + x: 1050 + y: 540 + } + PropertyChanges { + target: rect1 + z: 0 + opacity: 0 + } + PropertyChanges { + target: scale + xScale: 1 + yScale: 1 + } + }, + State { + name: "pos12" + PropertyChanges { + target: rotate + angle: 0 + } + PropertyChanges { + target: trans + x: 0 + y: 540 + } + PropertyChanges { + target: rect1 + z: 0 + opacity: 0 + } + PropertyChanges { + target: scale + xScale: 1 + yScale: 1 + } + }, + State { + name: "pos13" + PropertyChanges { + target: rotate + angle: 0 + } + PropertyChanges { + target: trans + x: -1050 + y: 540 + } + PropertyChanges { + target: rect1 + z: 0 + opacity: 0 + } + PropertyChanges { + target: scale + xScale: 1 + yScale: 1 + } + }, + State { + name: "pos14" + PropertyChanges { + target: rotate + angle: 0 + } + PropertyChanges { + target: trans + x: 0 + y: 0 + } + PropertyChanges { + target: rect1 + z: 1 + opacity: 1 + } + PropertyChanges { + target: scale + xScale: 1 + yScale: 1 + } } + ] + } + + } + Component.onCompleted: { + repeater.currentItem = 5; + var count = repeater.count; + for ( var i = 0; i < repeater.count; i++) + { + var item = repeater.itemAt(i); + item.currentState = i + 1; + if ( item.currentState >= 1 && item.currentState <= 10 ) + { + item.state = "pos" + item.currentState; + if ( item.currentState === 5 ) + item.state = "pos14"; + } else if ( item.currentState === 15 ){ + item.state = "pos11"; + } else if ( item.currentState === 16 ){ + item.state = "pos12"; + } else if ( item.currentState === 17 ){ + item.state = "pos13"; + } else if ( item.currentState >= 18 ){ + item.state = "pos0"; + } else { + item.state = "pos10"; } - Connections { - target: homescreenHandler - onInitAppList: { - console.warn("applist init in Launcher.qml") - applicationModel.initAppList(data); - } + } + } + + Image { + id: centerImage + source: './images/center_background.png' + height: 590 + width: 350 + anchors.centerIn: parent + opacity: 1.0 + } + + MouseArea { + anchors.fill: parent + propagateComposedEvents: true + z: 2 + + onPressed: { + firstPox = mouseX; + iconMoved = false; + centerImage.opacity = 0.0; + if(mouseX >= 800 && mouseX <= 1120) + { + var item = Cip.getCenterItem() + item.iconPressed() } + } - MouseArea { - id: loc - anchors.fill: parent - property string currentId: '' - property string currentName: '' - property int oldIndex: -1 - property int newIndex: -1 - property int index: grid.indexAt(loc.mouseX, loc.mouseY) - x: 62 - y: 264 - - onPressAndHold: { - oldIndex = index - currentId = applicationModel.id(newIndex = index) - currentName = applicationModel.name(loc.index) - homescreenHandler.hideWindow("homescreen") - } - onReleased: { - if (currentId === '' && loc.index >= 0 ) { - // Not long press, exec application and tapshortcut -// pid = launcher.launch(applicationModel.id(loc.index)) -// if (1 < pid) { - homescreenHandler.tapShortcut(applicationModel.appid(loc.index)) - -// } -// else { -// console.warn("app cannot be launched!") -// } - } else if (loc.mouseY <= 0) { - if (loc.mouseX >= 197 && loc.mouseX < 393) { -// shortcutAppModel.changeShortcut(currentId, currentName, "0"); - homescreenHandler.registerShortcut(currentId, currentName, "0"); - } else if (loc.mouseX >= 393 && loc.mouseX < 589) { -// shortcutAppModel.changeShortcut(currentId, currentName, "1"); - homescreenHandler.registerShortcut(currentId, currentName, "1"); - } else if (loc.mouseX >= 589 && loc.mouseX < 785) { -// shortcutAppModel.changeShortcut(currentId, currentName, "2"); - homescreenHandler.registerShortcut(currentId, currentName, "2"); - } - if (oldIndex != newIndex){ - applicationModel.move(newIndex, newIndex = oldIndex) - } - } else if (loc.mouseY >= 1488) { - if (loc.mouseX < 270 ) { - console.log("sendAppToMeter", currentId) - homescreenHandler.sendAppToMeter(currentId) - } else if (loc.mouseX >= 270 && loc.mouseX < 540 ) { - - } else if (loc.mouseX >= 540 && loc.mouseX < 810 ) { - - } else if (loc.mouseX >= 810) { - uninstallDialog.contents = 'Do you want to uninstall ' + currentName.toUpperCase() + '?' - uninstallDialog.uninstallApp = currentId - uninstallDialog.visible = true - } - } - - currentName = '' - currentId = '' - homescreenHandler.tapShortcut("homescreen") - } - onPositionChanged: { - if (loc.currentId === '') return - if (index < 0) return - if (index === newIndex) return - applicationModel.move(newIndex, newIndex = index) - } + onReleased: { + timer.start() + if(mouseX >= 800 && mouseX <= 1120) + { + var item = Cip.getCenterItem() + item.iconReleased() + } + } + + onClicked: { + if (iconMoved) + { + mouse.accepted = true + } else { + mouse.accepted = false } } - UninstallDialog { - id: uninstallDialog - anchors.fill: parent - visible: false + + onPositionChanged: { + var item = Cip.getCenterItem() + Cip.move(mouseX, item) } } + } diff --git a/launcher/qml/TopShortcutArea.qml b/launcher/qml/TopShortcutArea.qml deleted file mode 100644 index 0e45bb6..0000000 --- a/launcher/qml/TopShortcutArea.qml +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2016 The Qt Company Ltd. - * Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH - * Copyright (c) 2017 TOYOTA MOTOR CORPORATION - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import QtQuick 2.2 -import QtQuick.Layouts 1.1 -import QtQuick.Controls 2.1 - -Item { - id: root - width: 588 - height: 218 - - property int pid: -1 - - RowLayout { - anchors.fill: parent - spacing: 2 - Repeater { - id: repeater - model: shortcutAppModel - delegate: TopShortcutIcon { - Layout.fillWidth: true - Layout.fillHeight: true - name: shortcutAppModel.getName(model.index) - icon: shortcutAppModel.getIcon(model.index) - isBlank: shortcutAppModel.isBlank(model.index) - } - } - } - - Connections { - target: shortcutAppModel - onUpdateShortcut: { - for(var i = 0; i < 3; i++) { - var item = repeater.itemAt(i) - item.name = shortcutAppModel.getName(i) - item.icon = shortcutAppModel.getIcon(i) - item.isBlank = shortcutAppModel.isBlank(i) - } - } - } -} diff --git a/launcher/qml/TopShortcutIcon.qml b/launcher/qml/TopShortcutIcon.qml deleted file mode 100644 index 7ece370..0000000 --- a/launcher/qml/TopShortcutIcon.qml +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (C) 2016 The Qt Company Ltd. - * Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import QtQuick 2.2 -import QtQuick.Controls 2.0 -import QtGraphicalEffects 1.0 - -MouseArea { - id: root - width: 195 - height: 216.8 - property string name: 'Home' - property string icon:'./images/TopShortcut/' - property bool active: false - property bool isBlank: false - - Item { - id: icon - property real desaturation: 0 - anchors.fill: parent - Image { - id: inactiveIcon - anchors.fill: parent - source: isBlank ? './images/TopShortcut/blank.svg' : root.icon - property string initial: root.name.substring(0,1).toUpperCase() - Label { - style: Text.Outline - styleColor: '#00FFFF' - color: 'transparent' - font.pixelSize: 75 - anchors.centerIn: parent - text: inactiveIcon.initial - visible: root.isBlank - } - } - layer.enabled: true - layer.effect: Desaturate { - id: desaturate - desaturation: icon.desaturation - cached: true - } - } - Label { - id: name - y: 160 - width: root.width - 10 - font.pixelSize: 15 - font.letterSpacing: 5 - // wrapMode: Text.WordWrap - anchors.horizontalCenter: parent.horizontalCenter - horizontalAlignment: Text.AlignHCenter - color: "white" - text: qsTr(root.name).toUpperCase() - } -} diff --git a/launcher/qml/UninstallDialog.qml b/launcher/qml/UninstallDialog.qml deleted file mode 100644 index 4229525..0000000 --- a/launcher/qml/UninstallDialog.qml +++ /dev/null @@ -1,158 +0,0 @@ -import QtQuick 2.0 -import QtQuick.Layouts 1.1 -import QtQuick.Controls 2.0 - -Item { - id: root - width: 1080 - height: 1920 - property string contents: '' - property string uninstallApp: '' - property int pid: -1 - - MouseArea { - anchors.fill: parent - onPressAndHold: {} - onPressed: {} - onReleased: {} - onClicked: {} - } - - Rectangle { - id: mainform - height: 300 - width: 1000 - radius:2 - anchors.centerIn: parent - - gradient: Gradient { - GradientStop { position: 0.0; color: "#12262E" } - GradientStop { position: 1.0; color: "#18899B" } - } - - ColumnLayout { - anchors { - topMargin: 10; bottomMargin:10 - leftMargin: 20; rightMargin: 20 - fill: parent - } - spacing: 2 - - ColumnLayout { - id: title_part - anchors { - top: parent.top - left: parent.left - topMargin: 10 - } - - Label { - id: title - text: 'Uninstall Dialog' - color: "white" - font.pixelSize: 32 - font.bold: true - maximumLineCount: 1 - wrapMode: Text.Wrap - elide: Text.ElideRight - horizontalAlignment: Label.AlignHCenter - verticalAlignment: Label.AlignVCenter - Layout.preferredWidth: 960 - Layout.preferredHeight: 40 - } - - Image { - source: './images/DividingLine.svg' - anchors.left: title.left - anchors.top: title.bottom - } - } - - RowLayout { - id: contents_part - anchors { - left: parent.left; leftMargin: 20 - right: parent.right; rightMargin: 20 - } - Layout.preferredWidth: 920 - Layout.alignment: Qt.AlignVCenter | Qt.AlignHCenter - spacing: 10 - Image { - id: dsp_mark - source: './images/uninstall.png' - Layout.maximumHeight: 120 - Layout.maximumWidth: 120 - } - Label { - text: root.contents - color: "white" - font.pixelSize: 24 - wrapMode: Text.Wrap - elide: Text.ElideRight - horizontalAlignment: Label.AlignLeft - verticalAlignment: Label.AlignVCenter - Layout.preferredWidth: 780 - Layout.preferredHeight: 160 - } - } - - RowLayout { - id: btn_area - spacing: 60 - anchors { - horizontalCenter: parent.horizontalCenter - } - Layout.preferredWidth: parent.width*0.75 - Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter - - Button { - id: btn1 - text: 'YES' - onReleased: { - btn1.highlighted = false - root.visible = false - pid = homescreenHandler.uninstallApplication(uninstallApp) - if(pid < 1) { - console.warn("app cannot be uninstaled!") - } - } - onPressed: { - btn1.highlighted = true - } - onCanceled: { - btn1.highlighted = false - } - Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter - } - - Button { - id: btn2 - text: 'NO' - onReleased: { - btn2.highlighted = false - root.visible = false - } - onPressed: { - btn2.highlighted = true - } - onCanceled: { - btn2.highlighted = false - } - Layout.alignment: Qt.AlignHCenter | Qt.AlignVCenter - } - } - - Rectangle { - id: footer - opacity: 0 - width: parent.width - height: 5 - anchors { - bottom: parent.bottom - } - } - } - - } - -} diff --git a/launcher/qml/images/AGL_HMI_Blue_Background_Car-01.png b/launcher/qml/images/AGL_HMI_Blue_Background_Car-01.png deleted file mode 100644 index 8c01263..0000000 Binary files a/launcher/qml/images/AGL_HMI_Blue_Background_Car-01.png and /dev/null differ diff --git a/launcher/qml/images/DividingLine.svg b/launcher/qml/images/DividingLine.svg deleted file mode 100644 index 788256c..0000000 --- a/launcher/qml/images/DividingLine.svg +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - image/svg+xml - - - - - - - - - diff --git a/launcher/qml/images/TopShortcut/hvac.svg b/launcher/qml/images/TopShortcut/hvac.svg deleted file mode 100644 index 5c76e85..0000000 --- a/launcher/qml/images/TopShortcut/hvac.svg +++ /dev/null @@ -1,600 +0,0 @@ - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/launcher/qml/images/TopShortcut/hvac_active.svg b/launcher/qml/images/TopShortcut/hvac_active.svg deleted file mode 100644 index 46be46b..0000000 --- a/launcher/qml/images/TopShortcut/hvac_active.svg +++ /dev/null @@ -1,614 +0,0 @@ - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/launcher/qml/images/TopShortcut/launcher.svg b/launcher/qml/images/TopShortcut/launcher.svg deleted file mode 100644 index b6eab24..0000000 --- a/launcher/qml/images/TopShortcut/launcher.svg +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/launcher/qml/images/TopShortcut/launcher_active.svg b/launcher/qml/images/TopShortcut/launcher_active.svg deleted file mode 100644 index e85c7d8..0000000 --- a/launcher/qml/images/TopShortcut/launcher_active.svg +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/launcher/qml/images/TopShortcut/mediaplayer.svg b/launcher/qml/images/TopShortcut/mediaplayer.svg deleted file mode 100644 index de7448d..0000000 --- a/launcher/qml/images/TopShortcut/mediaplayer.svg +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/launcher/qml/images/TopShortcut/mediaplayer_active.svg b/launcher/qml/images/TopShortcut/mediaplayer_active.svg deleted file mode 100644 index 16e3af5..0000000 --- a/launcher/qml/images/TopShortcut/mediaplayer_active.svg +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/launcher/qml/images/TopShortcut/navigation.svg b/launcher/qml/images/TopShortcut/navigation.svg deleted file mode 100644 index 6f6f1e0..0000000 --- a/launcher/qml/images/TopShortcut/navigation.svg +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/launcher/qml/images/TopShortcut/navigation_active.svg b/launcher/qml/images/TopShortcut/navigation_active.svg deleted file mode 100644 index 9076934..0000000 --- a/launcher/qml/images/TopShortcut/navigation_active.svg +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/launcher/qml/images/TopShortcut/sdl_usb.svg b/launcher/qml/images/TopShortcut/sdl_usb.svg deleted file mode 100644 index 3b6a7e9..0000000 --- a/launcher/qml/images/TopShortcut/sdl_usb.svg +++ /dev/null @@ -1,311 +0,0 @@ - - - -image/svg+xml diff --git a/launcher/qml/images/TopShortcut/sdl_usb_active.svg b/launcher/qml/images/TopShortcut/sdl_usb_active.svg deleted file mode 100644 index 9584885..0000000 --- a/launcher/qml/images/TopShortcut/sdl_usb_active.svg +++ /dev/null @@ -1,278 +0,0 @@ - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - diff --git a/launcher/qml/images/TopShortcut/topshortcut.qrc b/launcher/qml/images/TopShortcut/topshortcut.qrc deleted file mode 100644 index d654bf2..0000000 --- a/launcher/qml/images/TopShortcut/topshortcut.qrc +++ /dev/null @@ -1,16 +0,0 @@ - - - launcher.svg - launcher_active.svg - hvac.svg - hvac_active.svg - mediaplayer.svg - mediaplayer_active.svg - navigation.svg - navigation_active.svg - video.svg - video_active.svg - sdl_usb.svg - sdl_usb_active.svg - - diff --git a/launcher/qml/images/TopShortcut/video.svg b/launcher/qml/images/TopShortcut/video.svg deleted file mode 100644 index e368922..0000000 --- a/launcher/qml/images/TopShortcut/video.svg +++ /dev/null @@ -1,109 +0,0 @@ - - - - - - image/svg+xml - - - - - - - diff --git a/launcher/qml/images/TopShortcut/video_active.svg b/launcher/qml/images/TopShortcut/video_active.svg deleted file mode 100644 index 344385f..0000000 --- a/launcher/qml/images/TopShortcut/video_active.svg +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - image/svg+xml - - - - - - - diff --git a/launcher/qml/images/background.png b/launcher/qml/images/background.png deleted file mode 100644 index 1da52a3..0000000 Binary files a/launcher/qml/images/background.png and /dev/null differ diff --git a/launcher/qml/images/blank_active.png b/launcher/qml/images/blank_active.png new file mode 100644 index 0000000..e5a0dd4 Binary files /dev/null and b/launcher/qml/images/blank_active.png differ diff --git a/launcher/qml/images/blank_active.svg b/launcher/qml/images/blank_active.svg deleted file mode 100644 index 10c0a89..0000000 --- a/launcher/qml/images/blank_active.svg +++ /dev/null @@ -1,133 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/images/blank_inactive.png b/launcher/qml/images/blank_inactive.png new file mode 100644 index 0000000..80b5198 Binary files /dev/null and b/launcher/qml/images/blank_inactive.png differ diff --git a/launcher/qml/images/blank_inactive.svg b/launcher/qml/images/blank_inactive.svg deleted file mode 100644 index 2e467a6..0000000 --- a/launcher/qml/images/blank_inactive.svg +++ /dev/null @@ -1,76 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/images/browser_active.png b/launcher/qml/images/browser_active.png new file mode 100644 index 0000000..8ef350b Binary files /dev/null and b/launcher/qml/images/browser_active.png differ diff --git a/launcher/qml/images/browser_active.svg b/launcher/qml/images/browser_active.svg deleted file mode 100644 index 70b4617..0000000 --- a/launcher/qml/images/browser_active.svg +++ /dev/null @@ -1,231 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/images/browser_inactive.png b/launcher/qml/images/browser_inactive.png new file mode 100644 index 0000000..faeee45 Binary files /dev/null and b/launcher/qml/images/browser_inactive.png differ diff --git a/launcher/qml/images/browser_inactive.svg b/launcher/qml/images/browser_inactive.svg deleted file mode 100644 index 09f34c9..0000000 --- a/launcher/qml/images/browser_inactive.svg +++ /dev/null @@ -1,165 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/images/center_background.png b/launcher/qml/images/center_background.png new file mode 100644 index 0000000..8e160f4 Binary files /dev/null and b/launcher/qml/images/center_background.png differ diff --git a/launcher/qml/images/connectivity_active.png b/launcher/qml/images/connectivity_active.png new file mode 100644 index 0000000..168b7fd Binary files /dev/null and b/launcher/qml/images/connectivity_active.png differ diff --git a/launcher/qml/images/connectivity_active.svg b/launcher/qml/images/connectivity_active.svg deleted file mode 100644 index 39d8e50..0000000 --- a/launcher/qml/images/connectivity_active.svg +++ /dev/null @@ -1,231 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/images/connectivity_inactive.png b/launcher/qml/images/connectivity_inactive.png new file mode 100644 index 0000000..68f1ca0 Binary files /dev/null and b/launcher/qml/images/connectivity_inactive.png differ diff --git a/launcher/qml/images/connectivity_inactive.svg b/launcher/qml/images/connectivity_inactive.svg deleted file mode 100644 index 4cb1c45..0000000 --- a/launcher/qml/images/connectivity_inactive.svg +++ /dev/null @@ -1,169 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/images/dashboard_active.png b/launcher/qml/images/dashboard_active.png new file mode 100644 index 0000000..84b973b Binary files /dev/null and b/launcher/qml/images/dashboard_active.png differ diff --git a/launcher/qml/images/dashboard_active.svg b/launcher/qml/images/dashboard_active.svg deleted file mode 100644 index a826c0c..0000000 --- a/launcher/qml/images/dashboard_active.svg +++ /dev/null @@ -1,174 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/images/dashboard_inactive.png b/launcher/qml/images/dashboard_inactive.png new file mode 100644 index 0000000..045658c Binary files /dev/null and b/launcher/qml/images/dashboard_inactive.png differ diff --git a/launcher/qml/images/dashboard_inactive.svg b/launcher/qml/images/dashboard_inactive.svg deleted file mode 100644 index 9c26fe3..0000000 --- a/launcher/qml/images/dashboard_inactive.svg +++ /dev/null @@ -1,94 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/images/hud.png b/launcher/qml/images/hud.png deleted file mode 100644 index 3bdc5d1..0000000 Binary files a/launcher/qml/images/hud.png and /dev/null differ diff --git a/launcher/qml/images/hvac_active.png b/launcher/qml/images/hvac_active.png new file mode 100644 index 0000000..9d4f6ac Binary files /dev/null and b/launcher/qml/images/hvac_active.png differ diff --git a/launcher/qml/images/hvac_active.svg b/launcher/qml/images/hvac_active.svg deleted file mode 100644 index 44d3bd5..0000000 --- a/launcher/qml/images/hvac_active.svg +++ /dev/null @@ -1,411 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/images/hvac_inactive.png b/launcher/qml/images/hvac_inactive.png new file mode 100644 index 0000000..806d661 Binary files /dev/null and b/launcher/qml/images/hvac_inactive.png differ diff --git a/launcher/qml/images/hvac_inactive.svg b/launcher/qml/images/hvac_inactive.svg deleted file mode 100644 index 67918e6..0000000 --- a/launcher/qml/images/hvac_inactive.svg +++ /dev/null @@ -1,349 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/images/images.qrc b/launcher/qml/images/images.qrc index a24fd84..821cd7f 100644 --- a/launcher/qml/images/images.qrc +++ b/launcher/qml/images/images.qrc @@ -1,46 +1,35 @@ - AGL_HMI_Blue_Background_Car-01.png - top_three_shortcut_background.png - meterdisplay.png - hud.png - background.png - uninstall.png - rse.png - DividingLine.svg - connectivity_active.svg - connectivity_inactive.svg - dashboard_active.svg - dashboard_inactive.svg - hvac_active.svg - hvac_inactive.svg - mixer_active.svg - mixer_inactive.svg - mediaplayer_active.svg - mediaplayer_inactive.svg - music_active.svg - music_inactive.svg - navigation_active.svg - navigation_inactive.svg - phone_active.svg - phone_inactive.svg - poi_active.svg - poi_inactive.svg - radio_active.svg - radio_inactive.svg - settings_active.svg - settings_inactive.svg - video_active.svg - video_inactive.svg - webbrowser_active.svg - webbrowser_inactive.svg - browser_active.svg - browser_inactive.svg - sdl_active.svg - sdl_inactive.svg - blank_active.svg - blank_inactive.svg - plus_active.svg - plus_inactive.svg + connectivity_active.png + connectivity_inactive.png + dashboard_active.png + dashboard_inactive.png + hvac_active.png + hvac_inactive.png + mixer_active.png + mixer_inactive.png + mediaplayer_active.png + mediaplayer_inactive.png + music_active.png + music_inactive.png + navigation_active.png + navigation_inactive.png + phone_active.png + phone_inactive.png + poi_active.png + poi_inactive.png + radio_active.png + radio_inactive.png + settings_active.png + settings_inactive.png + videoplayer_active.png + videoplayer_inactive.png + browser_active.png + browser_inactive.png + weather_active.png + weather_inactive.png + blank_active.png + blank_inactive.png + center_background.png diff --git a/launcher/qml/images/mediaplayer_active.png b/launcher/qml/images/mediaplayer_active.png new file mode 100644 index 0000000..140733a Binary files /dev/null and b/launcher/qml/images/mediaplayer_active.png differ diff --git a/launcher/qml/images/mediaplayer_active.svg b/launcher/qml/images/mediaplayer_active.svg deleted file mode 100644 index d560c3a..0000000 --- a/launcher/qml/images/mediaplayer_active.svg +++ /dev/null @@ -1,172 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/images/mediaplayer_inactive.png b/launcher/qml/images/mediaplayer_inactive.png new file mode 100644 index 0000000..38e6111 Binary files /dev/null and b/launcher/qml/images/mediaplayer_inactive.png differ diff --git a/launcher/qml/images/mediaplayer_inactive.svg b/launcher/qml/images/mediaplayer_inactive.svg deleted file mode 100644 index b6ec056..0000000 --- a/launcher/qml/images/mediaplayer_inactive.svg +++ /dev/null @@ -1,111 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/images/meterdisplay.png b/launcher/qml/images/meterdisplay.png deleted file mode 100644 index a3ad430..0000000 Binary files a/launcher/qml/images/meterdisplay.png and /dev/null differ diff --git a/launcher/qml/images/mixer_active.png b/launcher/qml/images/mixer_active.png new file mode 100644 index 0000000..ab0b9f3 Binary files /dev/null and b/launcher/qml/images/mixer_active.png differ diff --git a/launcher/qml/images/mixer_active.svg b/launcher/qml/images/mixer_active.svg deleted file mode 100644 index 2cb3c07..0000000 --- a/launcher/qml/images/mixer_active.svg +++ /dev/null @@ -1,370 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/images/mixer_inactive.png b/launcher/qml/images/mixer_inactive.png new file mode 100644 index 0000000..e3872bb Binary files /dev/null and b/launcher/qml/images/mixer_inactive.png differ diff --git a/launcher/qml/images/mixer_inactive.svg b/launcher/qml/images/mixer_inactive.svg deleted file mode 100644 index 32e69f0..0000000 --- a/launcher/qml/images/mixer_inactive.svg +++ /dev/null @@ -1,308 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/images/music_active.png b/launcher/qml/images/music_active.png new file mode 100644 index 0000000..140733a Binary files /dev/null and b/launcher/qml/images/music_active.png differ diff --git a/launcher/qml/images/music_active.svg b/launcher/qml/images/music_active.svg deleted file mode 100644 index d560c3a..0000000 --- a/launcher/qml/images/music_active.svg +++ /dev/null @@ -1,172 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/images/music_inactive.png b/launcher/qml/images/music_inactive.png new file mode 100644 index 0000000..38e6111 Binary files /dev/null and b/launcher/qml/images/music_inactive.png differ diff --git a/launcher/qml/images/music_inactive.svg b/launcher/qml/images/music_inactive.svg deleted file mode 100644 index b6ec056..0000000 --- a/launcher/qml/images/music_inactive.svg +++ /dev/null @@ -1,111 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/images/navigation_active.png b/launcher/qml/images/navigation_active.png new file mode 100644 index 0000000..ae3f720 Binary files /dev/null and b/launcher/qml/images/navigation_active.png differ diff --git a/launcher/qml/images/navigation_active.svg b/launcher/qml/images/navigation_active.svg deleted file mode 100644 index dc1fcd3..0000000 --- a/launcher/qml/images/navigation_active.svg +++ /dev/null @@ -1,245 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/images/navigation_inactive.png b/launcher/qml/images/navigation_inactive.png new file mode 100644 index 0000000..52530d6 Binary files /dev/null and b/launcher/qml/images/navigation_inactive.png differ diff --git a/launcher/qml/images/navigation_inactive.svg b/launcher/qml/images/navigation_inactive.svg deleted file mode 100644 index 97fcf31..0000000 --- a/launcher/qml/images/navigation_inactive.svg +++ /dev/null @@ -1,183 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/images/phone_active.png b/launcher/qml/images/phone_active.png new file mode 100644 index 0000000..8a10a92 Binary files /dev/null and b/launcher/qml/images/phone_active.png differ diff --git a/launcher/qml/images/phone_active.svg b/launcher/qml/images/phone_active.svg deleted file mode 100644 index e184f26..0000000 --- a/launcher/qml/images/phone_active.svg +++ /dev/null @@ -1,155 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/images/phone_inactive.png b/launcher/qml/images/phone_inactive.png new file mode 100644 index 0000000..2b61477 Binary files /dev/null and b/launcher/qml/images/phone_inactive.png differ diff --git a/launcher/qml/images/phone_inactive.svg b/launcher/qml/images/phone_inactive.svg deleted file mode 100644 index 7f26834..0000000 --- a/launcher/qml/images/phone_inactive.svg +++ /dev/null @@ -1,93 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/images/plus_active.svg b/launcher/qml/images/plus_active.svg deleted file mode 100644 index b8a56eb..0000000 --- a/launcher/qml/images/plus_active.svg +++ /dev/null @@ -1,180 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/images/plus_inactive.svg b/launcher/qml/images/plus_inactive.svg deleted file mode 100644 index 99d52e2..0000000 --- a/launcher/qml/images/plus_inactive.svg +++ /dev/null @@ -1,88 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/images/poi_active.png b/launcher/qml/images/poi_active.png new file mode 100644 index 0000000..dcf799f Binary files /dev/null and b/launcher/qml/images/poi_active.png differ diff --git a/launcher/qml/images/poi_active.svg b/launcher/qml/images/poi_active.svg deleted file mode 100644 index cb4bc0e..0000000 --- a/launcher/qml/images/poi_active.svg +++ /dev/null @@ -1,352 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/images/poi_inactive.png b/launcher/qml/images/poi_inactive.png new file mode 100644 index 0000000..c0a4fd3 Binary files /dev/null and b/launcher/qml/images/poi_inactive.png differ diff --git a/launcher/qml/images/poi_inactive.svg b/launcher/qml/images/poi_inactive.svg deleted file mode 100644 index 09c8890..0000000 --- a/launcher/qml/images/poi_inactive.svg +++ /dev/null @@ -1,314 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/images/radio_active.png b/launcher/qml/images/radio_active.png new file mode 100644 index 0000000..411f94a Binary files /dev/null and b/launcher/qml/images/radio_active.png differ diff --git a/launcher/qml/images/radio_active.svg b/launcher/qml/images/radio_active.svg deleted file mode 100644 index 2d04d72..0000000 --- a/launcher/qml/images/radio_active.svg +++ /dev/null @@ -1,383 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/images/radio_inactive.png b/launcher/qml/images/radio_inactive.png new file mode 100644 index 0000000..f8c2cc1 Binary files /dev/null and b/launcher/qml/images/radio_inactive.png differ diff --git a/launcher/qml/images/radio_inactive.svg b/launcher/qml/images/radio_inactive.svg deleted file mode 100644 index dcac8ee..0000000 --- a/launcher/qml/images/radio_inactive.svg +++ /dev/null @@ -1,321 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/images/rse.png b/launcher/qml/images/rse.png deleted file mode 100644 index a3122b3..0000000 Binary files a/launcher/qml/images/rse.png and /dev/null differ diff --git a/launcher/qml/images/sdl_active.svg b/launcher/qml/images/sdl_active.svg deleted file mode 100644 index efe3fe7..0000000 --- a/launcher/qml/images/sdl_active.svg +++ /dev/null @@ -1,140 +0,0 @@ - - - -image/svg+xml diff --git a/launcher/qml/images/sdl_inactive.svg b/launcher/qml/images/sdl_inactive.svg deleted file mode 100644 index dcc077a..0000000 --- a/launcher/qml/images/sdl_inactive.svg +++ /dev/null @@ -1,83 +0,0 @@ - - - -image/svg+xml diff --git a/launcher/qml/images/settings_active.png b/launcher/qml/images/settings_active.png new file mode 100644 index 0000000..e9bec82 Binary files /dev/null and b/launcher/qml/images/settings_active.png differ diff --git a/launcher/qml/images/settings_active.svg b/launcher/qml/images/settings_active.svg deleted file mode 100644 index 5391a08..0000000 --- a/launcher/qml/images/settings_active.svg +++ /dev/null @@ -1,176 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/images/settings_inactive.png b/launcher/qml/images/settings_inactive.png new file mode 100644 index 0000000..fc72f9d Binary files /dev/null and b/launcher/qml/images/settings_inactive.png differ diff --git a/launcher/qml/images/settings_inactive.svg b/launcher/qml/images/settings_inactive.svg deleted file mode 100644 index 882e3c4..0000000 --- a/launcher/qml/images/settings_inactive.svg +++ /dev/null @@ -1,114 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/images/top_three_shortcut_background.png b/launcher/qml/images/top_three_shortcut_background.png deleted file mode 100644 index fb5e180..0000000 Binary files a/launcher/qml/images/top_three_shortcut_background.png and /dev/null differ diff --git a/launcher/qml/images/uninstall.png b/launcher/qml/images/uninstall.png deleted file mode 100644 index 3f50c8f..0000000 Binary files a/launcher/qml/images/uninstall.png and /dev/null differ diff --git a/launcher/qml/images/video_active.svg b/launcher/qml/images/video_active.svg deleted file mode 100644 index 794a441..0000000 --- a/launcher/qml/images/video_active.svg +++ /dev/null @@ -1,177 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/images/video_inactive.svg b/launcher/qml/images/video_inactive.svg deleted file mode 100644 index 905d46f..0000000 --- a/launcher/qml/images/video_inactive.svg +++ /dev/null @@ -1,111 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/images/videoplayer_active.png b/launcher/qml/images/videoplayer_active.png new file mode 100644 index 0000000..69bd5bc Binary files /dev/null and b/launcher/qml/images/videoplayer_active.png differ diff --git a/launcher/qml/images/videoplayer_inactive.png b/launcher/qml/images/videoplayer_inactive.png new file mode 100644 index 0000000..99c44ff Binary files /dev/null and b/launcher/qml/images/videoplayer_inactive.png differ diff --git a/launcher/qml/images/weather_active.png b/launcher/qml/images/weather_active.png new file mode 100644 index 0000000..4ff7223 Binary files /dev/null and b/launcher/qml/images/weather_active.png differ diff --git a/launcher/qml/images/weather_inactive.png b/launcher/qml/images/weather_inactive.png new file mode 100644 index 0000000..d5a18b3 Binary files /dev/null and b/launcher/qml/images/weather_inactive.png differ diff --git a/launcher/qml/images/webbrowser_active.svg b/launcher/qml/images/webbrowser_active.svg deleted file mode 100644 index 70b4617..0000000 --- a/launcher/qml/images/webbrowser_active.svg +++ /dev/null @@ -1,231 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/images/webbrowser_inactive.svg b/launcher/qml/images/webbrowser_inactive.svg deleted file mode 100644 index 09f34c9..0000000 --- a/launcher/qml/images/webbrowser_inactive.svg +++ /dev/null @@ -1,165 +0,0 @@ - - - -image/svg+xml \ No newline at end of file diff --git a/launcher/qml/qml.qrc b/launcher/qml/qml.qrc index f440a6e..0dfd6b1 100644 --- a/launcher/qml/qml.qrc +++ b/launcher/qml/qml.qrc @@ -2,8 +2,6 @@ Launcher.qml IconItem.qml - TopShortcutArea.qml - TopShortcutIcon.qml - UninstallDialog.qml + ChangeItemPosition.js diff --git a/launcher/src/applicationmodel.cpp b/launcher/src/applicationmodel.cpp index 261e43e..31e80d9 100644 --- a/launcher/src/applicationmodel.cpp +++ b/launcher/src/applicationmodel.cpp @@ -1,7 +1,7 @@ /* * Copyright (C) 2016 The Qt Company Ltd. * Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH - * Copyright (c) 2018,2019 TOYOTA MOTOR CORPORATION + * Copyright (c) 2018 TOYOTA MOTOR CORPORATION * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,11 +32,9 @@ class ApplicationModel::Private { public: Private(); + void loadAppInfo(); - void addApp(QString icon, QString name, QString id); - void removeApp(QString id); - - QList data; + QList data, data_temp; }; namespace { @@ -44,8 +42,8 @@ namespace { { QString icon = i["name"].toString().toLower(); - if ( !QFile::exists(QString(":/images/%1_active.svg").arg(icon)) || - !QFile::exists(QString(":/images/%1_inactive.svg").arg(icon)) ) + if ( !QFile::exists(QString(":/images/%1_active.png").arg(icon)) || + !QFile::exists(QString(":/images/%1_inactive.png").arg(icon)) ) { icon = "blank"; } @@ -55,40 +53,47 @@ namespace { ApplicationModel::Private::Private() { -} - -void ApplicationModel::Private::addApp(QString icon, QString name, QString id) -{ - HMI_DEBUG("addApp","name: %s icon: %s id: %s.", name.toStdString().c_str(), icon.toStdString().c_str(), id.toStdString().c_str()); - for(int i = 0; i < this->data.size(); ++i) { - if(this->data[i].id() == id) - return; + loadAppInfo(); + int times = 22 / this->data_temp.size(); + if(22 % this->data_temp.size() > 0) { + ++times; } - - QString _icon = name.toLower(); - if ( !QFile::exists(QString(":/images/%1_active.svg").arg(_icon)) || - !QFile::exists(QString(":/images/%1_inactive.svg").arg(_icon)) ) - { - _icon = "blank"; - } - - int pos = 0; - for (pos = 0; pos < this->data.size(); ++pos) { - if (QString::compare(this->data.at(pos).name(), name, Qt::CaseInsensitive) > 0) - break; + while(times > 0) { + for(auto i = 0; i < this->data_temp.size(); ++i) { + this->data.append(this->data_temp.at(i)); + } + --times; } - this->data.insert(pos, AppInfo(_icon, name, id)); } -void ApplicationModel::Private::removeApp(QString id) +void ApplicationModel::Private::loadAppInfo() { - HMI_DEBUG("removeApp","id: %s.",id.toStdString().c_str()); - for (int i = 0; i < this->data.size(); ++i) { - if (this->data.at(i).id() == id) { - this->data.removeAt(i); - break; - } + QString apps = afm_user_daemon_proxy->runnables(QStringLiteral("")); + QJsonDocument japps = QJsonDocument::fromJson(apps.toUtf8()); + int appCount = 0; + int tachometerIndex = 0; + for (auto const &app : japps.array()) { + QJsonObject const &jso = app.toObject(); + auto const name = jso["name"].toString(); + auto const id = jso["id"].toString(); + auto const icon = get_icon_name(jso); + + // Hide HomeScreen icon itself + if (name != "launcher" && + name != "homescreen" && + name != "HomeScreen" && + !name.contains("OnScreen", Qt::CaseInsensitive)) { + this->data_temp.append(AppInfo(icon, name, id)); + } + if (name == "tachometer") { + HMI_DEBUG("launcher", "tachometer index:%d", tachometerIndex); + tachometerIndex = appCount - 1; + } + appCount++; + + HMI_DEBUG("launcher","name: %s icon: %s id: %s.", name.toStdString().c_str(), icon.toStdString().c_str(), id.toStdString().c_str()); } + this->data_temp.swap(tachometerIndex, 4); } ApplicationModel::ApplicationModel(QObject *parent) @@ -147,12 +152,6 @@ QString ApplicationModel::id(int i) const return data(index(i), Qt::UserRole).toString(); } -QString ApplicationModel::appid(int i) const -{ - QString id = data(index(i), Qt::UserRole).toString(); - return id.split("@")[0]; -} - QString ApplicationModel::name(int i) const { return data(index(i), Qt::DisplayRole).toString(); @@ -180,36 +179,3 @@ void ApplicationModel::move(int from, int to) HMI_NOTICE("launcher","from : %d, to : %d. false.", from, to); } } - -void ApplicationModel::updateApplist(QStringList info) -{ - QString icon = info.at(0); - QString name = info.at(1); - QString id = info.at(2); - - beginResetModel(); - if(icon == "") { // uninstall - d->removeApp(id); - } - else { - // new app - d->addApp(icon, name, id); - } - endResetModel(); -} - -void ApplicationModel::initAppList(QString data) -{ - HMI_DEBUG("launcher","init application list."); - beginResetModel(); - QJsonDocument japps = QJsonDocument::fromJson(data.toUtf8()); - for (auto const &app : japps.array()) { - QJsonObject const &jso = app.toObject(); - auto const name = jso["name"].toString(); - auto const id = jso["id"].toString(); - auto const icon = get_icon_name(jso); - - d->addApp(icon, name, id); - } - endResetModel(); -} diff --git a/launcher/src/applicationmodel.h b/launcher/src/applicationmodel.h index 780e575..8398b62 100644 --- a/launcher/src/applicationmodel.h +++ b/launcher/src/applicationmodel.h @@ -1,6 +1,6 @@ /* * Copyright (C) 2016 The Qt Company Ltd. - * Copyright (c) 2018,2019 TOYOTA MOTOR CORPORATION + * Copyright (c) 2018 TOYOTA MOTOR CORPORATION * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,12 +31,9 @@ public: QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; QHash roleNames() const override; - Q_INVOKABLE QString appid(int index) const; Q_INVOKABLE QString id(int index) const; Q_INVOKABLE QString name(int index) const; Q_INVOKABLE void move(int from, int to); - Q_INVOKABLE void initAppList(QString data); - Q_INVOKABLE void updateApplist(QStringList info); private: class Private; diff --git a/launcher/src/homescreenhandler.cpp b/launcher/src/homescreenhandler.cpp deleted file mode 100644 index 2da71c8..0000000 --- a/launcher/src/homescreenhandler.cpp +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Copyright (c) 2017 TOYOTA MOTOR CORPORATION - * Copyright (c) 2018,2019 TOYOTA MOTOR CORPORATION - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include "homescreenhandler.h" -#include -#include -#include -#include -#include "hmi-debug.h" -#include "afm_user_daemon_proxy.h" - -extern org::AGL::afm::user *afm_user_daemon_proxy; - -#define BUF_SIZE 1024 -void* HomescreenHandler::myThis = 0; - -HomescreenHandler::HomescreenHandler(QObject *parent) : - QObject(parent), - mp_qhs(NULL) -{ -} - -HomescreenHandler::~HomescreenHandler() -{ - if (mp_qhs != NULL) { - delete mp_qhs; - } -} - -void HomescreenHandler::init(int port, const char *token, QLibWindowmanager *qwm, QString myname) -{ - myThis = this; - mp_qwm = qwm; - m_myname = myname; - - mp_qhs = new QLibHomeScreen(); - mp_qhs->init(port, token); - mp_qhs->registerCallback(nullptr, HomescreenHandler::onRep_static); - - mp_qhs->set_event_handler(QLibHomeScreen::Event_ShowWindow,[this](json_object *object){ - HMI_DEBUG("Launcher","Surface launcher got Event_ShowWindow\n"); - mp_qwm->activateWindow(m_myname); - }); - - mp_qhs->set_event_handler(QLibHomeScreen::Event_AppListChanged,[this](json_object *object){ - HMI_DEBUG("Launcher","laucher: appListChanged [%s]\n", json_object_to_json_string(object)); - - struct json_object *obj_param, *obj_oper, *obj_data; - if(json_object_object_get_ex(object, "parameter", &obj_param) - && json_object_object_get_ex(obj_param, "operation", &obj_oper) - && json_object_object_get_ex(obj_param, "data", &obj_data)) { - QString oper = json_object_get_string(obj_oper); - if(oper == "uninstall") { - /* { "application_id": "launcher", - * "type": "application-list-changed", - * "parameter":{ - * "operation": "uninstall", - * "data": "onstestapp@0.1" - * } - * } */ - QString id = json_object_get_string(obj_data); - QStringList info; - // icon, name, id - info << "" << "" << id; - emit appListUpdate(info); - } - else if(oper == "install") { - /* { "application_id": "launcher", - * "type": "application-list-changed", - * "parameter": { - * "operation": "install", - * "data": { - * "description":"This is a demo onstestapp application", - * "name": "onstestapp", - * "shortname": "", - * "id": "onstestapp@0.1", - * "version": "0.1", - * "author": "Qt", - * "author-email": "", - * "width": "", - * "height": "", - * "icon": "\/var\/local\/lib\/afm\/applications\/onstestapp\/0.1\/icon.svg", - * "http-port": 31022 - * } - * } - * } */ - struct json_object *obj_icon, *obj_name, *obj_id; - if(json_object_object_get_ex(obj_data, "icon", &obj_icon) - && json_object_object_get_ex(obj_data, "name", &obj_name) - && json_object_object_get_ex(obj_data, "id", &obj_id)) { - QString icon = json_object_get_string(obj_icon); - QString name = json_object_get_string(obj_name); - QString id = json_object_get_string(obj_id); - QStringList info; - // icon, name, id - info << icon << name << id; - emit appListUpdate(info); - } - } - else { - HMI_ERROR("Launcher","error operation.\n"); - } - } - }); - - mp_qhs->set_event_handler(QLibHomeScreen::Event_UpdateShortcut,[this](json_object *object){ - HMI_DEBUG("Launcher","Surface launcher got Event_UpdateShortcut\n"); - json_object *obj_p = json_object_object_get(object, "parameter"); - json_object *obj_array = json_object_object_get(obj_p, "shortcut"); - QStringList shortcut_list; - for(int i = 0; i < 3; i++) - { - shortcut_list << QString(QLatin1String(json_object_get_string(json_object_object_get(json_object_array_get_idx(obj_array, i), "shortcut_id")))); - shortcut_list << QString(QLatin1String(json_object_get_string(json_object_object_get(json_object_array_get_idx(obj_array, i), "shortcut_name")))); - } - HMI_DEBUG("Launcher","SEvent_UpdateShortcut id1 = %s", shortcut_list.at(2).toStdString().c_str()); - emit updateShortcutList(shortcut_list); - }); -} - -void HomescreenHandler::tapShortcut(QString application_id) -{ - HMI_DEBUG("Launcher","tapShortcut %s", application_id.toStdString().c_str()); - struct json_object* j_json = json_object_new_object(); - struct json_object* value; - value = json_object_new_string("normal.full"); - json_object_object_add(j_json, "area", value); - - mp_qhs->showWindow(application_id.toStdString().c_str(), j_json); -} - -void HomescreenHandler::onRep_static(struct json_object* reply_contents) -{ - static_cast(HomescreenHandler::myThis)->onRep(reply_contents); -} - -void HomescreenHandler::onRep(struct json_object* reply_contents) -{ - HMI_DEBUG("launcher","HomeScreen onReply %s", json_object_to_json_string(reply_contents)); - struct json_object *obj_res, *obj_verb; - if(json_object_object_get_ex(reply_contents, "response", &obj_res) - && json_object_object_get_ex(obj_res, "verb", &obj_verb) - && !strcasecmp("getRunnables", json_object_get_string(obj_verb))) { - struct json_object *obj_data; - if(json_object_object_get_ex(obj_res, "data", &obj_data)) { - HMI_DEBUG("launcher","HomescreenHandler emit initAppList"); - QString data = json_object_to_json_string(obj_data); - emit initAppList(data); - } - } -} - -void HomescreenHandler::hideWindow(QString application_id) -{ - mp_qhs->hideWindow(application_id.section('@', 0, 0).toStdString().c_str()); -} - -void HomescreenHandler::registerShortcut(QString shortcut_id, QString shortcut_name, QString position) -{ -// struct json_object* j_obj = json_object_new_object(); -// struct json_object* val_id = json_object_new_string(shortcut_id.toStdString().c_str()); -// struct json_object* val_name = json_object_new_string(shortcut_name.toStdString().c_str()); -// struct json_object* val_position = json_object_new_string(position.toStdString().c_str()); -// json_object_object_add(j_obj, "shortcut_id", val_id); -// json_object_object_add(j_obj, "shortcut_name", val_name); -// json_object_object_add(j_obj, "position", val_position); - - mp_qhs->registerShortcut(shortcut_id, shortcut_name, position); -} - -int HomescreenHandler::uninstallApplication(QString application_id) -{ - int result = -1; - HMI_DEBUG("launcher","Application uninstall %s.", application_id.toStdString().c_str()); - - result = afm_user_daemon_proxy->uninstall(application_id).value().toInt(); - HMI_DEBUG("launcher","ApplicationUninstall pid: %d.", result); - -// QProcess *process = new QProcess(); -// QString command = "/usr/bin/pkill " + application_id.section('@', 0, 0); -// HMI_DEBUG("launcher", "command is %s", command.toStdString().c_str()); -// process->start(command); - - return result; -} - -void HomescreenHandler::sendAppToMeter(QString application_id) -{ - HMI_DEBUG("Launcher","sendAppToMeter %s", application_id.toStdString().c_str()); - struct json_object* j_json = json_object_new_object(); - struct json_object* value; - value = json_object_new_string("master.split.sub"); - json_object_object_add(j_json, "area", value); - - mp_qhs->showWindow(application_id.section('@', 0, 0).toStdString().c_str(), j_json); -} - -void HomescreenHandler::getRunnables(void) -{ - mp_qhs->getRunnables(); -} - -void HomescreenHandler::setQuickWindow(QQuickWindow *qw) -{ - mp_qhs->setQuickWindow(qw); -} diff --git a/launcher/src/homescreenhandler.h b/launcher/src/homescreenhandler.h deleted file mode 100644 index e612331..0000000 --- a/launcher/src/homescreenhandler.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2017 TOYOTA MOTOR CORPORATION - * Copyright (c) 2018,2019 TOYOTA MOTOR CORPORATION - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef HOMESCREENHANDLER_H -#define HOMESCREENHANDLER_H - -#include -#include -#include -#include -#include - -using namespace std; - -class HomescreenHandler : public QObject -{ - Q_OBJECT -public: - explicit HomescreenHandler(QObject *parent = 0); - ~HomescreenHandler(); - - void init(int port, const char* token, QLibWindowmanager *qwm, QString myname); - - Q_INVOKABLE void tapShortcut(QString application_id); - Q_INVOKABLE void getRunnables(void); - Q_INVOKABLE void hideWindow(QString application_id); - Q_INVOKABLE void registerShortcut(QString shortcut_id, QString shortcut_name, QString position); - Q_INVOKABLE int uninstallApplication(QString application_id); - Q_INVOKABLE void sendAppToMeter(QString application_id); - - void onRep(struct json_object* reply_contents); - - static void* myThis; - static void onRep_static(struct json_object* reply_contents); - void setQuickWindow(QQuickWindow *qw); - -signals: - void initAppList(QString data); - void appListUpdate(QStringList info); - void updateShortcutList(QStringList shortcut_list); - -private: - QLibHomeScreen *mp_qhs; - QLibWindowmanager *mp_qwm; - QString m_myname; -}; - -#endif // HOMESCREENHANDLER_H diff --git a/launcher/src/main.cpp b/launcher/src/main.cpp index 1d324b2..5fed90a 100644 --- a/launcher/src/main.cpp +++ b/launcher/src/main.cpp @@ -29,8 +29,7 @@ #include "applicationmodel.h" #include "appinfo.h" #include "afm_user_daemon_proxy.h" -#include "homescreenhandler.h" -#include "shortcutappmodel.h" +#include "qlibhomescreen.h" #include "hmi-debug.h" // XXX: We want this DBus connection to be shared across the different @@ -89,21 +88,18 @@ int main(int argc, char *argv[]) // import C++ class to QML qmlRegisterType("AppModel", 1, 0, "ApplicationModel"); - qmlRegisterType("ShortcutAppModel", 1, 0, "ShortcutAppModel"); // DBus qDBusRegisterMetaType(); qDBusRegisterMetaType >(); + QLibHomeScreen* homescreenHandler = new QLibHomeScreen(); ApplicationLauncher *launcher = new ApplicationLauncher(); QLibWindowmanager* layoutHandler = new QLibWindowmanager(); - ShortcutAppModel* shortcutAppModel = new ShortcutAppModel(); if(layoutHandler->init(port,token) != 0){ exit(EXIT_FAILURE); } -// AGLScreenInfo screenInfo(layoutHandler->get_scale_factor()); - if (layoutHandler->requestSurface(myname) != 0) { exit(EXIT_FAILURE); } @@ -123,10 +119,6 @@ int main(int argc, char *argv[]) HMI_DEBUG("launch", "surface %s Event_Invisible", label); }); - HomescreenHandler* homescreenHandler = new HomescreenHandler(); - QObject::connect(homescreenHandler, SIGNAL(updateShortcutList(QStringList)), shortcutAppModel, SLOT(shortcutUpdate(QStringList))); - homescreenHandler->init(port, token.toStdString().c_str(), layoutHandler, myname); - QUrl bindingAddress; bindingAddress.setScheme(QStringLiteral("ws")); bindingAddress.setHost(QStringLiteral("localhost")); @@ -137,16 +129,28 @@ int main(int argc, char *argv[]) query.addQueryItem(QStringLiteral("token"), token); bindingAddress.setQuery(query); + const QByteArray hack_delay = qgetenv("HMI_LAUNCHER_STARTUP_DELAY"); + int delay_time = 1; + + if (!hack_delay.isEmpty()) { + delay_time = (QString::fromLocal8Bit(hack_delay)).toInt(); + } + + QThread::sleep(delay_time); + qDebug("Sleep %d sec to resolve race condtion between HomeScreen and Launcher", delay_time); + // mail.qml loading QQmlApplicationEngine engine; - engine.rootContext()->setContextProperty(QStringLiteral("layoutHandler"), layoutHandler); - engine.rootContext()->setContextProperty(QStringLiteral("homescreenHandler"), homescreenHandler); - engine.rootContext()->setContextProperty(QStringLiteral("launcher"), launcher); -// engine.rootContext()->setContextProperty(QStringLiteral("screenInfo"), &screenInfo); - engine.rootContext()->setContextProperty(QStringLiteral("shortcutAppModel"), shortcutAppModel); + engine.rootContext()->setContextProperty("layoutHandler", layoutHandler); + engine.rootContext()->setContextProperty("homescreenHandler", homescreenHandler); + engine.rootContext()->setContextProperty("launcher", launcher); engine.load(QUrl(QStringLiteral("qrc:/Launcher.qml"))); - homescreenHandler->getRunnables(); + homescreenHandler->init(port, token.toStdString().c_str()); + + homescreenHandler->set_event_handler(QLibHomeScreen::Event_TapShortcut, [layoutHandler, myname](json_object *object){ + layoutHandler->activateSurface(myname); + }); QObject *root = engine.rootObjects().first(); QQuickWindow *window = qobject_cast(root); homescreenHandler->setQuickWindow(window); diff --git a/launcher/src/shortcutappmodel.cpp b/launcher/src/shortcutappmodel.cpp deleted file mode 100644 index 0fd76b6..0000000 --- a/launcher/src/shortcutappmodel.cpp +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright (c) 2017 TOYOTA MOTOR CORPORATION - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "shortcutappmodel.h" -#include "hmi-debug.h" -#include -#include -#include - -#define SHORTCUTKEY_PATH "/var/local/lib/afm/applications/homescreen/0.1/etc/registeredApp.json" - -class ShortcutAppModel::Private -{ -public: - Private(); - - QList data; -}; - -ShortcutAppModel::Private::Private() -{ -} - - -ShortcutAppModel::ShortcutAppModel(QObject *parent) - : QAbstractListModel(parent) - , d(new Private()) -{ - init(); -// getAppQueue(); -} - -ShortcutAppModel::~ShortcutAppModel() -{ - delete this->d; -} -void ShortcutAppModel::init() -{ - RegisterApp temp; - for(int i = 0; i < 3; i++) { - temp.id = "video@0.1"; - temp.name = "video"; - temp.icon = getIconPath(temp.id); - if (temp.icon == "") { - temp.isBlank = true; - } else { - temp.isBlank = false; - } - d->data.append(temp); - } -} - -int ShortcutAppModel::rowCount(const QModelIndex &parent) const -{ - if (parent.isValid()) - return 0; - - return this->d->data.count(); -} - -QVariant ShortcutAppModel::data(const QModelIndex &index, int role) const -{ - QVariant ret; - if (!index.isValid()) - return ret; - - switch (role) { - case Qt::DecorationRole: - ret = this->d->data[index.row()].icon; - break; - case Qt::DisplayRole: - ret = this->d->data[index.row()].name; - break; - case Qt::UserRole: - ret = this->d->data[index.row()].id; - break; - default: - break; - } - - return ret; -} - -QHash ShortcutAppModel::roleNames() const -{ - QHash roles; - roles[Qt::DecorationRole] = "icon"; - roles[Qt::DisplayRole] = "name"; - roles[Qt::UserRole] = "id"; - return roles; -} - -void ShortcutAppModel::shortcutUpdate(QStringList shortcut_list) -{ - HMI_DEBUG("Launcher", "ShortcutAppModel::shortcutUpdate id1=%s", shortcut_list.at(1).toStdString().c_str()); - RegisterApp temp; - for(int i = 0; i < d->data.size(); i++) { - temp.id = shortcut_list.at(2 * i); - temp.name = shortcut_list.at(2 * i + 1); - temp.icon = getIconPath(temp.id); - if (temp.icon == "") { - temp.isBlank = true; - } else { - temp.isBlank = false; - } - d->data.replace(i, temp); - } - emit updateShortcut(); -} - -QString ShortcutAppModel::getId(int index) const -{ - return d->data.at(index).id; -} - -QString ShortcutAppModel::getName(int index) const -{ - return d->data.at(index).name; -} - -QString ShortcutAppModel::getIcon(int index) const -{ - return d->data.at(index).icon; -} - -bool ShortcutAppModel::isBlank(int index) const -{ - return d->data.at(index).isBlank; -} - -QString ShortcutAppModel::getIconPath(QString id) -{ - QString name = id.section('@', 0, 0); - QString version = id.section('@', 1, 1); - QString boardIconPath = "/var/local/lib/afm/applications/" + name + "/" + version + "/icon.svg"; - QString appIconPath = ":/images/TopShortcut/" + name + ".svg"; - if (QFile::exists(boardIconPath)) { - return "file://" + boardIconPath; - } else if (QFile::exists(appIconPath)) { - return appIconPath.section('/', 1, -1); - } - return ""; -} - -void ShortcutAppModel::setAppQueuePoint(QString id, QString name) -{ - app.id = id; - app.icon = getIconPath(app.id); - if (app.icon == "") { - app.isBlank = true; - } else { - app.isBlank = false; - } - app.name = name; - d->data.append(app); -} diff --git a/launcher/src/shortcutappmodel.h b/launcher/src/shortcutappmodel.h deleted file mode 100644 index e11e121..0000000 --- a/launcher/src/shortcutappmodel.h +++ /dev/null @@ -1,53 +0,0 @@ -#ifndef SHORTCUTAPPMODEL_H -#define SHORTCUTAPPMODEL_H - -#include -#include -#include -#include -#include -#include - -struct RegisterApp { - QString id; - QString name; - QString icon; - bool isBlank; -}; - -class ShortcutAppModel : public QAbstractListModel -{ - Q_OBJECT -public: - explicit ShortcutAppModel(QObject *parent = nullptr); - ~ShortcutAppModel(); - - int rowCount(const QModelIndex &parent = QModelIndex()) const override; - - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override; - QHash roleNames() const override; - - Q_INVOKABLE QString getId(int index) const; - Q_INVOKABLE QString getName(int index) const; - Q_INVOKABLE QString getIcon(int index) const; - Q_INVOKABLE bool isBlank(int index) const; - -public slots: - void shortcutUpdate(QStringList shortcut_list); - -signals: - void updateShortcut(); - -private: - void init(); - void getAppQueue(); - void setAppQueuePoint(QString id, QString name); - QString getIconPath(QString id); - - class Private; - Private *d; - RegisterApp app; - -}; - -#endif // SHORTCUTAPPMODEL_H diff --git a/package/config.xml b/package/config.xml index 3a00cf8..62f99ed 100644 --- a/package/config.xml +++ b/package/config.xml @@ -12,6 +12,7 @@ + diff --git a/package/icon.svg b/package/icon.svg index b6eab24..91661a7 100644 --- a/package/icon.svg +++ b/package/icon.svg @@ -1,73 +1,279 @@ - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + +image/svg+xmlMULTIMEDIA + \ No newline at end of file -- cgit 1.2.3-korg