From c5aad6f23f523bf44bf58419bb2fc41262be2180 Mon Sep 17 00:00:00 2001 From: tiansen Date: Fri, 2 Nov 2018 10:08:22 +0800 Subject: horizontal --- homescreen/docs/homescreen_api.md | 186 ------- homescreen/docs/index.md | 31 -- .../docs/pictures/api_getAllSurfacesOfProcess.png | Bin 10485 -> 0 bytes .../docs/pictures/api_getSurfaceStatus_1.png | Bin 10168 -> 0 bytes .../docs/pictures/api_getSurfaceStatus_2.png | Bin 9794 -> 0 bytes .../docs/pictures/api_getSurfaceStatus_3.png | Bin 19030 -> 0 bytes homescreen/docs/pictures/api_hardKeyPressed.png | Bin 9241 -> 0 bytes .../docs/pictures/api_renderSurfaceToArea.png | Bin 9060 -> 0 bytes .../pictures/api_renderSurfaceToAreaAllowed.png | Bin 14910 -> 0 bytes .../pictures/api_requestSurfaceIdToFullScreen.png | Bin 10056 -> 0 bytes .../docs/pictures/api_surfaceVisibilityChanged.png | Bin 8882 -> 0 bytes homescreen/docs/pictures/dashboard.png | Bin 359145 -> 0 bytes homescreen/docs/pictures/full/dashboard.png | Bin 1055839 -> 0 bytes .../docs/pictures/full/homescreen_applauncher.png | Bin 1090490 -> 0 bytes homescreen/docs/pictures/full/hvac.png | Bin 921864 -> 0 bytes homescreen/docs/pictures/full/phone.png | Bin 936048 -> 0 bytes homescreen/docs/pictures/full/settings.png | Bin 863641 -> 0 bytes .../docs/pictures/homescreen_applauncher.png | Bin 399084 -> 0 bytes homescreen/docs/pictures/hvac.png | Bin 338097 -> 0 bytes homescreen/docs/pictures/phone.png | Bin 336318 -> 0 bytes homescreen/docs/pictures/settings.png | Bin 300437 -> 0 bytes homescreen/homescreen.pro | 10 +- homescreen/qml/MediaArea.qml | 57 -- homescreen/qml/MediaAreaBlank.qml | 121 ---- homescreen/qml/MediaAreaMusic.qml | 85 --- homescreen/qml/MediaAreaRadio.qml | 24 - homescreen/qml/ShortcutArea.qml | 76 ++- homescreen/qml/ShortcutIcon.qml | 54 +- homescreen/qml/StatusArea.qml | 256 +++++---- homescreen/qml/TopArea.qml | 31 +- .../images/AGL_HMI_Blue_Background_NoCar-01.png | Bin 949053 -> 0 bytes homescreen/qml/images/MediaMusic/AlbumArtwork.png | Bin 25963 -> 0 bytes homescreen/qml/images/MediaMusic/BackArrow.png | Bin 691 -> 0 bytes homescreen/qml/images/MediaMusic/ForwardArrow.png | Bin 717 -> 0 bytes homescreen/qml/images/MediaMusic/ShuffleIcon.png | Bin 927 -> 0 bytes homescreen/qml/images/MediaMusic/Volume_Loud.png | Bin 579 -> 0 bytes homescreen/qml/images/MediaMusic/Volume_Medium.png | Bin 882 -> 0 bytes homescreen/qml/images/MediaMusic/Volume_Off.png | Bin 740 -> 0 bytes homescreen/qml/images/MediaMusic/mediamusic.qrc | 11 - .../MediaPlayer/AGL_MediaPlayer_AlbumArtwork.png | Bin 1854532 -> 0 bytes .../MediaPlayer/AGL_MediaPlayer_BackArrow.png | Bin 648 -> 0 bytes .../AGL_MediaPlayer_Bluetooth_Active.png | Bin 4637 -> 0 bytes .../AGL_MediaPlayer_Bluetooth_Inactive.png | Bin 2790 -> 0 bytes .../MediaPlayer/AGL_MediaPlayer_CD_Active.png | Bin 5581 -> 0 bytes .../MediaPlayer/AGL_MediaPlayer_CD_Inactive.png | Bin 3223 -> 0 bytes .../MediaPlayer/AGL_MediaPlayer_DividingLine.png | Bin 342 -> 0 bytes .../MediaPlayer/AGL_MediaPlayer_ForwardArrow.png | Bin 675 -> 0 bytes .../MediaPlayer/AGL_MediaPlayer_Loop_Active.png | Bin 996 -> 0 bytes .../MediaPlayer/AGL_MediaPlayer_Loop_Inactive.png | Bin 1199 -> 0 bytes .../MediaPlayer/AGL_MediaPlayer_Player_Pause.png | Bin 3959 -> 0 bytes .../MediaPlayer/AGL_MediaPlayer_Player_Play.png | Bin 4078 -> 0 bytes .../AGL_MediaPlayer_PlaylistToggle_Active.png | Bin 2061 -> 0 bytes .../AGL_MediaPlayer_PlaylistToggle_Inactive.png | Bin 2061 -> 0 bytes .../AGL_MediaPlayer_Playlist_Active.png | Bin 4251 -> 0 bytes .../AGL_MediaPlayer_Playlist_Inactive.png | Bin 2547 -> 0 bytes .../MediaPlayer/AGL_MediaPlayer_Radio_Active.png | Bin 4673 -> 0 bytes .../MediaPlayer/AGL_MediaPlayer_Radio_Inactive.png | Bin 2877 -> 0 bytes .../MediaPlayer/AGL_MediaPlayer_Shuffle_Active.png | Bin 1139 -> 0 bytes .../AGL_MediaPlayer_Shuffle_Inactive.png | Bin 1379 -> 0 bytes .../qml/images/MediaPlayer/Albums_Active.png | Bin 4616 -> 0 bytes .../qml/images/MediaPlayer/Albums_Inactive.png | Bin 2965 -> 0 bytes homescreen/qml/images/MediaPlayer/DividingLine.png | Bin 419 -> 0 bytes homescreen/qml/images/MediaPlayer/GreenLine.png | Bin 364 -> 0 bytes homescreen/qml/images/MediaPlayer/Music_Active.png | Bin 2567 -> 0 bytes .../qml/images/MediaPlayer/Music_Inactive.png | Bin 2692 -> 0 bytes .../qml/images/MediaPlayer/Podcasts_Active.png | Bin 3687 -> 0 bytes .../qml/images/MediaPlayer/Podcasts_Inactive.png | Bin 3014 -> 0 bytes .../qml/images/MediaPlayer/Popup_Highlight.png | Bin 780 -> 0 bytes .../qml/images/MediaPlayer/Popup_PauseIcon.png | Bin 1496 -> 0 bytes .../qml/images/MediaPlayer/Popup_PlayIcon.png | Bin 2273 -> 0 bytes .../qml/images/MediaPlayer/Popup_VerticalLine.png | Bin 364 -> 0 bytes homescreen/qml/images/MediaPlayer/X.png | Bin 640 -> 0 bytes homescreen/qml/images/MediaPlayer/mediaplayer.qrc | 37 -- homescreen/qml/images/Shortcut/hvac.svg | 600 -------------------- homescreen/qml/images/Shortcut/hvac_active.svg | 614 --------------------- homescreen/qml/images/Shortcut/launcher.png | Bin 0 -> 3594 bytes homescreen/qml/images/Shortcut/launcher.svg | 73 --- homescreen/qml/images/Shortcut/launcher_active.png | Bin 0 -> 14471 bytes homescreen/qml/images/Shortcut/launcher_active.svg | 82 --- homescreen/qml/images/Shortcut/mediaplayer.png | Bin 0 -> 5333 bytes homescreen/qml/images/Shortcut/mediaplayer.svg | 50 -- .../qml/images/Shortcut/mediaplayer_active.png | Bin 0 -> 15996 bytes .../qml/images/Shortcut/mediaplayer_active.svg | 63 --- homescreen/qml/images/Shortcut/music.svg | 111 ++++ homescreen/qml/images/Shortcut/navigation.png | Bin 0 -> 5544 bytes homescreen/qml/images/Shortcut/navigation.svg | 242 +++++--- .../qml/images/Shortcut/navigation_active.png | Bin 0 -> 17333 bytes .../qml/images/Shortcut/navigation_active.svg | 90 --- homescreen/qml/images/Shortcut/phone.png | Bin 0 -> 5517 bytes homescreen/qml/images/Shortcut/phone_active.png | Bin 0 -> 16965 bytes homescreen/qml/images/Shortcut/settings.png | Bin 0 -> 7088 bytes homescreen/qml/images/Shortcut/settings_active.png | Bin 0 -> 19811 bytes homescreen/qml/images/Shortcut/shortcut.qrc | 18 +- .../qml/images/TopSection_NoText_NoIcons-01.svg | 55 -- .../qml/images/Utility_Logo_Background-01.svg | 53 -- homescreen/qml/images/Utility_Logo_Grey-01.svg | 84 --- .../qml/images/Utility_Music_Background-01.png | Bin 711 -> 0 bytes .../qml/images/Utility_Radio_Background-01.png | Bin 920 -> 0 bytes homescreen/qml/images/fullscreen.png | Bin 0 -> 1230 bytes homescreen/qml/images/images.qrc | 11 +- homescreen/qml/images/menubar_background.png | Bin 0 -> 69012 bytes homescreen/qml/images/menubar_full_background.png | Bin 0 -> 5692 bytes .../qml/images/menubar_normal_background.png | Bin 0 -> 68924 bytes homescreen/qml/images/normal.png | Bin 0 -> 1157 bytes homescreen/qml/main.qml | 129 ++++- homescreen/qml/qml.qrc | 4 - homescreen/src/homescreenhandler.cpp | 1 - homescreen/src/homescreenhandler.h | 5 + homescreen/src/main.cpp | 27 +- homescreen/src/mastervolume.cpp | 31 -- homescreen/src/mastervolume.h | 46 -- homescreen/src/statusbarmodel.cpp | 11 +- homescreen/src/toucharea.cpp | 33 ++ homescreen/src/toucharea.h | 30 + 114 files changed, 749 insertions(+), 2693 deletions(-) delete mode 100644 homescreen/docs/homescreen_api.md delete mode 100644 homescreen/docs/index.md delete mode 100644 homescreen/docs/pictures/api_getAllSurfacesOfProcess.png delete mode 100644 homescreen/docs/pictures/api_getSurfaceStatus_1.png delete mode 100644 homescreen/docs/pictures/api_getSurfaceStatus_2.png delete mode 100644 homescreen/docs/pictures/api_getSurfaceStatus_3.png delete mode 100644 homescreen/docs/pictures/api_hardKeyPressed.png delete mode 100644 homescreen/docs/pictures/api_renderSurfaceToArea.png delete mode 100644 homescreen/docs/pictures/api_renderSurfaceToAreaAllowed.png delete mode 100644 homescreen/docs/pictures/api_requestSurfaceIdToFullScreen.png delete mode 100644 homescreen/docs/pictures/api_surfaceVisibilityChanged.png delete mode 100644 homescreen/docs/pictures/dashboard.png delete mode 100644 homescreen/docs/pictures/full/dashboard.png delete mode 100644 homescreen/docs/pictures/full/homescreen_applauncher.png delete mode 100644 homescreen/docs/pictures/full/hvac.png delete mode 100644 homescreen/docs/pictures/full/phone.png delete mode 100644 homescreen/docs/pictures/full/settings.png delete mode 100644 homescreen/docs/pictures/homescreen_applauncher.png delete mode 100644 homescreen/docs/pictures/hvac.png delete mode 100644 homescreen/docs/pictures/phone.png delete mode 100644 homescreen/docs/pictures/settings.png delete mode 100644 homescreen/qml/MediaArea.qml delete mode 100644 homescreen/qml/MediaAreaBlank.qml delete mode 100644 homescreen/qml/MediaAreaMusic.qml delete mode 100644 homescreen/qml/MediaAreaRadio.qml delete mode 100644 homescreen/qml/images/AGL_HMI_Blue_Background_NoCar-01.png delete mode 100644 homescreen/qml/images/MediaMusic/AlbumArtwork.png delete mode 100644 homescreen/qml/images/MediaMusic/BackArrow.png delete mode 100644 homescreen/qml/images/MediaMusic/ForwardArrow.png delete mode 100644 homescreen/qml/images/MediaMusic/ShuffleIcon.png delete mode 100644 homescreen/qml/images/MediaMusic/Volume_Loud.png delete mode 100644 homescreen/qml/images/MediaMusic/Volume_Medium.png delete mode 100644 homescreen/qml/images/MediaMusic/Volume_Off.png delete mode 100644 homescreen/qml/images/MediaMusic/mediamusic.qrc delete mode 100644 homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_AlbumArtwork.png delete mode 100644 homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_BackArrow.png delete mode 100644 homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Bluetooth_Active.png delete mode 100644 homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Bluetooth_Inactive.png delete mode 100644 homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_CD_Active.png delete mode 100644 homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_CD_Inactive.png delete mode 100644 homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_DividingLine.png delete mode 100644 homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_ForwardArrow.png delete mode 100644 homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Loop_Active.png delete mode 100644 homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Loop_Inactive.png delete mode 100644 homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Player_Pause.png delete mode 100644 homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Player_Play.png delete mode 100644 homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_PlaylistToggle_Active.png delete mode 100644 homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_PlaylistToggle_Inactive.png delete mode 100644 homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Playlist_Active.png delete mode 100644 homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Playlist_Inactive.png delete mode 100644 homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Radio_Active.png delete mode 100644 homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Radio_Inactive.png delete mode 100644 homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Shuffle_Active.png delete mode 100644 homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Shuffle_Inactive.png delete mode 100644 homescreen/qml/images/MediaPlayer/Albums_Active.png delete mode 100644 homescreen/qml/images/MediaPlayer/Albums_Inactive.png delete mode 100644 homescreen/qml/images/MediaPlayer/DividingLine.png delete mode 100644 homescreen/qml/images/MediaPlayer/GreenLine.png delete mode 100644 homescreen/qml/images/MediaPlayer/Music_Active.png delete mode 100644 homescreen/qml/images/MediaPlayer/Music_Inactive.png delete mode 100644 homescreen/qml/images/MediaPlayer/Podcasts_Active.png delete mode 100644 homescreen/qml/images/MediaPlayer/Podcasts_Inactive.png delete mode 100644 homescreen/qml/images/MediaPlayer/Popup_Highlight.png delete mode 100644 homescreen/qml/images/MediaPlayer/Popup_PauseIcon.png delete mode 100644 homescreen/qml/images/MediaPlayer/Popup_PlayIcon.png delete mode 100644 homescreen/qml/images/MediaPlayer/Popup_VerticalLine.png delete mode 100644 homescreen/qml/images/MediaPlayer/X.png delete mode 100644 homescreen/qml/images/MediaPlayer/mediaplayer.qrc delete mode 100644 homescreen/qml/images/Shortcut/hvac.svg delete mode 100644 homescreen/qml/images/Shortcut/hvac_active.svg create mode 100644 homescreen/qml/images/Shortcut/launcher.png delete mode 100644 homescreen/qml/images/Shortcut/launcher.svg create mode 100644 homescreen/qml/images/Shortcut/launcher_active.png delete mode 100644 homescreen/qml/images/Shortcut/launcher_active.svg create mode 100644 homescreen/qml/images/Shortcut/mediaplayer.png delete mode 100644 homescreen/qml/images/Shortcut/mediaplayer.svg create mode 100644 homescreen/qml/images/Shortcut/mediaplayer_active.png delete mode 100644 homescreen/qml/images/Shortcut/mediaplayer_active.svg create mode 100644 homescreen/qml/images/Shortcut/music.svg create mode 100644 homescreen/qml/images/Shortcut/navigation.png create mode 100644 homescreen/qml/images/Shortcut/navigation_active.png delete mode 100644 homescreen/qml/images/Shortcut/navigation_active.svg create mode 100644 homescreen/qml/images/Shortcut/phone.png create mode 100644 homescreen/qml/images/Shortcut/phone_active.png create mode 100644 homescreen/qml/images/Shortcut/settings.png create mode 100644 homescreen/qml/images/Shortcut/settings_active.png delete mode 100644 homescreen/qml/images/TopSection_NoText_NoIcons-01.svg delete mode 100644 homescreen/qml/images/Utility_Logo_Background-01.svg delete mode 100644 homescreen/qml/images/Utility_Logo_Grey-01.svg delete mode 100644 homescreen/qml/images/Utility_Music_Background-01.png delete mode 100644 homescreen/qml/images/Utility_Radio_Background-01.png create mode 100644 homescreen/qml/images/fullscreen.png create mode 100644 homescreen/qml/images/menubar_background.png create mode 100644 homescreen/qml/images/menubar_full_background.png create mode 100644 homescreen/qml/images/menubar_normal_background.png create mode 100644 homescreen/qml/images/normal.png delete mode 100644 homescreen/src/mastervolume.cpp delete mode 100644 homescreen/src/mastervolume.h create mode 100644 homescreen/src/toucharea.cpp create mode 100644 homescreen/src/toucharea.h diff --git a/homescreen/docs/homescreen_api.md b/homescreen/docs/homescreen_api.md deleted file mode 100644 index 8f7b8f4..0000000 --- a/homescreen/docs/homescreen_api.md +++ /dev/null @@ -1,186 +0,0 @@ -# HomeScreen API -The HomeScreen app provides an own interface for some special use cases concerning the surfaces and user inputs. - -The interface is implemented as D-Bus interface. -This is the introspection, describing the interface: - -``` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -``` - -These interface will change during further development, so check back frequently. - -## User Input Events API calls - -### hardKeyPressed - -Use hardKeyPressed to inject hard key press events into the HomeScreen app. -This Interface call can be used by applications like the InputEventManager to inject hard keys into the HomeScreen application. - -#### Example - -if someone presses the Hard Key “NAV” on the target, this key may be injected using this interface to make the HomeScreen launch the navigation application. -Right now, only a few keys are defined (in inputevent.hpp): - -``` -namespace InputEvent { - typedef enum HardKey - { - HARDKEY_UNDEFINED, - HARDKEY_NAV, - HARDKEY_MEDIA - } eHardKey; -} -``` - -This will change in the future. - -![hardKeyPressed](pictures/api_hardKeyPressed.png) - -A “normal” application would not need to call this API. - -## Surface control API calls - -The normal use case when starting an application is: -The user presses a hard key or uses the app launcher to start an app. The app is then started and is shown full screen. -The org.agl.homescreen API provides some methods to get information about some status and some methods to show surfaces on the screen. - -### getSurfaceStatus - -A surface can be visible or invisible (please do not confuse “visible” and “visibility”). This function allows to request the current status. - -``` - - - - -``` - -Right now an application has to pull this information. -This is not optimal and will change in the future. There are two options: - - - The homescreen API will provide a signal that is emitted every time the visible status of surfaces changes. This would be way more efficient, because it would save time and avoid a re-occurring API call. __UPDATE:__ There is a D-Bus signal implemented in this API - - For Qt, there is already a patch available that provides this information as a base class property. See https://codereview.qt-project.org/#/c/176211/ This would be optimal for Qt widget applications. But not useful for other languages, e.g. Java. __UPDATE:__ This patch got reverted in AGL! - -#### Current implementation - -![getSurfaceStatus](pictures/api_getSurfaceStatus_1.png) - -#### Option 1 - -![getSurfaceStatus](pictures/api_getSurfaceStatus_2.png) - -#### Option 2 - -![getSurfaceStatus](pictures/api_getSurfaceStatus_3.png) - -### requestSurfaceIdToFullScreen - -This function will set the given surface to full screen. - -``` - - - -``` - -It will hide all other surfaces. - -![requestSurfaceIdToFullScreen](pictures/api_requestSurfaceIdToFullScreen.png) - -### getAllSurfacesOfProcess - -This returns all surfaces that are created by the given process ID. - -``` - - - - - -``` - -A process can create more than one surface. By default, the surface with the lowest surface ID is shown on the screen. If an application wants to know all surfaces that were created by an application, this method will provide them. - -![getAllSurfacesOfProcess](pictures/api_getAllSurfacesOfProcess.png) - -### renderSurfaceToAreaAllowed - -Before calling renderSurfaceToArea, an application can request, if it is allowed to render the surface to this area. This makes sense for an application that would begin to allocate resources to render. But if it is not allowed to render the surface, the application could avoid allocating the resources. - -``` - - - - - -``` - -The call will not affect the current setup, it will only request if it is allowed or not. - -![renderSurfaceToAreaAllowed](pictures/api_renderSurfaceToAreaAllowed.png) - -### renderSurfaceToArea - -By default, the HomeScreen application decides, where to render an applications surface. The concept of Layouts defines this. This API call can override the default behavior. An app can request to render a surface in a specific Layout Area. - -``` - - - - -``` - -The surface that was previously rendered in this Layout are will be hidden. - -![renderSurfaceToArea](pictures/api_renderSurfaceToArea.png) - -The homescreen interface functionality is not fully implemented, but the API is available. For example using the libhomescreen.so. - -### surfaceVisibilityChanged - -Whenever the visibility property of a surface changes, this signal is emitted. - -``` - - - - -``` - -Visibility here means visible. The name of the signal is from the Weston surface property “visibility”. -See here for reference: https://github.com/ntanibata/wayland-ivi-extension/blob/master/ivi-layermanagement-api/ilmCommon/include/ilm_types.h - -![surfaceVisibilityChanged](pictures/api_surfaceVisibilityChanged.png) diff --git a/homescreen/docs/index.md b/homescreen/docs/index.md deleted file mode 100644 index 4322255..0000000 --- a/homescreen/docs/index.md +++ /dev/null @@ -1,31 +0,0 @@ -# Welcome to your AGL system! -When booting up an AGL system, the first thing that your eyes will spot is this: - -![AGL HomeScreen Application Launcher](pictures/homescreen_applauncher.png) - -**The AGL HomeScreen!** - -Intended to be used with touch presses, the reference HMI provides access to all pre-installed AGL demo applications as well as in the future access to user installed apps. The list of demo apps contains some automotive applications like HVAC-control, Navigation or Dashboard, as well as some infotainment apps. Radio, Multimedia, Phone... -This applications are already available and were presented at CES 2017. - -## Here are some screenshots of the pre-installed demo applications: - -## HVAC - -![AGL HVAC](pictures/hvac.png) - -## Phone - -![AGL Phone](pictures/phone.png) - -## Dashboard - -![AGL Dashboard](pictures/dashboard.png) - -## Settings - -![AGL Settings](pictures/settings.png) - -#### Note: -* All current demos (including HomeScreen) are optimized for landscape full HD resolution (1080x1920). - diff --git a/homescreen/docs/pictures/api_getAllSurfacesOfProcess.png b/homescreen/docs/pictures/api_getAllSurfacesOfProcess.png deleted file mode 100644 index 5c862d7..0000000 Binary files a/homescreen/docs/pictures/api_getAllSurfacesOfProcess.png and /dev/null differ diff --git a/homescreen/docs/pictures/api_getSurfaceStatus_1.png b/homescreen/docs/pictures/api_getSurfaceStatus_1.png deleted file mode 100644 index 1e18fcf..0000000 Binary files a/homescreen/docs/pictures/api_getSurfaceStatus_1.png and /dev/null differ diff --git a/homescreen/docs/pictures/api_getSurfaceStatus_2.png b/homescreen/docs/pictures/api_getSurfaceStatus_2.png deleted file mode 100644 index e66d708..0000000 Binary files a/homescreen/docs/pictures/api_getSurfaceStatus_2.png and /dev/null differ diff --git a/homescreen/docs/pictures/api_getSurfaceStatus_3.png b/homescreen/docs/pictures/api_getSurfaceStatus_3.png deleted file mode 100644 index 50a3b10..0000000 Binary files a/homescreen/docs/pictures/api_getSurfaceStatus_3.png and /dev/null differ diff --git a/homescreen/docs/pictures/api_hardKeyPressed.png b/homescreen/docs/pictures/api_hardKeyPressed.png deleted file mode 100644 index a8a3660..0000000 Binary files a/homescreen/docs/pictures/api_hardKeyPressed.png and /dev/null differ diff --git a/homescreen/docs/pictures/api_renderSurfaceToArea.png b/homescreen/docs/pictures/api_renderSurfaceToArea.png deleted file mode 100644 index a61fc2f..0000000 Binary files a/homescreen/docs/pictures/api_renderSurfaceToArea.png and /dev/null differ diff --git a/homescreen/docs/pictures/api_renderSurfaceToAreaAllowed.png b/homescreen/docs/pictures/api_renderSurfaceToAreaAllowed.png deleted file mode 100644 index 35dbbcf..0000000 Binary files a/homescreen/docs/pictures/api_renderSurfaceToAreaAllowed.png and /dev/null differ diff --git a/homescreen/docs/pictures/api_requestSurfaceIdToFullScreen.png b/homescreen/docs/pictures/api_requestSurfaceIdToFullScreen.png deleted file mode 100644 index 6d2f712..0000000 Binary files a/homescreen/docs/pictures/api_requestSurfaceIdToFullScreen.png and /dev/null differ diff --git a/homescreen/docs/pictures/api_surfaceVisibilityChanged.png b/homescreen/docs/pictures/api_surfaceVisibilityChanged.png deleted file mode 100644 index f519757..0000000 Binary files a/homescreen/docs/pictures/api_surfaceVisibilityChanged.png and /dev/null differ diff --git a/homescreen/docs/pictures/dashboard.png b/homescreen/docs/pictures/dashboard.png deleted file mode 100644 index 527386d..0000000 Binary files a/homescreen/docs/pictures/dashboard.png and /dev/null differ diff --git a/homescreen/docs/pictures/full/dashboard.png b/homescreen/docs/pictures/full/dashboard.png deleted file mode 100644 index e947734..0000000 Binary files a/homescreen/docs/pictures/full/dashboard.png and /dev/null differ diff --git a/homescreen/docs/pictures/full/homescreen_applauncher.png b/homescreen/docs/pictures/full/homescreen_applauncher.png deleted file mode 100644 index b61884a..0000000 Binary files a/homescreen/docs/pictures/full/homescreen_applauncher.png and /dev/null differ diff --git a/homescreen/docs/pictures/full/hvac.png b/homescreen/docs/pictures/full/hvac.png deleted file mode 100644 index 7e0399a..0000000 Binary files a/homescreen/docs/pictures/full/hvac.png and /dev/null differ diff --git a/homescreen/docs/pictures/full/phone.png b/homescreen/docs/pictures/full/phone.png deleted file mode 100644 index f4cc547..0000000 Binary files a/homescreen/docs/pictures/full/phone.png and /dev/null differ diff --git a/homescreen/docs/pictures/full/settings.png b/homescreen/docs/pictures/full/settings.png deleted file mode 100644 index a115ef4..0000000 Binary files a/homescreen/docs/pictures/full/settings.png and /dev/null differ diff --git a/homescreen/docs/pictures/homescreen_applauncher.png b/homescreen/docs/pictures/homescreen_applauncher.png deleted file mode 100644 index e168668..0000000 Binary files a/homescreen/docs/pictures/homescreen_applauncher.png and /dev/null differ diff --git a/homescreen/docs/pictures/hvac.png b/homescreen/docs/pictures/hvac.png deleted file mode 100644 index f9a6030..0000000 Binary files a/homescreen/docs/pictures/hvac.png and /dev/null differ diff --git a/homescreen/docs/pictures/phone.png b/homescreen/docs/pictures/phone.png deleted file mode 100644 index e087594..0000000 Binary files a/homescreen/docs/pictures/phone.png and /dev/null differ diff --git a/homescreen/docs/pictures/settings.png b/homescreen/docs/pictures/settings.png deleted file mode 100644 index c92d835..0000000 Binary files a/homescreen/docs/pictures/settings.png and /dev/null differ diff --git a/homescreen/homescreen.pro b/homescreen/homescreen.pro index 0e5bb58..e0a038e 100644 --- a/homescreen/homescreen.pro +++ b/homescreen/homescreen.pro @@ -29,22 +29,20 @@ SOURCES += \ src/statusbarmodel.cpp \ src/statusbarserver.cpp \ src/applicationlauncher.cpp \ - src/mastervolume.cpp \ - src/homescreenhandler.cpp + src/homescreenhandler.cpp \ + src/toucharea.cpp HEADERS += \ src/statusbarmodel.h \ src/statusbarserver.h \ src/applicationlauncher.h \ - src/mastervolume.h \ - src/homescreenhandler.h + src/homescreenhandler.h \ + src/toucharea.h OTHER_FILES += \ README.md RESOURCES += \ - qml/images/MediaPlayer/mediaplayer.qrc \ - qml/images/MediaMusic/mediamusic.qrc \ qml/images/Weather/weather.qrc \ qml/images/Shortcut/shortcut.qrc \ qml/images/Status/status.qrc \ diff --git a/homescreen/qml/MediaArea.qml b/homescreen/qml/MediaArea.qml deleted file mode 100644 index 0447589..0000000 --- a/homescreen/qml/MediaArea.qml +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2016 The Qt Company Ltd. - * Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import QtQuick 2.2 -import QtQuick.Controls 2.0 - -StackView { - id: root - width: 1080 - height: 215 - - initialItem: blank - - Component { - id: blank - MediaAreaBlank { -// MouseArea { -// anchors.fill: parent -// onClicked: root.push(mouse.x < 540 ? music : radio) -// } - } - } - - Component { - id: music - MediaAreaMusic { - MouseArea { - anchors.fill: parent - onClicked: root.pop() - } - } - } - - Component { - id: radio - MediaAreaRadio { - MouseArea { - anchors.fill: parent - onClicked: root.pop() - } - } - } -} diff --git a/homescreen/qml/MediaAreaBlank.qml b/homescreen/qml/MediaAreaBlank.qml deleted file mode 100644 index c3a5f89..0000000 --- a/homescreen/qml/MediaAreaBlank.qml +++ /dev/null @@ -1,121 +0,0 @@ -/* - * Copyright (C) 2016 The Qt Company Ltd. - * Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import QtQuick 2.2 -import QtQuick.Layouts 1.1 -import QtQuick.Controls 2.0 -import AGL.Demo.Controls 1.0 -import MasterVolume 1.0 - -Image { - width: 1080 - height: 215 - source: './images/Utility_Logo_Background-01.svg' - property bool displayVolume: false; - - MouseArea { - anchors.fill: parent - function enableVolumeDisplay() { - if (!displayVolume) { - displayVolume = true - master_volume.visible = true - volume_timer.restart() - } - } - onClicked: enableVolumeDisplay() - } - - Image { - id: logo_image - anchors.centerIn: parent - source: './images/Utility_Logo_Grey-01.svg' - } - - Timer { - id: volume_timer - interval: 5000; running: false; repeat: false - onTriggered: displayVolume = false - } - - states: [ - State { when: displayVolume; - PropertyChanges { target: master_volume; opacity: 1.0 } - PropertyChanges { target: slider; enabled: true } - PropertyChanges { target: logo_image; opacity: 0.0 } - }, - State { when: !displayVolume; - PropertyChanges { target: master_volume; opacity: 0.0 } - PropertyChanges { target: slider; enabled: false } - PropertyChanges { target: logo_image; opacity: 1.0 } - } - ] - - transitions: Transition { - NumberAnimation { property: "opacity"; duration: 500} - } - - MasterVolume { - id: mv - objectName: "mv" - onVolumeChanged: slider.value = volume - } - - Item { - id: master_volume - anchors.fill: parent - anchors.centerIn: parent - visible: false - - Label { - font.pixelSize: 36 - anchors.horizontalCenter: parent.horizontalCenter - color: "white" - text: qsTr("Master Volume") - } - - RowLayout { - anchors.fill: parent - anchors.centerIn: parent - anchors.margins: 20 - spacing: 20 - Label { - font.pixelSize: 36 - color: "white" - text: "0 %" - } - Slider { - id: slider - Layout.fillWidth: true - from: 0 - to: 65536 - stepSize: 256 - snapMode: Slider.SnapOnRelease - onValueChanged: mv.volume = value - Component.onCompleted: value = mv.volume - onPressedChanged: { - if (pressed) {volume_timer.stop()} - else {volume_timer.restart()} - } - } - Label { - font.pixelSize: 36 - color: "white" - text: "100 %" - } - } - } -} diff --git a/homescreen/qml/MediaAreaMusic.qml b/homescreen/qml/MediaAreaMusic.qml deleted file mode 100644 index c0408e6..0000000 --- a/homescreen/qml/MediaAreaMusic.qml +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (C) 2016 The Qt Company Ltd. - * Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import QtQuick 2.2 -import QtQuick.Layouts 1.1 -import QtQuick.Controls 2.0 - -Image { - width: 1080 - height: 215 - source: './images/Utility_Music_Background-01.png' - - ColumnLayout { - anchors.fill: parent - spacing: 1 - RowLayout { - Layout.fillWidth: true - Layout.fillHeight: true - Layout.preferredHeight: 107 - spacing: 10 - Image { - source: './images/MediaMusic/AlbumArtwork.png' - width: 105.298 - height: 110.179 - fillMode: Image.PreserveAspectFit - } - Label { - text: 'Come Together - The Beatles' - font.family: 'Roboto' - font.pixelSize: 32 - color: 'white' - } - } - - RowLayout { - Layout.fillWidth: true - Layout.fillHeight: true - Layout.preferredHeight: 107 - Image { - source: './images/MediaPlayer/AGL_MediaPlayer_BackArrow.png' - } - Image { - source: './images/MediaPlayer/AGL_MediaPlayer_Player_Pause.png' - } - Image { - source: './images/MediaPlayer/AGL_MediaPlayer_ForwardArrow.png' - } - - ProgressBar { - Layout.fillWidth: true - Layout.preferredWidth: 2 - } - - Label { - text: '2:12/4:19' - font.family: 'Roboto' - font.pixelSize: 20 - } - Image { - source: './images/MediaPlayer/AGL_MediaPlayer_Shuffle_Active.png' - } - Image { - source: './images/MediaPlayer/AGL_MediaPlayer_Shuffle_Active.png' - } - ProgressBar { - Layout.fillWidth: true - Layout.preferredWidth: 1 - } - } - } -} diff --git a/homescreen/qml/MediaAreaRadio.qml b/homescreen/qml/MediaAreaRadio.qml deleted file mode 100644 index a49f06d..0000000 --- a/homescreen/qml/MediaAreaRadio.qml +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright (C) 2016 The Qt Company Ltd. - * Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import QtQuick 2.2 - -Image { - width: 1080 - height: 215 - source: './images/Utility_Radio_Background-01.png' -} diff --git a/homescreen/qml/ShortcutArea.qml b/homescreen/qml/ShortcutArea.qml index e0c9182..b33df22 100644 --- a/homescreen/qml/ShortcutArea.qml +++ b/homescreen/qml/ShortcutArea.qml @@ -21,8 +21,18 @@ import QtQuick.Layouts 1.1 Item { id: root - width: 785 - height: 218 + width: 700 + height: 110 + + Timer { + id:informationTimer + interval: 3000 + running: false + repeat: true + onTriggered: { + bottomInformation.visible = false + } + } ListModel { @@ -36,12 +46,16 @@ Item { application: 'mediaplayer@0.1' } ListElement { - name: 'HVAC' - application: 'hvac@0.1' + name: 'navigation' + application: 'navigation@0.1' + } + ListElement { + name: 'Phone' + application: 'phone@0.1' } ListElement { - name: 'Navigation' - application: 'navigation@0.1' + name: 'settings' + application: 'settings@0.1' } } @@ -49,16 +63,23 @@ Item { RowLayout { anchors.fill: parent - spacing: 2 + spacing: 75 Repeater { model: applicationModel delegate: ShortcutIcon { - Layout.fillWidth: true - Layout.fillHeight: true +// Layout.fillWidth: true +// Layout.fillHeight: true + width: 60 + height: 60 name: model.name active: model.name === launcher.current onClicked: { - pid = launcher.launch(model.application) + if(model.application === 'navigation@0.1') { + pid = launcher.launch('browser@5.0') + } else { + pid = launcher.launch(model.application.toLowerCase()) + } + if (1 < pid) { applicationArea.visible = true } @@ -66,9 +87,42 @@ Item { console.warn(model.application) console.warn("app cannot be launched!") } - homescreenHandler.tapShortcut(model.name) + if(model.name === 'Navigation') { + homescreenHandler.tapShortcut('browser') + } else { + homescreenHandler.tapShortcut(model.name) + } } } } } + Rectangle { + id: bottomInformation + width: parent.width + height: parent.height-20 + anchors.bottom: parent.bottom + color: "gray" + z: 1 + opacity: 0.8 + visible: false + + Text { + id: informationText + anchors.centerIn: parent + font.pixelSize: 25 + font.letterSpacing: 5 + horizontalAlignment: Text.AlignHCenter + color: "white" + text: "" + } + } + + Connections { + target: homescreenHandler + onInformation: { + informationText.text = text + bottomInformation.visible = true + informationTimer.restart() + } + } } diff --git a/homescreen/qml/ShortcutIcon.qml b/homescreen/qml/ShortcutIcon.qml index 1100a7c..026db32 100644 --- a/homescreen/qml/ShortcutIcon.qml +++ b/homescreen/qml/ShortcutIcon.qml @@ -21,8 +21,8 @@ import QtGraphicalEffects 1.0 MouseArea { id: root - width: 195 - height: 216.8 + width: 70 + height: 70 property string name: 'Home' property bool active: false Item { @@ -32,12 +32,12 @@ MouseArea { Image { id: inactiveIcon anchors.fill: parent - source: './images/Shortcut/%1.svg'.arg(root.name.toLowerCase()) + source: './images/Shortcut/%1.png'.arg(root.name.toLowerCase()) } Image { id: activeIcon anchors.fill: parent - source: './images/Shortcut/%1_active.svg'.arg(root.name.toLowerCase()) + source: './images/Shortcut/%1_active.png'.arg(root.name.toLowerCase()) opacity: 0.0 } layer.enabled: true @@ -47,42 +47,6 @@ MouseArea { cached: true } } - Label { - id: name - y: 160 - width: root.width - 10 - font.pixelSize: 15 - font.letterSpacing: 5 - // wrapMode: Text.WordWrap - anchors.horizontalCenter: parent.horizontalCenter - horizontalAlignment: Text.AlignHCenter - color: "white" - text: qsTr(model.name.toUpperCase()) - } - states: [ - State { - when: launcher.launching - PropertyChanges { - target: root - enabled: false - } - PropertyChanges { - target: icon - desaturation: 1.0 - } - }, - State { - when: root.active - PropertyChanges { - target: inactiveIcon - opacity: 0.0 - } - PropertyChanges { - target: activeIcon - opacity: 1.0 - } - } - ] transitions: [ Transition { @@ -97,4 +61,14 @@ MouseArea { } } ] + + onPressed: { + activeIcon.opacity = 1.0 + inactiveIcon.opacity = 0.0 + } + + onReleased: { + activeIcon.opacity = 0.0 + inactiveIcon.opacity = 1.0 + } } diff --git a/homescreen/qml/StatusArea.qml b/homescreen/qml/StatusArea.qml index 3f2b280..bd81767 100644 --- a/homescreen/qml/StatusArea.qml +++ b/homescreen/qml/StatusArea.qml @@ -1,7 +1,6 @@ /* * Copyright (C) 2016 The Qt Company Ltd. * Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH - * Copyright (c) 2017, 2018 TOYOTA MOTOR CORPORATION * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,8 +21,8 @@ import HomeScreen 1.0 Item { id: root - width: 295 - height: 218 + width: 700 + height: 80 property date now: new Date Timer { @@ -31,19 +30,27 @@ Item { onTriggered: root.now = new Date } + Timer { + id:notificationTimer + interval: 3000 + running: false + repeat: true + onTriggered: notificationItem.visible = false + } + Connections { target: weather onConditionChanged: { var icon = '' - if (condition.indexOf("clouds") != -1) { + if (condition.indexOf("clouds") !== -1) { icon = "WeatherIcons_Cloudy-01.png" - } else if (condition.indexOf("thunderstorm") != -1) { + } else if (condition.indexOf("thunderstorm") !== -1) { icon = "WeatherIcons_Thunderstorm-01.png" - } else if (condition.indexOf("snow") != -1) { + } else if (condition.indexOf("snow") !== -1) { icon = "WeatherIcons_Snow-01.png" - } else if (condition.indexOf("rain") != -1) { + } else if (condition.indexOf("rain") !== -1) { icon = "WeatherIcons_Rain-01.png" } @@ -55,116 +62,153 @@ Item { } } - RowLayout { - anchors.fill: parent - spacing: 0 - Item { - Layout.fillWidth: true - Layout.fillHeight: true - Layout.preferredWidth: 295 - 76 - ColumnLayout { - anchors.fill: parent - anchors.margins: 40 - spacing: 0 - Text { - Layout.fillWidth: true - Layout.fillHeight: true - text: Qt.formatDate(now, 'dddd').toUpperCase() - font.family: 'Roboto' - font.pixelSize: 13 - color: 'white' - verticalAlignment: Text.AlignVCenter -// Rectangle { -// anchors.fill: parent -// anchors.margins: 5 -// color: 'red' -// border.color: 'blue' -// border.width: 1 -// z: -1 -// } + RowLayout { + anchors.fill: parent + spacing: 0 + RowLayout { + id: icons + Layout.fillWidth: true + Layout.fillHeight: true + Layout.preferredWidth: 120 + spacing: -10 + + Image { + id: bt_icon + Layout.preferredWidth: 50 + Layout.preferredHeight: 50 + source: connStatus ? './images/Status/HMI_Status_Bluetooth_On-01.png' : './images/Status/HMI_Status_Bluetooth_Inactive-01.png' + fillMode: Image.PreserveAspectFit + property string deviceName: "none" + property bool connStatus: false + Connections { + target: bluetooth + onConnectionEvent: { + console.log("onConnectionEvent", data.Status) + if (data.Status === "connected") { + bt_icon.connStatus = true + } else if (data.Status === "disconnected") { + bt_icon.connStatus = false + } + } + onDeviceUpdateEvent: { + console.log("onConnectionEvent", data.Paired) + if (data.Paired === "True" && data.Connected === "True") { + bt_icon.deviceName = data.name + bt_icon.connStatus = true + } else { + if(bt_icon.deviceName === data.Name) + { + bt_icon.connStatus = false + } + } + } + } } - Text { - Layout.fillWidth: true - Layout.fillHeight: true - text: Qt.formatTime(now, 'h:mm ap').toUpperCase() - font.family: 'Roboto' - font.pixelSize: 40 - color: 'white' - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter + + Repeater { + model: StatusBarModel { objectName: "statusBar" } + delegate: Image { + Layout.preferredWidth: 50 + Layout.preferredHeight: 50 + source: model.modelData + fillMode: Image.PreserveAspectFit + } } - RowLayout { - Layout.fillWidth: true - Layout.fillHeight: true - Layout.preferredHeight: 20 - Image { - id: condition_item - source: './images/Weather/WeatherIcons_Rain-01.png' + } + Item { + anchors.left: icons.right + Layout.fillHeight: true + width: 440 + ColumnLayout { + anchors.fill: parent + anchors.margins: 17 + spacing: 0 + Text { + Layout.fillWidth: true + Layout.fillHeight: true + text: Qt.formatDate(now, 'dddd').toUpperCase() + font.family: 'Roboto' + font.pixelSize: 13 + color: 'white' + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter } Text { - id: temperature_item - text: '64°F' + Layout.fillWidth: true + Layout.fillHeight: true + text: Qt.formatTime(now, 'h:mm ap').toUpperCase() + font.family: 'Roboto' + font.pixelSize: 38 color: 'white' - font.family: 'Helvetica' - font.pixelSize: 32 + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter } } } - } - ColumnLayout { - id: icons - Layout.fillWidth: true - Layout.fillHeight: true - Layout.preferredWidth: 76 - spacing: -10 - - Image { - id: bt_icon - Layout.preferredWidth: 77 - Layout.preferredHeight: 73 - source: connStatus ? './images/Status/HMI_Status_Bluetooth_On-01.png' : './images/Status/HMI_Status_Bluetooth_Inactive-01.png' - fillMode: Image.PreserveAspectFit - property string deviceName: "none" - property bool connStatus: false - Connections { - target: bluetooth - - //{"event":"Bluetooth-Manager\/connection","data":{"Status":"connected","Address":"88:BD:45:EC:3A:E6"},"jtype":"afb-event"} - //{"event":"Bluetooth-Manager\/connection","data":{"Status":"disconnected","Address":"88:BD:45:EC:3A:E6"},"jtype":"afb-event"} - onConnectionEvent: { - // console.log("bluetooth connection is:", data.Status) - // console.log("onConnectionEvent bt_icon.deviceName:",bt_icon.deviceName, "bt_icon.connStatus:", bt_icon.connStatus) - if (data.Status == "connected"){ - bt_icon.connStatus = true - } else if (data.Status == "disconnected"){ - bt_icon.connStatus = false - } - } - //{"event":"Bluetooth-Manager\/device_updated","data":{"Address":"88:BD:45:EC:3A:E6","Name":"SG02","Paired":"True","Connected":"True","AVPConnected":"True","Metadata":{"Title":"","Artist":"","Status":"stop} - onDeviceUpdatedEvent: { - // console.log("bluetooth onDeviceUpdatedEvent date is:", data.Name, "Paired: ", data.Paired, "Connected: ", data.Connected) - // console.log("onDeviceUpdatedEvent bt_icon.deviceName:",bt_icon.deviceName, "bt_icon.connStatus:", bt_icon.connStatus) - if ( data.Paired == "True" && data.Connected == "True" ){ - bt_icon.deviceName = data.Name - bt_icon.connStatus = true - } else { - if(bt_icon.deviceName == data.Name) - { - bt_icon.connStatus = false - } - } - } + RowLayout { + Layout.fillWidth: true + Layout.fillHeight: true + Layout.preferredHeight: 20 + + Image { + id: condition_item + source: './images/Weather/WeatherIcons_Rain-01.png' + } + Text { + id: temperature_item + text: '64°F' + color: 'white' + font.family: 'Helvetica' + font.pixelSize: 32 } } - Repeater { - model: StatusBarModel { objectName: "statusBar" } - delegate: Image { - Layout.preferredWidth: 77 - Layout.preferredHeight: 73 - source: model.modelData - fillMode: Image.PreserveAspectFit + } + + Item { + id: notificationItem + x: 0 + y: 0 + z: 1 + width: parent.width + height: 100 + opacity: 0.8 + visible: false + + Rectangle { + width: parent.width + height: parent.height + anchors.fill: parent + color: "gray" + Image { + id: notificationIcon + width: 70 + height: 70 + anchors.left: parent.left + anchors.leftMargin: 20 + anchors.verticalCenter: parent.verticalCenter + source: "" + } + + Text { + id: notificationtext + font.pixelSize: 25 + anchors.left: notificationIcon.right + anchors.leftMargin: 5 + anchors.verticalCenter: parent.verticalCenter + color: "white" + text: qsTr("") } } } - } + + Connections { + target: homescreenHandler + onNotification: { + notificationIcon.source = './images/Shortcut/%1.svg'.arg(id) + notificationtext.text = text + notificationItem.visible = true + notificationTimer.restart() + } + } + } diff --git a/homescreen/qml/TopArea.qml b/homescreen/qml/TopArea.qml index 2a75cf8..978018c 100644 --- a/homescreen/qml/TopArea.qml +++ b/homescreen/qml/TopArea.qml @@ -19,41 +19,18 @@ import QtQuick 2.2 import QtQuick.Layouts 1.1 import QtQuick.Controls 2.0 -Image { - width: 1920 - height: 218 - source: './images/TopSection_NoText_NoIcons-01.svg' - fillMode: Image.PreserveAspectCrop +Item { + width: 700 + height: 80 RowLayout { anchors.fill: parent spacing: 0 - ShortcutArea { - id: shortcutArea - Layout.fillWidth: true - Layout.fillHeight: true - Layout.preferredWidth: 785 - } StatusArea { id: statusArea Layout.fillWidth: true Layout.fillHeight: true - Layout.preferredWidth: 295 + Layout.preferredWidth: 700 } } - - Timer { - id: launching - interval: 500 - running: launcher.launching - } - - ProgressBar { - id: progressBar - anchors.verticalCenter: parent.bottom - anchors.left: parent.left - anchors.right: parent.right - indeterminate: visible - visible: launcher.launching && !launching.running - } } diff --git a/homescreen/qml/images/AGL_HMI_Blue_Background_NoCar-01.png b/homescreen/qml/images/AGL_HMI_Blue_Background_NoCar-01.png deleted file mode 100644 index 357c204..0000000 Binary files a/homescreen/qml/images/AGL_HMI_Blue_Background_NoCar-01.png and /dev/null differ diff --git a/homescreen/qml/images/MediaMusic/AlbumArtwork.png b/homescreen/qml/images/MediaMusic/AlbumArtwork.png deleted file mode 100644 index 3716ab3..0000000 Binary files a/homescreen/qml/images/MediaMusic/AlbumArtwork.png and /dev/null differ diff --git a/homescreen/qml/images/MediaMusic/BackArrow.png b/homescreen/qml/images/MediaMusic/BackArrow.png deleted file mode 100644 index 63e38d9..0000000 Binary files a/homescreen/qml/images/MediaMusic/BackArrow.png and /dev/null differ diff --git a/homescreen/qml/images/MediaMusic/ForwardArrow.png b/homescreen/qml/images/MediaMusic/ForwardArrow.png deleted file mode 100644 index a513705..0000000 Binary files a/homescreen/qml/images/MediaMusic/ForwardArrow.png and /dev/null differ diff --git a/homescreen/qml/images/MediaMusic/ShuffleIcon.png b/homescreen/qml/images/MediaMusic/ShuffleIcon.png deleted file mode 100644 index 30f75c5..0000000 Binary files a/homescreen/qml/images/MediaMusic/ShuffleIcon.png and /dev/null differ diff --git a/homescreen/qml/images/MediaMusic/Volume_Loud.png b/homescreen/qml/images/MediaMusic/Volume_Loud.png deleted file mode 100644 index 8ea4402..0000000 Binary files a/homescreen/qml/images/MediaMusic/Volume_Loud.png and /dev/null differ diff --git a/homescreen/qml/images/MediaMusic/Volume_Medium.png b/homescreen/qml/images/MediaMusic/Volume_Medium.png deleted file mode 100644 index ae5c82e..0000000 Binary files a/homescreen/qml/images/MediaMusic/Volume_Medium.png and /dev/null differ diff --git a/homescreen/qml/images/MediaMusic/Volume_Off.png b/homescreen/qml/images/MediaMusic/Volume_Off.png deleted file mode 100644 index 07e3353..0000000 Binary files a/homescreen/qml/images/MediaMusic/Volume_Off.png and /dev/null differ diff --git a/homescreen/qml/images/MediaMusic/mediamusic.qrc b/homescreen/qml/images/MediaMusic/mediamusic.qrc deleted file mode 100644 index b1138c0..0000000 --- a/homescreen/qml/images/MediaMusic/mediamusic.qrc +++ /dev/null @@ -1,11 +0,0 @@ - - - AlbumArtwork.png - BackArrow.png - ForwardArrow.png - ShuffleIcon.png - Volume_Loud.png - Volume_Medium.png - Volume_Off.png - - diff --git a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_AlbumArtwork.png b/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_AlbumArtwork.png deleted file mode 100644 index 14a52b2..0000000 Binary files a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_AlbumArtwork.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_BackArrow.png b/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_BackArrow.png deleted file mode 100644 index 0ec1f67..0000000 Binary files a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_BackArrow.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Bluetooth_Active.png b/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Bluetooth_Active.png deleted file mode 100644 index bc2df1d..0000000 Binary files a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Bluetooth_Active.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Bluetooth_Inactive.png b/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Bluetooth_Inactive.png deleted file mode 100644 index 8d8fc02..0000000 Binary files a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Bluetooth_Inactive.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_CD_Active.png b/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_CD_Active.png deleted file mode 100644 index 94fe38f..0000000 Binary files a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_CD_Active.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_CD_Inactive.png b/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_CD_Inactive.png deleted file mode 100644 index 12609e1..0000000 Binary files a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_CD_Inactive.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_DividingLine.png b/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_DividingLine.png deleted file mode 100644 index 299903e..0000000 Binary files a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_DividingLine.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_ForwardArrow.png b/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_ForwardArrow.png deleted file mode 100644 index 33cc700..0000000 Binary files a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_ForwardArrow.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Loop_Active.png b/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Loop_Active.png deleted file mode 100644 index 9bdb14d..0000000 Binary files a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Loop_Active.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Loop_Inactive.png b/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Loop_Inactive.png deleted file mode 100644 index 76b0fc9..0000000 Binary files a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Loop_Inactive.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Player_Pause.png b/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Player_Pause.png deleted file mode 100644 index c423005..0000000 Binary files a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Player_Pause.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Player_Play.png b/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Player_Play.png deleted file mode 100644 index beece66..0000000 Binary files a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Player_Play.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_PlaylistToggle_Active.png b/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_PlaylistToggle_Active.png deleted file mode 100644 index eec608f..0000000 Binary files a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_PlaylistToggle_Active.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_PlaylistToggle_Inactive.png b/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_PlaylistToggle_Inactive.png deleted file mode 100644 index d392a90..0000000 Binary files a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_PlaylistToggle_Inactive.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Playlist_Active.png b/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Playlist_Active.png deleted file mode 100644 index 22319c9..0000000 Binary files a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Playlist_Active.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Playlist_Inactive.png b/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Playlist_Inactive.png deleted file mode 100644 index 9fd42e2..0000000 Binary files a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Playlist_Inactive.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Radio_Active.png b/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Radio_Active.png deleted file mode 100644 index eb61b39..0000000 Binary files a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Radio_Active.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Radio_Inactive.png b/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Radio_Inactive.png deleted file mode 100644 index de305f0..0000000 Binary files a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Radio_Inactive.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Shuffle_Active.png b/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Shuffle_Active.png deleted file mode 100644 index d97feec..0000000 Binary files a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Shuffle_Active.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Shuffle_Inactive.png b/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Shuffle_Inactive.png deleted file mode 100644 index 7f6445d..0000000 Binary files a/homescreen/qml/images/MediaPlayer/AGL_MediaPlayer_Shuffle_Inactive.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/Albums_Active.png b/homescreen/qml/images/MediaPlayer/Albums_Active.png deleted file mode 100644 index 1f66e23..0000000 Binary files a/homescreen/qml/images/MediaPlayer/Albums_Active.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/Albums_Inactive.png b/homescreen/qml/images/MediaPlayer/Albums_Inactive.png deleted file mode 100644 index e0e7f00..0000000 Binary files a/homescreen/qml/images/MediaPlayer/Albums_Inactive.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/DividingLine.png b/homescreen/qml/images/MediaPlayer/DividingLine.png deleted file mode 100644 index 87f2122..0000000 Binary files a/homescreen/qml/images/MediaPlayer/DividingLine.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/GreenLine.png b/homescreen/qml/images/MediaPlayer/GreenLine.png deleted file mode 100644 index 0210b83..0000000 Binary files a/homescreen/qml/images/MediaPlayer/GreenLine.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/Music_Active.png b/homescreen/qml/images/MediaPlayer/Music_Active.png deleted file mode 100644 index 36afac7..0000000 Binary files a/homescreen/qml/images/MediaPlayer/Music_Active.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/Music_Inactive.png b/homescreen/qml/images/MediaPlayer/Music_Inactive.png deleted file mode 100644 index 9dae353..0000000 Binary files a/homescreen/qml/images/MediaPlayer/Music_Inactive.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/Podcasts_Active.png b/homescreen/qml/images/MediaPlayer/Podcasts_Active.png deleted file mode 100644 index fd2d2c0..0000000 Binary files a/homescreen/qml/images/MediaPlayer/Podcasts_Active.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/Podcasts_Inactive.png b/homescreen/qml/images/MediaPlayer/Podcasts_Inactive.png deleted file mode 100644 index b76b04c..0000000 Binary files a/homescreen/qml/images/MediaPlayer/Podcasts_Inactive.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/Popup_Highlight.png b/homescreen/qml/images/MediaPlayer/Popup_Highlight.png deleted file mode 100644 index ac63673..0000000 Binary files a/homescreen/qml/images/MediaPlayer/Popup_Highlight.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/Popup_PauseIcon.png b/homescreen/qml/images/MediaPlayer/Popup_PauseIcon.png deleted file mode 100644 index 2627add..0000000 Binary files a/homescreen/qml/images/MediaPlayer/Popup_PauseIcon.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/Popup_PlayIcon.png b/homescreen/qml/images/MediaPlayer/Popup_PlayIcon.png deleted file mode 100644 index 0483e07..0000000 Binary files a/homescreen/qml/images/MediaPlayer/Popup_PlayIcon.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/Popup_VerticalLine.png b/homescreen/qml/images/MediaPlayer/Popup_VerticalLine.png deleted file mode 100644 index 6a9db00..0000000 Binary files a/homescreen/qml/images/MediaPlayer/Popup_VerticalLine.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/X.png b/homescreen/qml/images/MediaPlayer/X.png deleted file mode 100644 index ab392cb..0000000 Binary files a/homescreen/qml/images/MediaPlayer/X.png and /dev/null differ diff --git a/homescreen/qml/images/MediaPlayer/mediaplayer.qrc b/homescreen/qml/images/MediaPlayer/mediaplayer.qrc deleted file mode 100644 index 1cb17ab..0000000 --- a/homescreen/qml/images/MediaPlayer/mediaplayer.qrc +++ /dev/null @@ -1,37 +0,0 @@ - - - AGL_MediaPlayer_AlbumArtwork.png - AGL_MediaPlayer_BackArrow.png - AGL_MediaPlayer_Bluetooth_Active.png - AGL_MediaPlayer_Bluetooth_Inactive.png - AGL_MediaPlayer_CD_Active.png - AGL_MediaPlayer_CD_Inactive.png - AGL_MediaPlayer_DividingLine.png - AGL_MediaPlayer_ForwardArrow.png - AGL_MediaPlayer_Loop_Active.png - AGL_MediaPlayer_Loop_Inactive.png - AGL_MediaPlayer_Player_Pause.png - AGL_MediaPlayer_Player_Play.png - AGL_MediaPlayer_Playlist_Active.png - AGL_MediaPlayer_Playlist_Inactive.png - AGL_MediaPlayer_PlaylistToggle_Active.png - AGL_MediaPlayer_PlaylistToggle_Inactive.png - AGL_MediaPlayer_Radio_Active.png - AGL_MediaPlayer_Radio_Inactive.png - AGL_MediaPlayer_Shuffle_Active.png - AGL_MediaPlayer_Shuffle_Inactive.png - Albums_Active.png - Albums_Inactive.png - DividingLine.png - GreenLine.png - Music_Active.png - Music_Inactive.png - Podcasts_Active.png - Podcasts_Inactive.png - Popup_Highlight.png - Popup_PauseIcon.png - Popup_PlayIcon.png - Popup_VerticalLine.png - X.png - - diff --git a/homescreen/qml/images/Shortcut/hvac.svg b/homescreen/qml/images/Shortcut/hvac.svg deleted file mode 100644 index 5c76e85..0000000 --- a/homescreen/qml/images/Shortcut/hvac.svg +++ /dev/null @@ -1,600 +0,0 @@ - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/homescreen/qml/images/Shortcut/hvac_active.svg b/homescreen/qml/images/Shortcut/hvac_active.svg deleted file mode 100644 index 46be46b..0000000 --- a/homescreen/qml/images/Shortcut/hvac_active.svg +++ /dev/null @@ -1,614 +0,0 @@ - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/homescreen/qml/images/Shortcut/launcher.png b/homescreen/qml/images/Shortcut/launcher.png new file mode 100644 index 0000000..6f91d50 Binary files /dev/null and b/homescreen/qml/images/Shortcut/launcher.png differ diff --git a/homescreen/qml/images/Shortcut/launcher.svg b/homescreen/qml/images/Shortcut/launcher.svg deleted file mode 100644 index b6eab24..0000000 --- a/homescreen/qml/images/Shortcut/launcher.svg +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/homescreen/qml/images/Shortcut/launcher_active.png b/homescreen/qml/images/Shortcut/launcher_active.png new file mode 100644 index 0000000..2706961 Binary files /dev/null and b/homescreen/qml/images/Shortcut/launcher_active.png differ diff --git a/homescreen/qml/images/Shortcut/launcher_active.svg b/homescreen/qml/images/Shortcut/launcher_active.svg deleted file mode 100644 index e85c7d8..0000000 --- a/homescreen/qml/images/Shortcut/launcher_active.svg +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/homescreen/qml/images/Shortcut/mediaplayer.png b/homescreen/qml/images/Shortcut/mediaplayer.png new file mode 100644 index 0000000..8ea7d76 Binary files /dev/null and b/homescreen/qml/images/Shortcut/mediaplayer.png differ diff --git a/homescreen/qml/images/Shortcut/mediaplayer.svg b/homescreen/qml/images/Shortcut/mediaplayer.svg deleted file mode 100644 index de7448d..0000000 --- a/homescreen/qml/images/Shortcut/mediaplayer.svg +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/homescreen/qml/images/Shortcut/mediaplayer_active.png b/homescreen/qml/images/Shortcut/mediaplayer_active.png new file mode 100644 index 0000000..b130b92 Binary files /dev/null and b/homescreen/qml/images/Shortcut/mediaplayer_active.png differ diff --git a/homescreen/qml/images/Shortcut/mediaplayer_active.svg b/homescreen/qml/images/Shortcut/mediaplayer_active.svg deleted file mode 100644 index 16e3af5..0000000 --- a/homescreen/qml/images/Shortcut/mediaplayer_active.svg +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/homescreen/qml/images/Shortcut/music.svg b/homescreen/qml/images/Shortcut/music.svg new file mode 100644 index 0000000..b6ec056 --- /dev/null +++ b/homescreen/qml/images/Shortcut/music.svg @@ -0,0 +1,111 @@ + + + +image/svg+xml \ No newline at end of file diff --git a/homescreen/qml/images/Shortcut/navigation.png b/homescreen/qml/images/Shortcut/navigation.png new file mode 100644 index 0000000..17b347b Binary files /dev/null and b/homescreen/qml/images/Shortcut/navigation.png differ diff --git a/homescreen/qml/images/Shortcut/navigation.svg b/homescreen/qml/images/Shortcut/navigation.svg index 6f6f1e0..97fcf31 100644 --- a/homescreen/qml/images/Shortcut/navigation.svg +++ b/homescreen/qml/images/Shortcut/navigation.svg @@ -1,77 +1,183 @@ - + - - - - - - - - -]> - - \ No newline at end of file diff --git a/homescreen/qml/images/Shortcut/navigation_active.png b/homescreen/qml/images/Shortcut/navigation_active.png new file mode 100644 index 0000000..bebb23e Binary files /dev/null and b/homescreen/qml/images/Shortcut/navigation_active.png differ diff --git a/homescreen/qml/images/Shortcut/navigation_active.svg b/homescreen/qml/images/Shortcut/navigation_active.svg deleted file mode 100644 index 9076934..0000000 --- a/homescreen/qml/images/Shortcut/navigation_active.svg +++ /dev/null @@ -1,90 +0,0 @@ - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/homescreen/qml/images/Shortcut/phone.png b/homescreen/qml/images/Shortcut/phone.png new file mode 100644 index 0000000..d0ca0af Binary files /dev/null and b/homescreen/qml/images/Shortcut/phone.png differ diff --git a/homescreen/qml/images/Shortcut/phone_active.png b/homescreen/qml/images/Shortcut/phone_active.png new file mode 100644 index 0000000..77e45fd Binary files /dev/null and b/homescreen/qml/images/Shortcut/phone_active.png differ diff --git a/homescreen/qml/images/Shortcut/settings.png b/homescreen/qml/images/Shortcut/settings.png new file mode 100644 index 0000000..8c36376 Binary files /dev/null and b/homescreen/qml/images/Shortcut/settings.png differ diff --git a/homescreen/qml/images/Shortcut/settings_active.png b/homescreen/qml/images/Shortcut/settings_active.png new file mode 100644 index 0000000..d863457 Binary files /dev/null and b/homescreen/qml/images/Shortcut/settings_active.png differ diff --git a/homescreen/qml/images/Shortcut/shortcut.qrc b/homescreen/qml/images/Shortcut/shortcut.qrc index 5d67341..40462f4 100644 --- a/homescreen/qml/images/Shortcut/shortcut.qrc +++ b/homescreen/qml/images/Shortcut/shortcut.qrc @@ -1,12 +1,16 @@ - launcher.svg - launcher_active.svg - hvac.svg - hvac_active.svg - mediaplayer.svg - mediaplayer_active.svg + launcher.png + launcher_active.png + mediaplayer.png + mediaplayer_active.png + navigation.png + navigation_active.png + phone.png + phone_active.png + settings.png + settings_active.png navigation.svg - navigation_active.svg + music.svg diff --git a/homescreen/qml/images/TopSection_NoText_NoIcons-01.svg b/homescreen/qml/images/TopSection_NoText_NoIcons-01.svg deleted file mode 100644 index 6841001..0000000 --- a/homescreen/qml/images/TopSection_NoText_NoIcons-01.svg +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/homescreen/qml/images/Utility_Logo_Background-01.svg b/homescreen/qml/images/Utility_Logo_Background-01.svg deleted file mode 100644 index c289805..0000000 --- a/homescreen/qml/images/Utility_Logo_Background-01.svg +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/homescreen/qml/images/Utility_Logo_Grey-01.svg b/homescreen/qml/images/Utility_Logo_Grey-01.svg deleted file mode 100644 index 16ac88c..0000000 --- a/homescreen/qml/images/Utility_Logo_Grey-01.svg +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - -]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/homescreen/qml/images/Utility_Music_Background-01.png b/homescreen/qml/images/Utility_Music_Background-01.png deleted file mode 100644 index c3e9f91..0000000 Binary files a/homescreen/qml/images/Utility_Music_Background-01.png and /dev/null differ diff --git a/homescreen/qml/images/Utility_Radio_Background-01.png b/homescreen/qml/images/Utility_Radio_Background-01.png deleted file mode 100644 index b755843..0000000 Binary files a/homescreen/qml/images/Utility_Radio_Background-01.png and /dev/null differ diff --git a/homescreen/qml/images/fullscreen.png b/homescreen/qml/images/fullscreen.png new file mode 100644 index 0000000..3bb9ef0 Binary files /dev/null and b/homescreen/qml/images/fullscreen.png differ diff --git a/homescreen/qml/images/images.qrc b/homescreen/qml/images/images.qrc index 37ad676..e72f697 100644 --- a/homescreen/qml/images/images.qrc +++ b/homescreen/qml/images/images.qrc @@ -1,10 +1,9 @@ - TopSection_NoText_NoIcons-01.svg - Utility_Logo_Background-01.svg - Utility_Logo_Grey-01.svg - Utility_Music_Background-01.png - Utility_Radio_Background-01.png - AGL_HMI_Blue_Background_NoCar-01.png + menubar_background.png + menubar_normal_background.png + menubar_full_background.png + fullscreen.png + normal.png diff --git a/homescreen/qml/images/menubar_background.png b/homescreen/qml/images/menubar_background.png new file mode 100644 index 0000000..bb95916 Binary files /dev/null and b/homescreen/qml/images/menubar_background.png differ diff --git a/homescreen/qml/images/menubar_full_background.png b/homescreen/qml/images/menubar_full_background.png new file mode 100644 index 0000000..39e12b9 Binary files /dev/null and b/homescreen/qml/images/menubar_full_background.png differ diff --git a/homescreen/qml/images/menubar_normal_background.png b/homescreen/qml/images/menubar_normal_background.png new file mode 100644 index 0000000..ceb3684 Binary files /dev/null and b/homescreen/qml/images/menubar_normal_background.png differ diff --git a/homescreen/qml/images/normal.png b/homescreen/qml/images/normal.png new file mode 100644 index 0000000..34a9c65 Binary files /dev/null and b/homescreen/qml/images/normal.png differ diff --git a/homescreen/qml/main.qml b/homescreen/qml/main.qml index 96a1950..13500bd 100644 --- a/homescreen/qml/main.qml +++ b/homescreen/qml/main.qml @@ -26,38 +26,145 @@ Window { width: container.width * container.scale height: container.height * container.scale title: 'HomeScreen' + color: "#00000000" Image { id: container anchors.centerIn: parent - width: 1080 - height: 1920 - scale: screenInfo.scale_factor() - source: './images/AGL_HMI_Blue_Background_NoCar-01.png' + width: 1920 + height: 720 + scale: 1.0 + source: './images/menubar_background.png' ColumnLayout { + id: menuBar anchors.fill: parent spacing: 0 TopArea { id: topArea - Layout.fillWidth: true - Layout.preferredHeight: 218 + anchors.horizontalCenter: parent.horizontalCenter + Layout.preferredHeight: 80 + x: 640 } Item { id: applicationArea Layout.fillWidth: true Layout.fillHeight: true - Layout.preferredHeight: 1920 - 218 - 215 + Layout.preferredHeight: 510 visible: true + MouseArea { + enabled: true + } } - MediaArea { - id: mediaArea - Layout.fillWidth: true + ShortcutArea { + id: shortcutArea + anchors.horizontalCenter: parent.horizontalCenter Layout.fillHeight: true - Layout.preferredHeight: 215 + Layout.preferredHeight: 130 + } + } + states: [ + State { + name: "normal" + PropertyChanges { + target: container + y: 0 + } + PropertyChanges { + target: topArea + y: 0 + } + PropertyChanges { + target: applicationArea + y: 80 + } + PropertyChanges { + target: shortcutArea + y: 590 + } + }, + State { + name: "fullscreen" + PropertyChanges { + target: container + y: -720 + } + PropertyChanges { + target: topArea + y: -80 + } + PropertyChanges { + target: applicationArea + y: -510 + } + PropertyChanges { + target: shortcutArea + y: 720 + } + } + ] + transitions: Transition { + NumberAnimation { + target: topArea + property: "y" + easing.type: "OutQuad" + duration: 250 + } + NumberAnimation { + target: applicationArea + property: "y" + easing.type: "OutQuad" + duration: 250 + } + NumberAnimation { + target: shortcutArea + property: "y" + easing.type: "OutQuad" + duration: 250 + } + } + } + + + + + + Item { + id: switchBtn + anchors.right: parent.right + anchors.rightMargin: 20 + anchors.top: parent.top + anchors.topMargin: 5 + width: 55 + height: 55 + z: 1 + + MouseArea { + anchors.fill: parent + property string btnState: 'normal' + Image { + id: image + anchors.fill: parent + source: './images/normal.png' + } + onClicked: { + if (btnState === 'normal') { + image.source = './images/fullscreen.png' + btnState = 'fullscreen' + container.state = 'fullscreen' + container.opacity = 0.0 + touchArea.switchArea(1) + + } else { + image.source = './images/normal.png' + btnState = 'normal' + container.state = 'normal' + container.opacity = 1.0 + touchArea.switchArea(0) + } } } } diff --git a/homescreen/qml/qml.qrc b/homescreen/qml/qml.qrc index e60ea63..933a8a5 100644 --- a/homescreen/qml/qml.qrc +++ b/homescreen/qml/qml.qrc @@ -1,10 +1,6 @@ main.qml - MediaArea.qml - MediaAreaBlank.qml - MediaAreaMusic.qml - MediaAreaRadio.qml ShortcutArea.qml ShortcutIcon.qml StatusArea.qml diff --git a/homescreen/src/homescreenhandler.cpp b/homescreen/src/homescreenhandler.cpp index 5da8b9e..a655a5e 100644 --- a/homescreen/src/homescreenhandler.cpp +++ b/homescreen/src/homescreenhandler.cpp @@ -48,7 +48,6 @@ void HomescreenHandler::init(int port, const char *token) json_object_object_get(object, "display_message")); HMI_DEBUG("HomeScreen","set_event_handler Event_OnScreenMessage display_message = %s", display_message); }); - } void HomescreenHandler::tapShortcut(QString application_name) diff --git a/homescreen/src/homescreenhandler.h b/homescreen/src/homescreenhandler.h index c18d7a0..99367d5 100644 --- a/homescreen/src/homescreenhandler.h +++ b/homescreen/src/homescreenhandler.h @@ -40,6 +40,11 @@ public: static void* myThis; static void onRep_static(struct json_object* reply_contents); static void onEv_static(const string& event, struct json_object* event_contents); + +signals: + void notification(QString id, QString icon, QString text); + void information(QString text); + private: LibHomeScreen *mp_hs; }; diff --git a/homescreen/src/main.cpp b/homescreen/src/main.cpp index 620c869..a80dd04 100644 --- a/homescreen/src/main.cpp +++ b/homescreen/src/main.cpp @@ -1,6 +1,6 @@ /* * Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH - * Copyright (c) 2017, 2018 TOYOTA MOTOR CORPORATION + * Copyright (c) 2017 TOYOTA MOTOR CORPORATION * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -22,6 +22,7 @@ #include #include #include +#include #include #include @@ -29,9 +30,10 @@ #include "applicationlauncher.h" #include "statusbarmodel.h" #include "afm_user_daemon_proxy.h" -#include "mastervolume.h" #include "homescreenhandler.h" +#include "toucharea.h" #include "hmi-debug.h" +#include // XXX: We want this DBus connection to be shared across the different // QML objects, is there another way to do this, a nice way, perhaps? @@ -89,7 +91,6 @@ int main(int argc, char *argv[]) // import C++ class to QML // qmlRegisterType("HomeScreen", 1, 0, "ApplicationLauncher"); qmlRegisterType("HomeScreen", 1, 0, "StatusBarModel"); - qmlRegisterType("MasterVolume", 1, 0, "MasterVolume"); ApplicationLauncher *launcher = new ApplicationLauncher(); QLibWindowmanager* layoutHandler = new QLibWindowmanager(); @@ -97,14 +98,12 @@ int main(int argc, char *argv[]) exit(EXIT_FAILURE); } - AGLScreenInfo screenInfo(layoutHandler->get_scale_factor()); - - if (layoutHandler->requestSurface(QString("HomeScreen")) != 0) { + if (layoutHandler->requestSurface(QString("homescreen")) != 0) { exit(EXIT_FAILURE); } layoutHandler->set_event_handler(QLibWindowmanager::Event_SyncDraw, [layoutHandler](json_object *object) { - layoutHandler->endDraw(QString("HomeScreen")); + layoutHandler->endDraw(QString("homescreen")); }); layoutHandler->set_event_handler(QLibWindowmanager::Event_ScreenUpdated, [layoutHandler, launcher](json_object *object) { @@ -131,23 +130,33 @@ int main(int argc, char *argv[]) query.addQueryItem(QStringLiteral("token"), token); bindingAddress.setQuery(query); + TouchArea* touchArea = new TouchArea(); + // mail.qml loading QQmlApplicationEngine engine; engine.rootContext()->setContextProperty("layoutHandler", layoutHandler); engine.rootContext()->setContextProperty("homescreenHandler", homescreenHandler); + engine.rootContext()->setContextProperty("touchArea", touchArea); engine.rootContext()->setContextProperty("launcher", launcher); engine.rootContext()->setContextProperty("weather", new Weather(bindingAddress)); engine.rootContext()->setContextProperty("bluetooth", new Bluetooth(bindingAddress)); - engine.rootContext()->setContextProperty("screenInfo", &screenInfo); engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); QObject *root = engine.rootObjects().first(); QQuickWindow *window = qobject_cast(root); - QObject::connect(window, SIGNAL(frameSwapped()), layoutHandler, SLOT(slotActivateSurface())); + + touchArea->setWindow(window); + QThread* thread = new QThread; + touchArea->moveToThread(thread); + QObject::connect(thread, &QThread::started, touchArea, &TouchArea::init); + + thread->start(); QList sobjs = engine.rootObjects(); StatusBarModel *statusBar = sobjs.first()->findChild("statusBar"); statusBar->init(bindingAddress, engine.rootContext()); + QObject::connect(window, SIGNAL(frameSwapped()), layoutHandler, SLOT(slotActivateSurface())); + return a.exec(); } diff --git a/homescreen/src/mastervolume.cpp b/homescreen/src/mastervolume.cpp deleted file mode 100644 index 9fb92a9..0000000 --- a/homescreen/src/mastervolume.cpp +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2017 Konsulko Group - * - * 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 "mastervolume.h" - -void MasterVolume::setVolume(int volume) -{ - int volume_delta = volume - m_volume; - m_volume = volume; - emit sliderVolumeChanged(volume_delta); - -} - -void MasterVolume::changeExternalVolume(int volume) -{ - m_volume = volume; - emit volumeChanged(); -} diff --git a/homescreen/src/mastervolume.h b/homescreen/src/mastervolume.h deleted file mode 100644 index bca6356..0000000 --- a/homescreen/src/mastervolume.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (C) 2017 Konsulko Group - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include - -class MasterVolume : public QObject -{ - Q_OBJECT - Q_PROPERTY (uint32_t volume READ getVolume WRITE setVolume NOTIFY volumeChanged) - - public: - MasterVolume(QObject *parent = 0) - : QObject(parent), m_volume(32768) - { - } - - ~MasterVolume() {} - - uint32_t getVolume() const { return m_volume; } - void setVolume(int volume); - - public slots: - void changeExternalVolume(int volume); - - signals: - void volumeChanged(void); - void sliderVolumeChanged(int volume_delta); - void externalVolumeChanged(uint32_t volume); - - private: - uint32_t m_volume; -}; diff --git a/homescreen/src/statusbarmodel.cpp b/homescreen/src/statusbarmodel.cpp index 5e63b7d..c093ceb 100644 --- a/homescreen/src/statusbarmodel.cpp +++ b/homescreen/src/statusbarmodel.cpp @@ -1,6 +1,5 @@ /* * Copyright (C) 2016 The Qt Company Ltd. - * Copyright (C) 2017, 2018 TOYOTA MOTOR CORPORATION * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,11 +16,14 @@ #include "statusbarmodel.h" #include "statusbarserver.h" +#include +#include "hmi-debug.h" #include #include "network.h" + class StatusBarModel::Private { public: @@ -65,6 +67,7 @@ StatusBarModel::~StatusBarModel() void StatusBarModel::init(QUrl &url, QQmlContext *context) { + HMI_DEBUG("HomeScreen", "StatusBarModel::init"); d->network = new Network(url, context); context->setContextProperty("network", d->network); @@ -77,6 +80,7 @@ void StatusBarModel::init(QUrl &url, QQmlContext *context) void StatusBarModel::setWifiStatus(bool connected, bool enabled, int strength) { + HMI_DEBUG("HomeScreen", "StatusBarModel::setWifiStatus"); if (enabled && connected) if (strength < 30) d->server.setStatusIcon(0, QStringLiteral("qrc:/images/Status/HMI_Status_Wifi_1Bar-01.png")); @@ -111,7 +115,6 @@ int StatusBarModel::rowCount(const QModelIndex &parent) const if (parent.isValid()) return 0; - // Delete bluetooth because use agl-service-bluetooth. return StatusBarServer::SupportedCount - 1; } @@ -123,9 +126,9 @@ QVariant StatusBarModel::data(const QModelIndex &index, int role) const switch (role) { case Qt::DisplayRole: - if (index.row() == 0){ + if (index.row() == 0) { ret = d->iconList[StatusBarServer::StatusWifi]; - }else if (index.row() == 1){ + } else if (index.row() == 1) { ret = d->iconList[StatusBarServer::StatusCellular]; } break; diff --git a/homescreen/src/toucharea.cpp b/homescreen/src/toucharea.cpp new file mode 100644 index 0000000..aad4b1b --- /dev/null +++ b/homescreen/src/toucharea.cpp @@ -0,0 +1,33 @@ +#include "toucharea.h" + +TouchArea::TouchArea() +{ +} + +TouchArea::~TouchArea() +{ + +} + +void TouchArea::setWindow(QQuickWindow *window) +{ + myWindow = window; +} + +void TouchArea::init() +{ + bitmapNormal = QPixmap(":/images/menubar_normal_background.png").createHeuristicMask(); + bitmapFullscreen = QPixmap(":/images/menubar_full_background.png").createHeuristicMask(); + myWindow->setMask(QRegion(bitmapNormal)); +} + +void TouchArea::switchArea(int areaType) +{ + if(areaType == NORMAL) { + myWindow->setMask(QRegion(bitmapNormal)); + } else if (areaType == FULLSCREEN) { + myWindow->setMask(QRegion(bitmapFullscreen)); + } +} + + diff --git a/homescreen/src/toucharea.h b/homescreen/src/toucharea.h new file mode 100644 index 0000000..69c6872 --- /dev/null +++ b/homescreen/src/toucharea.h @@ -0,0 +1,30 @@ +#ifndef TOUCHAREA_H +#define TOUCHAREA_H + +#include +#include + +enum { + NORMAL=0, + FULLSCREEN +}; + +class TouchArea : public QObject +{ + Q_OBJECT +public: + explicit TouchArea(); + ~TouchArea(); + + Q_INVOKABLE void switchArea(int areaType); + void setWindow(QQuickWindow* window); + +public slots: + void init(); + +private: + QBitmap bitmapNormal, bitmapFullscreen; + QQuickWindow* myWindow; +}; + +#endif // TOUCHAREA_H -- cgit 1.2.3-korg