diff options
author | 2016-06-24 16:19:10 +0200 | |
---|---|---|
committer | 2016-06-24 16:19:10 +0200 | |
commit | ca3605ea664834acdf712e691be8f0358b1c6b6f (patch) | |
tree | 58b60fe19816136209a4a7302ed6d44e733fcc37 /HomeScreen | |
parent | ff25a2a06428ffb0d6d8aeddb5faaa301b4201fe (diff) |
v0.1.0
06/24/2016
- reworked status bar
- reviewed D-Bus interfaces, now using signals instead of methods for day/night mode
- created new home screen simulator app
- license changed to Apache 2.0
- put D-Bus introspections in one central place
- disabled "only one instance allowed" for development
Diffstat (limited to 'HomeScreen')
129 files changed, 1940 insertions, 0 deletions
diff --git a/HomeScreen/HomeScreen.pro b/HomeScreen/HomeScreen.pro new file mode 100644 index 0000000..01e5ace --- /dev/null +++ b/HomeScreen/HomeScreen.pro @@ -0,0 +1,137 @@ +# Copyright (C) 2016 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. + +#TODO: compile switches for ARM/x86 architecture + +QT += core gui dbus + +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +TARGET = HomeScreen +TEMPLATE = app + + +SOURCES += \ + src/main.cpp \ + src/mainwindow.cpp \ + $$OUT_PWD/daynightmode_adapter.cpp \ #generated dbus adapter + $$OUT_PWD/daynightmode_proxy.cpp \ #generated dbus proxy + $$OUT_PWD/popup_adapter.cpp \ #generated dbus adapter + $$OUT_PWD/popup_proxy.cpp \ #generated dbus proxy + $$OUT_PWD/statusbar_adapter.cpp \ #generated dbus adapter + $$OUT_PWD/statusbar_proxy.cpp \ #generated dbus proxy + src/settingswidget.cpp \ + src/popupwidget.cpp \ + src/controlbarwidget.cpp \ + src/statusbarwidget.cpp + +HEADERS += \ + ../interfaces/daynightmode.h \ + ../interfaces/popup.h \ + src/mainwindow.h \ + $$OUT_PWD/daynightmode_adapter.h \ #generated dbus adapter + $$OUT_PWD/daynightmode_proxy.h \ #generated dbus proxy + $$OUT_PWD/popup_adapter.h \ #generated dbus adapter + $$OUT_PWD/popup_proxy.h \ #generated dbus proxy + $$OUT_PWD/statusbar_adapter.h \ #generated dbus adapter + $$OUT_PWD/statusbar_proxy.h \ #generated dbus proxy + src/settingswidget.h \ + src/popupwidget.h \ + src/controlbarwidget.h \ + src/statusbarwidget.h + +FORMS += \ + resources/mainwindow.ui \ + resources/settingswidget.ui \ + resources/popupwidget.ui \ + resources/controlbarwidget.ui \ + resources/statusbarwidget.ui + +TRANSLATIONS = \ + resources/translations/homescreen_en_US.ts \ + resources/translations/homescreen_de_DE.ts \ + resources/translations/homescreen_ja_JP.ts + +OTHER_FILES += \ + ../interfaces/daynightmode.xml \ + ../interfaces/inputevent.xml \ + ../interfaces/popup.xml \ + ../interfaces/statusbar.xml \ + README.md + +RESOURCES += \ + resources/homescreen.qrc + +# remove generated files +QMAKE_CLEAN += -r \ + $$OUT_PWD/HomeScreen \ + $$OUT_PWD/Makefile \ + $$OUT_PWD/daynightmode_adapter.h \ + $$OUT_PWD/daynightmode_adapter.cpp \ + $$OUT_PWD/daynightmode_adapter.moc \ + $$OUT_PWD/daynightmode_proxy.h \ + $$OUT_PWD/daynightmode_proxy.cpp \ + $$OUT_PWD/daynightmode_proxy.moc \ + $$OUT_PWD/popup_adapter.h \ + $$OUT_PWD/popup_adapter.cpp \ + $$OUT_PWD/popup_adapter.moc \ + $$OUT_PWD/popup_proxy.h \ + $$OUT_PWD/popup_proxy.cpp \ + $$OUT_PWD/popup_proxy.moc \ + $$OUT_PWD/statusbar_adapter.h \ + $$OUT_PWD/statusbar_adapter.cpp \ + $$OUT_PWD/statusbar_adapter.moc \ + $$OUT_PWD/statusbar_proxy.h \ + $$OUT_PWD/statusbar_proxy.cpp \ + $$OUT_PWD/statusbar_proxy.moc + +# Create custom targets for generating dbus proxy and adapter +# OE_QMAKE_PATH_EXTERNAL_HOST_BINS is only defined in the yocto environment +isEmpty(OE_QMAKE_PATH_EXTERNAL_HOST_BINS){ + OE_QMAKE_PATH_EXTERNAL_HOST_BINS = "/" +} +# for daynightmode +daynightmodegenerateadapter.target = $$OUT_PWD/daynightmode_adapter.cpp +unix:daynightmodegenerateadapter.commands = "$(OE_QMAKE_PATH_EXTERNAL_HOST_BINS)qdbusxml2cpp -m -a daynightmode_adapter $$_PRO_FILE_PWD_/../interfaces/daynightmode.xml; $(OE_QMAKE_PATH_EXTERNAL_HOST_BINS)moc $$OUT_PWD/daynightmode_adapter.h -o $$OUT_PWD/daynightmode_adapter.moc" +daynightmodegenerateproxy.target = $$OUT_PWD/daynightmode_proxy.cpp +unix:daynightmodegenerateproxy.commands = "$(OE_QMAKE_PATH_EXTERNAL_HOST_BINS)qdbusxml2cpp -m -p daynightmode_proxy $$_PRO_FILE_PWD_/../interfaces/daynightmode.xml; $(OE_QMAKE_PATH_EXTERNAL_HOST_BINS)moc $$OUT_PWD/daynightmode_proxy.h -o $$OUT_PWD/daynightmode_proxy.moc" +PRE_TARGETDEPS += \ + $$OUT_PWD/daynightmode_adapter.cpp \ + $$OUT_PWD/daynightmode_proxy.cpp +QMAKE_EXTRA_TARGETS += \ + daynightmodegenerateadapter \ + daynightmodegenerateproxy +# for popup +popupgenerateadapter.target = $$OUT_PWD/popup_adapter.cpp +unix:popupgenerateadapter.commands = "$(OE_QMAKE_PATH_EXTERNAL_HOST_BINS)qdbusxml2cpp -m -a popup_adapter $$_PRO_FILE_PWD_/../interfaces/popup.xml; $(OE_QMAKE_PATH_EXTERNAL_HOST_BINS)moc $$OUT_PWD/popup_adapter.h -o $$OUT_PWD/popup_adapter.moc" +popupgenerateproxy.target = $$OUT_PWD/popup_proxy.cpp +unix:popupgenerateproxy.commands = "$(OE_QMAKE_PATH_EXTERNAL_HOST_BINS)qdbusxml2cpp -m -p popup_proxy $$_PRO_FILE_PWD_/../interfaces/popup.xml; $(OE_QMAKE_PATH_EXTERNAL_HOST_BINS)moc $$OUT_PWD/popup_proxy.h -o $$OUT_PWD/popup_proxy.moc" +PRE_TARGETDEPS += \ + $$OUT_PWD/popup_adapter.cpp \ + $$OUT_PWD/popup_proxy.cpp +QMAKE_EXTRA_TARGETS += \ + popupgenerateadapter \ + popupgenerateproxy +# for statusbar +statusbargenerateadapter.target = $$OUT_PWD/statusbar_adapter.cpp +unix:statusbargenerateadapter.commands = "$(OE_QMAKE_PATH_EXTERNAL_HOST_BINS)qdbusxml2cpp -m -a statusbar_adapter $$_PRO_FILE_PWD_/../interfaces/statusbar.xml; $(OE_QMAKE_PATH_EXTERNAL_HOST_BINS)moc $$OUT_PWD/statusbar_adapter.h -o $$OUT_PWD/statusbar_adapter.moc" +statusbargenerateproxy.target = $$OUT_PWD/statusbar_proxy.cpp +unix:statusbargenerateproxy.commands = "$(OE_QMAKE_PATH_EXTERNAL_HOST_BINS)qdbusxml2cpp -m -p statusbar_proxy $$_PRO_FILE_PWD_/../interfaces/statusbar.xml; $(OE_QMAKE_PATH_EXTERNAL_HOST_BINS)moc $$OUT_PWD/statusbar_proxy.h -o $$OUT_PWD/statusbar_proxy.moc" +PRE_TARGETDEPS += \ + $$OUT_PWD/statusbar_adapter.cpp \ + $$OUT_PWD/statusbar_proxy.cpp +QMAKE_EXTRA_TARGETS += \ + statusbargenerateadapter \ + statusbargenerateproxy + diff --git a/HomeScreen/LICENSE b/HomeScreen/LICENSE new file mode 100644 index 0000000..31c692a --- /dev/null +++ b/HomeScreen/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/HomeScreen/README.md b/HomeScreen/README.md new file mode 100644 index 0000000..b896bfa --- /dev/null +++ b/HomeScreen/README.md @@ -0,0 +1,61 @@ +AGL Home Screen reference implementation + + +AGL repo for source code: +https://gerrit.automotivelinux.org/gerrit/#/admin/projects/staging/HomeScreen + + +v0.1.0 +06/24/2016 + +#changes +- reworked status bar +- reviewed D-Bus interfaces, now using signals instead of methods for day/night mode +- created new home screen simulator app +- license changed to Apache 2.0 +- put D-Bus introspections in one central place +- disabled "only one instance allowed" for development + +v0.0.2 +06/13/2016 + +#changes +- created layout 1. Changed home screen app size to 1080x1920 + +v0.0.1 +06/01/2016 + +#new features +- initial version +- first implementation of home screen +- fix HMI layout (will be configurable in the future) +- dBus as IPC (may change in the future) +- no interaction with application manager so far +- multi-lanuage support +- day/night mode support +- initial status bar implementation (interface will be enhanced in the future) +- initial control bar implementation +- MPLv2.0 license +- input device simulator for developer build (not functional right now) +- system settings simulator for developer build (day/night mode switch functional right now) +- using QSettings for local app setting storage (may change in the future) +- first popup implementation (single popup support for now; multiple popup not defined; interface will change) +- only one instance of the app allowed + +#TODOs +- define and implement control bar D-Bus-interface +- many settings have to be read from the system somewhere during app startup. This is not available right now +- interaction with application manager +- interaction with wayland compositor +- define and implement input device event handler +- replace my HMI design with the official AGL design (graphics/icons...) +- implement example HMI layouts +- fix font issues on target +- more documentation ;) +- add animations +- much more... + +Thanks to Umar Irshad for his free iconset available here: +https://dribbble.com/shots/1569128-Freebie-48-Bubbles-Iconset + + diff --git a/HomeScreen/resources/controlbarwidget.ui b/HomeScreen/resources/controlbarwidget.ui new file mode 100644 index 0000000..9696a49 --- /dev/null +++ b/HomeScreen/resources/controlbarwidget.ui @@ -0,0 +1,94 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>ControlBarWidget</class> + <widget class="QWidget" name="ControlBarWidget"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>1080</width> + <height>60</height> + </rect> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <widget class="QWidget" name="widget_Background" native="true"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>1080</width> + <height>60</height> + </rect> + </property> + <property name="styleSheet"> + <string notr="true">background-image: url(:/images/backgrounds/bg_green_day.png);</string> + </property> + <widget class="QPushButton" name="pushButton_Home"> + <property name="geometry"> + <rect> + <x>10</x> + <y>10</y> + <width>40</width> + <height>40</height> + </rect> + </property> + <property name="focusPolicy"> + <enum>Qt::NoFocus</enum> + </property> + <property name="styleSheet"> + <string notr="true">background-image: url(:/images/transparency.png); +border-image: url(:/images/transparency.png);</string> + </property> + <property name="text"> + <string/> + </property> + <property name="icon"> + <iconset resource="homescreen.qrc"> + <normaloff>:/icons/home_day.png</normaloff>:/icons/home_day.png</iconset> + </property> + <property name="iconSize"> + <size> + <width>40</width> + <height>40</height> + </size> + </property> + </widget> + <widget class="QPushButton" name="pushButton_Settings"> + <property name="geometry"> + <rect> + <x>60</x> + <y>10</y> + <width>40</width> + <height>40</height> + </rect> + </property> + <property name="focusPolicy"> + <enum>Qt::NoFocus</enum> + </property> + <property name="styleSheet"> + <string notr="true">background-image: url(:/images/transparency.png); +border-image: url(:/images/transparency.png);</string> + </property> + <property name="text"> + <string/> + </property> + <property name="icon"> + <iconset resource="homescreen.qrc"> + <normaloff>:/icons/settings_day.png</normaloff>:/icons/settings_day.png</iconset> + </property> + <property name="iconSize"> + <size> + <width>40</width> + <height>40</height> + </size> + </property> + </widget> + </widget> + </widget> + <resources> + <include location="homescreen.qrc"/> + </resources> + <connections/> +</ui> diff --git a/HomeScreen/resources/homescreen.qrc b/HomeScreen/resources/homescreen.qrc new file mode 100644 index 0000000..0a8ee15 --- /dev/null +++ b/HomeScreen/resources/homescreen.qrc @@ -0,0 +1,18 @@ +<RCC> + <qresource prefix="/"> + <file>images/transparency.png</file> + <file>images/backgrounds/bg_stripes_day.png</file> + <file>images/backgrounds/bg_stripes_night.png</file> + <file>images/backgrounds/bg_blue_day.png</file> + <file>images/backgrounds/bg_blue_night.png</file> + <file>images/backgrounds/bg_green_day.png</file> + <file>images/backgrounds/bg_green_night.png</file> + <file alias="icons/home_day.png">images/icons/White/01.Home.png</file> + <file alias="icons/home_night.png">images/icons/Black/01.Home.png</file> + <file alias="icons/settings_day.png">images/icons/White/45.Settings.png</file> + <file alias="icons/settings_night.png">images/icons/Black/45.Settings.png</file> + <file>translations/homescreen_de_DE.qm</file> + <file>translations/homescreen_en_US.qm</file> + <file>translations/homescreen_ja_JP.qm</file> + </qresource> +</RCC> diff --git a/HomeScreen/resources/images/backgrounds/bg_blue_day.png b/HomeScreen/resources/images/backgrounds/bg_blue_day.png Binary files differnew file mode 100755 index 0000000..1cbe79a --- /dev/null +++ b/HomeScreen/resources/images/backgrounds/bg_blue_day.png diff --git a/HomeScreen/resources/images/backgrounds/bg_blue_night.png b/HomeScreen/resources/images/backgrounds/bg_blue_night.png Binary files differnew file mode 100755 index 0000000..bd3f1e9 --- /dev/null +++ b/HomeScreen/resources/images/backgrounds/bg_blue_night.png diff --git a/HomeScreen/resources/images/backgrounds/bg_green_day.png b/HomeScreen/resources/images/backgrounds/bg_green_day.png Binary files differnew file mode 100755 index 0000000..9549399 --- /dev/null +++ b/HomeScreen/resources/images/backgrounds/bg_green_day.png diff --git a/HomeScreen/resources/images/backgrounds/bg_green_night.png b/HomeScreen/resources/images/backgrounds/bg_green_night.png Binary files differnew file mode 100755 index 0000000..0377283 --- /dev/null +++ b/HomeScreen/resources/images/backgrounds/bg_green_night.png diff --git a/HomeScreen/resources/images/backgrounds/bg_stripes_day.png b/HomeScreen/resources/images/backgrounds/bg_stripes_day.png Binary files differnew file mode 100755 index 0000000..e2fdadd --- /dev/null +++ b/HomeScreen/resources/images/backgrounds/bg_stripes_day.png diff --git a/HomeScreen/resources/images/backgrounds/bg_stripes_night.png b/HomeScreen/resources/images/backgrounds/bg_stripes_night.png Binary files differnew file mode 100755 index 0000000..3c08bd2 --- /dev/null +++ b/HomeScreen/resources/images/backgrounds/bg_stripes_night.png diff --git a/HomeScreen/resources/images/icons/Black/01.Home.png b/HomeScreen/resources/images/icons/Black/01.Home.png Binary files differnew file mode 100644 index 0000000..08323c8 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/01.Home.png diff --git a/HomeScreen/resources/images/icons/Black/02.Shop.png b/HomeScreen/resources/images/icons/Black/02.Shop.png Binary files differnew file mode 100644 index 0000000..c50ae45 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/02.Shop.png diff --git a/HomeScreen/resources/images/icons/Black/03.Office.png b/HomeScreen/resources/images/icons/Black/03.Office.png Binary files differnew file mode 100644 index 0000000..6e74c74 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/03.Office.png diff --git a/HomeScreen/resources/images/icons/Black/04.Bank.png b/HomeScreen/resources/images/icons/Black/04.Bank.png Binary files differnew file mode 100644 index 0000000..07a724d --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/04.Bank.png diff --git a/HomeScreen/resources/images/icons/Black/05.Tag.png b/HomeScreen/resources/images/icons/Black/05.Tag.png Binary files differnew file mode 100644 index 0000000..5d09027 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/05.Tag.png diff --git a/HomeScreen/resources/images/icons/Black/06.Tags.png b/HomeScreen/resources/images/icons/Black/06.Tags.png Binary files differnew file mode 100644 index 0000000..6d85dde --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/06.Tags.png diff --git a/HomeScreen/resources/images/icons/Black/07.Wallet.png b/HomeScreen/resources/images/icons/Black/07.Wallet.png Binary files differnew file mode 100644 index 0000000..7c3be7f --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/07.Wallet.png diff --git a/HomeScreen/resources/images/icons/Black/08.Credit-Card.png b/HomeScreen/resources/images/icons/Black/08.Credit-Card.png Binary files differnew file mode 100644 index 0000000..690fb65 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/08.Credit-Card.png diff --git a/HomeScreen/resources/images/icons/Black/09.Handbag.png b/HomeScreen/resources/images/icons/Black/09.Handbag.png Binary files differnew file mode 100644 index 0000000..d12348d --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/09.Handbag.png diff --git a/HomeScreen/resources/images/icons/Black/10.Folder.png b/HomeScreen/resources/images/icons/Black/10.Folder.png Binary files differnew file mode 100644 index 0000000..eeb9a05 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/10.Folder.png diff --git a/HomeScreen/resources/images/icons/Black/11.Notebook.png b/HomeScreen/resources/images/icons/Black/11.Notebook.png Binary files differnew file mode 100644 index 0000000..eb8bd67 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/11.Notebook.png diff --git a/HomeScreen/resources/images/icons/Black/12.File.png b/HomeScreen/resources/images/icons/Black/12.File.png Binary files differnew file mode 100644 index 0000000..6e2bd02 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/12.File.png diff --git a/HomeScreen/resources/images/icons/Black/13.Clipboard.png b/HomeScreen/resources/images/icons/Black/13.Clipboard.png Binary files differnew file mode 100644 index 0000000..d1c6816 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/13.Clipboard.png diff --git a/HomeScreen/resources/images/icons/Black/14.News.png b/HomeScreen/resources/images/icons/Black/14.News.png Binary files differnew file mode 100644 index 0000000..f5689c8 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/14.News.png diff --git a/HomeScreen/resources/images/icons/Black/15.Pencil.png b/HomeScreen/resources/images/icons/Black/15.Pencil.png Binary files differnew file mode 100644 index 0000000..d9cbca9 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/15.Pencil.png diff --git a/HomeScreen/resources/images/icons/Black/16.Pen.png b/HomeScreen/resources/images/icons/Black/16.Pen.png Binary files differnew file mode 100644 index 0000000..ce6e2e2 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/16.Pen.png diff --git a/HomeScreen/resources/images/icons/Black/17.Brush.png b/HomeScreen/resources/images/icons/Black/17.Brush.png Binary files differnew file mode 100644 index 0000000..ca9b131 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/17.Brush.png diff --git a/HomeScreen/resources/images/icons/Black/18.Pictures-Day.png b/HomeScreen/resources/images/icons/Black/18.Pictures-Day.png Binary files differnew file mode 100644 index 0000000..75cee68 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/18.Pictures-Day.png diff --git a/HomeScreen/resources/images/icons/Black/19.Pictures-Night.png b/HomeScreen/resources/images/icons/Black/19.Pictures-Night.png Binary files differnew file mode 100644 index 0000000..532e5b3 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/19.Pictures-Night.png diff --git a/HomeScreen/resources/images/icons/Black/20.Photos.png b/HomeScreen/resources/images/icons/Black/20.Photos.png Binary files differnew file mode 100644 index 0000000..c9f5fce --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/20.Photos.png diff --git a/HomeScreen/resources/images/icons/Black/21.Music.png b/HomeScreen/resources/images/icons/Black/21.Music.png Binary files differnew file mode 100644 index 0000000..4cab482 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/21.Music.png diff --git a/HomeScreen/resources/images/icons/Black/22.Music-Playlist.png b/HomeScreen/resources/images/icons/Black/22.Music-Playlist.png Binary files differnew file mode 100644 index 0000000..9b7a05d --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/22.Music-Playlist.png diff --git a/HomeScreen/resources/images/icons/Black/23.Videos.png b/HomeScreen/resources/images/icons/Black/23.Videos.png Binary files differnew file mode 100644 index 0000000..04b6575 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/23.Videos.png diff --git a/HomeScreen/resources/images/icons/Black/24.TV.png b/HomeScreen/resources/images/icons/Black/24.TV.png Binary files differnew file mode 100644 index 0000000..188bf42 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/24.TV.png diff --git a/HomeScreen/resources/images/icons/Black/25.Camera-Front.png b/HomeScreen/resources/images/icons/Black/25.Camera-Front.png Binary files differnew file mode 100644 index 0000000..0b32a56 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/25.Camera-Front.png diff --git a/HomeScreen/resources/images/icons/Black/26.Camera-Back.png b/HomeScreen/resources/images/icons/Black/26.Camera-Back.png Binary files differnew file mode 100644 index 0000000..b6e6935 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/26.Camera-Back.png diff --git a/HomeScreen/resources/images/icons/Black/27.Phone.png b/HomeScreen/resources/images/icons/Black/27.Phone.png Binary files differnew file mode 100644 index 0000000..afd67de --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/27.Phone.png diff --git a/HomeScreen/resources/images/icons/Black/28.Tablet.png b/HomeScreen/resources/images/icons/Black/28.Tablet.png Binary files differnew file mode 100644 index 0000000..6806fba --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/28.Tablet.png diff --git a/HomeScreen/resources/images/icons/Black/29.Mac.png b/HomeScreen/resources/images/icons/Black/29.Mac.png Binary files differnew file mode 100644 index 0000000..35125f1 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/29.Mac.png diff --git a/HomeScreen/resources/images/icons/Black/30.User.png b/HomeScreen/resources/images/icons/Black/30.User.png Binary files differnew file mode 100644 index 0000000..ca34e59 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/30.User.png diff --git a/HomeScreen/resources/images/icons/Black/31.ID-Horizontal.png b/HomeScreen/resources/images/icons/Black/31.ID-Horizontal.png Binary files differnew file mode 100644 index 0000000..ac20dc8 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/31.ID-Horizontal.png diff --git a/HomeScreen/resources/images/icons/Black/32.ID-Vertical.png b/HomeScreen/resources/images/icons/Black/32.ID-Vertical.png Binary files differnew file mode 100644 index 0000000..88c9787 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/32.ID-Vertical.png diff --git a/HomeScreen/resources/images/icons/Black/33.Thumbs-Up.png b/HomeScreen/resources/images/icons/Black/33.Thumbs-Up.png Binary files differnew file mode 100644 index 0000000..06e5c0d --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/33.Thumbs-Up.png diff --git a/HomeScreen/resources/images/icons/Black/34.Thumbs-Down.png b/HomeScreen/resources/images/icons/Black/34.Thumbs-Down.png Binary files differnew file mode 100644 index 0000000..c37a621 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/34.Thumbs-Down.png diff --git a/HomeScreen/resources/images/icons/Black/35.Alarm-Clock.png b/HomeScreen/resources/images/icons/Black/35.Alarm-Clock.png Binary files differnew file mode 100644 index 0000000..12de647 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/35.Alarm-Clock.png diff --git a/HomeScreen/resources/images/icons/Black/36.Watch.png b/HomeScreen/resources/images/icons/Black/36.Watch.png Binary files differnew file mode 100644 index 0000000..dec17c4 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/36.Watch.png diff --git a/HomeScreen/resources/images/icons/Black/37.Stopwatch.png b/HomeScreen/resources/images/icons/Black/37.Stopwatch.png Binary files differnew file mode 100644 index 0000000..0671df9 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/37.Stopwatch.png diff --git a/HomeScreen/resources/images/icons/Black/38.Location-Pin.png b/HomeScreen/resources/images/icons/Black/38.Location-Pin.png Binary files differnew file mode 100644 index 0000000..d8ea41f --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/38.Location-Pin.png diff --git a/HomeScreen/resources/images/icons/Black/39.Heart.png b/HomeScreen/resources/images/icons/Black/39.Heart.png Binary files differnew file mode 100644 index 0000000..f25ac7e --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/39.Heart.png diff --git a/HomeScreen/resources/images/icons/Black/40.Cloud.png b/HomeScreen/resources/images/icons/Black/40.Cloud.png Binary files differnew file mode 100644 index 0000000..5772739 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/40.Cloud.png diff --git a/HomeScreen/resources/images/icons/Black/41.Trophy.png b/HomeScreen/resources/images/icons/Black/41.Trophy.png Binary files differnew file mode 100644 index 0000000..c78fb34 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/41.Trophy.png diff --git a/HomeScreen/resources/images/icons/Black/42.Badge.png b/HomeScreen/resources/images/icons/Black/42.Badge.png Binary files differnew file mode 100644 index 0000000..dfbc6ed --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/42.Badge.png diff --git a/HomeScreen/resources/images/icons/Black/43.Bell.png b/HomeScreen/resources/images/icons/Black/43.Bell.png Binary files differnew file mode 100644 index 0000000..1ddcb40 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/43.Bell.png diff --git a/HomeScreen/resources/images/icons/Black/44.Share.png b/HomeScreen/resources/images/icons/Black/44.Share.png Binary files differnew file mode 100644 index 0000000..08b710f --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/44.Share.png diff --git a/HomeScreen/resources/images/icons/Black/45.Settings.png b/HomeScreen/resources/images/icons/Black/45.Settings.png Binary files differnew file mode 100644 index 0000000..2487c4f --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/45.Settings.png diff --git a/HomeScreen/resources/images/icons/Black/46.Calender.png b/HomeScreen/resources/images/icons/Black/46.Calender.png Binary files differnew file mode 100644 index 0000000..255cd76 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/46.Calender.png diff --git a/HomeScreen/resources/images/icons/Black/47.Explore.png b/HomeScreen/resources/images/icons/Black/47.Explore.png Binary files differnew file mode 100644 index 0000000..202f710 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/47.Explore.png diff --git a/HomeScreen/resources/images/icons/Black/48.Dashboard.png b/HomeScreen/resources/images/icons/Black/48.Dashboard.png Binary files differnew file mode 100644 index 0000000..3deb0a0 --- /dev/null +++ b/HomeScreen/resources/images/icons/Black/48.Dashboard.png diff --git a/HomeScreen/resources/images/icons/White/01.Home.png b/HomeScreen/resources/images/icons/White/01.Home.png Binary files differnew file mode 100644 index 0000000..0aca105 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/01.Home.png diff --git a/HomeScreen/resources/images/icons/White/02.Shop.png b/HomeScreen/resources/images/icons/White/02.Shop.png Binary files differnew file mode 100644 index 0000000..21a33e3 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/02.Shop.png diff --git a/HomeScreen/resources/images/icons/White/03.Office.png b/HomeScreen/resources/images/icons/White/03.Office.png Binary files differnew file mode 100644 index 0000000..105b516 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/03.Office.png diff --git a/HomeScreen/resources/images/icons/White/04.Bank.png b/HomeScreen/resources/images/icons/White/04.Bank.png Binary files differnew file mode 100644 index 0000000..22d1bce --- /dev/null +++ b/HomeScreen/resources/images/icons/White/04.Bank.png diff --git a/HomeScreen/resources/images/icons/White/05.Tag.png b/HomeScreen/resources/images/icons/White/05.Tag.png Binary files differnew file mode 100644 index 0000000..a5d7e10 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/05.Tag.png diff --git a/HomeScreen/resources/images/icons/White/06.Tags.png b/HomeScreen/resources/images/icons/White/06.Tags.png Binary files differnew file mode 100644 index 0000000..d2dc4ff --- /dev/null +++ b/HomeScreen/resources/images/icons/White/06.Tags.png diff --git a/HomeScreen/resources/images/icons/White/07.Wallet.png b/HomeScreen/resources/images/icons/White/07.Wallet.png Binary files differnew file mode 100644 index 0000000..b713ae0 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/07.Wallet.png diff --git a/HomeScreen/resources/images/icons/White/08.Credit-Card.png b/HomeScreen/resources/images/icons/White/08.Credit-Card.png Binary files differnew file mode 100644 index 0000000..bb1499f --- /dev/null +++ b/HomeScreen/resources/images/icons/White/08.Credit-Card.png diff --git a/HomeScreen/resources/images/icons/White/09.Handbag.png b/HomeScreen/resources/images/icons/White/09.Handbag.png Binary files differnew file mode 100644 index 0000000..4ff1b39 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/09.Handbag.png diff --git a/HomeScreen/resources/images/icons/White/10.Folder.png b/HomeScreen/resources/images/icons/White/10.Folder.png Binary files differnew file mode 100644 index 0000000..aa238d5 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/10.Folder.png diff --git a/HomeScreen/resources/images/icons/White/11.Notebook.png b/HomeScreen/resources/images/icons/White/11.Notebook.png Binary files differnew file mode 100644 index 0000000..f306b7f --- /dev/null +++ b/HomeScreen/resources/images/icons/White/11.Notebook.png diff --git a/HomeScreen/resources/images/icons/White/12.File.png b/HomeScreen/resources/images/icons/White/12.File.png Binary files differnew file mode 100644 index 0000000..711af78 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/12.File.png diff --git a/HomeScreen/resources/images/icons/White/13.Clipboard.png b/HomeScreen/resources/images/icons/White/13.Clipboard.png Binary files differnew file mode 100644 index 0000000..83c6af5 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/13.Clipboard.png diff --git a/HomeScreen/resources/images/icons/White/14.News.png b/HomeScreen/resources/images/icons/White/14.News.png Binary files differnew file mode 100644 index 0000000..0e884c2 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/14.News.png diff --git a/HomeScreen/resources/images/icons/White/15.Pencil.png b/HomeScreen/resources/images/icons/White/15.Pencil.png Binary files differnew file mode 100644 index 0000000..b260f5b --- /dev/null +++ b/HomeScreen/resources/images/icons/White/15.Pencil.png diff --git a/HomeScreen/resources/images/icons/White/16.Pen.png b/HomeScreen/resources/images/icons/White/16.Pen.png Binary files differnew file mode 100644 index 0000000..0447477 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/16.Pen.png diff --git a/HomeScreen/resources/images/icons/White/17.Brush.png b/HomeScreen/resources/images/icons/White/17.Brush.png Binary files differnew file mode 100644 index 0000000..222c1c2 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/17.Brush.png diff --git a/HomeScreen/resources/images/icons/White/18.Pictures-Day.png b/HomeScreen/resources/images/icons/White/18.Pictures-Day.png Binary files differnew file mode 100644 index 0000000..fabf402 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/18.Pictures-Day.png diff --git a/HomeScreen/resources/images/icons/White/19.Pictures-Night.png b/HomeScreen/resources/images/icons/White/19.Pictures-Night.png Binary files differnew file mode 100644 index 0000000..32850a8 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/19.Pictures-Night.png diff --git a/HomeScreen/resources/images/icons/White/20.Photos.png b/HomeScreen/resources/images/icons/White/20.Photos.png Binary files differnew file mode 100644 index 0000000..7799b55 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/20.Photos.png diff --git a/HomeScreen/resources/images/icons/White/21.Music.png b/HomeScreen/resources/images/icons/White/21.Music.png Binary files differnew file mode 100644 index 0000000..7ddeead --- /dev/null +++ b/HomeScreen/resources/images/icons/White/21.Music.png diff --git a/HomeScreen/resources/images/icons/White/22.Music-Playlist.png b/HomeScreen/resources/images/icons/White/22.Music-Playlist.png Binary files differnew file mode 100644 index 0000000..3bde110 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/22.Music-Playlist.png diff --git a/HomeScreen/resources/images/icons/White/23.Videos.png b/HomeScreen/resources/images/icons/White/23.Videos.png Binary files differnew file mode 100644 index 0000000..e508572 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/23.Videos.png diff --git a/HomeScreen/resources/images/icons/White/24.TV.png b/HomeScreen/resources/images/icons/White/24.TV.png Binary files differnew file mode 100644 index 0000000..6677e66 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/24.TV.png diff --git a/HomeScreen/resources/images/icons/White/25.Camera-Front.png b/HomeScreen/resources/images/icons/White/25.Camera-Front.png Binary files differnew file mode 100644 index 0000000..4df0878 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/25.Camera-Front.png diff --git a/HomeScreen/resources/images/icons/White/26.Camera-Back.png b/HomeScreen/resources/images/icons/White/26.Camera-Back.png Binary files differnew file mode 100644 index 0000000..dbf46d7 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/26.Camera-Back.png diff --git a/HomeScreen/resources/images/icons/White/27.Phone.png b/HomeScreen/resources/images/icons/White/27.Phone.png Binary files differnew file mode 100644 index 0000000..8590412 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/27.Phone.png diff --git a/HomeScreen/resources/images/icons/White/28.Tablet.png b/HomeScreen/resources/images/icons/White/28.Tablet.png Binary files differnew file mode 100644 index 0000000..f29fb36 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/28.Tablet.png diff --git a/HomeScreen/resources/images/icons/White/29.Mac.png b/HomeScreen/resources/images/icons/White/29.Mac.png Binary files differnew file mode 100644 index 0000000..1916a6e --- /dev/null +++ b/HomeScreen/resources/images/icons/White/29.Mac.png diff --git a/HomeScreen/resources/images/icons/White/30.User.png b/HomeScreen/resources/images/icons/White/30.User.png Binary files differnew file mode 100644 index 0000000..9e4a17f --- /dev/null +++ b/HomeScreen/resources/images/icons/White/30.User.png diff --git a/HomeScreen/resources/images/icons/White/31.ID-Horizontal.png b/HomeScreen/resources/images/icons/White/31.ID-Horizontal.png Binary files differnew file mode 100644 index 0000000..36b5593 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/31.ID-Horizontal.png diff --git a/HomeScreen/resources/images/icons/White/32.ID-Vertical.png b/HomeScreen/resources/images/icons/White/32.ID-Vertical.png Binary files differnew file mode 100644 index 0000000..7a9dcea --- /dev/null +++ b/HomeScreen/resources/images/icons/White/32.ID-Vertical.png diff --git a/HomeScreen/resources/images/icons/White/33.Thumbs-Up.png b/HomeScreen/resources/images/icons/White/33.Thumbs-Up.png Binary files differnew file mode 100644 index 0000000..8e7a559 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/33.Thumbs-Up.png diff --git a/HomeScreen/resources/images/icons/White/34.Thumbs-Down.png b/HomeScreen/resources/images/icons/White/34.Thumbs-Down.png Binary files differnew file mode 100644 index 0000000..a41d54a --- /dev/null +++ b/HomeScreen/resources/images/icons/White/34.Thumbs-Down.png diff --git a/HomeScreen/resources/images/icons/White/35.Alarm-Clock.png b/HomeScreen/resources/images/icons/White/35.Alarm-Clock.png Binary files differnew file mode 100644 index 0000000..1459802 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/35.Alarm-Clock.png diff --git a/HomeScreen/resources/images/icons/White/36.Watch.png b/HomeScreen/resources/images/icons/White/36.Watch.png Binary files differnew file mode 100644 index 0000000..bf8bcfa --- /dev/null +++ b/HomeScreen/resources/images/icons/White/36.Watch.png diff --git a/HomeScreen/resources/images/icons/White/37.Stopwatch.png b/HomeScreen/resources/images/icons/White/37.Stopwatch.png Binary files differnew file mode 100644 index 0000000..b94c702 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/37.Stopwatch.png diff --git a/HomeScreen/resources/images/icons/White/38.Location-Pin.png b/HomeScreen/resources/images/icons/White/38.Location-Pin.png Binary files differnew file mode 100644 index 0000000..b9817a3 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/38.Location-Pin.png diff --git a/HomeScreen/resources/images/icons/White/39.Heart.png b/HomeScreen/resources/images/icons/White/39.Heart.png Binary files differnew file mode 100644 index 0000000..512a9d5 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/39.Heart.png diff --git a/HomeScreen/resources/images/icons/White/40.Cloud.png b/HomeScreen/resources/images/icons/White/40.Cloud.png Binary files differnew file mode 100644 index 0000000..bcfecf0 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/40.Cloud.png diff --git a/HomeScreen/resources/images/icons/White/41.Trophy.png b/HomeScreen/resources/images/icons/White/41.Trophy.png Binary files differnew file mode 100644 index 0000000..2f3fb3a --- /dev/null +++ b/HomeScreen/resources/images/icons/White/41.Trophy.png diff --git a/HomeScreen/resources/images/icons/White/42.Badge.png b/HomeScreen/resources/images/icons/White/42.Badge.png Binary files differnew file mode 100644 index 0000000..2140235 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/42.Badge.png diff --git a/HomeScreen/resources/images/icons/White/43.Bell.png b/HomeScreen/resources/images/icons/White/43.Bell.png Binary files differnew file mode 100644 index 0000000..cad88a2 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/43.Bell.png diff --git a/HomeScreen/resources/images/icons/White/44.Share.png b/HomeScreen/resources/images/icons/White/44.Share.png Binary files differnew file mode 100644 index 0000000..4b7bd14 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/44.Share.png diff --git a/HomeScreen/resources/images/icons/White/45.Settings.png b/HomeScreen/resources/images/icons/White/45.Settings.png Binary files differnew file mode 100644 index 0000000..7a2b809 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/45.Settings.png diff --git a/HomeScreen/resources/images/icons/White/46.Calender.png b/HomeScreen/resources/images/icons/White/46.Calender.png Binary files differnew file mode 100644 index 0000000..737bf0d --- /dev/null +++ b/HomeScreen/resources/images/icons/White/46.Calender.png diff --git a/HomeScreen/resources/images/icons/White/47.Explore.png b/HomeScreen/resources/images/icons/White/47.Explore.png Binary files differnew file mode 100644 index 0000000..83ac058 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/47.Explore.png diff --git a/HomeScreen/resources/images/icons/White/48.Dashboard.png b/HomeScreen/resources/images/icons/White/48.Dashboard.png Binary files differnew file mode 100644 index 0000000..3f9cef5 --- /dev/null +++ b/HomeScreen/resources/images/icons/White/48.Dashboard.png diff --git a/HomeScreen/resources/images/transparency.png b/HomeScreen/resources/images/transparency.png Binary files differnew file mode 100644 index 0000000..989d3c5 --- /dev/null +++ b/HomeScreen/resources/images/transparency.png diff --git a/HomeScreen/resources/mainwindow.ui b/HomeScreen/resources/mainwindow.ui new file mode 100644 index 0000000..7e9b4fa --- /dev/null +++ b/HomeScreen/resources/mainwindow.ui @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>MainWindow</class> + <widget class="QMainWindow" name="MainWindow"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>1080</width> + <height>1920</height> + </rect> + </property> + <property name="focusPolicy"> + <enum>Qt::NoFocus</enum> + </property> + <property name="windowTitle"> + <string/> + </property> + <property name="styleSheet"> + <string notr="true"/> + </property> + <widget class="QWidget" name="centralWidget"> + <widget class="QWidget" name="widget_Background" native="true"> + <property name="geometry"> + <rect> + <x>0</x> + <y>60</y> + <width>1080</width> + <height>1800</height> + </rect> + </property> + <property name="focusPolicy"> + <enum>Qt::NoFocus</enum> + </property> + <property name="styleSheet"> + <string notr="true">background-image: url(:/images/backgrounds/bg_blue_day.png) +</string> + </property> + <widget class="QWidget" name="widget_Home_Icon" native="true"> + <property name="geometry"> + <rect> + <x>-40</x> + <y>1640</y> + <width>200</width> + <height>200</height> + </rect> + </property> + <property name="styleSheet"> + <string notr="true">border-image: url(:/icons/home_day.png) 0 0 0 0 stretch stretch; +</string> + </property> + </widget> + </widget> + </widget> + </widget> + <layoutdefault spacing="6" margin="11"/> + <resources/> + <connections/> +</ui> diff --git a/HomeScreen/resources/popupwidget.ui b/HomeScreen/resources/popupwidget.ui new file mode 100644 index 0000000..5bda98b --- /dev/null +++ b/HomeScreen/resources/popupwidget.ui @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>PopupWidget</class> + <widget class="QWidget" name="PopupWidget"> + <property name="windowModality"> + <enum>Qt::WindowModal</enum> + </property> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>1080</width> + <height>1920</height> + </rect> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <widget class="QWidget" name="widget_Popup" native="true"> + <property name="geometry"> + <rect> + <x>350</x> + <y>430</y> + <width>400</width> + <height>200</height> + </rect> + </property> + <property name="styleSheet"> + <string notr="true">QWidget { +border: 1px solid #D3D3D3; +border-radius: 8px; +background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(242, 242, 249, 255), stop:1 rgba(255, 255, 255, 255)); +color: #333; +padding: 0px; +} +QWidget:on { +background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #D5D5D5, stop: 1 #EEEEEE); +} +</string> + </property> + <widget class="QPushButton" name="pushButton_OK"> + <property name="geometry"> + <rect> + <x>150</x> + <y>130</y> + <width>100</width> + <height>50</height> + </rect> + </property> + <property name="maximumSize"> + <size> + <width>16777211</width> + <height>16777215</height> + </size> + </property> + <property name="focusPolicy"> + <enum>Qt::NoFocus</enum> + </property> + <property name="text"> + <string>OK</string> + </property> + </widget> + <widget class="QLabel" name="label_Text"> + <property name="geometry"> + <rect> + <x>10</x> + <y>10</y> + <width>380</width> + <height>100</height> + </rect> + </property> + <property name="styleSheet"> + <string notr="true">background-color: rgba(109, 109, 109, 0); +background-image: url(:/images/transparency.png); +border-image: url(:/images/transparency.png);</string> + </property> + <property name="text"> + <string/> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + <property name="wordWrap"> + <bool>true</bool> + </property> + </widget> + </widget> + </widget> + <resources/> + <connections/> +</ui> diff --git a/HomeScreen/resources/settingswidget.ui b/HomeScreen/resources/settingswidget.ui new file mode 100644 index 0000000..2ec5076 --- /dev/null +++ b/HomeScreen/resources/settingswidget.ui @@ -0,0 +1,102 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>SettingsWidget</class> + <widget class="QWidget" name="SettingsWidget"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>1080</width> + <height>1800</height> + </rect> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <widget class="QWidget" name="widget_Background" native="true"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>1080</width> + <height>1800</height> + </rect> + </property> + <property name="styleSheet"> + <string notr="true">background-image: url(:/images/backgrounds/bg_blue_day.png); +</string> + </property> + <widget class="QComboBox" name="comboBoxLanguage"> + <property name="geometry"> + <rect> + <x>660</x> + <y>20</y> + <width>400</width> + <height>60</height> + </rect> + </property> + <property name="font"> + <font> + <pointsize>22</pointsize> + </font> + </property> + <property name="focusPolicy"> + <enum>Qt::NoFocus</enum> + </property> + <property name="styleSheet"> + <string notr="true">QComboBox { +border: 1px solid #D3D3D3; +border-radius: 8px; +background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(242, 242, 249, 255), stop:1 rgba(255, 255, 255, 255)); +color: #333; +padding: 0px; +} +QComboBox:on { +background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #D5D5D5, stop: 1 #EEEEEE); +} +QComboBox::drop-down { +border: 0px solid; +border-radius: 0px; +} +QComboBox::down-arrow:on { +} +</string> + </property> + </widget> + <widget class="QWidget" name="widget_Settings_Icon" native="true"> + <property name="geometry"> + <rect> + <x>-40</x> + <y>1640</y> + <width>200</width> + <height>200</height> + </rect> + </property> + <property name="styleSheet"> + <string notr="true">border-image: url(:/icons/settings_day.png) 0 0 0 0 stretch stretch; +</string> + </property> + </widget> + </widget> + <widget class="QLabel" name="labelLanguage"> + <property name="geometry"> + <rect> + <x>20</x> + <y>20</y> + <width>300</width> + <height>60</height> + </rect> + </property> + <property name="font"> + <font> + <pointsize>22</pointsize> + </font> + </property> + <property name="text"> + <string>Language</string> + </property> + </widget> + </widget> + <resources/> + <connections/> +</ui> diff --git a/HomeScreen/resources/statusbarwidget.ui b/HomeScreen/resources/statusbarwidget.ui new file mode 100644 index 0000000..d0747ab --- /dev/null +++ b/HomeScreen/resources/statusbarwidget.ui @@ -0,0 +1,152 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>StatusBarWidget</class> + <widget class="QWidget" name="StatusBarWidget"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>1080</width> + <height>60</height> + </rect> + </property> + <property name="windowTitle"> + <string/> + </property> + <widget class="QWidget" name="widget" native="true"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>1080</width> + <height>60</height> + </rect> + </property> + <property name="styleSheet"> + <string notr="true">background-image: url(:/images/backgrounds/bg_stripes_day.png);</string> + </property> + <widget class="QLabel" name="label_1"> + <property name="geometry"> + <rect> + <x>20</x> + <y>10</y> + <width>200</width> + <height>40</height> + </rect> + </property> + <property name="font"> + <font> + <pointsize>12</pointsize> + <weight>75</weight> + <bold>true</bold> + </font> + </property> + <property name="styleSheet"> + <string notr="true">color: rgb(238, 238, 238); +background-image: url(:/images/transparency.png);</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + <widget class="QLabel" name="label_2"> + <property name="geometry"> + <rect> + <x>230</x> + <y>10</y> + <width>200</width> + <height>40</height> + </rect> + </property> + <property name="font"> + <font> + <pointsize>12</pointsize> + <weight>75</weight> + <bold>true</bold> + </font> + </property> + <property name="styleSheet"> + <string notr="true">color: rgb(238, 238, 238); +background-image: url(:/images/transparency.png);</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + <widget class="QLabel" name="label_3"> + <property name="geometry"> + <rect> + <x>440</x> + <y>10</y> + <width>200</width> + <height>40</height> + </rect> + </property> + <property name="font"> + <font> + <pointsize>12</pointsize> + <weight>75</weight> + <bold>true</bold> + </font> + </property> + <property name="styleSheet"> + <string notr="true">color: rgb(238, 238, 238); +background-image: url(:/images/transparency.png);</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + <widget class="QLabel" name="label_4"> + <property name="geometry"> + <rect> + <x>650</x> + <y>10</y> + <width>200</width> + <height>40</height> + </rect> + </property> + <property name="font"> + <font> + <pointsize>12</pointsize> + <weight>75</weight> + <bold>true</bold> + </font> + </property> + <property name="styleSheet"> + <string notr="true">color: rgb(238, 238, 238); +background-image: url(:/images/transparency.png);</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + <widget class="QLabel" name="label_5"> + <property name="geometry"> + <rect> + <x>860</x> + <y>10</y> + <width>200</width> + <height>40</height> + </rect> + </property> + <property name="font"> + <font> + <pointsize>12</pointsize> + <weight>75</weight> + <bold>true</bold> + </font> + </property> + <property name="styleSheet"> + <string notr="true">color: rgb(238, 238, 238); +background-image: url(:/images/transparency.png);</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </widget> + </widget> + <resources/> + <connections/> +</ui> diff --git a/HomeScreen/resources/translations/homescreen_de_DE.qm b/HomeScreen/resources/translations/homescreen_de_DE.qm Binary files differnew file mode 100644 index 0000000..bf2aa8c --- /dev/null +++ b/HomeScreen/resources/translations/homescreen_de_DE.qm diff --git a/HomeScreen/resources/translations/homescreen_de_DE.ts b/HomeScreen/resources/translations/homescreen_de_DE.ts new file mode 100644 index 0000000..d512aaf --- /dev/null +++ b/HomeScreen/resources/translations/homescreen_de_DE.ts @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="de_DE"> +<context> + <name>ControlBarWidget</name> + <message> + <location filename="../controlbarwidget.ui" line="14"/> + <source>Form</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MainWindow</name> + <message> + <source>Exit</source> + <translation type="vanished">Beenden</translation> + </message> +</context> +<context> + <name>PopupWidget</name> + <message> + <location filename="../popupwidget.ui" line="17"/> + <source>Form</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../popupwidget.ui" line="60"/> + <source>OK</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>SettingsWidget</name> + <message> + <location filename="../settingswidget.ui" line="14"/> + <source>Form</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../settingswidget.ui" line="96"/> + <source>Language</source> + <translation type="unfinished">Sprache</translation> + </message> +</context> +<context> + <name>SystemSettingsSimulator</name> + <message> + <source>Exit</source> + <translation type="obsolete">Beenden</translation> + </message> +</context> +</TS> diff --git a/HomeScreen/resources/translations/homescreen_en_US.qm b/HomeScreen/resources/translations/homescreen_en_US.qm Binary files differnew file mode 100644 index 0000000..ce75d11 --- /dev/null +++ b/HomeScreen/resources/translations/homescreen_en_US.qm diff --git a/HomeScreen/resources/translations/homescreen_en_US.ts b/HomeScreen/resources/translations/homescreen_en_US.ts new file mode 100644 index 0000000..07199a4 --- /dev/null +++ b/HomeScreen/resources/translations/homescreen_en_US.ts @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="en_US"> +<context> + <name>ControlBarWidget</name> + <message> + <location filename="../controlbarwidget.ui" line="14"/> + <source>Form</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>MainWindow</name> + <message> + <source>Exit</source> + <translation type="vanished">Exit</translation> + </message> +</context> +<context> + <name>PopupWidget</name> + <message> + <location filename="../popupwidget.ui" line="17"/> + <source>Form</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../popupwidget.ui" line="60"/> + <source>OK</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>SettingsWidget</name> + <message> + <location filename="../settingswidget.ui" line="14"/> + <source>Form</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../settingswidget.ui" line="96"/> + <source>Language</source> + <translation>Language</translation> + </message> +</context> +<context> + <name>SystemSettingsSimulator</name> + <message> + <source>Exit</source> + <translation type="obsolete">Exit</translation> + </message> +</context> +</TS> diff --git a/HomeScreen/resources/translations/homescreen_ja_JP.qm b/HomeScreen/resources/translations/homescreen_ja_JP.qm Binary files differnew file mode 100644 index 0000000..8e662d8 --- /dev/null +++ b/HomeScreen/resources/translations/homescreen_ja_JP.qm diff --git a/HomeScreen/resources/translations/homescreen_ja_JP.ts b/HomeScreen/resources/translations/homescreen_ja_JP.ts new file mode 100644 index 0000000..cb943e4 --- /dev/null +++ b/HomeScreen/resources/translations/homescreen_ja_JP.ts @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE TS> +<TS version="2.1" language="ja_JP"> +<context> + <name>ControlBarWidget</name> + <message> + <location filename="../controlbarwidget.ui" line="14"/> + <source>Form</source> + <translation type="unfinished"></translation> + </message> +</context> +<context> + <name>InputDeviceSimulator</name> + <message> + <source>Input Device Simulator</source> + <translation type="obsolete">入力デバイスシミュレータ</translation> + </message> + <message> + <source>Up</source> + <translation type="obsolete">アップ</translation> + </message> + <message> + <source>Left</source> + <translation type="obsolete">左</translation> + </message> + <message> + <source>Right</source> + <translation type="obsolete">右</translation> + </message> + <message> + <source>Down</source> + <translation type="obsolete">ダウン</translation> + </message> + <message> + <source>OK</source> + <translation type="obsolete">OK</translation> + </message> +</context> +<context> + <name>PopupWidget</name> + <message> + <location filename="../popupwidget.ui" line="17"/> + <source>Form</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../popupwidget.ui" line="60"/> + <source>OK</source> + <translation type="unfinished">OK</translation> + </message> +</context> +<context> + <name>SettingsWidget</name> + <message> + <location filename="../settingswidget.ui" line="14"/> + <source>Form</source> + <translation type="unfinished"></translation> + </message> + <message> + <location filename="../settingswidget.ui" line="96"/> + <source>Language</source> + <translation>言語</translation> + </message> +</context> +<context> + <name>SystemSettingsSimulator</name> + <message> + <source>System Settings</source> + <translation type="obsolete">システム設定</translation> + </message> + <message> + <source>Exit</source> + <translation type="obsolete">出口</translation> + </message> + <message> + <source>Day/Night Mode</source> + <translation type="obsolete">昼/夜モード</translation> + </message> + <message> + <source>Night Mode</source> + <translation type="obsolete">ナイトモード</translation> + </message> + <message> + <source>Day Mode</source> + <translation type="obsolete">デイモード</translation> + </message> +</context> +</TS> diff --git a/HomeScreen/src/controlbarwidget.cpp b/HomeScreen/src/controlbarwidget.cpp new file mode 100644 index 0000000..e01fe26 --- /dev/null +++ b/HomeScreen/src/controlbarwidget.cpp @@ -0,0 +1,92 @@ +/* + * Copyright (C) 2016 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. + */ + +#include "controlbarwidget.h" +#include "ui_controlbarwidget.h" + +ControlBarWidget::ControlBarWidget(QWidget *parent) : + QWidget(parent), + mp_ui(new Ui::ControlBarWidget), + mp_settingsWidget(0), + m_dayNightMode(SystemDayNight::DAYNIGHTMODE_DAY), // TODO: read from system + mp_dayNightModeProxy(0) +{ + // this has to be adopted to the system setup + mp_dayNightModeProxy = new org::agl::daynightmode("org.agl.homescreen.simulator", //"org.agl.systeminfoprovider" + "/", + QDBusConnection::sessionBus(), + 0); + QObject::connect(mp_dayNightModeProxy, SIGNAL(dayNightMode(int)), this, SLOT(dayNightModeSlot(int))); + + mp_ui->setupUi(this); +} + +ControlBarWidget::~ControlBarWidget() +{ + delete mp_dayNightModeProxy; + if (0 != mp_settingsWidget) + { + delete mp_settingsWidget; + } + delete mp_ui; +} + +void ControlBarWidget::dayNightModeSlot(int mode) +{ + QIcon icon; + switch (mode) + { + case SystemDayNight::DAYNIGHTMODE_DAY: + m_dayNightMode = SystemDayNight::DAYNIGHTMODE_DAY; + mp_ui->widget_Background->setStyleSheet(QString("background-image: url(:/images/backgrounds/bg_green_day.png)")); + + icon.addFile(QStringLiteral(":/icons/home_day.png"), QSize(), QIcon::Normal, QIcon::Off); + mp_ui->pushButton_Home->setIcon(icon); + icon.addFile(QStringLiteral(":/icons/settings_day.png"), QSize(), QIcon::Normal, QIcon::Off); + mp_ui->pushButton_Settings->setIcon(icon); + break; + case SystemDayNight::DAYNIGHTMODE_NIGHT: + m_dayNightMode = SystemDayNight::DAYNIGHTMODE_NIGHT; + mp_ui->widget_Background->setStyleSheet(QString("background-image: url(:/images/backgrounds/bg_green_night.png)")); + + icon.addFile(QStringLiteral(":/icons/home_night.png"), QSize(), QIcon::Normal, QIcon::Off); + mp_ui->pushButton_Home->setIcon(icon); + icon.addFile(QStringLiteral(":/icons/settings_night.png"), QSize(), QIcon::Normal, QIcon::Off); + mp_ui->pushButton_Settings->setIcon(icon); + break; + default: + m_dayNightMode = SystemDayNight::DAYNIGHTMODE_UNDEFINED; + } +} + +void ControlBarWidget::on_pushButton_Settings_clicked() +{ + if (0 == mp_settingsWidget) + { + mp_settingsWidget = new SettingsWidget((QWidget*)parent()); + } + + mp_settingsWidget->move(0, 60); + mp_settingsWidget->show(); +} + +void ControlBarWidget::on_pushButton_Home_clicked() +{ + if (0 != mp_settingsWidget) + { + mp_settingsWidget->hide(); + } +} diff --git a/HomeScreen/src/controlbarwidget.h b/HomeScreen/src/controlbarwidget.h new file mode 100644 index 0000000..618fa35 --- /dev/null +++ b/HomeScreen/src/controlbarwidget.h @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2016 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. + */ + +#ifndef CONTROLBARWIDGET_H +#define CONTROLBARWIDGET_H + +#include <QWidget> +#include "../interfaces/daynightmode.h" +#include "daynightmode_proxy.h" +#include "settingswidget.h" + +namespace Ui { +class ControlBarWidget; +} + +class ControlBarWidget : public QWidget +{ + Q_OBJECT + +public: + explicit ControlBarWidget(QWidget *parent = 0); + ~ControlBarWidget(); + +// day/night mode +public Q_SLOTS: + void dayNightModeSlot(int mode); + +private slots: + void on_pushButton_Settings_clicked(); + + void on_pushButton_Home_clicked(); + +private: + Ui::ControlBarWidget *mp_ui; + SettingsWidget *mp_settingsWidget; + org::agl::daynightmode *mp_dBusDayNightMode_SettingsWidget; + + // D-Bus day/night + SystemDayNight::eDayNightMode m_dayNightMode; + org::agl::daynightmode *mp_dayNightModeProxy; +}; + +#endif // CONTROLBARWIDGET_H diff --git a/HomeScreen/src/main.cpp b/HomeScreen/src/main.cpp new file mode 100644 index 0000000..9108c35 --- /dev/null +++ b/HomeScreen/src/main.cpp @@ -0,0 +1,54 @@ +/* + * Copyright (C) 2016 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. + */ + +#include "mainwindow.h" +#include <QApplication> +#include <QSysInfo> +#include <QSharedMemory> + +int main(int argc, char *argv[]) +{ + // allow only one instance of this application + /*QSharedMemory appInstance; + appInstance.setKey("HomeScreen"); + if (!appInstance.create(1)) + { + qDebug("Only one instance of the Home Screen App allowed!"); + exit(-1); + }*/ + + QApplication a(argc, argv); + + // used for application settings (QSettings) + QCoreApplication::setOrganizationDomain("LinuxFoundation"); + QCoreApplication::setOrganizationName("AutomotiveGradeLinux"); + QCoreApplication::setApplicationName("HomeScreen"); + QCoreApplication::setApplicationVersion("0.1.0"); + + MainWindow w; + w.move(0, 0); + w.show(); + + +#ifdef __arm__ + qDebug("Running on ARM architecture"); +#endif +#ifdef __i386__ + qDebug("Running on x86 architecture"); +#endif + + return a.exec(); +} diff --git a/HomeScreen/src/mainwindow.cpp b/HomeScreen/src/mainwindow.cpp new file mode 100644 index 0000000..e2b55a9 --- /dev/null +++ b/HomeScreen/src/mainwindow.cpp @@ -0,0 +1,104 @@ +/* + * Copyright (C) 2016 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. + */ + +#include "mainwindow.h" +#include "ui_mainwindow.h" + +MainWindow::MainWindow(QWidget *parent) : + QMainWindow(parent), + mp_ui(new Ui::MainWindow), + mp_statusBarWidget(0), + mp_controlBarWidget(0), + m_dayNightMode(SystemDayNight::DAYNIGHTMODE_DAY), // TODO: read from system + mp_dayNightModeProxy(0), + mp_popupWidget(0) +{ + // this has to be adopted to the system setup + mp_dayNightModeProxy = new org::agl::daynightmode("org.agl.homescreen.simulator", //"org.agl.systeminfoprovider" + "/", + QDBusConnection::sessionBus(), + 0); + QObject::connect(mp_dayNightModeProxy, SIGNAL(dayNightMode(int)), this, SLOT(dayNightModeSlot(int))); + + // dbus setup + QDBusConnection dbus = QDBusConnection::sessionBus(); + + dbus.registerObject("/MainWindow", this); + dbus.registerService("org.agl.homescreen"); + + // no window decoration + setWindowFlags(Qt::FramelessWindowHint); + mp_ui->setupUi(this); + + mp_statusBarWidget = new StatusBarWidget(this); + mp_statusBarWidget->raise(); + // apply layout + mp_statusBarWidget->move(0, 0); + + mp_controlBarWidget = new ControlBarWidget(this); + mp_controlBarWidget->raise(); + // apply layout + mp_controlBarWidget->move(0, 1920-60); + + mp_popupWidget = new PopupWidget(this); + mp_controlBarWidget->raise(); + // apply layout + mp_popupWidget->move(0, 0); + + setWindowIcon(QIcon(":/icons/home_day.png")); +} + +MainWindow::~MainWindow() +{ + delete mp_popupWidget; + delete mp_dayNightModeProxy; + delete mp_statusBarWidget; + delete mp_ui; +} + +void MainWindow::dayNightModeSlot(int mode) +{ + switch (mode) + { + case SystemDayNight::DAYNIGHTMODE_DAY: + m_dayNightMode = SystemDayNight::DAYNIGHTMODE_DAY; + mp_ui->widget_Background->setStyleSheet(QString("background-image: url(:/images/backgrounds/bg_blue_day.png)")); + // home icon + mp_ui->widget_Home_Icon->setStyleSheet(QString("border-image: url(:/icons/home_day.png) 0 0 0 0 stretch stretch;")); + + break; + case SystemDayNight::DAYNIGHTMODE_NIGHT: + m_dayNightMode = SystemDayNight::DAYNIGHTMODE_NIGHT; + mp_ui->widget_Background->setStyleSheet(QString("background-image: url(:/images/backgrounds/bg_blue_night.png)")); + // home icon + mp_ui->widget_Home_Icon->setStyleSheet(QString("border-image: url(:/icons/home_night.png) 0 0 0 0 stretch stretch;")); + + break; + default: + m_dayNightMode = SystemDayNight::DAYNIGHTMODE_UNDEFINED; + } +} + +void MainWindow::changeEvent(QEvent* event) +{ + if (QEvent::LanguageChange == event->type()) + { + mp_ui->retranslateUi(this); + } + + QMainWindow::changeEvent(event); +} + diff --git a/HomeScreen/src/mainwindow.h b/HomeScreen/src/mainwindow.h new file mode 100644 index 0000000..af725fd --- /dev/null +++ b/HomeScreen/src/mainwindow.h @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2016 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. + */ + +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include <QMainWindow> +#include "../interfaces/daynightmode.h" +#include "daynightmode_proxy.h" + +#include "popupwidget.h" + +#include "statusbarwidget.h" +#include "controlbarwidget.h" + +namespace Ui { +class MainWindow; +} + +class MainWindow : public QMainWindow +{ + Q_OBJECT + +public: + explicit MainWindow(QWidget *parent = 0); + ~MainWindow(); + +// day/night mode +public Q_SLOTS: + void dayNightModeSlot(int mode); + +protected: + // called when the translator loaded a new language set + void changeEvent(QEvent* event); + +private: + Ui::MainWindow *mp_ui; + + StatusBarWidget *mp_statusBarWidget; + org::agl::daynightmode *mp_dBusDayNightMode_StatusBarWidget; + ControlBarWidget *mp_controlBarWidget; + org::agl::daynightmode *mp_dBusDayNightMode_ControlBarWidget; + + SystemDayNight::eDayNightMode m_dayNightMode; + org::agl::daynightmode *mp_dayNightModeProxy; + + PopupWidget *mp_popupWidget; +}; + +#endif // MAINWINDOW_H diff --git a/HomeScreen/src/popupwidget.cpp b/HomeScreen/src/popupwidget.cpp new file mode 100644 index 0000000..81ffdf7 --- /dev/null +++ b/HomeScreen/src/popupwidget.cpp @@ -0,0 +1,103 @@ +/* + * Copyright (C) 2016 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. + */ + +#include "popupwidget.h" +#include "ui_popupwidget.h" + +PopupWidget::PopupWidget(QWidget *parent) : + QWidget(parent), + mp_ui(new Ui::PopupWidget), + m_dayNightMode(SystemDayNight::DAYNIGHTMODE_DAY), // TODO: read from system + mp_dayNightModeProxy(0), + mp_popupAdaptor(0) +{ + // this has to be adopted to the system setup + mp_dayNightModeProxy = new org::agl::daynightmode("org.agl.homescreen.simulator", //"org.agl.systeminfoprovider" + "/", + QDBusConnection::sessionBus(), + 0); + QObject::connect(mp_dayNightModeProxy, SIGNAL(dayNightMode(int)), this, SLOT(dayNightModeSlot(int))); + + // publish dbus popup interface + mp_popupAdaptor = new PopupAdaptor((QObject*)this); + QDBusConnection dbus = QDBusConnection::sessionBus(); + dbus.registerObject("/Popup", this); + dbus.registerService("org.agl.homescreen"); + + mp_ui->setupUi(this); + this->close(); +} + +PopupWidget::~PopupWidget() +{ + delete mp_dayNightModeProxy; + delete mp_popupAdaptor; + delete mp_ui; +} + +void PopupWidget::dayNightModeSlot(int mode) +{ + switch (mode) + { + case SystemDayNight::DAYNIGHTMODE_DAY: + m_dayNightMode = SystemDayNight::DAYNIGHTMODE_DAY; + mp_ui->widget_Popup->setStyleSheet(QString("QWidget { \ + border: 1px solid #D3D3D3; \ + border-radius: 8px; \ + background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(242, 242, 249, 255), stop:1 rgba(255, 255, 255, 255)); \ + color: #333; \ + padding: 0px; \ + } \ + QWidget:on { \ + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #D5D5D5, stop: 1 #EEEEEE); \ + }")); + mp_ui->label_Text->setStyleSheet(QString("background-color: rgba(109, 109, 109, 0); \ + background-image: url(:/images/transparency.png); \ + border-image: url(:/images/transparency.png);")); + break; + case SystemDayNight::DAYNIGHTMODE_NIGHT: + m_dayNightMode = SystemDayNight::DAYNIGHTMODE_NIGHT; + mp_ui->widget_Popup->setStyleSheet(QString("QWidget { \ + border: 1px solid #D3D3D3; \ + border-radius: 8px; \ + background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(147, 147, 151, 255), stop:1 rgba(255, 255, 255, 255)); \ + color: #333; \ + padding: 0px; \ + } \ + QWidget:on { \ + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #D5D5D5, stop: 1 #EEEEEE); \ + }")); + mp_ui->label_Text->setStyleSheet(QString("background-color: rgba(109, 109, 109, 0); \ + background-image: url(:/images/transparency.png); \ + border-image: url(:/images/transparency.png);")); + break; + default: + m_dayNightMode = SystemDayNight::DAYNIGHTMODE_UNDEFINED; + } +} + +void PopupWidget::showPopup(int type, const QString &text) +{ + this->show(); + this->raise(); + qDebug("PopupWidget::showPopup: type %d, text %s", type, text.toStdString().c_str()); + mp_ui->label_Text->setText(text); +} + +void PopupWidget::on_pushButton_OK_clicked() +{ + this->close(); +} diff --git a/HomeScreen/src/popupwidget.h b/HomeScreen/src/popupwidget.h new file mode 100644 index 0000000..a876576 --- /dev/null +++ b/HomeScreen/src/popupwidget.h @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2016 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. + */ + +#ifndef POPUPWIDGET_H +#define POPUPWIDGET_H + +#include <QWidget> +#include "../interfaces/popup.h" +#include "popup_adapter.h" +#include "../interfaces/daynightmode.h" +#include "daynightmode_proxy.h" + + +namespace Ui { +class PopupWidget; +} + +class PopupWidget : public QWidget +{ + Q_OBJECT + +public: + explicit PopupWidget(QWidget *parent = 0); + ~PopupWidget(); + +// day/night mode +public Q_SLOTS: + void dayNightModeSlot(int mode); + + // from popup_adapter.h +public Q_SLOTS: // METHODS + void showPopup(int type, const QString &text); + +private slots: + void on_pushButton_OK_clicked(); + +private: + Ui::PopupWidget *mp_ui; + + SystemDayNight::eDayNightMode m_dayNightMode; + org::agl::daynightmode *mp_dayNightModeProxy; + PopupAdaptor *mp_popupAdaptor; +}; + +#endif // POPUPWIDGET_H diff --git a/HomeScreen/src/settingswidget.cpp b/HomeScreen/src/settingswidget.cpp new file mode 100644 index 0000000..039b99f --- /dev/null +++ b/HomeScreen/src/settingswidget.cpp @@ -0,0 +1,127 @@ +/* + * Copyright (C) 2016 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. + */ + +#include "settingswidget.h" +#include "ui_settingswidget.h" +#include <QSettings> + +SettingsWidget::SettingsWidget(QWidget *parent) : + QWidget(parent), + mp_ui(new Ui::SettingsWidget), + m_dayNightMode(SystemDayNight::DAYNIGHTMODE_DAY), // TODO: read from system + mp_dayNightModeProxy(0), + mp_translator(0) +{ + // this has to be adopted to the system setup + mp_dayNightModeProxy = new org::agl::daynightmode("org.agl.homescreen.simulator", //"org.agl.systeminfoprovider" + "/", + QDBusConnection::sessionBus(), + 0); + QObject::connect(mp_dayNightModeProxy, SIGNAL(dayNightMode(int)), this, SLOT(dayNightModeSlot(int))); + + // multi-language support + mp_translator = new QTranslator(); + mp_translator->load("homescreen_en_US.qm", ":/translations"); // TODO: read from system + QApplication::instance()->installTranslator(mp_translator); + + mp_ui->setupUi(this); + + mp_ui->comboBoxLanguage->addItem(QString("English"), QVariant("homescreen_en_US.qm")); // TODO: make this configurable? + mp_ui->comboBoxLanguage->addItem(QString("Deutsch"), QVariant("homescreen_de_DE.qm")); + mp_ui->comboBoxLanguage->addItem(QString("日本語"), QVariant("homescreen_ja_JP.qm")); + + QSettings settings; + mp_ui->comboBoxLanguage->setCurrentIndex(settings.value("systemsettings/language", 0).toInt()); +} + +SettingsWidget::~SettingsWidget() +{ + delete mp_translator; + delete mp_dayNightModeProxy; + + QSettings settings; + settings.setValue("systemsettings/language", mp_ui->comboBoxLanguage->currentIndex()); + delete mp_ui; +} + +void SettingsWidget::dayNightModeSlot(int mode) +{ + switch (mode) + { + case SystemDayNight::DAYNIGHTMODE_DAY: + m_dayNightMode = SystemDayNight::DAYNIGHTMODE_DAY; + mp_ui->widget_Background->setStyleSheet(QString("background-image: url(:/images/backgrounds/bg_blue_day.png);")); + mp_ui->comboBoxLanguage->setStyleSheet(QString("QComboBox { \ + border: 1px solid #D3D3D3; \ + border-radius: 8px; \ + background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(242, 242, 249, 255), stop:1 rgba(255, 255, 255, 255)); \ + color: #333; \ + padding: 0px; \ + } \ + QComboBox:on { \ + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #D5D5D5, stop: 1 #EEEEEE); \ + } \ + QComboBox::drop-down { \ + border: 0px solid; \ + border-radius: 0px; \ + } \ + QComboBox::down-arrow:on { \ + }")); + // settings icon + mp_ui->widget_Settings_Icon->setStyleSheet(QString("border-image: url(:/icons/settings_day.png) 0 0 0 0 stretch stretch;")); + break; + case SystemDayNight::DAYNIGHTMODE_NIGHT: + m_dayNightMode = SystemDayNight::DAYNIGHTMODE_NIGHT; + mp_ui->widget_Background->setStyleSheet(QString("background-image: url(:/images/backgrounds/bg_blue_night.png);")); + mp_ui->comboBoxLanguage->setStyleSheet(QString("QComboBox { \ + border: 1px solid #D3D3D3; \ + border-radius: 8px; \ + background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, stop:0 rgba(147, 147, 151, 255), stop:1 rgba(255, 255, 255, 255)); \ + color: #333; \ + padding: 0px; \ + } \ + QComboBox:on { \ + background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1,stop: 0 #D5D5D5, stop: 1 #EEEEEE); \ + } \ + QComboBox::drop-down { \ + border: 0px solid; \ + border-radius: 0px; \ + } \ + QComboBox::down-arrow:on { \ + }")); + // settings icon + mp_ui->widget_Settings_Icon->setStyleSheet(QString("border-image: url(:/icons/settings_night.png) 0 0 0 0 stretch stretch;")); + break; + default: + m_dayNightMode = SystemDayNight::DAYNIGHTMODE_UNDEFINED; + } +} + +void SettingsWidget::changeEvent(QEvent* event) +{ + if (QEvent::LanguageChange == event->type()) + { + mp_ui->retranslateUi(this); + } + + QWidget::changeEvent(event); +} + +void SettingsWidget::on_comboBoxLanguage_currentIndexChanged(const QString &) +{ + if (0 != mp_translator) + mp_translator->load(mp_ui->comboBoxLanguage->currentData().toString(), ":/translations"); +} diff --git a/HomeScreen/src/settingswidget.h b/HomeScreen/src/settingswidget.h new file mode 100644 index 0000000..15b24bd --- /dev/null +++ b/HomeScreen/src/settingswidget.h @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2016 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. + */ + +#ifndef SETTINGSWIDGET_H +#define SETTINGSWIDGET_H + +#include <QWidget> +#include <QTranslator> +#include "../interfaces/daynightmode.h" +#include "daynightmode_proxy.h" + + +namespace Ui { +class SettingsWidget; +} + +class SettingsWidget : public QWidget +{ + Q_OBJECT + +public: + explicit SettingsWidget(QWidget *parent = 0); + ~SettingsWidget(); + +// day/night mode +public Q_SLOTS: + void dayNightModeSlot(int mode); + +protected: + // called when the translator loaded a new language set + void changeEvent(QEvent* event); + +private slots: + void on_comboBoxLanguage_currentIndexChanged(const QString &); + +private: + Ui::SettingsWidget *mp_ui; + + SystemDayNight::eDayNightMode m_dayNightMode; + org::agl::daynightmode *mp_dayNightModeProxy; + + QTranslator *mp_translator; +}; + +#endif // SETTINGSWIDGET_H diff --git a/HomeScreen/src/statusbarwidget.cpp b/HomeScreen/src/statusbarwidget.cpp new file mode 100644 index 0000000..af144c5 --- /dev/null +++ b/HomeScreen/src/statusbarwidget.cpp @@ -0,0 +1,205 @@ +/* + * Copyright (C) 2016 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. + */ + +#include "statusbarwidget.h" +#include "ui_statusbarwidget.h" + +StatusBarWidget::StatusBarWidget(QWidget *parent) : + QWidget(parent), + mp_ui(new Ui::StatusBarWidget), + m_dayNightMode(SystemDayNight::DAYNIGHTMODE_DAY), // TODO: read from system + mp_dayNightModeProxy(0), + mp_statusbarAdaptor(0), + mp_statusbarIconURIs(new QMap<int, QString>) +{ + // this has to be adopted to the system setup + mp_dayNightModeProxy = new org::agl::daynightmode("org.agl.homescreen.simulator", //"org.agl.systeminfoprovider" + "/", + QDBusConnection::sessionBus(), + 0); + QObject::connect(mp_dayNightModeProxy, SIGNAL(dayNightMode(int)), this, SLOT(dayNightModeSlot(int))); + + // publish statusbar interface + mp_statusbarAdaptor = new StatusbarAdaptor((QObject*)this); + + QDBusConnection dbus = QDBusConnection::sessionBus(); + dbus.registerObject("/StatusBar", this); + dbus.registerService("org.agl.homescreen"); + + mp_ui->setupUi(this); +} + +StatusBarWidget::~StatusBarWidget() +{ + delete mp_statusbarAdaptor; + delete mp_dayNightModeProxy; + delete mp_ui; +} + +void StatusBarWidget::dayNightModeSlot(int mode) +{ + switch (mode) + { + case SystemDayNight::DAYNIGHTMODE_DAY: + m_dayNightMode = SystemDayNight::DAYNIGHTMODE_DAY; + mp_ui->widget->setStyleSheet(QString("background-image: url(:/images/backgrounds/bg_stripes_day.png)")); + mp_ui->label_1->setStyleSheet(QString("color: rgb(238, 238, 238); background-image: url(") + mp_statusbarIconURIs->value(1) + QString("); background-repeat: no-repeat;")); + mp_ui->label_2->setStyleSheet(QString("color: rgb(238, 238, 238); background-image: url(") + mp_statusbarIconURIs->value(2) + QString("); background-repeat: no-repeat;")); + mp_ui->label_3->setStyleSheet(QString("color: rgb(238, 238, 238); background-image: url(") + mp_statusbarIconURIs->value(3) + QString("); background-repeat: no-repeat;")); + mp_ui->label_4->setStyleSheet(QString("color: rgb(238, 238, 238); background-image: url(") + mp_statusbarIconURIs->value(4) + QString("); background-repeat: no-repeat;")); + mp_ui->label_5->setStyleSheet(QString("color: rgb(238, 238, 238); background-image: url(") + mp_statusbarIconURIs->value(5) + QString("); background-repeat: no-repeat;")); + break; + case SystemDayNight::DAYNIGHTMODE_NIGHT: + m_dayNightMode = SystemDayNight::DAYNIGHTMODE_NIGHT; + mp_ui->widget->setStyleSheet(QString("background-image: url(:/images/backgrounds/bg_stripes_night.png)")); + mp_ui->label_1->setStyleSheet(QString("color: rgb(177, 177, 177); background-image: url(") + mp_statusbarIconURIs->value(1) + QString("); background-repeat: no-repeat;")); + mp_ui->label_2->setStyleSheet(QString("color: rgb(177, 177, 177); background-image: url(") + mp_statusbarIconURIs->value(2) + QString("); background-repeat: no-repeat;")); + mp_ui->label_3->setStyleSheet(QString("color: rgb(177, 177, 177); background-image: url(") + mp_statusbarIconURIs->value(3) + QString("); background-repeat: no-repeat;")); + mp_ui->label_4->setStyleSheet(QString("color: rgb(177, 177, 177); background-image: url(") + mp_statusbarIconURIs->value(4) + QString("); background-repeat: no-repeat;")); + mp_ui->label_5->setStyleSheet(QString("color: rgb(177, 177, 177); background-image: url(") + mp_statusbarIconURIs->value(5) + QString("); background-repeat: no-repeat;")); + break; + default: + m_dayNightMode = SystemDayNight::DAYNIGHTMODE_UNDEFINED; + } +} + +QList<int> StatusBarWidget::getAvailablePlaceholders() +{ + QList<int> result; + + // for now, all are available + result.append(1); + result.append(2); + result.append(3); + result.append(4); + result.append(5); + + return result; +} + +QString StatusBarWidget::getStatusIcon(int placeholderIndex) +{ + return mp_statusbarIconURIs->value(placeholderIndex); +} + +QString StatusBarWidget::getStatusText(int placeholderIndex) +{ + QString result = ""; + + switch (placeholderIndex) + { + case 1: + result = mp_ui->label_1->text(); + break; + case 2: + result = mp_ui->label_2->text(); + break; + case 3: + result = mp_ui->label_3->text(); + break; + case 4: + result = mp_ui->label_4->text(); + break; + case 5: + result = mp_ui->label_5->text(); + break; + default: + break; + } + + return result; +} + +void StatusBarWidget::setStatusIcon(int placeholderIndex, const QString &iconURI) +{ + mp_statusbarIconURIs->insert(placeholderIndex, iconURI); + + switch (m_dayNightMode) + { + case SystemDayNight::DAYNIGHTMODE_DAY: + switch (placeholderIndex) + { + case 1: + mp_ui->label_1->setStyleSheet(QString("color: rgb(238, 238, 238); background-image: url(") + mp_statusbarIconURIs->value(placeholderIndex) + QString("); background-repeat: no-repeat;")); + break; + case 2: + mp_ui->label_2->setStyleSheet(QString("color: rgb(238, 238, 238); background-image: url(") + mp_statusbarIconURIs->value(placeholderIndex) + QString("); background-repeat: no-repeat;")); + break; + case 3: + mp_ui->label_3->setStyleSheet(QString("color: rgb(238, 238, 238); background-image: url(") + mp_statusbarIconURIs->value(placeholderIndex) + QString("); background-repeat: no-repeat;")); + break; + case 4: + mp_ui->label_4->setStyleSheet(QString("color: rgb(238, 238, 238); background-image: url(") + mp_statusbarIconURIs->value(placeholderIndex) + QString("); background-repeat: no-repeat;")); + break; + case 5: + mp_ui->label_5->setStyleSheet(QString("color: rgb(238, 238, 238); background-image: url(") + mp_statusbarIconURIs->value(placeholderIndex) + QString("); background-repeat: no-repeat;")); + break; + default: + break; + } + break; + case SystemDayNight::DAYNIGHTMODE_NIGHT: + switch (placeholderIndex) + { + case 1: + mp_ui->label_1->setStyleSheet(QString("color: rgb(177, 177, 177); background-image: url(") + mp_statusbarIconURIs->value(placeholderIndex) + QString("); background-repeat: no-repeat;")); + break; + case 2: + mp_ui->label_2->setStyleSheet(QString("color: rgb(177, 177, 177); background-image: url(") + mp_statusbarIconURIs->value(placeholderIndex) + QString("); background-repeat: no-repeat;")); + break; + case 3: + mp_ui->label_3->setStyleSheet(QString("color: rgb(177, 177, 177); background-image: url(") + mp_statusbarIconURIs->value(placeholderIndex) + QString("); background-repeat: no-repeat;")); + break; + case 4: + mp_ui->label_4->setStyleSheet(QString("color: rgb(177, 177, 177); background-image: url(") + mp_statusbarIconURIs->value(placeholderIndex) + QString("); background-repeat: no-repeat;")); + break; + case 5: + mp_ui->label_5->setStyleSheet(QString("color: rgb(177, 177, 177); background-image: url(") + mp_statusbarIconURIs->value(placeholderIndex) + QString("); background-repeat: no-repeat;")); + break; + default: + break; + } + break; + default: + break; + } +} + +void StatusBarWidget::setStatusText(int placeholderIndex, const QString &text) +{ + switch (placeholderIndex) + { + case 1: + mp_ui->label_1->setText(text); + break; + case 2: + mp_ui->label_2->setText(text); + break; + case 3: + mp_ui->label_3->setText(text); + break; + case 4: + mp_ui->label_4->setText(text); + break; + case 5: + mp_ui->label_5->setText(text); + break; + default: + break; + } +} + + diff --git a/HomeScreen/src/statusbarwidget.h b/HomeScreen/src/statusbarwidget.h new file mode 100644 index 0000000..e17f13e --- /dev/null +++ b/HomeScreen/src/statusbarwidget.h @@ -0,0 +1,60 @@ +/* + * Copyright (C) 2016 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. + */ + +#ifndef STATUSBARWIDGET_H +#define STATUSBARWIDGET_H + +#include <QWidget> +#include "../interfaces/daynightmode.h" +#include "daynightmode_proxy.h" + +#include "statusbar_adapter.h" + +namespace Ui { +class StatusBarWidget; +} + +class StatusBarWidget : public QWidget +{ + Q_OBJECT + +public: + explicit StatusBarWidget(QWidget *parent = 0); + ~StatusBarWidget(); + +// day/night mode +public Q_SLOTS: + void dayNightModeSlot(int mode); + +// from statusbar_adapter.h +public Q_SLOTS: // METHODS + QList<int> getAvailablePlaceholders(); + QString getStatusIcon(int placeholderIndex); + QString getStatusText(int placeholderIndex); + void setStatusIcon(int placeholderIndex, const QString &iconURI); + void setStatusText(int placeholderIndex, const QString &text); + +private: + Ui::StatusBarWidget *mp_ui; + + SystemDayNight::eDayNightMode m_dayNightMode; + org::agl::daynightmode *mp_dayNightModeProxy; + StatusbarAdaptor *mp_statusbarAdaptor; + + QMap<int, QString> *mp_statusbarIconURIs; +}; + +#endif // STATUSBARWIDGET_H |