From 4234b74480e6684051852598a4f31976a8db437d Mon Sep 17 00:00:00 2001 From: asanoaozora Date: Tue, 20 Dec 2016 15:41:19 +0100 Subject: preparation of a more simple HMI: pre-release version --- src/hmi/qml/CameraSettings.qml | 379 --------- src/hmi/qml/Core/EntryField.qml | 104 --- src/hmi/qml/Core/Keyboard.qml | 231 ------ .../draft-theme/800x480/NavigationAppBrowseMap.xcf | Bin 1010456 -> 0 bytes .../800x480/NavigationAppBrowseMapBottom.xcf | Bin 69225 -> 0 bytes .../800x480/NavigationAppBrowseMapGuidance.xcf | Bin 8119 -> 0 bytes .../800x480/NavigationAppBrowseMapManeuver.xcf | Bin 15573 -> 0 bytes .../800x480/NavigationAppBrowseMapRoute.xcf | Bin 23675 -> 0 bytes .../800x480/NavigationAppBrowseMapScroll.xcf | Bin 8053 -> 0 bytes .../800x480/NavigationAppBrowseMapSettings.xcf | Bin 28147 -> 0 bytes .../800x480/NavigationAppBrowseMapSimulation.xcf | Bin 32052 -> 0 bytes .../800x480/NavigationAppBrowseMapTop.xcf | Bin 35714 -> 0 bytes .../gimp/draft-theme/800x480/NavigationAppMain.xcf | Bin 1680115 -> 0 bytes .../gimp/draft-theme/800x480/NavigationAppPOI.xcf | Bin 169106 -> 0 bytes .../draft-theme/800x480/NavigationAppSearch.xcf | Bin 297119 -> 0 bytes .../draft-theme/800x480/NavigationAppSettings.xcf | Bin 654650 -> 0 bytes .../800x480/NavigationAppSettingsPreference.xcf | Bin 1055776 -> 0 bytes ...vigationAppSettingsSettingsLanguageAndUnits.xcf | Bin 751999 -> 0 bytes .../800x480/NavigationAppTripComputer.xcf | Bin 471763 -> 0 bytes .../gimp/draft-theme/800x480/button-keyboard.xcf | Bin 1942 -> 0 bytes src/hmi/qml/Core/gimp/draft-theme/LICENSE | 8 - .../gdp-theme/800x480/NavigationAppBrowseMap.xcf | Bin 0 -> 1010456 bytes .../800x480/NavigationAppBrowseMapBottom.xcf | Bin 0 -> 69228 bytes .../800x480/NavigationAppBrowseMapGuidance.xcf | Bin 0 -> 8119 bytes .../800x480/NavigationAppBrowseMapManeuver.xcf | Bin 0 -> 15573 bytes .../800x480/NavigationAppBrowseMapRoute.xcf | Bin 0 -> 23675 bytes .../800x480/NavigationAppBrowseMapScroll.xcf | Bin 0 -> 8053 bytes .../800x480/NavigationAppBrowseMapSettings.xcf | Bin 0 -> 28147 bytes .../800x480/NavigationAppBrowseMapSimulation.xcf | Bin 0 -> 32052 bytes .../800x480/NavigationAppBrowseMapTop.xcf | Bin 0 -> 35714 bytes .../gimp/gdp-theme/800x480/NavigationAppMain.xcf | Bin 0 -> 1680115 bytes .../gimp/gdp-theme/800x480/NavigationAppPOI.xcf | Bin 0 -> 169106 bytes .../gimp/gdp-theme/800x480/NavigationAppSearch.xcf | Bin 0 -> 293217 bytes .../gdp-theme/800x480/NavigationAppSettings.xcf | Bin 0 -> 654650 bytes .../800x480/NavigationAppSettingsPreference.xcf | Bin 0 -> 1055776 bytes ...vigationAppSettingsSettingsLanguageAndUnits.xcf | Bin 0 -> 751999 bytes .../800x480/NavigationAppTripComputer.xcf | Bin 0 -> 471763 bytes .../Core/gimp/gdp-theme/800x480/fsa-main-menu.xcf | Bin 1777075 -> 0 bytes .../Core/gimp/gdp-theme/800x480/fsa-poi-menu.xcf | Bin 756072 -> 0 bytes .../800x480/navigation-browse-map-bottom.xcf | Bin 69221 -> 0 bytes .../800x480/navigation-browse-map-guidance.xcf | Bin 8115 -> 0 bytes .../800x480/navigation-browse-map-route.xcf | Bin 32656 -> 0 bytes .../800x480/navigation-browse-map-scroll.xcf | Bin 8049 -> 0 bytes .../800x480/navigation-browse-map-settings.xcf | Bin 26984 -> 0 bytes .../800x480/navigation-browse-map-simulation.xcf | Bin 32048 -> 0 bytes .../800x480/navigation-browse-map-top.xcf | Bin 35710 -> 0 bytes .../gdp-theme/800x480/navigation-browse-map.xcf | Bin 1009790 -> 0 bytes .../800x480/navigation-calculated-route-menu.xcf | Bin 830190 -> 0 bytes .../gdp-theme/800x480/navigation-route-menu.xcf | Bin 744655 -> 0 bytes .../800x480/navigation-search-address-menu.xcf | Bin 629366 -> 0 bytes .../800x480/navigation-search-coordinates-menu.xcf | Bin 612257 -> 0 bytes .../800x480/navigation-search-freetext-menu.xcf | Bin 698160 -> 0 bytes .../gdp-theme/800x480/navigation-search-menu.xcf | Bin 716548 -> 0 bytes ...navigation-settings-language-and-units-menu.xcf | Bin 752000 -> 0 bytes .../gdp-theme/800x480/navigation-settings-menu.xcf | Bin 650741 -> 0 bytes .../navigation-settings-preference-menu.xcf | Bin 1055777 -> 0 bytes .../gimp/gdp-theme/800x480/trip-computer-menu.xcf | Bin 471763 -> 0 bytes src/hmi/qml/Entry.qml | 214 ----- src/hmi/qml/EntryFreeText.qml | 235 ------ src/hmi/qml/MainMenu.qml | 130 --- src/hmi/qml/NavigationAppBrowseMap.qml | 9 +- src/hmi/qml/NavigationAppMain.qml | 16 +- src/hmi/qml/NavigationAppPOI.qml | 1 + src/hmi/qml/NavigationAppSearch.qml | 101 ++- src/hmi/qml/NavigationBrowseMap.qml | 920 --------------------- src/hmi/qml/NavigationCalculatedRoute.qml | 255 ------ src/hmi/qml/NavigationManeuversList.qml | 102 --- src/hmi/qml/NavigationRoute.qml | 229 ----- src/hmi/qml/NavigationRouteDescription.qml | 96 --- src/hmi/qml/NavigationSearch.qml | 96 --- src/hmi/qml/NavigationSearchAddress.qml | 362 -------- src/hmi/qml/NavigationSearchCoordinates.qml | 113 --- src/hmi/qml/NavigationSearchFreeText.qml | 183 ---- src/hmi/qml/NavigationSearchHistory.qml | 100 --- src/hmi/qml/NavigationSettings.qml | 454 ---------- src/hmi/qml/NavigationSettingsLanguageAndUnits.qml | 194 ----- src/hmi/qml/NavigationSettingsPreferences.qml | 220 ----- src/hmi/qml/POI.qml | 245 ------ src/hmi/qml/TripComputer.qml | 440 ---------- src/hmi/qml/application.qml | 57 -- src/run | 2 +- src/set_window_location | 19 + 82 files changed, 103 insertions(+), 5412 deletions(-) delete mode 100644 src/hmi/qml/CameraSettings.qml delete mode 100644 src/hmi/qml/Core/EntryField.qml delete mode 100644 src/hmi/qml/Core/Keyboard.qml delete mode 100644 src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMap.xcf delete mode 100755 src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapBottom.xcf delete mode 100755 src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapGuidance.xcf delete mode 100755 src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapManeuver.xcf delete mode 100755 src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapRoute.xcf delete mode 100755 src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapScroll.xcf delete mode 100755 src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapSettings.xcf delete mode 100755 src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapSimulation.xcf delete mode 100644 src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapTop.xcf delete mode 100755 src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppMain.xcf delete mode 100644 src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppPOI.xcf delete mode 100644 src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSearch.xcf delete mode 100644 src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSettings.xcf delete mode 100644 src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSettingsPreference.xcf delete mode 100644 src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSettingsSettingsLanguageAndUnits.xcf delete mode 100644 src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppTripComputer.xcf delete mode 100644 src/hmi/qml/Core/gimp/draft-theme/800x480/button-keyboard.xcf delete mode 100644 src/hmi/qml/Core/gimp/draft-theme/LICENSE create mode 100644 src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMap.xcf create mode 100755 src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapBottom.xcf create mode 100755 src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapGuidance.xcf create mode 100755 src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapManeuver.xcf create mode 100755 src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapRoute.xcf create mode 100755 src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapScroll.xcf create mode 100755 src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapSettings.xcf create mode 100755 src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapSimulation.xcf create mode 100644 src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapTop.xcf create mode 100755 src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppMain.xcf create mode 100644 src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppPOI.xcf create mode 100644 src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSearch.xcf create mode 100644 src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSettings.xcf create mode 100644 src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSettingsPreference.xcf create mode 100644 src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSettingsSettingsLanguageAndUnits.xcf create mode 100644 src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppTripComputer.xcf delete mode 100755 src/hmi/qml/Core/gimp/gdp-theme/800x480/fsa-main-menu.xcf delete mode 100644 src/hmi/qml/Core/gimp/gdp-theme/800x480/fsa-poi-menu.xcf delete mode 100755 src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-bottom.xcf delete mode 100755 src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-guidance.xcf delete mode 100755 src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-route.xcf delete mode 100755 src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-scroll.xcf delete mode 100755 src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-settings.xcf delete mode 100755 src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-simulation.xcf delete mode 100644 src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-top.xcf delete mode 100644 src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map.xcf delete mode 100644 src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-calculated-route-menu.xcf delete mode 100644 src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-route-menu.xcf delete mode 100644 src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-search-address-menu.xcf delete mode 100644 src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-search-coordinates-menu.xcf delete mode 100644 src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-search-freetext-menu.xcf delete mode 100644 src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-search-menu.xcf delete mode 100644 src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-settings-language-and-units-menu.xcf delete mode 100644 src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-settings-menu.xcf delete mode 100644 src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-settings-preference-menu.xcf delete mode 100644 src/hmi/qml/Core/gimp/gdp-theme/800x480/trip-computer-menu.xcf delete mode 100644 src/hmi/qml/Entry.qml delete mode 100644 src/hmi/qml/EntryFreeText.qml delete mode 100644 src/hmi/qml/MainMenu.qml delete mode 100644 src/hmi/qml/NavigationBrowseMap.qml delete mode 100644 src/hmi/qml/NavigationCalculatedRoute.qml delete mode 100644 src/hmi/qml/NavigationManeuversList.qml delete mode 100644 src/hmi/qml/NavigationRoute.qml delete mode 100644 src/hmi/qml/NavigationRouteDescription.qml delete mode 100644 src/hmi/qml/NavigationSearch.qml delete mode 100644 src/hmi/qml/NavigationSearchAddress.qml delete mode 100644 src/hmi/qml/NavigationSearchCoordinates.qml delete mode 100644 src/hmi/qml/NavigationSearchFreeText.qml delete mode 100644 src/hmi/qml/NavigationSearchHistory.qml delete mode 100644 src/hmi/qml/NavigationSettings.qml delete mode 100644 src/hmi/qml/NavigationSettingsLanguageAndUnits.qml delete mode 100644 src/hmi/qml/NavigationSettingsPreferences.qml delete mode 100644 src/hmi/qml/POI.qml delete mode 100644 src/hmi/qml/TripComputer.qml delete mode 100644 src/hmi/qml/application.qml create mode 100755 src/set_window_location diff --git a/src/hmi/qml/CameraSettings.qml b/src/hmi/qml/CameraSettings.qml deleted file mode 100644 index 5876860..0000000 --- a/src/hmi/qml/CameraSettings.qml +++ /dev/null @@ -1,379 +0,0 @@ -/** -* @licence app begin@ -* SPDX-License-Identifier: MPL-2.0 -* -* \copyright Copyright (C) 2013-2014, PCA Peugeot Citroen -* -* \file CameraSettings.qml -* -* \brief This file is part of the navigation hmi. -* -* \author Martin Schaller -* \author Philippe Colliot -* -* \version 1.1 -* -* This Source Code Form is subject to the terms of the -* Mozilla Public License (MPL), v. 2.0. -* If a copy of the MPL was not distributed with this file, -* You can obtain one at http://mozilla.org/MPL/2.0/. -* -* For further information see http://www.genivi.org/. -* -* List of changes: -* 2014-03-05, Philippe Colliot, migration to the new HMI design -* , , -* -* @licence end@ -*/ -import QtQuick 2.1 -import "Core" -import "Core/genivi.js" as Genivi; -import "Core/style-sheets/style-constants.js" as Constants; -import "Core/style-sheets/navigation-browse-map-css.js" as StyleSheetMap; -import "Core/style-sheets/navigation-browse-map-settings-css.js" as StyleSheetSettings; -import lbs.plugin.dbusif 1.0 - -HMIMenu { - id: menu - property string pagefile:"CameraSettings" - - DBusIf { - id:dbusIf - } - - Timer { - id:move_timer - repeat:true - triggeredOnStart:false - property real lat; - property real lon; - property bool active; - onTriggered: { - if (active) { - var res=Genivi.mapviewer_GetTargetPoint(dbusIf); - var latitude=res[1][1]+lat; - var longitude=res[1][3]+lon; - var altitude=res[1][5]; - Genivi.mapviewer_SetTargetPoint(dbusIf,latitude,longitude,altitude); - interval=50; - restart(); - } - } - } - - Timer { - id:camera_timer - repeat:true - triggeredOnStart:false - property bool active; - property string camera_value; - property real step; - property bool clamp; - property real clamp_value; - onTriggered: { - if (active) { - var res=Genivi.mapviewer_GetCameraValue(dbusIf,camera_value); - res[1]+=step; - if (clamp) { - if (step > 0 && res[1] > clamp_value) { - res[1]=clamp_value; - } - if (step < 0 && res[1] < clamp_value) { - res[1]=clamp_value; - } - } - Genivi.mapviewer_SetCameraValue(dbusIf,camera_value, res); - interval=50; - restart(); - } - } - } - - function move_start(lat, lon) - { - Genivi.mapviewer_SetFollowCarMode(dbusIf, false); - move_timer.lat=lat/10000; - move_timer.lon=lon/10000; - move_timer.active=true; - move_timer.triggered(); - } - - function move_stop() - { - move_timer.active=false; - move_timer.stop(); - } - - function camera_start(camera_value, step) - { - camera_timer.camera_value=camera_value; - camera_timer.step=step; - camera_timer.active=true; - camera_timer.triggered(); - } - - function camera_start_clamp(camera_value, step, clampvalue) - { - camera_timer.clamp=true; - camera_timer.clamp_value=clampvalue; - camera_start(camera_value, step); - } - - function camera_stop() - { - camera_timer.active=false; - camera_timer.stop(); - camera_timer.clamp=false; - } - - function set_angle(angle) - { - Genivi.mapviewer_SetMapViewRotation(dbusIf,angle); - } - - function updateMapViewer() - { - var res=Genivi.mapviewer_GetMapViewPerspective(dbusIf); - if (res[1] == Genivi.MAPVIEWER_2D) { - perspective.text=Genivi.gettext("CameraPerspective3d"); - } else { - perspective.text=Genivi.gettext("CameraPerspective2d"); - } - res=Genivi.mapviewer_GetDisplayedRoutes(dbusIf); - if (res[1] && res[1].length) { - split.disabled=false; - } else { - split.disabled=true; - } - if (Genivi.g_mapviewer_handle2) { - split.text=Genivi.gettext("Join"); - } else { - split.text=Genivi.gettext("Split"); - } - } - - function toggleDayNight() - { - var res=Genivi.mapviewer_GetMapViewTheme(dbusIf); - if (res[1] == Genivi.MAPVIEWER_THEME_1) { - Genivi.mapviewer_SetMapViewTheme(dbusIf,Genivi.MAPVIEWER_THEME_2); - if (Genivi.g_mapviewer_handle2) { - Genivi.mapviewer2_SetMapViewTheme(dbusIf,Genivi.MAPVIEWER_THEME_2); - } - daynight.text=Genivi.gettext("Day"); - } else { - Genivi.mapviewer_SetMapViewTheme(dbusIf,Genivi.MAPVIEWER_THEME_1); - if (Genivi.g_mapviewer_handle2) { - Genivi.mapviewer2_SetMapViewTheme(dbusIf,Genivi.MAPVIEWER_THEME_1); - } - daynight.text=Genivi.gettext("Night"); - } - } - - function updateDayNight() - { - var res=Genivi.mapviewer_GetMapViewTheme(dbusIf); - if (res[1] == Genivi.MAPVIEWER_THEME_1) { - daynight.text=Genivi.gettext("Night"); - } else { - daynight.text=Genivi.gettext("Day"); - } - } - - function togglePerspective() - { - if (perspective.text == Genivi.gettext("CameraPerspective2d")) { - Genivi.mapviewer_SetMapViewPerspective(dbusIf,Genivi.MAPVIEWER_2D); - } else { - Genivi.mapviewer_SetMapViewPerspective(dbusIf,Genivi.MAPVIEWER_3D); - } - updateMapViewer(); - } - - function toggleSplit() - { - var displayedRoutes=Genivi.mapviewer_GetDisplayedRoutes(dbusIf); - var mapViewTheme=Genivi.mapviewer_GetMapViewTheme(dbusIf); - if (split.text == Genivi.gettext("Split")) { - Genivi.mapviewer_handle_clear(dbusIf); - Genivi.mapviewer_handle2(dbusIf,map.width/2,map.height,Genivi.MAPVIEWER_MAIN_MAP); - Genivi.mapviewer_handle(dbusIf,map.width/2,map.height,Genivi.MAPVIEWER_MAIN_MAP); - if (displayedRoutes[1] && displayedRoutes[1].length) { - var boundingBox=Genivi.routing_GetRouteBoundingBox(dbusIf,[]); - Genivi.mapviewer2_SetMapViewBoundingBox(dbusIf,boundingBox); - } - Genivi.mapviewer_SetMapViewTheme(dbusIf,mapViewTheme[1]); - Genivi.mapviewer2_SetMapViewTheme(dbusIf,mapViewTheme[1]); - Genivi.mapviewer_SetFollowCarMode(dbusIf,true); - } else { - Genivi.mapviewer_handle_clear2(dbusIf); - Genivi.mapviewer_handle_clear(dbusIf); - Genivi.mapviewer_handle(dbusIf,map.width,map.height,Genivi.MAPVIEWER_MAIN_MAP); - Genivi.mapviewer_SetMapViewTheme(dbusIf,mapViewTheme[1]); - Genivi.mapviewer_SetFollowCarMode(dbusIf,true); - } - if (displayedRoutes[1] && displayedRoutes[1].length) { - var route=[]; - for (var i = 0 ; i < displayedRoutes[1].length ; i+=2) { - route=displayedRoutes[1][i+1][0]; - route=route.concat(res[1][i+1][1]); - Genivi.mapviewer_DisplayRoute(dbusIf,route,res[1][i+1][3]); - if (split.text == Genivi.gettext("Split")) { - Genivi.mapviewer2_DisplayRoute(dbusIf,route,res[1][i+1][3]); - } - } - } - updateMapViewer(); - } - - function disableSplit() - { - if (Genivi.g_mapviewer_handle2) { - toggleSplit(); - } - } - - Rectangle { - id:map - x:0 - y:0 - height:menu.height - width:menu.width - color:"transparent" - Rectangle { - opacity: 0.8 - width: StyleSheetSettings.navigation_browse_map_settings_background[Constants.WIDTH] - height: StyleSheetSettings.navigation_browse_map_settings_background[Constants.HEIGHT] - x: StyleSheetMap.settings_area[Constants.X] - y: StyleSheetMap.settings_area[Constants.Y] - HMIBgImage { - id: content - image:StyleSheetSettings.navigation_browse_map_settings_background[Constants.SOURCE]; - anchors { fill: parent; topMargin: parent.headlineHeight} - - - Text { - x:StyleSheetSettings.tiltText[StyleSheetSettings.X]; y:StyleSheetSettings.tiltText[StyleSheetSettings.Y]; width:StyleSheetSettings.tiltText[StyleSheetSettings.WIDTH]; height:StyleSheetSettings.tiltText[StyleSheetSettings.HEIGHT];color:StyleSheetSettings.tiltText[StyleSheetSettings.TEXTCOLOR];styleColor:StyleSheetSettings.tiltText[StyleSheetSettings.STYLECOLOR]; font.pixelSize:StyleSheetSettings.tiltText[StyleSheetSettings.PIXELSIZE]; - id:tiltText; - style: Text.Sunken; - smooth: true - text: Genivi.gettext("CameraTilt") - } - - StdButton {source:StyleSheetSettings.tiltp[Constants.SOURCE]; x:StyleSheetSettings.tiltp[StyleSheetSettings.X]; y:StyleSheetSettings.tiltp[StyleSheetSettings.Y]; width:StyleSheetSettings.tiltp[StyleSheetSettings.WIDTH]; height:StyleSheetSettings.tiltp[StyleSheetSettings.HEIGHT]; - id:tiltp; next:tiltm; prev:daynight; - onPressed: {camera_start_clamp("CameraTiltAngle",-10,0);} - onReleased: {camera_stop();} - } - - StdButton {source:StyleSheetSettings.tiltm[Constants.SOURCE]; x:StyleSheetSettings.tiltm[StyleSheetSettings.X]; y:StyleSheetSettings.tiltm[StyleSheetSettings.Y]; width:StyleSheetSettings.tiltm[StyleSheetSettings.WIDTH]; height:StyleSheetSettings.tiltm[StyleSheetSettings.HEIGHT]; - id:tiltm; next:heightp; prev:tiltp; - onPressed: {camera_start_clamp("CameraTiltAngle",10,90);} - onReleased: {camera_stop();} - } - - Text { - x:StyleSheetSettings.heightText[StyleSheetSettings.X]; y:StyleSheetSettings.heightText[StyleSheetSettings.Y]; width:StyleSheetSettings.heightText[StyleSheetSettings.WIDTH]; height:StyleSheetSettings.heightText[StyleSheetSettings.HEIGHT];color:StyleSheetSettings.heightText[StyleSheetSettings.TEXTCOLOR];styleColor:StyleSheetSettings.heightText[StyleSheetSettings.STYLECOLOR]; font.pixelSize:StyleSheetSettings.heightText[StyleSheetSettings.PIXELSIZE]; - id:heightText; - style: Text.Sunken; - smooth: true - text: Genivi.gettext("CameraHeight") - } - - StdButton {source:StyleSheetSettings.heightp[Constants.SOURCE]; x:StyleSheetSettings.heightp[StyleSheetSettings.X]; y:StyleSheetSettings.heightp[StyleSheetSettings.Y]; width:StyleSheetSettings.heightp[StyleSheetSettings.WIDTH]; height:StyleSheetSettings.heightp[StyleSheetSettings.HEIGHT]; - id:heightp; next:heightm; prev:tiltm; - onPressed: {camera_start("CameraHeight",10);} - onReleased: {camera_stop();} - } - - StdButton {source:StyleSheetSettings.heightm[Constants.SOURCE]; x:StyleSheetSettings.heightm[StyleSheetSettings.X]; y:StyleSheetSettings.heightm[StyleSheetSettings.Y]; width:StyleSheetSettings.heightm[StyleSheetSettings.WIDTH]; height:StyleSheetSettings.heightm[StyleSheetSettings.HEIGHT]; - id:heightm; next:distancep; prev:heightp; - onPressed: {camera_start("CameraHeight",-10);} - onReleased: {camera_stop();} - } - - Text { - x:StyleSheetSettings.distanceText[StyleSheetSettings.X]; y:StyleSheetSettings.distanceText[StyleSheetSettings.Y]; width:StyleSheetSettings.distanceText[StyleSheetSettings.WIDTH]; height:StyleSheetSettings.distanceText[StyleSheetSettings.HEIGHT];color:StyleSheetSettings.distanceText[StyleSheetSettings.TEXTCOLOR];styleColor:StyleSheetSettings.distanceText[StyleSheetSettings.STYLECOLOR]; font.pixelSize:StyleSheetSettings.distanceText[StyleSheetSettings.PIXELSIZE]; - id:distanceText; - style: Text.Sunken; - smooth: true - text: Genivi.gettext("CameraDistance") - } - - StdButton {source:StyleSheetSettings.distancep[Constants.SOURCE]; x:StyleSheetSettings.distancep[StyleSheetSettings.X]; y:StyleSheetSettings.distancep[StyleSheetSettings.Y]; width:StyleSheetSettings.distancep[StyleSheetSettings.WIDTH]; height:StyleSheetSettings.distancep[StyleSheetSettings.HEIGHT]; - id:distancep; next:distancem; prev:heightm; - onPressed: {camera_start("CameraDistanceFromTargetPoint",10);} - onReleased: {camera_stop();} - } - - StdButton {source:StyleSheetSettings.distancem[Constants.SOURCE]; x:StyleSheetSettings.distancem[StyleSheetSettings.X]; y:StyleSheetSettings.distancem[StyleSheetSettings.Y]; width:StyleSheetSettings.distancem[StyleSheetSettings.WIDTH]; height:StyleSheetSettings.distancem[StyleSheetSettings.HEIGHT]; - id:distancem; next:exit; prev:distancep; - onPressed: {camera_start("CameraDistanceFromTargetPoint",-10);} - onReleased: {camera_stop();} - } - - StdButton {source:StyleSheetSettings.north[Constants.SOURCE]; x:StyleSheetSettings.north[StyleSheetSettings.X]; y:StyleSheetSettings.north[StyleSheetSettings.Y]; width:StyleSheetSettings.north[StyleSheetSettings.WIDTH]; height:StyleSheetSettings.north[StyleSheetSettings.HEIGHT];textColor:StyleSheetSettings.northText[StyleSheetSettings.TEXTCOLOR]; pixelSize:StyleSheetSettings.northText[StyleSheetSettings.PIXELSIZE]; - id:north; text: Genivi.gettext("North"); next:south; prev:exit; - onClicked: { - set_angle(0); - } - } - - StdButton { source:StyleSheetSettings.south[Constants.SOURCE]; x:StyleSheetSettings.south[StyleSheetSettings.X]; y:StyleSheetSettings.south[StyleSheetSettings.Y]; width:StyleSheetSettings.south[StyleSheetSettings.WIDTH]; height:StyleSheetSettings.south[StyleSheetSettings.HEIGHT];textColor:StyleSheetSettings.southText[StyleSheetSettings.TEXTCOLOR]; pixelSize:StyleSheetSettings.southText[StyleSheetSettings.PIXELSIZE]; - id:south; text:Genivi.gettext("South"); next:east; prev:north; - onClicked: { - set_angle(180); - } - } - - StdButton {source:StyleSheetSettings.east[Constants.SOURCE]; x:StyleSheetSettings.east[StyleSheetSettings.X]; y:StyleSheetSettings.east[StyleSheetSettings.Y]; width:StyleSheetSettings.east[StyleSheetSettings.WIDTH]; height:StyleSheetSettings.east[StyleSheetSettings.HEIGHT];textColor:StyleSheetSettings.eastText[StyleSheetSettings.TEXTCOLOR]; pixelSize:StyleSheetSettings.eastText[StyleSheetSettings.PIXELSIZE]; - id:east; text:Genivi.gettext("East"); next:west; prev:south; - onClicked: { - set_angle(90); - } - } - - StdButton {source:StyleSheetSettings.west[Constants.SOURCE]; x:StyleSheetSettings.west[StyleSheetSettings.X]; y:StyleSheetSettings.west[StyleSheetSettings.Y]; width:StyleSheetSettings.west[StyleSheetSettings.WIDTH]; height:StyleSheetSettings.west[StyleSheetSettings.HEIGHT];textColor:StyleSheetSettings.westText[StyleSheetSettings.TEXTCOLOR]; pixelSize:StyleSheetSettings.westText[StyleSheetSettings.PIXELSIZE]; - id:west; text:Genivi.gettext("West"); next:split; prev:east; - onClicked: { - set_angle(270); - } - } - - StdButton {source:StyleSheetSettings.exit[Constants.SOURCE]; x:StyleSheetSettings.exit[StyleSheetSettings.X]; y:StyleSheetSettings.exit[StyleSheetSettings.Y]; width:StyleSheetSettings.exit[StyleSheetSettings.WIDTH]; height:StyleSheetSettings.exit[StyleSheetSettings.HEIGHT]; - id:exit; next:north; prev:west; - onClicked: { - Genivi.data['show_current_position']=true; - move_stop(); - camera_stop(); - leaveMenu(); - } - } - - StdButton {source:StyleSheetSettings.split[Constants.SOURCE]; x:StyleSheetSettings.split[StyleSheetSettings.X]; y:StyleSheetSettings.split[StyleSheetSettings.Y]; width:StyleSheetSettings.split[StyleSheetSettings.WIDTH]; height:StyleSheetSettings.split[StyleSheetSettings.HEIGHT];textColor:StyleSheetSettings.splitText[StyleSheetSettings.TEXTCOLOR]; pixelSize:StyleSheetSettings.splitText[StyleSheetSettings.PIXELSIZE]; - id:split; text:Genivi.gettext("Split"); next:perspective; prev:west; - onClicked: {toggleSplit();} - } - - StdButton {source:StyleSheetSettings.perspective[Constants.SOURCE]; x:StyleSheetSettings.perspective[StyleSheetSettings.X]; y:StyleSheetSettings.perspective[StyleSheetSettings.Y]; width:StyleSheetSettings.perspective[StyleSheetSettings.WIDTH]; height:StyleSheetSettings.perspective[StyleSheetSettings.HEIGHT];textColor:StyleSheetSettings.perspectiveText[StyleSheetSettings.TEXTCOLOR]; pixelSize:StyleSheetSettings.perspectiveText[StyleSheetSettings.PIXELSIZE]; - id:perspective; text:Genivi.gettext("CameraPerspective3d"); next:daynight; prev:split; - onClicked: {togglePerspective();} - } - - StdButton {source:StyleSheetSettings.daynight[Constants.SOURCE]; x:StyleSheetSettings.daynight[StyleSheetSettings.X]; y:StyleSheetSettings.daynight[StyleSheetSettings.Y]; width:StyleSheetSettings.daynight[StyleSheetSettings.WIDTH]; height:StyleSheetSettings.daynight[StyleSheetSettings.HEIGHT];textColor:StyleSheetSettings.daynightText[StyleSheetSettings.TEXTCOLOR]; pixelSize:StyleSheetSettings.daynightText[StyleSheetSettings.PIXELSIZE]; - id:daynight; text:Genivi.gettext("Day"); next:tiltp; prev:perspective; - onClicked: { - toggleDayNight(); - } - } - - } - } - } - Component.onCompleted: { - Genivi.mapviewer_handle(dbusIf,menu.width,menu.height,Genivi.MAPVIEWER_MAIN_MAP); - updateMapViewer(); - updateDayNight(); - } -} diff --git a/src/hmi/qml/Core/EntryField.qml b/src/hmi/qml/Core/EntryField.qml deleted file mode 100644 index ee91533..0000000 --- a/src/hmi/qml/Core/EntryField.qml +++ /dev/null @@ -1,104 +0,0 @@ -/** -* @licence app begin@ -* SPDX-License-Identifier: MPL-2.0 -* -* \copyright Copyright (C) 2013-2014, PCA Peugeot Citroen -* -* \file EntryField.qml -* -* \brief This file is part of the navigation hmi. -* -* \author Martin Schaller -* \author Philippe Colliot -* -* \version 1.1 -* -* This Source Code Form is subject to the terms of the -* Mozilla Public License (MPL), v. 2.0. -* If a copy of the MPL was not distributed with this file, -* You can obtain one at http://mozilla.org/MPL/2.0/. -* -* For further information see http://www.genivi.org/. -* -* List of changes: -* 2014-03-05, Philippe Colliot, remove text title from the entry field -* , , -* -* @licence end@ -*/ -import QtQuick 2.1 - -import "genivi.js" as Genivi; - -Column { - id: entryfield - width: input.width - height: input.height - property alias text: input.text - property alias criterion: input.criterion - property alias textfocus: input.focus - property alias next: input.next - property alias prev: input.prev - property string globaldata - property bool disabled - signal leave() - opacity: disabled ? 0.2 : 1 - - function takeFocus() - { - input.forceActiveFocus(); - } - - function callEntry() - { - entryfield.leave(); - Genivi.entrydest=globaldata; - Genivi.entrycriterion=criterion; - if (criterion && criterion != Genivi.NAVIGATIONCORE_FULL_ADDRESS) { - entryMenu("Entry",menu); - } else { - entryMenu("EntryFreeText",menu); - } - } - - Rectangle { - width: parent.width; height: parent.height; color: 'transparent' - Row { - width: parent.width; height: parent.height; - TextInput { - property real criterion - property Item next - property Item prev - signal mclicked() - id:input; width: parent.width*3/4; height: parent.height; color: 'white'; font.pixelSize: parent.height*0.75 - onMclicked: { callEntry(); } - text: Genivi.data[globaldata]?Genivi.data[globaldata]:"" - wrapMode: Text.WordWrap - clip: true - MouseArea { - anchors.fill: parent - onClicked: { - if (!entryfield.disabled) { - if (!input.focus) { - takeFocus(); - } else { - callEntry(); - } - } - } - } - Keys.onReturnPressed: { - accept(entryfield); - } - } - StdButton { - height: parent.height; - width: parent.width/4; - source:"images/keyboard.png"; - onClicked: { - callEntry(); - } - } - } - } -} diff --git a/src/hmi/qml/Core/Keyboard.qml b/src/hmi/qml/Core/Keyboard.qml deleted file mode 100644 index 59b7826..0000000 --- a/src/hmi/qml/Core/Keyboard.qml +++ /dev/null @@ -1,231 +0,0 @@ -/** -* @licence app begin@ -* SPDX-License-Identifier: MPL-2.0 -* -* -* \file Keyboard.qml -* -* \brief This file is part of the navigation hmi. -* -* \author Martin Schaller -* -* \version -* -* This Source Code Form is subject to the terms of the -* Mozilla Public License (MPL), v. 2.0. -* If a copy of the MPL was not distributed with this file, -* You can obtain one at http://mozilla.org/MPL/2.0/. -* -* For further information see http://www.genivi.org/. -* -* List of changes: -* , , -* -* @licence end@ -*/ -import QtQuick 2.1 - -Item { - id: keyboard; - property real wspc: keyboard.width/80; - property real hspc: keyboard.height/20; - property real w: (keyboard.width-wspc*7)/8+0.5; - property real h: keyboard.height/5 - property Item destination; - property Item layout; - property string firstLayout; - property string secondLayout: null; - property Item next; - property Item prev; - property string activekeys; - property bool activekeys_enabled; - property string shiftlevel; - signal keypress(string what); - - function takeFocus(dir) { - if (dir > 0) { - key1.forceActiveFocus(); - } else { - key32.forceActiveFocus(); - } - } - - function keytext(what) - { - if (what == '␣') { - return ' '; - } - if (what == '←') { - return '\b'; - } - return what; - } - - function append(what) { - what=keytext(what); - if (what.length > 1) { - shift(what); - return; - } - if (secondLayout && !destination.text.length) { - shift(secondLayout); - } - keypress(what); - if (what == '\b') { - backspace(); - } else { - destination.text+=what; - } - } - - function backspace() { - if (destination.text.length) { - destination.text=destination.text.slice(0,-1); - if (secondLayout && !destination.text.length) { - shift(firstLayout); - } - } - } - - function set(id,text) - { - id.text=text; - var stext=keytext(text.toLowerCase()); - var disabled=true; - if (text.length) { - if (!activekeys_enabled || text.length > 1 || activekeys.indexOf(stext) != -1) - disabled=false; - if (stext == '\b' && !destination.text.length) - disabled=true; - } - id.disabled=disabled; - } - - function setactivekeys(keys,enabled) - { - activekeys=keys.toLowerCase(); - activekeys_enabled=enabled; - shift(shiftlevel); - } - - function shift(what) { - shiftlevel=what; - secondLayout=""; - var layouts={ - 'ABC':['A','B','C','D','E','F','G','H', - 'I','J','K','L','M','N','O','P', - 'Q','R','S','T','U','V','W','X', - 'Y','Z','␣','','abc','123','ÄÖÜ','←', - ], - 'abc':['a','b','c','d','e','f','g','h', - 'i','j','k','l','m','n','o','p', - 'q','r','s','t','u','v','w','x', - 'y','z','␣','','ABC','123','äöü','←', - ], - 'ÄÖÜ':['Ä','Ö','Ü','ß','','','','', - '','','','','','','','', - '','','','','','','','', - '','','','','ABC','123','äöü','←', - ], - 'äöü':['ä','ö','ü','ß','','','','', - '','','','','','','','', - '','','','','','','','', - '','','','','abc','123','ÄÖÜ','←', - ], - '123':['0','1','2','3','4','5','6','7', - '8','9','-','.',',','','','', - '','','','','','','','', - '','','','','','ABC','abc','←', - ], - }; - var l=layouts[what]; - set(key1,l[0]); - set(key2,l[1]); - set(key3,l[2]); - set(key4,l[3]); - set(key5,l[4]); - set(key6,l[5]); - set(key7,l[6]); - set(key8,l[7]); - set(key9,l[8]); - set(key10,l[9]); - set(key11,l[10]); - set(key12,l[11]); - set(key13,l[12]); - set(key14,l[13]); - set(key15,l[14]); - set(key16,l[15]); - set(key17,l[16]); - set(key18,l[17]); - set(key19,l[18]); - set(key20,l[19]); - set(key21,l[20]); - set(key22,l[21]); - set(key23,l[22]); - set(key24,l[23]); - set(key25,l[24]); - set(key26,l[25]); - set(key27,l[26]); - set(key28,l[27]); - set(key29,l[28]); - set(key30,l[29]); - set(key31,l[30]); - set(key32,l[31]); - } - - Component.onCompleted: { - if (destination.text.length && secondLayout) { - shift(secondLayout); - } else { - shift(firstLayout); - } - } - - Column { - spacing:keyboard.hspc - Row { - spacing:keyboard.wspc - KButton { id:key1; next:key2; prev:keyboard.prev } - KButton { id:key2; next:key3; prev:key1 } - KButton { id:key3; next:key4; prev:key2 } - KButton { id:key4; next:key5; prev:key3 } - KButton { id:key5; next:key6; prev:key4 } - KButton { id:key6; next:key7; prev:key5 } - KButton { id:key7; next:key8; prev:key6 } - KButton { id:key8; next:key9; prev:key7 } - } - Row { - spacing:keyboard.wspc - KButton { id:key9; next:key10; prev:key8 } - KButton { id:key10; next:key11; prev:key9 } - KButton { id:key11; next:key12; prev:key10 } - KButton { id:key12; next:key13; prev:key11 } - KButton { id:key13; next:key14; prev:key12 } - KButton { id:key14; next:key15; prev:key13 } - KButton { id:key15; next:key16; prev:key14 } - KButton { id:key16; next:key17; prev:key15 } - } - Row { - spacing:keyboard.wspc - KButton { id:key17; next:key18; prev:key16 } - KButton { id:key18; next:key19; prev:key17 } - KButton { id:key19; next:key20; prev:key18 } - KButton { id:key20; next:key21; prev:key19 } - KButton { id:key21; next:key22; prev:key20 } - KButton { id:key22; next:key23; prev:key21 } - KButton { id:key23; next:key24; prev:key22 } - KButton { id:key24; next:key25; prev:key23 } - } - Row { - spacing:keyboard.wspc - KButton { id:key25; next:key26; prev:key24 } - KButton { id:key26; next:key27; prev:key25 } - KButton { id:key27; next:key28; prev:key26 } - KButton { id:key28; next:key29; prev:key27 } - KButton { id:key29; next:key30; prev:key28 } - KButton { id:key30; next:key31; prev:key29 } - KButton { id:key31; next:key32; prev:key30 } - KButton { id:key32; next:keyboard.next; prev:key31 } - } - } -} diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMap.xcf b/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMap.xcf deleted file mode 100644 index 3e85a28..0000000 Binary files a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMap.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapBottom.xcf b/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapBottom.xcf deleted file mode 100755 index 25cbdd3..0000000 Binary files a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapBottom.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapGuidance.xcf b/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapGuidance.xcf deleted file mode 100755 index 464e3d6..0000000 Binary files a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapGuidance.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapManeuver.xcf b/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapManeuver.xcf deleted file mode 100755 index a9467d6..0000000 Binary files a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapManeuver.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapRoute.xcf b/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapRoute.xcf deleted file mode 100755 index a444646..0000000 Binary files a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapRoute.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapScroll.xcf b/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapScroll.xcf deleted file mode 100755 index 27f6842..0000000 Binary files a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapScroll.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapSettings.xcf b/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapSettings.xcf deleted file mode 100755 index 891d2cb..0000000 Binary files a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapSettings.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapSimulation.xcf b/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapSimulation.xcf deleted file mode 100755 index 8b3c580..0000000 Binary files a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapSimulation.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapTop.xcf b/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapTop.xcf deleted file mode 100644 index d447405..0000000 Binary files a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapTop.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppMain.xcf b/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppMain.xcf deleted file mode 100755 index 5011705..0000000 Binary files a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppMain.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppPOI.xcf b/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppPOI.xcf deleted file mode 100644 index 94fdd35..0000000 Binary files a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppPOI.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSearch.xcf b/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSearch.xcf deleted file mode 100644 index d1caeaa..0000000 Binary files a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSearch.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSettings.xcf b/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSettings.xcf deleted file mode 100644 index b76582b..0000000 Binary files a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSettings.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSettingsPreference.xcf b/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSettingsPreference.xcf deleted file mode 100644 index a15a2db..0000000 Binary files a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSettingsPreference.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSettingsSettingsLanguageAndUnits.xcf b/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSettingsSettingsLanguageAndUnits.xcf deleted file mode 100644 index a950bda..0000000 Binary files a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSettingsSettingsLanguageAndUnits.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppTripComputer.xcf b/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppTripComputer.xcf deleted file mode 100644 index 0fb21ff..0000000 Binary files a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppTripComputer.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/button-keyboard.xcf b/src/hmi/qml/Core/gimp/draft-theme/800x480/button-keyboard.xcf deleted file mode 100644 index 23fdc4a..0000000 Binary files a/src/hmi/qml/Core/gimp/draft-theme/800x480/button-keyboard.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/draft-theme/LICENSE b/src/hmi/qml/Core/gimp/draft-theme/LICENSE deleted file mode 100644 index 47c14d8..0000000 --- a/src/hmi/qml/Core/gimp/draft-theme/LICENSE +++ /dev/null @@ -1,8 +0,0 @@ -SPDX-License-Identifier: CC-BY-SA-4.0 - -Copyright (C) 2015, PCA Peugeot Citroen - -Author Philippe Colliot - -This work is licensed under the Creative Commons Attribution-ShareAlike 4.0 Unported License. -To view a copy of this license, visit http://creativecommons.org/licenses/by-sa/4.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA. diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMap.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMap.xcf new file mode 100644 index 0000000..3e85a28 Binary files /dev/null and b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMap.xcf differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapBottom.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapBottom.xcf new file mode 100755 index 0000000..cc9d0a2 Binary files /dev/null and b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapBottom.xcf differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapGuidance.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapGuidance.xcf new file mode 100755 index 0000000..464e3d6 Binary files /dev/null and b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapGuidance.xcf differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapManeuver.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapManeuver.xcf new file mode 100755 index 0000000..a9467d6 Binary files /dev/null and b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapManeuver.xcf differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapRoute.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapRoute.xcf new file mode 100755 index 0000000..a444646 Binary files /dev/null and b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapRoute.xcf differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapScroll.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapScroll.xcf new file mode 100755 index 0000000..27f6842 Binary files /dev/null and b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapScroll.xcf differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapSettings.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapSettings.xcf new file mode 100755 index 0000000..891d2cb Binary files /dev/null and b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapSettings.xcf differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapSimulation.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapSimulation.xcf new file mode 100755 index 0000000..8b3c580 Binary files /dev/null and b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapSimulation.xcf differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapTop.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapTop.xcf new file mode 100644 index 0000000..d447405 Binary files /dev/null and b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapTop.xcf differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppMain.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppMain.xcf new file mode 100755 index 0000000..5011705 Binary files /dev/null and b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppMain.xcf differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppPOI.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppPOI.xcf new file mode 100644 index 0000000..94fdd35 Binary files /dev/null and b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppPOI.xcf differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSearch.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSearch.xcf new file mode 100644 index 0000000..aae49ef Binary files /dev/null and b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSearch.xcf differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSettings.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSettings.xcf new file mode 100644 index 0000000..b76582b Binary files /dev/null and b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSettings.xcf differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSettingsPreference.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSettingsPreference.xcf new file mode 100644 index 0000000..a15a2db Binary files /dev/null and b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSettingsPreference.xcf differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSettingsSettingsLanguageAndUnits.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSettingsSettingsLanguageAndUnits.xcf new file mode 100644 index 0000000..a950bda Binary files /dev/null and b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSettingsSettingsLanguageAndUnits.xcf differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppTripComputer.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppTripComputer.xcf new file mode 100644 index 0000000..0fb21ff Binary files /dev/null and b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppTripComputer.xcf differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/fsa-main-menu.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/fsa-main-menu.xcf deleted file mode 100755 index 3b2ce69..0000000 Binary files a/src/hmi/qml/Core/gimp/gdp-theme/800x480/fsa-main-menu.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/fsa-poi-menu.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/fsa-poi-menu.xcf deleted file mode 100644 index 1c59f83..0000000 Binary files a/src/hmi/qml/Core/gimp/gdp-theme/800x480/fsa-poi-menu.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-bottom.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-bottom.xcf deleted file mode 100755 index 100b6dc..0000000 Binary files a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-bottom.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-guidance.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-guidance.xcf deleted file mode 100755 index 54a08fc..0000000 Binary files a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-guidance.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-route.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-route.xcf deleted file mode 100755 index fae321d..0000000 Binary files a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-route.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-scroll.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-scroll.xcf deleted file mode 100755 index 5e68dc1..0000000 Binary files a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-scroll.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-settings.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-settings.xcf deleted file mode 100755 index 08e0753..0000000 Binary files a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-settings.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-simulation.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-simulation.xcf deleted file mode 100755 index 1315c79..0000000 Binary files a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-simulation.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-top.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-top.xcf deleted file mode 100644 index ba56540..0000000 Binary files a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-top.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map.xcf deleted file mode 100644 index 81da5af..0000000 Binary files a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-calculated-route-menu.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-calculated-route-menu.xcf deleted file mode 100644 index b39ab03..0000000 Binary files a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-calculated-route-menu.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-route-menu.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-route-menu.xcf deleted file mode 100644 index 3778e6d..0000000 Binary files a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-route-menu.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-search-address-menu.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-search-address-menu.xcf deleted file mode 100644 index 4af2fd5..0000000 Binary files a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-search-address-menu.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-search-coordinates-menu.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-search-coordinates-menu.xcf deleted file mode 100644 index f7ea446..0000000 Binary files a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-search-coordinates-menu.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-search-freetext-menu.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-search-freetext-menu.xcf deleted file mode 100644 index 8a310ca..0000000 Binary files a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-search-freetext-menu.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-search-menu.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-search-menu.xcf deleted file mode 100644 index 61a73c7..0000000 Binary files a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-search-menu.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-settings-language-and-units-menu.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-settings-language-and-units-menu.xcf deleted file mode 100644 index a5d8b2a..0000000 Binary files a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-settings-language-and-units-menu.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-settings-menu.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-settings-menu.xcf deleted file mode 100644 index a5f9334..0000000 Binary files a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-settings-menu.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-settings-preference-menu.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-settings-preference-menu.xcf deleted file mode 100644 index 61b84ba..0000000 Binary files a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-settings-preference-menu.xcf and /dev/null differ diff --git a/src/hmi/qml/Core/gimp/gdp-theme/800x480/trip-computer-menu.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/trip-computer-menu.xcf deleted file mode 100644 index 0fb21ff..0000000 Binary files a/src/hmi/qml/Core/gimp/gdp-theme/800x480/trip-computer-menu.xcf and /dev/null differ diff --git a/src/hmi/qml/Entry.qml b/src/hmi/qml/Entry.qml deleted file mode 100644 index 885aa4a..0000000 --- a/src/hmi/qml/Entry.qml +++ /dev/null @@ -1,214 +0,0 @@ -/** -* @licence app begin@ -* SPDX-License-Identifier: MPL-2.0 -* -* -* \file Entry.qml -* -* \brief This file is part of the navigation hmi. -* -* \author Martin Schaller -* -* \version -* -* This Source Code Form is subject to the terms of the -* Mozilla Public License (MPL), v. 2.0. -* If a copy of the MPL was not distributed with this file, -* You can obtain one at http://mozilla.org/MPL/2.0/. -* -* For further information see http://www.genivi.org/. -* -* List of changes: -* , , -* -* @licence end@ -*/ -import QtQuick 2.1 -import "Core" -import "Core/genivi.js" as Genivi; -import "Core/style-sheets/style-constants.js" as Constants; -import lbs.plugin.dbusif 1.0 - -HMIMenu { - id: menu - property string pagefile:"Entry" - - color: Constants.MENU_BACKGROUND_COLOR - - //property Item currentSelectionCriterionSignal; - property Item searchStatusSignal; - property Item searchResultListSignal; - //property Item contentUpdatedSignal; - property Item spellResultSignal; - property real criterion; - property string extraspell; - - DBusIf { - id:dbusIf - } - - function searchStatus(args) - { //locationInputHandle 1, statusValue 3 - Genivi.hookSignal("searchStatus"); - var statusValue=args[3]; - if (statusValue == Genivi.NAVIGATIONCORE_SEARCHING) { - view.model.clear(); - text.color='red'; //(Searching) - } else { - if (statusValue == Genivi.NAVIGATIONCORE_FINISHED) - { - text.color='white'; - Genivi.locationinput_RequestListUpdate(dbusIf,0,10); - } - } - } - - function searchResultList(args) - {//locationInputHandle 1, totalSize 3, windowOffset 5, windowSize 7, resultListWindow 9 - Genivi.hookSignal("searchResultList"); - var model=view.model; - var windowOffset=args[5]; - var resultListWindow=args[9]; - var offset=args[5]; - var array=args[9]; - for (var i=0 ; i < resultListWindow.length ; i+=2) { - for (var j = 0 ; j < resultListWindow[i+1].length ; j+=4) { - if (resultListWindow[i+1][j+1] == criterion) { - model.append({"name":resultListWindow[i+1][j+3][3][1],"number":(i/2)+windowOffset+1}); - } - } - } - } - - function spellResult(args) - {//locationInputHandle 1, uniqueString 3, validCharacters 5, fullMatch 7 - Genivi.hookSignal("spellResult"); - var uniqueString=args[3]; - var validCharacters=args[5]; - if (text.text.length < uniqueString.length) { - extraspell=uniqueString.substr(text.text.length); - text.text=uniqueString; - } - keyboard.setactivekeys('\b'+validCharacters,true); - } - - function spell(input) - { - input=extraspell+input; - extraspell=''; - Genivi.locationinput_Spell(dbusIf,input,10); - } - - function connectSignals() - { - searchStatusSignal=Genivi.connect_searchStatusSignal(dbusIf,menu); - searchResultListSignal=Genivi.connect_searchResultListSignal(dbusIf,menu); - spellResultSignal=Genivi.connect_spellResultSignal(dbusIf,menu); - } - - function disconnectSignals() - { - searchStatusSignal.destroy(); - searchResultListSignal.destroy(); - spellResultSignal.destroy(); - } - - Keys.onPressed: { - if (event.text) { - if (event.text == '\b') { - if (text.text.length) { - text.text=text.text.slice(0,-1); - } - } else { - text.text+=event.text; - } - spell(event.text); - } - } - Column { - id:content - anchors { fill: parent; topMargin: menu.hspc/2 } - Row { - id:textrow - spacing:menu.hspc/4; - anchors.topMargin: 100; - Rectangle { - color:'black'; - width:content.width-back.width-menu.hspc/4-menu.hspc/8; - height:back.height; - Text { - anchors.fill:parent; - id: text - font.pixelSize: 40; - color: "white"; smooth: true - focus: true - } - } - StdButton { id:back; text: "Back"; onClicked: { - disconnectSignals(); - Genivi.entrycancel=true; - Genivi.preloadMode=true; - leaveMenu(); - } next:view; prev:keyboard} - } - - Component { - id: listDelegate - Text { - property real index:number; - width: 180; - height: 20; - id:text; - text: name; - font.pixelSize: 20; - style: Text.Sunken; - color: "white"; - styleColor: "black"; - smooth: true - } - } - - HMIList { - property real selectedEntry - height:parent.height-keyboard.height-textrow.height; - width:parent.width; - id:view - delegate: listDelegate - next:keyboard - prev:back - onSelected:{ - Genivi.entrydest=null; - disconnectSignals(); - Genivi.entryselectedentry=what.index; - leaveMenu(); - } - } - - Keyboard { - id: keyboard - height: 200; - width: menu.width; - destination: text; - firstLayout: "ABC"; - secondLayout: "abc"; - next: back; - prev: view; - onKeypress: { spell(what); } - } - } - Component.onCompleted: { - view.forceActiveFocus(); - if (Genivi.entrycriterion) { - criterion=Genivi.entrycriterion; - Genivi.entrycriterion=0; - Genivi.locationinput_SetSelectionCriterion(dbusIf,criterion); - } - extraspell=''; - if(criterion != Genivi.NAVIGATIONCORE_STREET) - { - spell(''); - } - - connectSignals(); - } -} diff --git a/src/hmi/qml/EntryFreeText.qml b/src/hmi/qml/EntryFreeText.qml deleted file mode 100644 index a9bc637..0000000 --- a/src/hmi/qml/EntryFreeText.qml +++ /dev/null @@ -1,235 +0,0 @@ -/** -* @licence app begin@ -* SPDX-License-Identifier: MPL-2.0 -* -* -* \file Entry.qml -* -* \brief This file is part of the navigation hmi. -* -* \author Martin Schaller -* -* \version -* -* This Source Code Form is subject to the terms of the -* Mozilla Public License (MPL), v. 2.0. -* If a copy of the MPL was not distributed with this file, -* You can obtain one at http://mozilla.org/MPL/2.0/. -* -* For further information see http://www.genivi.org/. -* -* List of changes: -* , , -* -* @licence end@ -*/ -import QtQuick 2.1 -import "Core" -import "Core/genivi.js" as Genivi; -import "Core/style-sheets/style-constants.js" as Constants; -import lbs.plugin.dbusif 1.0 - -HMIMenu { - id: menu - property string pagefile:"EntryFreeText" - - color: Constants.MENU_BACKGROUND_COLOR - - //property Item currentSelectionCriterionSignal; - property Item searchStatusSignal; - property Item searchResultListSignal; - //property Item contentUpdatedSignal; - property real criterion; - - DBusIf { - id:dbusIf - } - - function searchStatus(args) - { - Genivi.hookSignal("searchStatus"); - if (args[3] == Genivi.NAVIGATIONCORE_SEARCHING) { - viewListAddress.model.clear(); - viewListPOI.model.clear(); - text.color='red'; //(Searching) - } else - text.color='white'; - } - - function searchResultListAddress(args) - { - Genivi.hookSignal("searchResultListAddress"); - var model=viewListAddress.model; - if (args[4] == "uint16" && args[8] == "array") { - var offset=args[5]; - var array=args[9]; - for (var i=0 ; i < array.length ; i+=2) { - if (array[i] == "map") { - var map=array[i+1]; - for (var j = 0 ; j < map.length ; j+=4) { - if (map[j] == "uint16" && map[j+1] == criterion) { - if (map[j+2] == "variant") { - var variant=map[j+3]; - if (variant[0] == "string") { - model.append({"name":variant[1],"number":(i/2)+offset+1}); - } - } - } - } - } - } - } else { - console.log("Unexpected result from SearchResultList:"); - Genivi.dump("",args); - } - } - - function search(input) - { - Genivi.locationinput_Search(dbusIf,input,10); - } - - function connectSignals() - { - searchStatusSignal=Genivi.connect_searchStatusSignal(dbusIf,menu); - searchResultListSignal=Genivi.connect_searchResultListSignal(dbusIf,menu); - } - - function disconnectSignals() - { - searchStatusSignal.destroy(); - searchResultListSignal.destroy(); - } - - Keys.onPressed: { - if (event.text) { - if (event.text == '\b') { - if (text.text.length) { - text.text=text.text.slice(0,-1); - } - } else { - text.text+=event.text; - } - search(event.text); - } - } - - Column { - id:content - anchors { fill: parent; topMargin: menu.hspc/2 } - Row { - id:textrow - spacing:menu.hspc/4; - anchors.topMargin: 100; - Rectangle { - color:'black'; - width:content.width-back.width-menu.hspc/4-menu.hspc/8; - height:back.height; - Text { - anchors.fill:parent; - id: text - font.pixelSize: 40; - color: "white"; smooth: true - focus: true - } - } - StdButton { id:back; text: "Back"; onClicked: { - disconnectSignals(); - Genivi.entrycancel=true; - Genivi.preloadMode=true; - leaveMenu(); - } next:viewListAddress; prev:keyboard} - } - - Component { - id: listDelegateAddress - Text { - property real index:number; - width: 180; - height: 20; - id:text; - text: name; - font.pixelSize: 20; - style: Text.Sunken; - color: "white"; - styleColor: "black"; - smooth: true - } - } - - Column { - width:parent.width/2; - height:parent.height-keyboard.height-textrow.height; - HMIList { - id:viewListAddress - property real selectedEntry - height:parent.height; - width:parent.width; - delegate: listDelegateAddress - next:keyboard - prev:back - onSelected:{ - Genivi.entrydest=null; - disconnectSignals(); - Genivi.entryselectedentry=what.index; - leaveMenu(); - } - } - } - - Component { - id: listDelegatePOI - Text { - property real index:number; - width: 180; - height: 20; - id:text; - text: name; - font.pixelSize: 20; - style: Text.Sunken; - color: "white"; - styleColor: "black"; - smooth: true - } - } - - Column { - HMIList { - id:viewListPOI - property real selectedEntry - height:parent.height-keyboard.height-textrow.height; - width:parent.width/2; - delegate: listDelegatePOI - next:keyboard - prev:viewListAddress - onSelected:{ - Genivi.entrydest=null; - disconnectSignals(); - Genivi.entryselectedentry=what.index; - leaveMenu(); - } - } - } - Keyboard { - id: keyboard - height: 200; - width: menu.width; - destination: text; - firstLayout: "ABC"; - secondLayout: "abc"; - next: back; - prev: viewListAddress; - onKeypress: { search(what); } - } - } - - Component.onCompleted: { - viewListAddress.forceActiveFocus(); - if (Genivi.entrycriterion) { - criterion=Genivi.entrycriterion; - Genivi.entrycriterion=0; - Genivi.locationinput_SetSelectionCriterion(dbusIf,criterion); - } - connectSignals(); - } -} diff --git a/src/hmi/qml/MainMenu.qml b/src/hmi/qml/MainMenu.qml deleted file mode 100644 index 36e359c..0000000 --- a/src/hmi/qml/MainMenu.qml +++ /dev/null @@ -1,130 +0,0 @@ -/** -* @licence app begin@ -* SPDX-License-Identifier: MPL-2.0 -* -* \copyright Copyright (C) 2013-2014, PCA Peugeot Citroen -* -* \file MainMenu.qml -* -* \brief This file is part of the navigation hmi. -* -* \author Martin Schaller -* \author Philippe Colliot -* -* \version 1.1 -* -* This Source Code Form is subject to the terms of the -* Mozilla Public License (MPL), v. 2.0. -* If a copy of the MPL was not distributed with this file, -* You can obtain one at http://mozilla.org/MPL/2.0/. -* -* For further information see http://www.genivi.org/. -* -* List of changes: -* 2014-03-05, Philippe Colliot, migration to the new HMI design -* , , -* -* @licence end@ -*/ -import QtQuick 2.1 -import "Core" -import "Core/genivi.js" as Genivi; -import "Core/style-sheets/style-constants.js" as Constants; -import "Core/style-sheets/fsa-main-menu-css.js" as StyleSheet; -import lbs.plugin.dbusif 1.0 - -HMIMenu { - id: menu - property string pagefile:"MainMenu" - pageBack: Genivi.entryback[Genivi.entrybackheapsize] - next: navigation - prev: quit - DBusIf { - id:dbusIf; - } - - HMIBgImage { - image:StyleSheet.fsa_main_menu_background[Constants.SOURCE]; - anchors { fill: parent; topMargin: parent.headlineHeight} - - Text { - x:StyleSheet.navigationText[Constants.X]; y:StyleSheet.navigationText[Constants.Y]; width:StyleSheet.navigationText[Constants.WIDTH]; height:StyleSheet.navigationText[Constants.HEIGHT];color:StyleSheet.navigationText[Constants.TEXTCOLOR];styleColor:StyleSheet.navigationText[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.navigationText[Constants.PIXELSIZE]; - id:navigationText; - style: Text.Sunken; - smooth: true - text: Genivi.gettext("Navigation") - } - - StdButton { - source:StyleSheet.select_navigation[Constants.SOURCE]; x:StyleSheet.select_navigation[Constants.X]; y:StyleSheet.select_navigation[Constants.Y]; width:StyleSheet.select_navigation[Constants.WIDTH]; height:StyleSheet.select_navigation[Constants.HEIGHT]; - id:navigation; next:mapview; prev:quit; onClicked: { - entryMenu("NavigationSearch",menu); - } - } - - Text { - x:StyleSheet.mapviewText[Constants.X]; y:StyleSheet.mapviewText[Constants.Y]; width:StyleSheet.mapviewText[Constants.WIDTH]; height:StyleSheet.mapviewText[Constants.HEIGHT];color:StyleSheet.mapviewText[Constants.TEXTCOLOR];styleColor:StyleSheet.mapviewText[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.mapviewText[Constants.PIXELSIZE]; - id:mapviewText; - style: Text.Sunken; - smooth: true - text: Genivi.gettext("Mapview") - } - - StdButton { - source:StyleSheet.select_mapview[Constants.SOURCE]; x:StyleSheet.select_mapview[Constants.X]; y:StyleSheet.select_mapview[Constants.Y]; width:StyleSheet.select_mapview[Constants.WIDTH]; height:StyleSheet.select_mapview[Constants.HEIGHT]; - id:mapview; next:trip; prev:navigation; onClicked: { - Genivi.data["show_current_position"]=true; - entryMenu("NavigationBrowseMap",menu); - } - } - - Text { - x:StyleSheet.tripText[Constants.X]; y:StyleSheet.tripText[Constants.Y]; width:StyleSheet.tripText[Constants.WIDTH]; height:StyleSheet.tripText[Constants.HEIGHT];color:StyleSheet.tripText[Constants.TEXTCOLOR];styleColor:StyleSheet.tripText[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.tripText[Constants.PIXELSIZE]; - id:tripText; - style: Text.Sunken; - smooth: true - text: Genivi.gettext("Trip") - } - - StdButton { - source:StyleSheet.select_trip[Constants.SOURCE]; x:StyleSheet.select_trip[Constants.X]; y:StyleSheet.select_trip[Constants.Y]; width:StyleSheet.select_trip[Constants.WIDTH]; height:StyleSheet.select_trip[Constants.HEIGHT]; - id:trip; next:poi; prev:mapview;onClicked: { - entryMenu("TripComputer",menu); - } - } - - Text { - x:StyleSheet.poiText[Constants.X]; y:StyleSheet.poiText[Constants.Y]; width:StyleSheet.poiText[Constants.WIDTH]; height:StyleSheet.poiText[Constants.HEIGHT];color:StyleSheet.poiText[Constants.TEXTCOLOR];styleColor:StyleSheet.poiText[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.poiText[Constants.PIXELSIZE]; - id:poiText; - style: Text.Sunken; - smooth: true - text: Genivi.gettext("Poi") - } - - StdButton { - source:StyleSheet.select_poi[Constants.SOURCE]; x:StyleSheet.select_poi[Constants.X]; y:StyleSheet.select_poi[Constants.Y]; width:StyleSheet.select_poi[Constants.WIDTH]; height:StyleSheet.select_poi[Constants.HEIGHT]; - id:poi; next:configuration; prev:trip; onClicked: { - entryMenu("POI",menu); - } - } - - Text { - x:StyleSheet.configurationText[Constants.X]; y:StyleSheet.configurationText[Constants.Y]; width:StyleSheet.configurationText[Constants.WIDTH]; height:StyleSheet.configurationText[Constants.HEIGHT];color:StyleSheet.configurationText[Constants.TEXTCOLOR];styleColor:StyleSheet.configurationText[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.configurationText[Constants.PIXELSIZE]; - id:configurationText; - style: Text.Sunken; - smooth: true - text: Genivi.gettext("Configuration") - } - - StdButton { - source:StyleSheet.select_configuration[Constants.SOURCE]; x:StyleSheet.select_configuration[Constants.X]; y:StyleSheet.select_configuration[Constants.Y]; width:StyleSheet.select_configuration[Constants.WIDTH]; height:StyleSheet.select_configuration[Constants.HEIGHT]; - id:configuration; next:quit; prev:trip; onClicked: { - entryMenu("NavigationSettings",menu); - } - } - - StdButton { - source:StyleSheet.quit[Constants.SOURCE]; x:StyleSheet.quit[Constants.X]; y:StyleSheet.quit[Constants.Y]; width:StyleSheet.quit[Constants.WIDTH]; height:StyleSheet.quit[Constants.HEIGHT];textColor:StyleSheet.quitText[Constants.TEXTCOLOR]; pixelSize:StyleSheet.quitText[Constants.PIXELSIZE]; - id:quit; text: Genivi.gettext("Quit"); next:navigation; prev:configuration; onClicked:{Qt.quit()}} - } -} diff --git a/src/hmi/qml/NavigationAppBrowseMap.qml b/src/hmi/qml/NavigationAppBrowseMap.qml index 6a6e3e1..fe3346b 100644 --- a/src/hmi/qml/NavigationAppBrowseMap.qml +++ b/src/hmi/qml/NavigationAppBrowseMap.qml @@ -540,9 +540,10 @@ HMIMenu { StdButton { source:StyleSheetBottom.menub[Constants.SOURCE]; x:StyleSheetBottom.menub[Constants.X]; y:StyleSheetBottom.menub[Constants.Y]; width:StyleSheetBottom.menub[Constants.WIDTH]; height:StyleSheetBottom.menub[Constants.HEIGHT];textColor:StyleSheetBottom.menubText[Constants.TEXTCOLOR]; pixelSize:StyleSheetBottom.menubText[Constants.PIXELSIZE]; - id:menub; text:Genivi.gettext("Menu"); next:orientation; prev:settings; + id:menub; text:Genivi.gettext("Menu"); next:orientation; prev:mapsettings; onClicked: { disconnectSignals(); + Genivi.preloadMode=true; leaveMenu();; } } @@ -598,7 +599,7 @@ HMIMenu { StdButton { source:StyleSheetBottom.zoomout[Constants.SOURCE]; x:StyleSheetBottom.zoomout[Constants.X]; y:StyleSheetBottom.zoomout[Constants.Y]; width:StyleSheetBottom.zoomout[Constants.WIDTH]; height:StyleSheetBottom.zoomout[Constants.HEIGHT]; - id:zoomout; next:settings; prev:zoomin; + id:zoomout; next:mapsettings; prev:zoomin; onClicked: { Genivi.mapviewer_SetMapViewScaleByDelta(dbusIf,-1); showZoom(); @@ -606,8 +607,8 @@ HMIMenu { } StdButton { - source:StyleSheetBottom.settings[Constants.SOURCE]; x:StyleSheetBottom.settings[Constants.X]; y:StyleSheetBottom.settings[Constants.Y]; width:StyleSheetBottom.settings[Constants.WIDTH]; height:StyleSheetBottom.settings[Constants.HEIGHT]; - id:settings; next:menub; prev:zoomout; + source:StyleSheetBottom.mapsettings[Constants.SOURCE]; x:StyleSheetBottom.mapsettings[Constants.X]; y:StyleSheetBottom.mapsettings[Constants.Y]; width:StyleSheetBottom.mapsettings[Constants.WIDTH]; height:StyleSheetBottom.mapsettings[Constants.HEIGHT]; + id:mapsettings; next:menub; prev:zoomout; onClicked: { disconnectSignals(); entryMenu("NavigationAppBrowseMapSettings",menu); diff --git a/src/hmi/qml/NavigationAppMain.qml b/src/hmi/qml/NavigationAppMain.qml index cbdba53..a8ceee2 100644 --- a/src/hmi/qml/NavigationAppMain.qml +++ b/src/hmi/qml/NavigationAppMain.qml @@ -110,11 +110,23 @@ HMIMenu { StdButton { source:StyleSheet.quit[Constants.SOURCE]; x:StyleSheet.quit[Constants.X]; y:StyleSheet.quit[Constants.Y]; width:StyleSheet.quit[Constants.WIDTH]; height:StyleSheet.quit[Constants.HEIGHT];textColor:StyleSheet.quitText[Constants.TEXTCOLOR]; pixelSize:StyleSheet.quitText[Constants.PIXELSIZE]; - id:quit; text: Genivi.gettext("Quit"); next:navigation; prev:trip; onClicked:{Qt.quit()}} - + id:quit; text: Genivi.gettext("Quit"); next:navigation; prev:trip; + onClicked:{ + Genivi.navigationcore_session_clear(dbusIf); + Qt.quit(); //for the time being quit + } + } } Component.onCompleted: { + // Test if the navigation server is connected + var res=Genivi.navigationcore_session_GetVersion(dbusIf); + if (res[0] != "error") { + res=Genivi.navigationcore_session(dbusIf); + } else { + Genivi.dump("",res); + } + } } diff --git a/src/hmi/qml/NavigationAppPOI.qml b/src/hmi/qml/NavigationAppPOI.qml index 855ab9e..4f1c15c 100644 --- a/src/hmi/qml/NavigationAppPOI.qml +++ b/src/hmi/qml/NavigationAppPOI.qml @@ -318,6 +318,7 @@ NavigationAppHMIMenu { disabled:false; next:select_search; prev:select_display_on_map; onClicked: { + Genivi.preloadMode=true; leaveMenu(); } } diff --git a/src/hmi/qml/NavigationAppSearch.qml b/src/hmi/qml/NavigationAppSearch.qml index d828621..76c2e6e 100644 --- a/src/hmi/qml/NavigationAppSearch.qml +++ b/src/hmi/qml/NavigationAppSearch.qml @@ -207,13 +207,33 @@ NavigationAppHMIMenu { cityValue.text=""; streetValue.text=""; numberValue.text=""; + if (Genivi.preloadMode === false) + { + Genivi.address[Genivi.NAVIGATIONCORE_COUNTRY]=""; + Genivi.address[Genivi.NAVIGATIONCORE_CITY]=""; + Genivi.address[Genivi.NAVIGATIONCORE_STREET]=""; + Genivi.address[Genivi.NAVIGATIONCORE_HOUSENUMBER]=""; + } + for (var i=0 ; i < address.length ; i+=4) { if (address[i+1] == Genivi.NAVIGATIONCORE_LATITUDE) lat=address[i+3][3][1]; if (address[i+1] == Genivi.NAVIGATIONCORE_LONGITUDE) lon=address[i+3][3][1]; - if (address[i+1] == Genivi.NAVIGATIONCORE_COUNTRY) countryValue.text=address[i+3][3][1]; - if (address[i+1] == Genivi.NAVIGATIONCORE_CITY) cityValue.text=address[i+3][3][1]; - if (address[i+1] == Genivi.NAVIGATIONCORE_STREET) streetValue.text=address[i+3][3][1]; - if (address[i+1] == Genivi.NAVIGATIONCORE_HOUSENUMBER) numberValue.text=address[i+3][3][1]; + if (address[i+1] == Genivi.NAVIGATIONCORE_COUNTRY) { + countryValue.text=address[i+3][3][1]; + Genivi.address[Genivi.NAVIGATIONCORE_COUNTRY]=countryValue.text; + } + if (address[i+1] == Genivi.NAVIGATIONCORE_CITY) { + cityValue.text=address[i+3][3][1]; + Genivi.address[Genivi.NAVIGATIONCORE_CITY]=cityValue.text; + } + if (address[i+1] == Genivi.NAVIGATIONCORE_STREET) { + streetValue.text=address[i+3][3][1]; + Genivi.address[Genivi.NAVIGATIONCORE_STREET]=streetValue.text; + } + if (address[i+1] == Genivi.NAVIGATIONCORE_HOUSENUMBER) { + numberValue.text=address[i+3][3][1]; + Genivi.address[Genivi.NAVIGATIONCORE_HOUSENUMBER]=numberValue.text; + } } // Manage the focus @@ -269,6 +289,7 @@ NavigationAppHMIMenu { show_route_on_map.disabled=false; showRoute(); + getRouteList(); } property Item routeCalculationFailedSignal; @@ -382,6 +403,17 @@ NavigationAppHMIMenu { Genivi.locationinput_Spell(dbusIf,input,10); } + function launchRouteCalculation() + { + var position,destination; + + //launch route calculation + destination=Genivi.latlon_to_map(Genivi.data['destination']); + position=""; + Genivi.routing_SetWaypoints(dbusIf,true,position,destination); + Genivi.routing_CalculateRoute(dbusIf); + } + //------------------------------------------// // Management of entered location //------------------------------------------// @@ -413,8 +445,15 @@ NavigationAppHMIMenu { } } - function saveAddress() - { //save address for next time + function setAddress() + { + // set destination address + Genivi.data['destination']=new Array; + Genivi.data['destination']['lat']=Genivi.data['lat']; + Genivi.data['destination']['lon']=Genivi.data['lon']; + Genivi.data['destination']['description']=Genivi.data['description']; + + //save address for next time Genivi.address[Genivi.NAVIGATIONCORE_COUNTRY]=countryValue.text; Genivi.address[Genivi.NAVIGATIONCORE_CITY]=cityValue.text; Genivi.address[Genivi.NAVIGATIONCORE_STREET]=streetValue.text; @@ -489,9 +528,9 @@ NavigationAppHMIMenu { } extraspell=''; if(criterion != Genivi.NAVIGATIONCORE_STREET) - { //there's a bug for street + { spell(''); - } else { + } else { //there's a bug for street keyboardArea.setactivekeys('\b'+"aAuUeEbBnNrRsSiIhHfFdDcC(kK otvVgGwWmMOTjJpPlLyYzZqQ*",true); listArea.model.clear(); } @@ -502,7 +541,6 @@ NavigationAppHMIMenu { keyboardActivated = true; keyboardArea.visible = true; listArea.visible = true; - cancel.disabled = false; } function hideKeyboard() @@ -510,7 +548,6 @@ NavigationAppHMIMenu { keyboardActivated = false; keyboardArea.visible = false; listArea.visible = false; - cancel.disabled = true; } //------------------------------------------// @@ -532,7 +569,6 @@ NavigationAppHMIMenu { guidance_start.disabled=false; guidance_stop.disabled=true; routeArea.visible=true; - getRouteList(); Genivi.route_calculated=true; } @@ -855,21 +891,8 @@ NavigationAppHMIMenu { source:StyleSheet.calculate_curr[Constants.SOURCE]; x:StyleSheet.calculate_curr[Constants.X]; y:StyleSheet.calculate_curr[Constants.Y]; width:StyleSheet.calculate_curr[Constants.WIDTH]; height:StyleSheet.calculate_curr[Constants.HEIGHT];textColor:StyleSheet.calculate_currText[Constants.TEXTCOLOR]; pixelSize:StyleSheet.calculate_currText[Constants.PIXELSIZE]; id:calculate_curr; text: Genivi.gettext("GoTo"); onClicked: { - var position,destination; - - saveAddress(); - - // set destination address - Genivi.data['destination']=new Array; - Genivi.data['destination']['lat']=Genivi.data['lat']; - Genivi.data['destination']['lon']=Genivi.data['lon']; - Genivi.data['destination']['description']=Genivi.data['description']; - - //launch route calculation - destination=Genivi.latlon_to_map(Genivi.data['destination']); - position=""; - Genivi.routing_SetWaypoints(dbusIf,true,position,destination); - Genivi.routing_CalculateRoute(dbusIf); + setAddress(); + launchRouteCalculation(); } disabled:!(vehicleLocated && destinationValid && !(keyboardActivated)); next:back; prev:numberKeyboard @@ -877,7 +900,7 @@ NavigationAppHMIMenu { StdButton { source:StyleSheet.cancel[Constants.SOURCE]; x:StyleSheet.cancel[Constants.X]; y:StyleSheet.cancel[Constants.Y]; width:StyleSheet.cancel[Constants.WIDTH]; height:StyleSheet.cancel[Constants.HEIGHT];textColor:StyleSheet.cancelText[Constants.TEXTCOLOR]; pixelSize:StyleSheet.cancelText[Constants.PIXELSIZE]; id:cancel; text: Genivi.gettext("Cancel"); - disabled:true; + disabled: !(keyboardActivated); onClicked: { Genivi.entrycancel=true; Genivi.preloadMode=true; @@ -888,25 +911,30 @@ NavigationAppHMIMenu { } StdButton { source:StyleSheet.settings[Constants.SOURCE]; x:StyleSheet.settings[Constants.X]; y:StyleSheet.settings[Constants.Y]; width:StyleSheet.settings[Constants.WIDTH]; height:StyleSheet.settings[Constants.HEIGHT]; - id:settings; next:back; prev:calculate_curr; onClicked: { + id:settings; next:back; prev:calculate_curr; + disabled: keyboardActivated; + onClicked: { Genivi.preloadMode=true; //for the next call of this menu entryMenu("NavigationAppSettings",menu); } } StdButton { source:StyleSheet.poi[Constants.SOURCE]; x:StyleSheet.poi[Constants.X]; y:StyleSheet.poi[Constants.Y]; width:StyleSheet.poi[Constants.WIDTH]; height:StyleSheet.poi[Constants.HEIGHT]; - id:poi; next:back; prev:calculate_curr; onClicked: { + id:poi; next:back; prev:calculate_curr; + disabled: keyboardActivated; + onClicked: { entryMenu("NavigationAppPOI",menu); } } StdButton { source:StyleSheet.back[Constants.SOURCE]; x:StyleSheet.back[Constants.X]; y:StyleSheet.back[Constants.Y]; width:StyleSheet.back[Constants.WIDTH]; height:StyleSheet.back[Constants.HEIGHT];textColor:StyleSheet.backText[Constants.TEXTCOLOR]; pixelSize:StyleSheet.backText[Constants.PIXELSIZE]; id:back; text: Genivi.gettext("Back"); + disabled: keyboardActivated; next:streetValue; prev:calculate_curr; onClicked: { disconnectSignals(); + Genivi.locationinput_handle_clear(dbusIf); //clear the handle leaveMenu(); } - disabled:false; next:streetValue; prev:calculate_curr; } } @@ -916,21 +944,18 @@ NavigationAppHMIMenu { hideKeyboard(); // no keyboard by default + listArea.model.clear(); // clean lists + routeArea.model.clear(); + if (Genivi.route_calculated) { + launchRouteCalculation(); //relaunch route calculation to refresh data showRoute(); } else { hideRoute(); } - // Test if the navigation server is connected - var res=Genivi.navigationcore_session_GetVersion(dbusIf); - if (res[0] != "error") { - res=Genivi.navigationcore_session(dbusIf); - res=Genivi.locationinput_handle(dbusIf); - } else { - Genivi.dump("",res); - } + var res=Genivi.locationinput_handle(dbusIf); //get an handle for the location input // Preload address if activated if (Genivi.preloadMode==true) diff --git a/src/hmi/qml/NavigationBrowseMap.qml b/src/hmi/qml/NavigationBrowseMap.qml deleted file mode 100644 index 4069c14..0000000 --- a/src/hmi/qml/NavigationBrowseMap.qml +++ /dev/null @@ -1,920 +0,0 @@ -/** -* @licence app begin@ -* SPDX-License-Identifier: MPL-2.0 -* -* -* \file NavigationBrowseMap.qml -* -* \brief This file is part of the navigation hmi. -* -* \author Martin Schaller -* -* \version -* -* This Source Code Form is subject to the terms of the -* Mozilla Public License (MPL), v. 2.0. -* If a copy of the MPL was not distributed with this file, -* You can obtain one at http://mozilla.org/MPL/2.0/. -* -* For further information see http://www.genivi.org/. -* -* List of changes: -* , , -* -* @licence end@ -*/ -import QtQuick 2.1 -import "Core" -import "Core/genivi.js" as Genivi; -import "Core/style-sheets/style-constants.js" as Constants; -import "Core/style-sheets/navigation-browse-map-css.js" as StyleSheetMap; -import "Core/style-sheets/navigation-browse-map-bottom-css.js" as StyleSheetBottom -import "Core/style-sheets/navigation-browse-map-route-css.js" as StyleSheetRoute -import "Core/style-sheets/navigation-browse-map-guidance-css.js" as StyleSheetGuidance -import "Core/style-sheets/navigation-browse-map-scroll-css.js" as StyleSheetScroll -import "Core/style-sheets/navigation-browse-map-simulation-css.js" as StyleSheetSimulation -import "Core/style-sheets/navigation-browse-map-top-css.js" as StyleSheetTop - -import lbs.plugin.dbusif 1.0 - -HMIMenu { - id: menu - property string pagefile:"NavigationBrowseMap" - next: scrollup - prev: menub - property Item guidanceWaypointReachedSignal; - property Item guidanceManeuverChangedSignal; - property Item guidancePositionOnRouteChangedSignal; - property Item mapmatchedpositionPositionUpdateSignal; - property Item mapmatchedpositionAddressUpdateSignal; - property Item simulationStatusChangedSignal; - property Item simulationSpeedChangedSignal; - property Item fuelStopAdvisorSignal; - property bool north:false; - property int speedValueSent: 0; - - DBusIf { - id:dbusIf - } - - function guidanceManeuverChanged(args) - { - Genivi.hookSignal("guidanceManeuverChanged"); - // TODO: Create possibility to poll information? - // console.log("guidanceManeuverChanged"); - // Genivi.dump("",args); - maneuverAdvice.text=Genivi.Maneuver[args[1]]; - } - - function guidanceWaypointReached(args) - { - Genivi.hookSignal("guidanceWaypointReached"); - // console.log("guidanceWaypointReached"); - // Genivi.dump("",args); - if (args[2]) { - maneuverAdvice.text="Destination reached"; - } else { - maneuverAdvice.text="Waypoint reached"; - } - - } - - function guidancePositionOnRouteChanged(args) - { - Genivi.hookSignal("guidancePositionOnRouteChanged"); - updateGuidance(); - } - - function mapmatchedpositionPositionUpdate(args) - { - Genivi.hookSignal("mapmatchedpositionPositionUpdate"); - var res=Genivi.mapmatchedposition_GetPosition(dbusIf); - for (var i=0;i 0) - { - speedValueSent = speedValueSent-1; - } - Genivi.mapmatchedposition_SetSimulationSpeed(dbusIf,getDBusSpeedValue(speedValueSent)); - } - } - StdButton { - source:StyleSheetSimulation.speed_up_popup[Constants.SOURCE]; x:StyleSheetSimulation.speed_up_popup[Constants.X]; y:StyleSheetSimulation.speed_up_popup[Constants.Y]; width:StyleSheetSimulation.speed_up_popup[Constants.WIDTH]; height:StyleSheetSimulation.speed_up_popup[Constants.HEIGHT]; - id:speed_up; disabled:false; next:on_off; prev:speed_down; - onClicked: - { - if (speedValueSent < 7) - { - speedValueSent = speedValueSent+1; - } - Genivi.mapmatchedposition_SetSimulationSpeed(dbusIf,getDBusSpeedValue(speedValueSent)); - } - } - StdButton { - x:StyleSheetSimulation.simulation_on_popup[Constants.X]; y:StyleSheetSimulation.simulation_on_popup[Constants.Y]; width:StyleSheetSimulation.simulation_on_popup[Constants.WIDTH]; height:StyleSheetSimulation.simulation_on_popup[Constants.HEIGHT]; - id:on_off; next:simu_mode; prev:speed_up; disabled:false; - property int status: 1; //by default simulation stopped - function setState(name) - { - if (name=="ON") - { - status=1; - source=StyleSheetSimulation.simulation_off_popup[Constants.SOURCE]; - } - else - { - status=0; - source=StyleSheetSimulation.simulation_on_popup[Constants.SOURCE]; - } - } - onClicked: - { - switch (status) - { - case 0: //start the simulation - startSimulation(); - break; - case 1: //stop the simulation - stopSimulation(); - break; - default: - break; - } - } - } - StdButton { - x:StyleSheetSimulation.play_popup[Constants.X]; y:StyleSheetSimulation.play_popup[Constants.Y]; width:StyleSheetSimulation.play_popup[Constants.WIDTH]; height:StyleSheetSimulation.play_popup[Constants.HEIGHT]; - id:simu_mode; next:speed_down; prev:on_off; disabled:false; - property int status: 0; - function setState(name) - { - if (name=="FREE") - { - status=0; - source=StyleSheetSimulation.play_popup[Constants.SOURCE]; - disabled=true; - } - else - { - if (name=="PLAY") - { - status=1; - source=StyleSheetSimulation.pause_popup[Constants.SOURCE]; - enabled=true; - disabled=false; - } - else - { - if (name=="PAUSE") - { - status=2; - source=StyleSheetSimulation.play_popup[Constants.SOURCE]; - enabled=true; - disabled=false; - } - } - } - } - onClicked: - { - switch (status) - { - case 2: //pause - //pause to resume - Genivi.mapmatchedposition_StartSimulation(dbusIf); - break; - case 1: //play - //play to pause - Genivi.mapmatchedposition_PauseSimulation(dbusIf); - break; - default: - break; - } - } - } - } - } - } - - Component.onCompleted: { - Genivi.mapviewer_handle(dbusIf,menu.width,menu.height,Genivi.MAPVIEWER_MAIN_MAP); - if (Genivi.data['show_route_handle']) { - Genivi.mapviewer_DisplayRoute(dbusIf,Genivi.data['show_route_handle'],false); - delete(Genivi.data['show_route_handle']); - } - if (Genivi.data['zoom_route_handle']) { - var res=Genivi.routing_GetRouteBoundingBox(dbusIf,Genivi.data['zoom_route_handle']); - if (res[0] == "structure") { - Genivi.mapviewer_SetMapViewBoundingBox(dbusIf,res); - } else { - console.log("Unexpected result from GetRouteBoundingBox:"); - Genivi.dump("",res); - } - delete(Genivi.data['zoom_route_handle']); - } - if (Genivi.data['show_position']) { - Genivi.mapviewer_SetFollowCarMode(dbusIf,false); - Genivi.mapviewer_SetTargetPoint(dbusIf,Genivi.data['show_position']['lat'],Genivi.data['show_position']['lon'],Genivi.data['show_position']['alt']); - delete(Genivi.data['show_position']); - } - if (Genivi.data['show_current_position']) { - Genivi.mapviewer_SetFollowCarMode(dbusIf,true); - delete(Genivi.data['show_current_position']); - } - connectSignals(); - updateGuidance(); - updateSimulation(); - showZoom(); - } -} diff --git a/src/hmi/qml/NavigationCalculatedRoute.qml b/src/hmi/qml/NavigationCalculatedRoute.qml deleted file mode 100644 index 4c31af1..0000000 --- a/src/hmi/qml/NavigationCalculatedRoute.qml +++ /dev/null @@ -1,255 +0,0 @@ -/** -* @licence app begin@ -* SPDX-License-Identifier: MPL-2.0 -* -* \copyright Copyright (C) 2013-2014, PCA Peugeot Citroen -* -* \file NavigationCalculatedRoute.qml -* -* \brief This file is part of the navigation hmi. -* -* \author Martin Schaller -* \author Philippe Colliot -* -* \version 1.1 -* -* This Source Code Form is subject to the terms of the -* Mozilla Public License (MPL), v. 2.0. -* If a copy of the MPL was not distributed with this file, -* You can obtain one at http://mozilla.org/MPL/2.0/. -* -* For further information see http://www.genivi.org/. -* -* List of changes: -* 2014-03-05, Philippe Colliot, migration to the new HMI design -* , , -* -* @licence end@ -*/ -import QtQuick 2.1 -import "Core" -import "Core/genivi.js" as Genivi; -import "Core/style-sheets/style-constants.js" as Constants; -import "Core/style-sheets/navigation-calculated-route-menu-css.js" as StyleSheet; -import lbs.plugin.dbusif 1.0 - -HMIMenu { - id: menu - property string pagefile:"NavigationCalculatedRoute" - next: back - prev: show_route_in_list - property Item routeCalculationSuccessfulSignal; - property Item routeCalculationFailedSignal; - property Item routeCalculationProgressUpdateSignal; - property string routeText:" " - - DBusIf { - id:dbusIf - } - - function routeCalculationFailed(args) - { - Genivi.hookSignal("routeCalculationFailed"); - //console.log("routeCalculationFailed:"); - //Genivi.dump("",args); - - statusValue.text=Genivi.gettext("CalculatedRouteFailed"); - Genivi.route_calculated = false; - // Tell the FSA that there's no route available - Genivi.fuelstopadvisor_ReleaseRouteHandle(dbusIf,Genivi.g_routing_handle); - } - - function routeCalculationProgressUpdate(args) - { - Genivi.hookSignal("routeCalculationProgressUpdate"); - statusValue.text=Genivi.gettext("CalculatedRouteInProgress"); - Genivi.route_calculated = false; - } - - function updateStartStop() - { - var res=Genivi.guidance_GetGuidanceStatus(dbusIf); - if (res[1] != Genivi.NAVIGATIONCORE_INACTIVE) { - guidance_start.disabled=true; - guidance_stop.disabled=false; - } else { - guidance_start.disabled=false; - guidance_stop.disabled=true; - } - } - - function routeCalculationSuccessful(args) - { //routeHandle 1, unfullfilledPreferences 3 - Genivi.hookSignal("routeCalculationSuccessful"); - show_route_on_map.disabled=false; - show_route_in_list.disabled=false; - statusValue.text=Genivi.gettext("CalculatedRouteSuccess"); - Genivi.route_calculated = true; - var res=Genivi.routing_GetRouteOverviewTimeAndDistance(dbusIf); - - var i, time = 0, distance = 0; - for (i=0;i -* \author Philippe Colliot -* -* \version 1.1 -* -* This Source Code Form is subject to the terms of the -* Mozilla Public License (MPL), v. 2.0. -* If a copy of the MPL was not distributed with this file, -* You can obtain one at http://mozilla.org/MPL/2.0/. -* -* For further information see http://www.genivi.org/. -* -* List of changes: -* 2014-03-05, Philippe Colliot, migration to the new HMI design -* , , -* -* @licence end@ -*/ -import QtQuick 2.1 -import "Core" -import "Core/genivi.js" as Genivi; -import "Core/style-sheets/style-constants.js" as Constants; -import lbs.plugin.dbusif 1.0 - -HMIMenu { - id: menu - property string pagefile:"NavigationManeuversList" - - Column { - id:content - anchors { fill: parent; topMargin: menu.hspc/2 } - - Component { - id: listDelegate - Text { - width: 180; - height: 20; - id:text; - text: name; - font.pixelSize: 20; - style: Text.Sunken; - color: "white"; - styleColor: "black"; - smooth: true - } - } - - HMIList { - property real selectedEntry - height:parent.height-back.height; - width:parent.width; - id:view - delegate: listDelegate - next:back - prev:back - } - StdButton { - id:back - text: "Back" - pixelSize:Constants.MENU_ROUTE_DESCRIPTION_TEXT_PIXEL_SIZE; - onClicked:{leaveMenu();} - } - } - - DBusIf { - id:dbusIf - } - - Component.onCompleted: { - var res=Genivi.guidance_GetManeuversList(dbusIf,0xffff,0); - var maneuversList=res[5]; - var model=view.model; - for (var i = 0 ; i < maneuversList.length ; i+=2) { - var roadNameAfterManeuver=maneuversList[i+1][3]; - var offsetOfNextManeuver=maneuversList[i+1][9]; - var items=maneuversList[i+1][11]; - - for (var j = 0 ; j < items.length ; j+=2) { - //multiple maneuvers are not managed ! - var offsetOfManeuver=items[j+1][1]; - var direction=items[j+1][5]; - var maneuver=items[j+1][7]; - var maneuverData=items[j+1][9]; - if (maneuverData[1] == Genivi.NAVIGATIONCORE_DIRECTION) - { - var text=Genivi.distance(offsetOfManeuver)+" "+Genivi.distance(offsetOfNextManeuver)+" "+Genivi.ManeuverType[maneuver]+":"+Genivi.ManeuverDirection[direction]+" "+roadNameAfterManeuver; - model.append({"name":text}); - } - } - } - } -} diff --git a/src/hmi/qml/NavigationRoute.qml b/src/hmi/qml/NavigationRoute.qml deleted file mode 100644 index e43b809..0000000 --- a/src/hmi/qml/NavigationRoute.qml +++ /dev/null @@ -1,229 +0,0 @@ -/** -* @licence app begin@ -* SPDX-License-Identifier: MPL-2.0 -* -* \copyright Copyright (C) 2013-2014, PCA Peugeot Citroen -* -* \file NavigationRoute.qml -* -* \brief This file is part of the navigation hmi. -* -* \author Martin Schaller -* \author Philippe Colliot -* -* \version 1.1 -* -* This Source Code Form is subject to the terms of the -* Mozilla Public License (MPL), v. 2.0. -* If a copy of the MPL was not distributed with this file, -* You can obtain one at http://mozilla.org/MPL/2.0/. -* -* For further information see http://www.genivi.org/. -* -* List of changes: -* 2014-03-05, Philippe Colliot, migration to the new HMI design -* , , -* -* @licence end@ -*/ -import QtQuick 2.1 -import "Core" -import "Core/genivi.js" as Genivi; -import "Core/style-sheets/style-constants.js" as Constants; -import "Core/style-sheets/navigation-route-menu-css.js" as StyleSheet; -import lbs.plugin.dbusif 1.0 - -HMIMenu { - id: menu - property string pagefile:"NavigationRoute" - next: back - prev: calculate - property Item mapmatchedpositionPositionUpdateSignal; - - function setLocation() - { - Genivi.route_calculated = false; //position or destination changed, so needs to calculate a new route - locationValue.text=Genivi.data['description']; - positionValue.text=(Genivi.data['position'] ? Genivi.data['position']['description']:""); - destinationValue.text=(Genivi.data['destination'] ? Genivi.data['destination']['description']:""); - } - - function updateCurrentPosition() - { - var res=Genivi.mapmatchedposition_GetPosition(dbusIf); - var oklat=0; - var oklong=0; - for (var i=0;i -* \author Philippe Colliot -* -* \version 1.1 -* -* This Source Code Form is subject to the terms of the -* Mozilla Public License (MPL), v. 2.0. -* If a copy of the MPL was not distributed with this file, -* You can obtain one at http://mozilla.org/MPL/2.0/. -* -* For further information see http://www.genivi.org/. -* -* List of changes: -* 2014-03-05, Philippe Colliot, migration to the new HMI design -* , , -* -* @licence end@ -*/ - -import QtQuick 2.1 -import "Core" -import "Core/genivi.js" as Genivi; -import "Core/style-sheets/style-constants.js" as Constants; -import lbs.plugin.dbusif 1.0 - -HMIMenu { - id: menu - property string pagefile:"NavigationRouteDescription" - - Column { - id:content - anchors { fill: parent; topMargin: menu.hspc/2 } - - Component { - id: listDelegate - Text { - width: 180; - height: 20; - id:text; - text: name; - font.pixelSize: 20; - style: Text.Sunken; - color: "white"; - styleColor: "black"; - smooth: true - } - } - - HMIList { - property real selectedEntry - height:parent.height-back.height; - width:parent.width; - id:view - delegate: listDelegate - next:back - prev:back - } - StdButton { - id:back - pixelSize:Constants.MENU_ROUTE_DESCRIPTION_TEXT_PIXEL_SIZE; - text: "Back" - onClicked: { - leaveMenu(); - } - } - } - - DBusIf { - id:dbusIf - } - - Component.onCompleted: { - var res=Genivi.routing_GetRouteSegments(dbusIf,0,100,0) - var array=res[3]; - var model=view.model; - for (var i = 0 ; i < array.length ; i+=2) { - var map=array[i+1]; - var mapresult=Array; - for (var j = 0 ; j < map.length ; j+=4) { - mapresult[map[j+1]]=map[j+3][3][1]; - } - var text=Genivi.distance(mapresult[Genivi.NAVIGATIONCORE_DISTANCE])+" "+Genivi.time(mapresult[Genivi.NAVIGATIONCORE_TIME])+" "+mapresult[Genivi.NAVIGATIONCORE_ROAD_NAME]; - model.append({"name":text}); - } - } -} diff --git a/src/hmi/qml/NavigationSearch.qml b/src/hmi/qml/NavigationSearch.qml deleted file mode 100644 index 26b1a63..0000000 --- a/src/hmi/qml/NavigationSearch.qml +++ /dev/null @@ -1,96 +0,0 @@ -/** -* @licence app begin@ -* SPDX-License-Identifier: MPL-2.0 -* -* \copyright Copyright (C) 2013-2014, PCA Peugeot Citroen -* -* \file NavigationSearch.qml -* -* \brief This file is part of the navigation hmi. -* -* \author Martin Schaller -* \author Philippe Colliot -* -* \version 1.1 -* -* This Source Code Form is subject to the terms of the -* Mozilla Public License (MPL), v. 2.0. -* If a copy of the MPL was not distributed with this file, -* You can obtain one at http://mozilla.org/MPL/2.0/. -* -* For further information see http://www.genivi.org/. -* -* List of changes: -* 2014-03-05, Philippe Colliot, migration to the new HMI design -* , , -* -* @licence end@ -*/ -import QtQuick 2.1 -import "Core" -import "Core/genivi.js" as Genivi; -import "Core/style-sheets/style-constants.js" as Constants; -import "Core/style-sheets/navigation-search-menu-css.js" as StyleSheet; -import lbs.plugin.dbusif 1.0 - -HMIMenu { - id: menu - property string pagefile:"NavigationSearch" - next: search_by_address - prev: back - DBusIf { - id:dbusIf; - } - - HMIBgImage { - image:StyleSheet.navigation_search_menu_background[Constants.SOURCE]; - anchors { fill: parent; topMargin: parent.headlineHeight} - - Text { - x:StyleSheet.searchTitle[Constants.X]; y:StyleSheet.searchTitle[Constants.Y]; width:StyleSheet.searchTitle[Constants.WIDTH]; height:StyleSheet.searchTitle[Constants.HEIGHT];color:StyleSheet.searchTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.searchTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.searchTitle[Constants.PIXELSIZE]; - style: Text.Sunken; - smooth: true - id: searchTitle - text: Genivi.gettext("SearchMode") - } - - StdButton { source:StyleSheet.search_by_address[Constants.SOURCE]; x:StyleSheet.search_by_address[Constants.X]; y:StyleSheet.search_by_address[Constants.Y]; width:StyleSheet.search_by_address[Constants.WIDTH]; height:StyleSheet.search_by_address[Constants.HEIGHT]; - id:search_by_address; next:search_by_coordinates; prev:back; - onClicked: { - Genivi.preloadMode=true; - entryMenu("NavigationSearchAddress",menu); - } - } - StdButton { source:StyleSheet.search_by_coordinates[Constants.SOURCE]; x:StyleSheet.search_by_coordinates[Constants.X]; y:StyleSheet.search_by_coordinates[Constants.Y]; width:StyleSheet.search_by_coordinates[Constants.WIDTH]; height:StyleSheet.search_by_coordinates[Constants.HEIGHT]; - id:search_by_coordinates; next:search_by_poi; prev:search_by_address; - onClicked: { - entryMenu("NavigationSearchCoordinates",menu); - } - } - StdButton { source:StyleSheet.search_by_poi[Constants.SOURCE]; x:StyleSheet.search_by_poi[Constants.X]; y:StyleSheet.search_by_poi[Constants.Y]; width:StyleSheet.search_by_poi[Constants.WIDTH]; height:StyleSheet.search_by_poi[Constants.HEIGHT]; - id:search_by_poi; next:search_by_freetext; prev:search_by_coordinates; - onClicked: { - entryMenu("POI",menu); - } - } - StdButton { source:StyleSheet.search_by_freetext[Constants.SOURCE]; x:StyleSheet.search_by_freetext[Constants.X]; y:StyleSheet.search_by_freetext[Constants.Y]; width:StyleSheet.search_by_freetext[Constants.WIDTH]; height:StyleSheet.search_by_freetext[Constants.HEIGHT]; - id:search_by_freetext; next:history; prev:search_by_poi; - onClicked: { - entryMenu("NavigationSearchFreeText",menu); - } - } - StdButton { source:StyleSheet.history[Constants.SOURCE]; x:StyleSheet.history[Constants.X]; y:StyleSheet.history[Constants.Y]; width:StyleSheet.history[Constants.WIDTH]; height:StyleSheet.history[Constants.HEIGHT];textColor:StyleSheet.historyText[Constants.TEXTCOLOR]; pixelSize:StyleSheet.historyText[Constants.PIXELSIZE]; - id:history; text: Genivi.gettext("History"); disabled:false; next:back; prev:search_by_freetext; - onClicked: { - entryMenu("NavigationSearchHistory",menu); - } - } - - StdButton { source:StyleSheet.back[Constants.SOURCE]; x:StyleSheet.back[Constants.X]; y:StyleSheet.back[Constants.Y]; width:StyleSheet.back[Constants.WIDTH]; height:StyleSheet.back[Constants.HEIGHT];textColor:StyleSheet.backText[Constants.TEXTCOLOR]; pixelSize:StyleSheet.backText[Constants.PIXELSIZE]; - id:back; text: Genivi.gettext("Back"); next:search_by_address; prev:search_by_freetext; - onClicked: { - leaveMenu(); - } - } - } -} diff --git a/src/hmi/qml/NavigationSearchAddress.qml b/src/hmi/qml/NavigationSearchAddress.qml deleted file mode 100644 index 475007e..0000000 --- a/src/hmi/qml/NavigationSearchAddress.qml +++ /dev/null @@ -1,362 +0,0 @@ -/** -* @licence app begin@ -* SPDX-License-Identifier: MPL-2.0 -* -* \copyright Copyright (C) 2013-2014, PCA Peugeot Citroen -* -* \file NavigationSearchAddress.qml -* -* \brief This file is part of the navigation hmi. -* -* \author Martin Schaller -* \author Philippe Colliot -* -* \version 1.1 -* -* This Source Code Form is subject to the terms of the -* Mozilla Public License (MPL), v. 2.0. -* If a copy of the MPL was not distributed with this file, -* You can obtain one at http://mozilla.org/MPL/2.0/. -* -* For further information see http://www.genivi.org/. -* -* List of changes: -* 2014-03-05, Philippe Colliot, migration to the new HMI design -* , , -* -* @licence end@ -*/ -import QtQuick 2.1 -import "Core" -import "Core/genivi.js" as Genivi; -import "Core/style-sheets/style-constants.js" as Constants; -import "Core/style-sheets/navigation-search-address-menu-css.js" as StyleSheet; -import lbs.plugin.dbusif 1.0 - -HMIMenu { - id: menu - property string pagefile:"NavigationSearchAddress" - property Item currentSelectionCriterionSignal; - property Item searchStatusSignal; - property Item searchResultListSignal; - property Item contentUpdatedSignal; - property real lat - property real lon - - function loadWithCountry() - { - //load the field with saved values - if (Genivi.address[Genivi.NAVIGATIONCORE_COUNTRY] !== "") - {//need to test empty string - countryValue.text=Genivi.address[Genivi.NAVIGATIONCORE_COUNTRY]; - accept(countryValue); - cityValue.disabled=false; - } - else - Genivi.preloadMode=false; - } - - function currentSelectionCriterion(args) - {// locationInputHandle 1, selectionCriterion 3 - Genivi.hookSignal("currentSelectionCriterion"); - var selectionCriterion=args[3]; - Genivi.entrycriterion = selectionCriterion; - } - - function searchStatus(args) - { //locationInputHandle 1, statusValue 3 - Genivi.hookSignal("searchStatus"); - var statusValue=args[3]; - if (statusValue === Genivi.NAVIGATIONCORE_FINISHED) - { - Genivi.locationinput_SelectEntry(dbusIf,Genivi.entryselectedentry); - if (Genivi.preloadMode === true) - { - if (Genivi.entrycriterion === countryValue.criterion) - { - if (Genivi.address[Genivi.NAVIGATIONCORE_CITY] !== "") - { - cityValue.text=Genivi.address[Genivi.NAVIGATIONCORE_CITY]; - accept(cityValue); - streetValue.disabled=false; - } - else - Genivi.preloadMode=false; - } - else - { - if (Genivi.entrycriterion === cityValue.criterion) - { - if (Genivi.address[Genivi.NAVIGATIONCORE_STREET] !== "") - { - streetValue.text=Genivi.address[Genivi.NAVIGATIONCORE_STREET]; - accept(streetValue); - numberValue.disabled=false; - } - - } - else - { - if (Genivi.entrycriterion === streetValue.criterion) - { - Genivi.preloadMode=false; - } - else - { - Genivi.preloadMode=false; - console.log("Error when load a preloaded address"); - } - } - } - } - } - } - - function searchResultList(args) - { - Genivi.hookSignal("searchResultList"); - } - - function contentUpdated(args) - { //locationInputHandle 1, guidable 3, availableSelectionCriteria 5, address 7 - Genivi.hookSignal("contentUpdated"); - // Check if the destination is guidable - var guidable=args[3]; - if (guidable) { - ok.disabled=false; - } - else - { - //to do something is it's not guidable - } - - // Manage the available entries - var availableSelectionCriteria=args[5]; - countryValue.disabled=true; - cityValue.disabled=true; - streetValue.disabled=true; - numberValue.disabled=true; - for (var i=0 ; i < args.length ; i++) { - if (availableSelectionCriteria[i] == Genivi.NAVIGATIONCORE_COUNTRY) countryValue.disabled=false; - if (availableSelectionCriteria[i] == Genivi.NAVIGATIONCORE_CITY) cityValue.disabled=false; - if (availableSelectionCriteria[i] == Genivi.NAVIGATIONCORE_STREET) streetValue.disabled=false; - if (availableSelectionCriteria[i] == Genivi.NAVIGATIONCORE_HOUSENUMBER) numberValue.disabled=false; - } - if (countryValue.disabled) - countryValue.text=""; - if (cityValue.disabled) - cityValue.text=""; - if (streetValue.disabled) - streetValue.text=""; - if (numberValue.disabled) - numberValue.text=""; - - // Manage the content - var address=args[7]; - countryValue.text=""; - cityValue.text=""; - streetValue.text=""; - numberValue.text=""; - for (var i=0 ; i < address.length ; i+=4) { - if (address[i+1] == Genivi.NAVIGATIONCORE_LATITUDE) lat=address[i+3][3][1]; - if (address[i+1] == Genivi.NAVIGATIONCORE_LONGITUDE) lon=address[i+3][3][1]; - if (address[i+1] == Genivi.NAVIGATIONCORE_COUNTRY) countryValue.text=address[i+3][3][1]; - if (address[i+1] == Genivi.NAVIGATIONCORE_CITY) cityValue.text=address[i+3][3][1]; - if (address[i+1] == Genivi.NAVIGATIONCORE_STREET) streetValue.text=address[i+3][3][1]; - if (address[i+1] == Genivi.NAVIGATIONCORE_HOUSENUMBER) numberValue.text=address[i+3][3][1]; - } - - // Manage the focus - var focus; - if (!countryValue.disabled) - focus=countryValue; - if (!cityValue.disabled) - focus=cityValue; - if (!streetValue.disabled) - focus=streetValue; - if (!numberValue.disabled) - focus=numberValue; - focus.takeFocus(); - } - - function connectSignals() - { - currentSelectionCriterionSignal=Genivi.connect_currentSelectionCriterionSignal(dbusIf,menu); - searchStatusSignal=Genivi.connect_searchStatusSignal(dbusIf,menu); - searchResultListSignal=Genivi.connect_searchResultListSignal(dbusIf,menu); - contentUpdatedSignal=Genivi.connect_contentUpdatedSignal(dbusIf,menu); - } - - function disconnectSignals() - { - currentSelectionCriterionSignal.destroy(); - searchStatusSignal.destroy(); - searchResultListSignal.destroy(); - contentUpdatedSignal.destroy(); - } - - function accept(what) - { - ok.disabled=true; - Genivi.locationinput_SetSelectionCriterion(dbusIf,what.criterion); - Genivi.locationinput_Search(dbusIf,what.text,10); - } - - - function leave(toOtherMenu) - { - disconnectSignals(); - if (toOtherMenu) { - Genivi.locationinput_handle_clear(dbusIf); - } - //Genivi.navigationcore_session_clear(dbusIf); - } - - DBusIf { - id: dbusIf - } - - HMIBgImage { - image:StyleSheet.navigation_search_by_address_menu_background[Constants.SOURCE]; - anchors { fill: parent; topMargin: parent.headlineHeight} - id: content - - Text { - x:StyleSheet.countryTitle[Constants.X]; y:StyleSheet.countryTitle[Constants.Y]; width:StyleSheet.countryTitle[Constants.WIDTH]; height:StyleSheet.countryTitle[Constants.HEIGHT];color:StyleSheet.countryTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.countryTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.countryTitle[Constants.PIXELSIZE]; - style: Text.Sunken; - smooth: true; - id: countryTitle - text: Genivi.gettext("Country"); - } - EntryField { - x:StyleSheet.countryValue[Constants.X]; y:StyleSheet.countryValue[Constants.Y]; width: StyleSheet.countryValue[Constants.WIDTH]; height: StyleSheet.countryValue[Constants.HEIGHT]; - id: countryValue - criterion: Genivi.NAVIGATIONCORE_COUNTRY - globaldata: 'countryValue' - textfocus: true - next: cityValue - prev: back - onLeave:{menu.leave(0)} - } - Text { - x:StyleSheet.streetTitle[Constants.X]; y:StyleSheet.streetTitle[Constants.Y]; width:StyleSheet.streetTitle[Constants.WIDTH]; height:StyleSheet.streetTitle[Constants.HEIGHT];color:StyleSheet.streetTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.streetTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.streetTitle[Constants.PIXELSIZE]; - style: Text.Sunken; - smooth: true; - id:streetTitle - text: Genivi.gettext("Street"); - } - EntryField { - x:StyleSheet.streetValue[Constants.X]; y:StyleSheet.streetValue[Constants.Y]; width: StyleSheet.streetValue[Constants.WIDTH]; height: StyleSheet.streetValue[Constants.HEIGHT]; - id:streetValue - criterion: Genivi.NAVIGATIONCORE_STREET - globaldata: 'streetValue' - next: numberValue - prev: cityValue - disabled: true - onLeave:{menu.leave(0)} - } - Text { - x:StyleSheet.cityTitle[Constants.X]; y:StyleSheet.cityTitle[Constants.Y]; width:StyleSheet.cityTitle[Constants.WIDTH]; height:StyleSheet.cityTitle[Constants.HEIGHT];color:StyleSheet.cityTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.cityTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.cityTitle[Constants.PIXELSIZE]; - style: Text.Sunken; - smooth: true; - id:cityTitle - text: Genivi.gettext("City"); - } - EntryField { - x:StyleSheet.cityValue[Constants.X]; y:StyleSheet.cityValue[Constants.Y]; width: StyleSheet.cityValue[Constants.WIDTH]; height: StyleSheet.cityValue[Constants.HEIGHT]; - id:cityValue - criterion: Genivi.NAVIGATIONCORE_CITY - globaldata: 'cityValue' - next:streetValue - prev:countryValue - disabled: true - onLeave:{menu.leave(0)} - } - Text { - x:StyleSheet.numberTitle[Constants.X]; y:StyleSheet.numberTitle[Constants.Y]; width:StyleSheet.numberTitle[Constants.WIDTH]; height:StyleSheet.numberTitle[Constants.HEIGHT];color:StyleSheet.numberTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.numberTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.numberTitle[Constants.PIXELSIZE]; - style: Text.Sunken; - smooth: true; - id:numberTitle - text: Genivi.gettext("Number"); - } - EntryField { - x:StyleSheet.numberValue[Constants.X]; y:StyleSheet.numberValue[Constants.Y]; width: StyleSheet.numberValue[Constants.WIDTH]; height: StyleSheet.numberValue[Constants.HEIGHT]; - id:numberValue - criterion: Genivi.NAVIGATIONCORE_HOUSENUMBER - globaldata: 'numberValue' - next: ok - prev: streetValue - disabled: true - onLeave:{menu.leave(0)} - } - - StdButton { source:StyleSheet.ok[Constants.SOURCE]; x:StyleSheet.ok[Constants.X]; y:StyleSheet.ok[Constants.Y]; width:StyleSheet.ok[Constants.WIDTH]; height:StyleSheet.ok[Constants.HEIGHT];textColor:StyleSheet.okText[Constants.TEXTCOLOR]; pixelSize:StyleSheet.okText[Constants.PIXELSIZE]; - id:ok - next:back - prev:numberValue - text:Genivi.gettext("Ok") - disabled: true - onClicked:{ - leave(1); - //save address for next time - Genivi.address[Genivi.NAVIGATIONCORE_COUNTRY]=countryValue.text; - Genivi.address[Genivi.NAVIGATIONCORE_CITY]=cityValue.text; - Genivi.address[Genivi.NAVIGATIONCORE_STREET]=streetValue.text; - Genivi.address[Genivi.NAVIGATIONCORE_HOUSENUMBER]=numberValue.text; - Genivi.data['lat']=menu.lat; - Genivi.data['lon']=menu.lon; - Genivi.data['description']=countryValue.text; - if (!cityValue.disabled) - Genivi.data['description']+=' '+cityValue.text; - if (!streetValue.disabled) - Genivi.data['description']+=' '+streetValue.text; - if (!numberValue.disabled) - Genivi.data['description']+=' '+numberValue.text; - //save entered location into the history - Genivi.updateHistoryOfLastEnteredLocation(Genivi.data['description'],Genivi.data['lat'],Genivi.data['lon']); - routeMenu(); - } - } - - StdButton { source:StyleSheet.back[Constants.SOURCE]; x:StyleSheet.back[Constants.X]; y:StyleSheet.back[Constants.Y]; width:StyleSheet.back[Constants.WIDTH]; height:StyleSheet.back[Constants.HEIGHT];textColor:StyleSheet.backText[Constants.TEXTCOLOR]; pixelSize:StyleSheet.backText[Constants.PIXELSIZE]; - id:back; text: Genivi.gettext("Back"); next:countryValue; prev:ok; - onClicked:{leave(1); leaveMenu();} - } - } - Component.onCompleted: { - connectSignals(); - - var res=Genivi.navigationcore_session_GetVersion(dbusIf); - if (res[0] != "error") { - res=Genivi.navigationcore_session(dbusIf); - res=Genivi.locationinput_handle(dbusIf); - } else { - Genivi.dump("",res); - } - if (Genivi.entryselectedentry) { - Genivi.locationinput_SelectEntry(dbusIf,Genivi.entryselectedentry-1); - } - if (Genivi.entrydest == 'countryValue') - { - accept(countryValue); - } - if (Genivi.entrydest == 'cityValue') - { - accept(cityValue); - } - if (Genivi.entrydest == 'streetValue') - { - accept(streetValue); - } - if (Genivi.entrydest == 'numberValue') - { - accept(numberValue); - } - Genivi.entrydest=null; - - if (Genivi.preloadMode==true) - { - loadWithCountry(); - } - } -} diff --git a/src/hmi/qml/NavigationSearchCoordinates.qml b/src/hmi/qml/NavigationSearchCoordinates.qml deleted file mode 100644 index 8ac3b90..0000000 --- a/src/hmi/qml/NavigationSearchCoordinates.qml +++ /dev/null @@ -1,113 +0,0 @@ -/** -* @licence app begin@ -* SPDX-License-Identifier: MPL-2.0 -* -* \copyright Copyright (C) 2013-2014, PCA Peugeot Citroen -* -* \file NavigationSearchCoordinates.qml -* -* \brief This file is part of the navigation hmi. -* -* \author Martin Schaller -* \author Philippe Colliot -* -* \version 1.1 -* -* This Source Code Form is subject to the terms of the -* Mozilla Public License (MPL), v. 2.0. -* If a copy of the MPL was not distributed with this file, -* You can obtain one at http://mozilla.org/MPL/2.0/. -* -* For further information see http://www.genivi.org/. -* -* List of changes: -* 2014-03-05, Philippe Colliot, migration to the new HMI design -* , , -* -* @licence end@ -*/ -import QtQuick 2.1 -import "Core" -import "Core/genivi.js" as Genivi; -import "Core/style-sheets/style-constants.js" as Constants; -import "Core/style-sheets/navigation-search-coordinates-menu-css.js" as StyleSheet; -import lbs.plugin.dbusif 1.0 - -//draft, not tested yet !!!!! - -HMIMenu { - id: menu - property string pagefile:"NavigationSearchCoordinates" - - function accept(what) - { - if (what == latitudeValue) { - longitudeValue.take_focus(); - } - } - - function leave() - { - } - - - HMIBgImage { - image:StyleSheet.navigation_search_by_coordinates_menu_background[Constants.SOURCE]; - anchors { fill: parent; topMargin: parent.headlineHeight} - - Text { - x:StyleSheet.latitudeTitle[Constants.X]; y:StyleSheet.latitudeTitle[Constants.Y]; width:StyleSheet.latitudeTitle[Constants.WIDTH]; height:StyleSheet.latitudeTitle[Constants.HEIGHT];color:StyleSheet.latitudeTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.latitudeTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.latitudeTitle[Constants.PIXELSIZE]; - id:latitudeTitle; - style: Text.Sunken; - smooth: true; - text: Genivi.gettext("Latitude"); - } - EntryField { - x:StyleSheet.latitudeValue[Constants.X]; y:StyleSheet.latitudeValue[Constants.Y]; width: StyleSheet.latitudeValue[Constants.WIDTH]; height: StyleSheet.latitudeValue[Constants.HEIGHT]; - id: latitudeValue - globaldata: 'lat' - textfocus: true - next: longitudeValue - prev: back - onLeave:{menu.leave(0)} - } - Text { - x:StyleSheet.longitudeTitle[Constants.X]; y:StyleSheet.longitudeTitle[Constants.Y]; width:StyleSheet.longitudeTitle[Constants.WIDTH]; height:StyleSheet.longitudeTitle[Constants.HEIGHT];color:StyleSheet.longitudeTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.longitudeTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.longitudeTitle[Constants.PIXELSIZE]; - id:longitudeTitle; - style: Text.Sunken; - smooth: true; - text: Genivi.gettext("Longitude"); - } - EntryField { - x:StyleSheet.longitudeValue[Constants.X]; y:StyleSheet.longitudeValue[Constants.Y]; width: StyleSheet.longitudeValue[Constants.WIDTH]; height: StyleSheet.longitudeValue[Constants.HEIGHT]; - id: longitudeValue - globaldata: 'lon' - next: ok - prev: latitudeValue - onLeave:{menu.leave(0)} - } - StdButton { - source:StyleSheet.ok[Constants.SOURCE]; x:StyleSheet.ok[Constants.X]; y:StyleSheet.ok[Constants.Y]; width:StyleSheet.ok[Constants.WIDTH]; height:StyleSheet.ok[Constants.HEIGHT];textColor:StyleSheet.okText[Constants.TEXTCOLOR]; pixelSize:StyleSheet.okText[Constants.PIXELSIZE]; - id:ok - next:back - prev:longitudeValue - text:Genivi.gettext("Ok") - disabled: true - onClicked:{ - Genivi.data['lat']=latitudeValue.text; - Genivi.data['lon']=longitudeValue.text; - Genivi.data['description']="Latitude "+latitudeValue.text+"° Longitude "+longitudeValue.text+"°"; - routeMenu(); - } - } - StdButton { - source:StyleSheet.back[Constants.SOURCE]; x:StyleSheet.back[Constants.X]; y:StyleSheet.back[Constants.Y]; width:StyleSheet.back[Constants.WIDTH]; height:StyleSheet.back[Constants.HEIGHT];textColor:StyleSheet.backText[Constants.TEXTCOLOR]; pixelSize:StyleSheet.backText[Constants.PIXELSIZE]; - id:back; text: Genivi.gettext("Back"); next:latitudeValue; prev:ok; - onClicked:{ - Genivi.data['lat']=''; - Genivi.data['lon']=''; - leaveMenu(); - } - } - } -} diff --git a/src/hmi/qml/NavigationSearchFreeText.qml b/src/hmi/qml/NavigationSearchFreeText.qml deleted file mode 100644 index 7904e33..0000000 --- a/src/hmi/qml/NavigationSearchFreeText.qml +++ /dev/null @@ -1,183 +0,0 @@ -/** -* @licence app begin@ -* SPDX-License-Identifier: MPL-2.0 -* -* \copyright Copyright (C) 2013-2014, PCA Peugeot Citroen -* -* \file NavigationSearchFreeText.qml -* -* \brief This file is part of the navigation hmi. -* -* \author Martin Schaller -* \author Philippe Colliot -* -* \version 1.1 -* -* This Source Code Form is subject to the terms of the -* Mozilla Public License (MPL), v. 2.0. -* If a copy of the MPL was not distributed with this file, -* You can obtain one at http://mozilla.org/MPL/2.0/. -* -* For further information see http://www.genivi.org/. -* -* List of changes: -* 2014-03-05, Philippe Colliot, migration to the new HMI design -* , , -* -* @licence end@ -*/ -import QtQuick 2.1 -import "Core" -import "Core/genivi.js" as Genivi; -import "Core/style-sheets/style-constants.js" as Constants; -import "Core/style-sheets/navigation-search-freetext-menu-css.js" as StyleSheet; -import lbs.plugin.dbusif 1.0 - -HMIMenu { - id: menu - property string pagefile:"NavigationSearchFreeText" - property Item searchStatusSignal; - property Item searchResultListSignal; - property Item contentUpdatedSignal; - property real lat - property real lon - property string country; - property string city; - property string street; - property string number; - - function searchStatus(args) - { - Genivi.hookSignal("searchStatus"); - Genivi.dump("searchStatus",args); - if (args[3] == 2) - console.log("Searching"); - else - console.log("FreeText"); - } - - function searchResultList(args) - { - Genivi.hookSignal("searchResultList"); - Genivi.dump("searchResultList",args); - Genivi.locationinput_SelectEntry(dbusIf,0); - } - - function contentUpdated(args) - { - Genivi.hookSignal("contentUpdated"); - country=""; - city=""; - street=""; - number=""; - args=args[7]; - Genivi.dump("contentUpdated",args); - for (var i=0 ; i < args.length ; i+=4) { - if (args[i+1] == Genivi.NAVIGATIONCORE_LATITUDE) lat=args[i+3][1]; - if (args[i+1] == Genivi.NAVIGATIONCORE_LONGITUDE) lon=args[i+3][1]; - if (args[i+1] == Genivi.NAVIGATIONCORE_COUNTRY) country=args[i+3][1]; - if (args[i+1] == Genivi.NAVIGATIONCORE_CITY) city=args[i+3][1]; - if (args[i+1] == Genivi.NAVIGATIONCORE_STREET) street=args[i+3][1]; - if (args[i+1] == Genivi.NAVIGATIONCORE_HOUSENUMBER) number=args[i+3][1]; - } - leave(1); - Genivi.data['lat']=lat; - Genivi.data['lon']=lon; - Genivi.data['description']=country+" "+city+" "+street+" "+number; - pageOpen("NavigationRoute"); //to be fixed - } - - function connectSignals() - { - searchStatusSignal=Genivi.connect_searchStatusSignal(dbusIf,menu); - searchResultListSignal=Genivi.connect_searchResultListSignal(dbusIf,menu); - contentUpdatedSignal=Genivi.connect_contentUpdatedSignal(dbusIf,menu); - } - - function disconnectSignals() - { - searchStatusSignal.destroy(); - searchResultListSignal.destroy(); - contentUpdatedSignal.destroy(); - } - - function accept(what) - { - Genivi.locationinput_SetSelectionCriterion(dbusIf,what.criterion); - Genivi.locationinput_Search(dbusIf,what.text,10); - } - - - function leave(toOtherMenu) - { - disconnectSignals(); - if (toOtherMenu) { - Genivi.locationinput_handle_clear(dbusIf); - } - //Genivi.navigationcore_session_clear(dbusIf); - } - - DBusIf { - id: dbusIf - Component.onCompleted: { - connectSignals(); - - var res=Genivi.navigationcore_session_GetVersion(dbusIf); - if (res[0] != "error") { - res=Genivi.navigationcore_session(dbusIf); - res=Genivi.locationinput_handle(dbusIf); - } else { - Genivi.dump("",res); - } - if (Genivi.entryselectedentry) { - Genivi.locationinput_SelectEntry(dbusIf,Genivi.entryselectedentry-1); - } - } - } - - HMIBgImage { - image:StyleSheet.navigation_search_by_freetext_menu_background[Constants.SOURCE]; - anchors { fill: parent; topMargin: parent.headlineHeight} - - Text { - x:StyleSheet.textTitle[Constants.X]; y:StyleSheet.textTitle[Constants.Y]; width:StyleSheet.textTitle[Constants.WIDTH]; height:StyleSheet.textTitle[Constants.HEIGHT];color:StyleSheet.textTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.textTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.textTitle[Constants.PIXELSIZE]; - id:textTitle; - style: Text.Sunken; - smooth: true; - text: Genivi.gettext("Text"); - } - EntryField { - x:StyleSheet.textValue[Constants.X]; y:StyleSheet.textValue[Constants.Y]; width: StyleSheet.textValue[Constants.WIDTH]; height: StyleSheet.textValue[Constants.HEIGHT]; - id: textValue - criterion: Genivi.NAVIGATIONCORE_FULL_ADDRESS - globaldata: 'location_input' - textfocus: true - next: ok - prev: back - onLeave:{menu.leave(0)} - } - StdButton { - source:StyleSheet.ok[Constants.SOURCE]; x:StyleSheet.ok[Constants.X]; y:StyleSheet.ok[Constants.Y]; width:StyleSheet.ok[Constants.WIDTH]; height:StyleSheet.ok[Constants.HEIGHT];textColor:StyleSheet.okText[Constants.TEXTCOLOR]; pixelSize:StyleSheet.okText[Constants.PIXELSIZE]; - id:ok - text:Genivi.gettext("Ok") - next:back - prev:textValue - explode:false - onClicked:{ - accept(textValue); -/* - leave(1); - Genivi.data['lat']=menu.lat; - Genivi.data['lon']=menu.lon; - Genivi.data['description']=country.text; - pageOpen("NavigationRoute"); -*/ - } - } - StdButton { - source:StyleSheet.back[Constants.SOURCE]; x:StyleSheet.back[Constants.X]; y:StyleSheet.back[Constants.Y]; width:StyleSheet.back[Constants.WIDTH]; height:StyleSheet.back[Constants.HEIGHT];textColor:StyleSheet.backText[Constants.TEXTCOLOR]; pixelSize:StyleSheet.backText[Constants.PIXELSIZE]; - id:back; text: Genivi.gettext("Back"); next:textValue; prev:ok; - onClicked:{leave(1); leaveMenu();} - } - } -} diff --git a/src/hmi/qml/NavigationSearchHistory.qml b/src/hmi/qml/NavigationSearchHistory.qml deleted file mode 100644 index 76c26c2..0000000 --- a/src/hmi/qml/NavigationSearchHistory.qml +++ /dev/null @@ -1,100 +0,0 @@ -/** -* @licence app begin@ -* SPDX-License-Identifier: MPL-2.0 -* -* \copyright Copyright (C) 2013-2014, PCA Peugeot Citroen -* -* \file NavigationSearchHistory.qml -* -* \brief This file is part of the navigation hmi. -* -* \author Martin Schaller -* \author Philippe Colliot -* -* \version 1.1 -* -* This Source Code Form is subject to the terms of the -* Mozilla Public License (MPL), v. 2.0. -* If a copy of the MPL was not distributed with this file, -* You can obtain one at http://mozilla.org/MPL/2.0/. -* -* For further information see http://www.genivi.org/. -* -* List of changes: -* 2014-03-05, Philippe Colliot, creation of the new page -* , , -* -* @licence end@ -*/ - -import QtQuick 2.1 -import "Core" -import "Core/genivi.js" as Genivi; -import "Core/style-sheets/style-constants.js" as Constants; -import lbs.plugin.dbusif 1.0 - -HMIMenu { - id: menu - property string pagefile:"NavigationSearchHistory" - - DBusIf { - id:dbusIf - } - - Column { - id:content - anchors { fill: parent; topMargin: menu.hspc/2 } - - Component { - id: listDelegate - Text { - property real index:number; - width: 180; - height: 20; - id:text; - text: name; - font.pixelSize: 20; - style: Text.Sunken; - color: "white"; - styleColor: "black"; - smooth: true - } - } - - HMIList { - id:view - property real selectedEntry - height:parent.height-back.height; - width:parent.width; - delegate: listDelegate - next:back - prev:back - onSelected:{ - Genivi.data['description'] = what.text; - Genivi.data['lat'] = Genivi.historyOfLastEnteredLat[what.index]; - Genivi.data['lon'] = Genivi.historyOfLastEnteredLon[what.index]; - routeMenu(); - } - } - StdButton { - id:back - text: "Back" - onClicked:{leaveMenu();} - } - } - Component.onCompleted: { - var model=view.model; - var array=Genivi.historyOfLastEnteredLocation; - // display list of locations (fifo) - var i = Genivi.historyOfLastEnteredLocationOut; - while (i !== Genivi.historyOfLastEnteredLocationIn) - { - model.append({"name":Genivi.historyOfLastEnteredLocation[i],"number":(i)}); - if ((i+1) >= Genivi.historyOfLastEnteredLocationDepth) - i=0; - else - i+=1; - }; - view.forceActiveFocus(); - } -} diff --git a/src/hmi/qml/NavigationSettings.qml b/src/hmi/qml/NavigationSettings.qml deleted file mode 100644 index 4bd30c3..0000000 --- a/src/hmi/qml/NavigationSettings.qml +++ /dev/null @@ -1,454 +0,0 @@ -/** -* @licence app begin@ -* SPDX-License-Identifier: MPL-2.0 -* -* \copyright Copyright (C) 2013-2014, PCA Peugeot Citroen -* -* \file NavigationSettings.qml -* -* \brief This file is part of the navigation hmi. -* -* \author Martin Schaller -* \author Philippe Colliot -* -* \version 1.1 -* -* This Source Code Form is subject to the terms of the -* Mozilla Public License (MPL), v. 2.0. -* If a copy of the MPL was not distributed with this file, -* You can obtain one at http://mozilla.org/MPL/2.0/. -* -* For further information see http://www.genivi.org/. -* -* List of changes: -* 2014-03-05, Philippe Colliot, migration to the new HMI design -* , , -* -* @licence end@ -*/ -import QtQuick 2.1 -import "Core" -import "Core/genivi.js" as Genivi; -import "Core/style-sheets/style-constants.js" as Constants; -import "Core/style-sheets/navigation-settings-menu-css.js" as StyleSheet; -import lbs.plugin.dbusif 1.0 - -HMIMenu { - id: menu - property string pagefile:"NavigationSettings" - property Item simulationStatusChangedSignal; - property Item simulationSpeedChangedSignal; - next: back - prev: back - - DBusIf { - id:dbusIf; - } - - property int speedValueSent: 0; - - function simulationSpeedChanged(args) - { - Genivi.hookSignal("simulationSpeedChanged"); - var speedFactor=args[1]; - if (speedFactor == 0) { - speedValue.text="0"; - speedValueSent=0; - } - if (speedFactor == 1) { - speedValue.text="1/4"; - speedValueSent=1; - } - if (speedFactor == 2) { - speedValue.text="1/2"; - speedValueSent=2; - } - if (speedFactor == 4) { - speedValue.text="1"; - speedValueSent=3; - } - if (speedFactor == 8) { - speedValue.text="2"; - speedValueSent=4; - } - if (speedFactor == 16) { - speedValue.text="4"; - speedValueSent=5; - } - if (speedFactor == 32) { - speedValue.text="8"; - speedValueSent=6; - } - if (speedFactor == 64) { - speedValue.text="16"; - speedValueSent=7; - } - } - - function simulationStatusChanged(args) - { - Genivi.hookSignal("simulationStatusChanged"); - var simulationStatus=args[1]; - if (simulationStatus != Genivi.NAVIGATIONCORE_SIMULATION_STATUS_NO_SIMULATION) - { - on_off.setState("ON"); - if (simulationStatus == Genivi.NAVIGATIONCORE_SIMULATION_STATUS_PAUSED || simulationStatus == Genivi.NAVIGATIONCORE_SIMULATION_STATUS_FIXED_POSITION) - { - simu_mode.setState("PAUSE"); - } - else - { - if (simulationStatus == Genivi.NAVIGATIONCORE_SIMULATION_STATUS_RUNNING) - { - simu_mode.setState("PLAY"); - } - } - } - else - { - on_off.setState("OFF"); - simu_mode.setState("FREE"); - } - } - - function connectSignals() - { - simulationStatusChangedSignal=Genivi.connect_simulationStatusChangedSignal(dbusIf,menu); - simulationSpeedChangedSignal=Genivi.connect_simulationSpeedChangedSignal(dbusIf,menu); - } - - function disconnectSignals() - { - simulationStatusChangedSignal.destroy(); - simulationSpeedChangedSignal.destroy(); - } - - - function getDBusSpeedValue(value) - { - var returnValue; - switch (value) - { - case 0: - returnValue = 0; - break; - case 1: - returnValue = 1; - break; - case 2: - returnValue = 2; - break; - case 3: - returnValue = 4; - break; - case 4: - returnValue = 8; - break; - case 5: - returnValue = 16; - break; - case 6: - returnValue = 32; - break; - case 7: - returnValue = 64; - break; - default: - returnValue = 0; - break; - } - return returnValue; - } - - function updateSimulation() - { - var res=Genivi.mapmatchedposition_GetSimulationStatus(dbusIf); - var simulationStatus=res[1]; - if (simulationStatus != Genivi.NAVIGATIONCORE_SIMULATION_STATUS_NO_SIMULATION) - { - on_off.setState("ON"); - if (simulationStatus == Genivi.NAVIGATIONCORE_SIMULATION_STATUS_PAUSED || simulationStatus == Genivi.NAVIGATIONCORE_SIMULATION_STATUS_FIXED_POSITION) - { - simu_mode.setState("PAUSE"); - } - else - { - if (simulationStatus == Genivi.NAVIGATIONCORE_SIMULATION_STATUS_RUNNING) - { - simu_mode.setState("PLAY"); - } - } - } - else - { - on_off.setState("OFF"); - simu_mode.setState("FREE"); - } - - var res1=Genivi.mapmatchedposition_GetSimulationSpeed(dbusIf); - var speedFactor=res1[1]; - if (speedFactor == 0) { - speedValue.text="0"; - speedValueSent=0; - } - if (speedFactor == 1) { - speedValue.text="1/4"; - speedValueSent=1; - } - if (speedFactor == 2) { - speedValue.text="1/2"; - speedValueSent=2; - } - if (speedFactor == 4) { - speedValue.text="1"; - speedValueSent=3; - } - if (speedFactor == 8) { - speedValue.text="2"; - speedValueSent=4; - } - if (speedFactor == 16) { - speedValue.text="4"; - speedValueSent=5; - } - if (speedFactor == 32) { - speedValue.text="8"; - speedValueSent=6; - } - if (speedFactor == 64) { - speedValue.text="16"; - speedValueSent=7; - } - } - - function leave() - { - disconnectSignals(); - } - - HMIBgImage { - id: content - image:StyleSheet.navigation_settings_background[Constants.SOURCE]; - anchors { fill: parent; topMargin: parent.headlineHeight} - - Text { - x:StyleSheet.simulationTitle[Constants.X]; y:StyleSheet.simulationTitle[Constants.Y]; width:StyleSheet.simulationTitle[Constants.WIDTH]; height:StyleSheet.simulationTitle[Constants.HEIGHT];color:StyleSheet.simulationTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.simulationTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.simulationTitle[Constants.PIXELSIZE]; - id:simulationTitle; - style: Text.Sunken; - smooth: true - text: Genivi.gettext("Simulation") - } - - Text { - x:StyleSheet.speedTitle[Constants.X]; y:StyleSheet.speedTitle[Constants.Y]; width:StyleSheet.speedTitle[Constants.WIDTH]; height:StyleSheet.speedTitle[Constants.HEIGHT];color:StyleSheet.speedTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.speedTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.speedTitle[Constants.PIXELSIZE]; - id:speedTitle; - style: Text.Sunken; - smooth: true - text: Genivi.gettext("Speed") - } - - Text { - x:StyleSheet.speedValue[Constants.X]; y:StyleSheet.speedValue[Constants.Y]; width:StyleSheet.speedValue[Constants.WIDTH]; height:StyleSheet.speedValue[Constants.HEIGHT];color:StyleSheet.speedValue[Constants.TEXTCOLOR];styleColor:StyleSheet.speedValue[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.speedValue[Constants.PIXELSIZE]; - id:speedValue - style: Text.Sunken; - smooth: true - text: "" - } - - StdButton { - source:StyleSheet.speed_down[Constants.SOURCE]; x:StyleSheet.speed_down[Constants.X]; y:StyleSheet.speed_down[Constants.Y]; width:StyleSheet.speed_down[Constants.WIDTH]; height:StyleSheet.speed_down[Constants.HEIGHT]; - id:speed_down; disabled:false; next:back; prev:back; - onClicked: - { - if (speedValueSent > 0) - { - speedValueSent = speedValueSent-1; - } - Genivi.mapmatchedposition_SetSimulationSpeed(dbusIf,getDBusSpeedValue(speedValueSent)); - } - } - - StdButton { - source:StyleSheet.speed_up[Constants.SOURCE]; x:StyleSheet.speed_up[Constants.X]; y:StyleSheet.speed_up[Constants.Y]; width:StyleSheet.speed_up[Constants.WIDTH]; height:StyleSheet.speed_up[Constants.HEIGHT]; - id:speed_up; disabled:false; next:back; prev:back; - onClicked: - { - if (speedValueSent < 7) - { - speedValueSent = speedValueSent+1; - } - Genivi.mapmatchedposition_SetSimulationSpeed(dbusIf,getDBusSpeedValue(speedValueSent)); - } - } - - Text { - x:StyleSheet.modeTitle[Constants.X]; y:StyleSheet.modeTitle[Constants.Y]; width:StyleSheet.modeTitle[Constants.WIDTH]; height:StyleSheet.modeTitle[Constants.HEIGHT];color:StyleSheet.modeTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.modeTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.modeTitle[Constants.PIXELSIZE]; - id:modeTitle; - style: Text.Sunken; - smooth: true - text: Genivi.gettext("Mode") - } - - Text { - x:StyleSheet.onmapviewTitle[Constants.X]; y:StyleSheet.onmapviewTitle[Constants.Y]; width:StyleSheet.onmapviewTitle[Constants.WIDTH]; height:StyleSheet.onmapviewTitle[Constants.HEIGHT];color:StyleSheet.onmapviewTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.onmapviewTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.onmapviewTitle[Constants.PIXELSIZE]; - id:onmapviewTitle; - style: Text.Sunken; - smooth: true - text: Genivi.gettext("OnMapView") - } - - StdButton { - x:StyleSheet.simulation_on[Constants.X]; y:StyleSheet.simulation_on[Constants.Y]; width:StyleSheet.simulation_on[Constants.WIDTH]; height:StyleSheet.simulation_on[Constants.HEIGHT]; - id:on_off; next:back; prev:back; disabled:false; - property int status: 0; - function setState(name) - { - if (name=="ON") - { - status=1; - source=StyleSheet.simulation_off[Constants.SOURCE]; - } - else - { - status=0; - source=StyleSheet.simulation_on[Constants.SOURCE]; - } - } - onClicked: - { - switch (status) - { - case 0: //start the simulation - Genivi.mapmatchedposition_SetSimulationMode(dbusIf,true); - Genivi.mapmatchedposition_StartSimulation(dbusIf); - break; - case 1: //stop the simulation - Genivi.mapmatchedposition_SetSimulationMode(dbusIf,false); - break; - default: - break; - } - } - } - - StdButton { - x:StyleSheet.play[Constants.X]; y:StyleSheet.play[Constants.Y]; width:StyleSheet.play[Constants.WIDTH]; height:StyleSheet.play[Constants.HEIGHT]; - id:simu_mode; next:back; prev:back; disabled:false; - property int status: 0; - function setState(name) - { - if (name=="FREE") - { - status=0; - source=StyleSheet.play[Constants.SOURCE]; - disabled=true; - } - else - { - if (name=="PLAY") - { - status=1; - source=StyleSheet.pause[Constants.SOURCE]; - enabled=true; - disabled=false; - } - else - { - if (name=="PAUSE") - { - status=2; - source=StyleSheet.play[Constants.SOURCE]; - enabled=true; - disabled=false; - } - } - } - } - onClicked: - { - switch (status) - { - case 2: //pause - //pause to resume - Genivi.mapmatchedposition_StartSimulation(dbusIf); - break; - case 1: //play - //play to pause - Genivi.mapmatchedposition_PauseSimulation(dbusIf); - break; - default: - break; - } - } - } - - StdButton { - source:StyleSheet.preferences[Constants.SOURCE]; x:StyleSheet.preferences[Constants.X]; y:StyleSheet.preferences[Constants.Y]; width:StyleSheet.preferences[Constants.WIDTH]; height:StyleSheet.preferences[Constants.HEIGHT];textColor:StyleSheet.preferencesText[Constants.TEXTCOLOR]; pixelSize:StyleSheet.preferencesText[Constants.PIXELSIZE]; - id:preferences; text: Genivi.gettext("Preference"); disabled:false; next:languageAndUnit; prev:back; - onClicked: { - entryMenu("NavigationSettingsPreferences",menu); - } - } - - StdButton { - source:StyleSheet.languageAndUnit[Constants.SOURCE]; x:StyleSheet.languageAndUnit[Constants.X]; y:StyleSheet.languageAndUnit[Constants.Y]; width:StyleSheet.languageAndUnit[Constants.WIDTH]; height:StyleSheet.languageAndUnit[Constants.HEIGHT];textColor:StyleSheet.languageAndUnitText[Constants.TEXTCOLOR]; pixelSize:StyleSheet.languageAndUnitText[Constants.PIXELSIZE]; - id:languageAndUnit; text: Genivi.gettext("LanguageAndUnits"); disabled:false; next:back; prev:preferences; - onClicked: { - entryMenu("NavigationSettingsLanguageAndUnits",menu); - } - } - - StdButton { - source:StyleSheet.back[Constants.SOURCE]; x:StyleSheet.back[Constants.X]; y:StyleSheet.back[Constants.Y]; width:StyleSheet.back[Constants.WIDTH]; height:StyleSheet.back[Constants.HEIGHT];textColor:StyleSheet.backText[Constants.TEXTCOLOR]; pixelSize:StyleSheet.backText[Constants.PIXELSIZE]; - id:back; text: Genivi.gettext("Back"); disabled:false; next:onmapview_enable; prev:languageAndUnit; - onClicked:{leave(); leaveMenu();} - } - - StdButton { - x:StyleSheet.onmapview_enable[Constants.X]; y:StyleSheet.onmapview_enable[Constants.Y]; width:StyleSheet.onmapview_enable[Constants.WIDTH]; height:StyleSheet.onmapview_enable[Constants.HEIGHT]; - id:onmapview_enable; next:back; prev:preferences; disabled:false; - source: - { - if (Genivi.simulationPanelOnMapview==true) - { - source=StyleSheet.onmapview_enable[Constants.SOURCE]; - } - else - { - source=StyleSheet.onmapview_disable[Constants.SOURCE]; - } - } - - function setState(name) - { - if (name=="ENABLE") - { - source=StyleSheet.onmapview_enable[Constants.SOURCE]; - } - else - { - source=StyleSheet.onmapview_disable[Constants.SOURCE]; - } - } - onClicked: - { - if (Genivi.simulationPanelOnMapview==true) - { //hide the panel - Genivi.simulationPanelOnMapview=false; - onmapview_enable.setState("DISABLE"); - } - else - { //show the panel - Genivi.simulationPanelOnMapview=true; - onmapview_enable.setState("ENABLE"); - } - } - } - - } - - Component.onCompleted: { - connectSignals(); - updateSimulation(); - } -} diff --git a/src/hmi/qml/NavigationSettingsLanguageAndUnits.qml b/src/hmi/qml/NavigationSettingsLanguageAndUnits.qml deleted file mode 100644 index 117e954..0000000 --- a/src/hmi/qml/NavigationSettingsLanguageAndUnits.qml +++ /dev/null @@ -1,194 +0,0 @@ -/** -* @licence app begin@ -* SPDX-License-Identifier: MPL-2.0 -* -* \copyright Copyright (C) 2013-2014, PCA Peugeot Citroen -* -* \file NavigationSettingsLanguageAndUnits.qml -* -* \brief This file is part of the navigation hmi. -* -* \author Martin Schaller -* \author Philippe Colliot -* -* \version 1.1 -* -* This Source Code Form is subject to the terms of the -* Mozilla Public License (MPL), v. 2.0. -* If a copy of the MPL was not distributed with this file, -* You can obtain one at http://mozilla.org/MPL/2.0/. -* -* For further information see http://www.genivi.org/. -* -* List of changes: -* 2014-03-05, Philippe Colliot, migration to the new HMI design -* , , -* -* @licence end@ -*/ -import QtQuick 2.1 -import "Core" -import "Core/genivi.js" as Genivi; -import "Core/style-sheets/style-constants.js" as Constants; -import "Core/style-sheets/navigation-settings-language-and-units-menu-css.js" as StyleSheet; -import lbs.plugin.dbusif 1.0 - -HMIMenu { - id: menu - property string pagefile:"NavigationSettingsLanguageAndUnits" - property Item configurationChangedSignal; - - DBusIf { - id: dbusIf - } - - function configurationChanged(args) - { //to be improved ! - Genivi.hookSignal("configurationChanged"); - for (var i=0; i < args[1].length;i+=2) { - switch (args[1][i+1]) { - case Genivi.NAVIGATIONCORE_LOCALE: - update(); - break; - case Genivi.NAVIGATIONCORE_UNITS_OF_MEASUREMENT: - update(); - break; - } - } - } - - function connectSignals() - { - configurationChangedSignal=Genivi.connect_configurationChangedSignal(dbusIf,menu); - } - - function disconnectSignals() - { - configurationChangedSignal.destroy(); - } - - function update() - { - var available_nav=Genivi.navigationcore_configuration_GetSupportedLocales(dbusIf); - var available_map=Genivi.mapviewer_configuration_GetSupportedLocales(dbusIf); - var current_nav=Genivi.navigationcore_configuration_GetLocale(dbusIf); - var current_map=Genivi.mapviewer_configuration_GetLocale(dbusIf); - var current_lang_nav; - var current_lang_map; - var lang_nav=[]; - var lang_map=[]; - - current_lang_nav=current_nav[1] + "_" + current_nav[3]; - current_lang_map=current_map[1] + "_" + current_map[3]; - - for (var i = 0 ; i < available_nav[1].length ; i+=2) { - lang_nav[available_nav[1][i+1][1]+"_"+available_nav[1][i+1][3]]=true; - } - - for (var i = 0 ; i < available_map[1].length ; i+=2) { - lang_map[available_map[1][i+1][1]+"_"+available_map[1][i+1][3]]=true; - } - - // only the locales for nav are used - for (var i = 0 ; i < content.children.length ; i++) { - var name=content.children[i].objectName; - if (name) { - content.children[i].visible=true; - if (name == current_lang_nav) { - content.children[i].disabled=true; - } - else { - content.children[i].disabled=false; - } - } - } - - Genivi.setlang(current_lang_nav); - - var units1,units2; - var res=Genivi.navigationcore_configuration_GetUnitsOfMeasurement(dbusIf); - - if (res[1][1] == Genivi.NAVIGATIONCORE_LENGTH) { - units1=res[1][3]; - } - var res1=Genivi.mapviewer_configuration_GetUnitsOfMeasurement(dbusIf); - if (res1[1][1] == Genivi.MAPVIEWER_LENGTH) { - units2=res1[1][3]; - } - unit_km.disabled=false; - unit_mile.disabled=false; - if (units1==Genivi.NAVIGATIONCORE_KM) unit_km.disabled=true; - if (units1==Genivi.NAVIGATIONCORE_MILE) unit_mile.disabled=true; - } - - function setLocale(language, country, script) - { - Genivi.navigationcore_configuration_SetLocale(dbusIf,language,country,script); - Genivi.mapviewer_configuration_SetLocale(dbusIf,language,country,script); - Genivi.setlang(language + "_" + country); - pageOpen(menu.pagefile); //reload page because of texts... - } - function setUnitsLength(units1,units2) - { - Genivi.navigationcore_configuration_SetUnitsOfMeasurementLength(dbusIf,units1); - Genivi.mapviewer_configuration_SetUnitsOfMeasurementLength(dbusIf,units2); - update(); - } - - HMIBgImage { - id: content - image:StyleSheet.navigation_settings_language_and_units_menu_background[Constants.SOURCE]; - anchors { fill: parent; topMargin: parent.headlineHeight} - - Text { - x:StyleSheet.languagesTitle[Constants.X]; y:StyleSheet.languagesTitle[Constants.Y]; width:StyleSheet.languagesTitle[Constants.WIDTH]; height:StyleSheet.languagesTitle[Constants.HEIGHT];color:StyleSheet.languagesTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.languagesTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.languagesTitle[Constants.PIXELSIZE]; - id:languagesTitle; - style: Text.Sunken; - smooth: true - text: Genivi.gettext("Language") - } - StdButton { objectName:"fra_FRA"; - source:StyleSheet.french_flag[Constants.SOURCE]; x:StyleSheet.french_flag[Constants.X]; y:StyleSheet.french_flag[Constants.Y]; width:StyleSheet.french_flag[Constants.WIDTH]; height:StyleSheet.french_flag[Constants.HEIGHT]; - id:fra_FRA; disabled:false; next:deu_DEU; prev:back; onClicked: {setLocale("fra","FRA","Latn");}} - StdButton { objectName:"deu_DEU"; - source:StyleSheet.german_flag[Constants.SOURCE]; x:StyleSheet.german_flag[Constants.X]; y:StyleSheet.german_flag[Constants.Y]; width:StyleSheet.german_flag[Constants.WIDTH]; height:StyleSheet.german_flag[Constants.HEIGHT]; - id:deu_DEU; disabled:false; next:eng_USA; prev:fra_FRA; onClicked: {setLocale("deu","DEU","Latn");}} - StdButton { objectName:"eng_USA"; - source:StyleSheet.usa_flag[Constants.SOURCE]; x:StyleSheet.usa_flag[Constants.X]; y:StyleSheet.usa_flag[Constants.Y]; width:StyleSheet.usa_flag[Constants.WIDTH]; height:StyleSheet.usa_flag[Constants.HEIGHT]; - id:eng_USA; disabled:false; next:jpn_JPN; prev:deu_DEU; onClicked: {setLocale("eng","USA","Latn");}} - StdButton { objectName:"jpn_JPN"; - source:StyleSheet.japanese_flag[Constants.SOURCE]; x:StyleSheet.japanese_flag[Constants.X]; y:StyleSheet.japanese_flag[Constants.Y]; width:StyleSheet.japanese_flag[Constants.WIDTH]; height:StyleSheet.japanese_flag[Constants.HEIGHT]; - id:jpn_JPN; disabled:false; next:back; prev:eng_USA; onClicked: {setLocale("jpn","JPN","Hrkt");}} - - Text { - x:StyleSheet.unitsTitle[Constants.X]; y:StyleSheet.unitsTitle[Constants.Y]; width:StyleSheet.unitsTitle[Constants.WIDTH]; height:StyleSheet.unitsTitle[Constants.HEIGHT];color:StyleSheet.unitsTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.unitsTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.unitsTitle[Constants.PIXELSIZE]; - id:unitsTitle; - style: Text.Sunken; - smooth: true - text: Genivi.gettext("Units") - } - StdButton { source:StyleSheet.unit_km[Constants.SOURCE]; x:StyleSheet.unit_km[Constants.X]; y:StyleSheet.unit_km[Constants.Y]; width:StyleSheet.unit_km[Constants.WIDTH]; height:StyleSheet.unit_km[Constants.HEIGHT]; - id:unit_km; disabled:false; next:back; prev:back; - onClicked: { - setUnitsLength(Genivi.NAVIGATIONCORE_KM,Genivi.MAPVIEWER_KM);} - } - StdButton { source:StyleSheet.unit_mile[Constants.SOURCE]; x:StyleSheet.unit_mile[Constants.X]; y:StyleSheet.unit_mile[Constants.Y]; width:StyleSheet.unit_mile[Constants.WIDTH]; height:StyleSheet.unit_mile[Constants.HEIGHT]; - id:unit_mile; disabled:false; next:back; prev:back; - onClicked: { - setUnitsLength(Genivi.NAVIGATIONCORE_MILE,Genivi.MAPVIEWER_MILE);} - } - StdButton { source:StyleSheet.back[Constants.SOURCE]; x:StyleSheet.back[Constants.X]; y:StyleSheet.back[Constants.Y]; width:StyleSheet.back[Constants.WIDTH]; height:StyleSheet.back[Constants.HEIGHT];textColor:StyleSheet.backText[Constants.TEXTCOLOR]; pixelSize:StyleSheet.backText[Constants.PIXELSIZE]; - id:back; text: Genivi.gettext("Back"); disabled:false; next:back; prev:back; - onClicked:{ - disconnectSignals(); - leaveMenu(); - } - } - - } - - Component.onCompleted: { - connectSignals(); - update(); - } -} diff --git a/src/hmi/qml/NavigationSettingsPreferences.qml b/src/hmi/qml/NavigationSettingsPreferences.qml deleted file mode 100644 index 6e0758b..0000000 --- a/src/hmi/qml/NavigationSettingsPreferences.qml +++ /dev/null @@ -1,220 +0,0 @@ -/** -* @licence app begin@ -* SPDX-License-Identifier: MPL-2.0 -* -* \copyright Copyright (C) 2013-2014, PCA Peugeot Citroen -* -* \file NavigationSettingsPreferences.qml -* -* \brief This file is part of the navigation hmi. -* -* \author Martin Schaller -* \author Philippe Colliot -* -* \version 1.1 -* -* This Source Code Form is subject to the terms of the -* Mozilla Public License (MPL), v. 2.0. -* If a copy of the MPL was not distributed with this file, -* You can obtain one at http://mozilla.org/MPL/2.0/. -* -* For further information see http://www.genivi.org/. -* -* List of changes: -* 2014-03-05, Philippe Colliot, migration to the new HMI design -* , , -* -* @licence end@ -*/ -import QtQuick 2.1 -import "Core" -import "Core/genivi.js" as Genivi; -import "Core/style-sheets/style-constants.js" as Constants; -import "Core/style-sheets/navigation-settings-preference-menu-css.js" as StyleSheet; -import lbs.plugin.dbusif 1.0 -import lbs.plugin.preference 1.0 - -HMIMenu { - id: menu - property string pagefile:"NavigationSettingsPreferences" - - DBusIf { - id: dbusIf - } - -// please note that the preferences are hard coded, limited to three couples: -// (NAVIGATIONCORE_AVOID,NAVIGATIONCORE_HIGHWAYS_MOTORWAYS) -// (NAVIGATIONCORE_AVOID,NAVIGATIONCORE_TOLL_ROADS) -// (NAVIGATIONCORE_AVOID,NAVIGATIONCORE_FERRY) - - Preference { - source: 0 - mode: 0 - } - - function update() - { - Genivi.routing_SetRoutePreferences(dbusIf,""); //preferences applied to all countries - var active=Genivi.routing_GetRoutePreferences(dbusIf,""); - - var roadPreferenceList; - var conditionPreferenceList; - roadPreferenceList=active[1]; - conditionPreferenceList=active[3]; - var roadPreferenceMode,roadPreferenceSource; - var conditionPreferenceMode,conditionPreferenceSource; - - for(var i=0; i -* \author Philippe Colliot -* -* \version 1.1 -* -* This Source Code Form is subject to the terms of the -* Mozilla Public License (MPL), v. 2.0. -* If a copy of the MPL was not distributed with this file, -* You can obtain one at http://mozilla.org/MPL/2.0/. -* -* For further information see http://www.genivi.org/. -* -* List of changes: -* 2014-03-05, Philippe Colliot, migration to the new HMI design -* , , -* -* @licence end@ -*/ -import QtQuick 2.1 -import "Core" -import "Core/genivi.js" as Genivi; -import "Core/style-sheets/style-constants.js" as Constants; -import "Core/style-sheets/fsa-poi-menu-css.js" as StyleSheet; -import lbs.plugin.dbusif 1.0 - -HMIMenu { - id: menu - property string pagefile:"POI" - - DBusIf { - id: dbusIf - } - - function update() - { - selectedStationValue.text="See details of \nthe station \nhere" - } - HMIBgImage { - image:StyleSheet.fsa_poi_menu_background[Constants.SOURCE]; - anchors { fill: parent; topMargin: parent.headlineHeight } - Text { - x:StyleSheet.searchResultTitle[Constants.X]; y:StyleSheet.searchResultTitle[Constants.Y]; width:StyleSheet.searchResultTitle[Constants.WIDTH]; height:StyleSheet.searchResultTitle[Constants.HEIGHT];color:StyleSheet.searchResultTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.searchResultTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.searchResultTitle[Constants.PIXELSIZE]; - id:searchResultTitle; - style: Text.Sunken; - smooth: true - text: Genivi.gettext("SearchResult") - } - Text { - x:StyleSheet.selectedStationTitle[Constants.X]; y:StyleSheet.selectedStationTitle[Constants.Y]; width:StyleSheet.selectedStationTitle[Constants.WIDTH]; height:StyleSheet.selectedStationTitle[Constants.HEIGHT];color:StyleSheet.selectedStationTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.selectedStationTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.selectedStationTitle[Constants.PIXELSIZE]; - id:selectedStationTitle; - style: Text.Sunken; - smooth: true - text: Genivi.gettext("SelectedStation") - } - Text { - x:StyleSheet.selectedStationValue[Constants.X]; y:StyleSheet.selectedStationValue[Constants.Y]; width:StyleSheet.selectedStationValue[Constants.WIDTH]; height:StyleSheet.selectedStationValue[Constants.HEIGHT];color:StyleSheet.selectedStationValue[Constants.TEXTCOLOR];styleColor:StyleSheet.selectedStationValue[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.selectedStationValue[Constants.PIXELSIZE]; - id:selectedStationValue - style: Text.Sunken; - smooth: true - clip: true - text: " " - } - Component { - id: searchResultList - Text { - x:StyleSheet.searchResultValue[Constants.X]; y:StyleSheet.searchResultValue[Constants.Y]; width:StyleSheet.searchResultValue[Constants.WIDTH]; height:StyleSheet.searchResultValue[Constants.HEIGHT];color:StyleSheet.searchResultValue[Constants.TEXTCOLOR];styleColor:StyleSheet.searchResultValue[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.searchResultValue[Constants.PIXELSIZE]; - id:searchResultValue; - property real index:number; - text: name; - style: Text.Sunken; - smooth: true - } - } - HMIList { - x:StyleSheet.searchResultList[Constants.X]; y:StyleSheet.searchResultList[Constants.Y]; width:StyleSheet.searchResultList[Constants.WIDTH]; height:StyleSheet.searchResultList[Constants.HEIGHT]; - property real selectedEntry - id:view - delegate: searchResultList - next:select_search_for_refill - prev:back - onSelected:{ - if (what) { - Genivi.poi_id=what.index; - var poi_data=Genivi.poi_data[what.index]; - selectedStationValue.text="Name:"+poi_data.name+"\nID:"+poi_data.id+"\nLat:"+poi_data.lat+"\nLon:"+poi_data.lon; - select_reroute.disabled=false; - select_display_on_map.disabled=false; - } else { - Genivi.poi_id=null; - selectedStationValue.text=""; - select_reroute.disabled=true; - select_display_on_map.disabled=true; - } - } - } - StdButton { - source:StyleSheet.select_search_for_refill[Constants.SOURCE]; x:StyleSheet.select_search_for_refill[Constants.X]; y:StyleSheet.select_search_for_refill[Constants.Y]; width:StyleSheet.select_search_for_refill[Constants.WIDTH]; height:StyleSheet.select_search_for_refill[Constants.HEIGHT]; - id:select_search_for_refill - explode: false - onClicked: { - var model=view.model; - var ids=[]; - var position=Genivi.mapmatchedposition_GetPosition(dbusIf); - var latitude=0; - var longitude=0; - for (var i=0;i -* \author Philippe Colliot -* -* \version 1.1 -* -* This Source Code Form is subject to the terms of the -* Mozilla Public License (MPL), v. 2.0. -* If a copy of the MPL was not distributed with this file, -* You can obtain one at http://mozilla.org/MPL/2.0/. -* -* For further information see http://www.genivi.org/. -* -* List of changes: -* 2014-03-05, Philippe Colliot, migration to the new HMI design -* , , -* -* @licence end@ -*/ -import QtQuick 2.1 -import "Core" -import "Core/genivi.js" as Genivi; -import "Core/style-sheets/style-constants.js" as Constants; -import "Core/style-sheets/trip-computer-menu-css.js" as StyleSheet; -import lbs.plugin.dbusif 1.0 - -HMIMenu { - id: menu - property string pagefile:"TripComputer" - property Item tripDataUpdatedSignal; - - DBusIf { - id: dbusIf - } - - function tripDataUpdated(args) - { - Genivi.hookSignal("tripDataUpdated"); - updateTripMode(); - } - - function connectSignals() - { - tripDataUpdatedSignal=Genivi.connect_tripDataUpdatedSignal(dbusIf,menu); - } - - function disconnectSignals() - { - tripDataUpdatedSignal.destroy(); - } - - function hideAll() - { - avg_speed_value.visible=false - avg_speed_unit.visible=false - avg_speed_title.visible=false - avg_fuel_value.visible=false - avg_fuel_unit.visible=false - avg_fuel_title.visible=false - distance_value.visible=false - distance_unit.visible=false - distance_title.visible=false - fuel_value.visible=false - fuel_unit.visible=false - fuel_title.visible=false - tank_distance_value.visible=false - tank_distance_unit.visible=false - tank_distance_title.visible=false - predictive_tank_distance_value.visible=false - predictive_tank_distance_unit.visible=false - predictive_tank_distance_title.visible=false - select_trip1.visible=false; - select_trip2.visible=false; - select_instant.visible=false; - reset.visible=false; - } - - function updateTripMode() - { - hideAll() - if (Genivi.tripMode=="TRIP_NUMBER1") - { - content.image=StyleSheet.trip1_background[Constants.SOURCE] - avg_speed_value.visible=true - avg_speed_unit.visible=true - avg_speed_title.visible=true - avg_fuel_value.visible=true - avg_fuel_unit.visible=true - avg_fuel_title.visible=true - distance_value.visible=true - distance_unit.visible=true - distance_title.visible=true - select_trip2.visible=true; - select_instant.visible=true; - reset.visible=true; - update(1); - } - else - if (Genivi.tripMode=="TRIP_NUMBER2") - { - content.image=StyleSheet.trip2_background[Constants.SOURCE] - avg_speed_value.visible=true - avg_speed_unit.visible=true - avg_speed_title.visible=true - avg_fuel_value.visible=true - avg_fuel_unit.visible=true - avg_fuel_title.visible=true - distance_value.visible=true - distance_unit.visible=true - distance_title.visible=true - select_trip1.visible=true; - select_instant.visible=true; - reset.visible=true; - update(2); - } - else - if (Genivi.tripMode=="TRIP_INSTANT") - { - content.image=StyleSheet.trip_instant_background[Constants.SOURCE] - fuel_value.visible=true - fuel_unit.visible=true - fuel_title.visible=true - tank_distance_value.visible=true - tank_distance_unit.visible=true - tank_distance_title.visible=true - predictive_tank_distance_value.visible=true - predictive_tank_distance_unit.visible=true - predictive_tank_distance_title.visible=true - select_trip1.visible=true; - select_trip2.visible=true; - update(0); - } - else - { - content.image=StyleSheet.trip1_background[Constants.SOURCE] - avg_speed_value.visible=true - avg_speed_unit.visible=true - avg_speed_title.visible=true - avg_fuel_value.visible=true - avg_fuel_unit.visible=true - avg_fuel_title.visible=true - distance_value.visible=true - distance_unit.visible=true - distance_title.visible=true - select_trip2.visible=true; - select_instant.visible=true; - reset.visible=true; - } - } - - function disableAllValue() - { - distance_value.text="---"; - avg_speed_value.text="---"; - avg_fuel_value.text="---"; - fuel_value.text="---"; - tank_distance_value.text="---"; - predictive_tank_distance_value.text="---"; - } - - function setUnits() - { - distance_unit.text="km"; - avg_speed_unit.text="km/h"; - avg_fuel_unit.text="l/100km"; - fuel_unit.text="L"; - tank_distance_unit.text="km"; - predictive_tank_distance_unit.text="km"; - } - - function update(tripnr) - { - var res; - var value; - disableAllValue(); // By default set all the values to "--" - if (tripnr > 0) { - res=Genivi.fuelstopadvisor_GetTripData(dbusIf,tripnr-1); - for (var i = 0 ; i < res[1].length ; i+=4) { - if (res[1][i+1] == Genivi.FUELSTOPADVISOR_DISTANCE) { - value=res[1][i+3][3][1]/10; - distance_value.text=value.toFixed(1); - } - if (res[1][i+1] == Genivi.FUELSTOPADVISOR_AVERAGE_SPEED) { - value=res[1][i+3][3][1]/10; - avg_speed_value.text=value.toFixed(0); - } - if (res[1][i+1] == Genivi.FUELSTOPADVISOR_AVERAGE_FUEL_CONSUMPTION_PER_DISTANCE) { - value=res[1][i+3][3][1]/10; - avg_fuel_value.text=value.toFixed(1); - } - } - } else { - res=Genivi.fuelstopadvisor_GetInstantData(dbusIf); - for (var i = 0 ; i < res[1].length ; i+=4) { - if (res[1][i+1] == Genivi.FUELSTOPADVISOR_FUEL_LEVEL) { - fuel_value.text=res[1][i+3][3][1]; - } - if (res[1][i+1] == Genivi.FUELSTOPADVISOR_TANK_DISTANCE) { - tank_distance_value.text=res[1][i+3][3][1]; - } - if (res[1][i+1] == Genivi.FUELSTOPADVISOR_ENHANCED_TANK_DISTANCE) { - predictive_tank_distance_value.text=res[1][i+3][3][1]; - } - } - - } - } - - function leave() - { - disconnectSignals(); - } - - HMIBgImage { - id:content - image: - { - if (Genivi.tripMode=="TRIP_NUMBER1") - { - image=StyleSheet.trip1_background[Constants.SOURCE] - } - else - if (Genivi.tripMode=="TRIP_NUMBER2") - { - image=StyleSheet.trip2_background[Constants.SOURCE] - } - else - if (Genivi.tripMode=="TRIP_INSTANT") - { - image=StyleSheet.trip_instant_background[Constants.SOURCE] - } - else - { - image=StyleSheet.trip1_background[Constants.SOURCE] - } - } - - anchors { fill: parent; topMargin: parent.headlineHeight} - Text { - x:StyleSheet.avg_speed_value[Constants.X]; y:StyleSheet.avg_speed_value[Constants.Y]; width:StyleSheet.avg_speed_value[Constants.WIDTH]; height:StyleSheet.avg_speed_value[Constants.HEIGHT];color:StyleSheet.avg_speed_value[Constants.TEXTCOLOR];styleColor:StyleSheet.avg_speed_value[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.avg_speed_value[Constants.PIXELSIZE]; - visible: false - style: Text.Sunken; - smooth: true - id:avg_speed_value - text: " " - } - Text { - x:StyleSheet.avg_speed_unit[Constants.X]; y:StyleSheet.avg_speed_unit[Constants.Y]; width:StyleSheet.avg_speed_unit[Constants.WIDTH]; height:StyleSheet.avg_speed_unit[Constants.HEIGHT];color:StyleSheet.avg_speed_unit[Constants.TEXTCOLOR];styleColor:StyleSheet.avg_speed_unit[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.avg_speed_unit[Constants.PIXELSIZE]; - visible: false - style: Text.Sunken; - smooth: true - id:avg_speed_unit - text: " " - } - Text { - x:StyleSheet.avg_speed_title[Constants.X]; y:StyleSheet.avg_speed_title[Constants.Y]; width:StyleSheet.avg_speed_title[Constants.WIDTH]; height:StyleSheet.avg_speed_title[Constants.HEIGHT];color:StyleSheet.avg_speed_title[Constants.TEXTCOLOR];styleColor:StyleSheet.avg_speed_title[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.avg_speed_title[Constants.PIXELSIZE]; - visible: false - style: Text.Sunken; - smooth: true - id:avg_speed_title - text: Genivi.gettext("AvgSpeed") - } - Text { - x:StyleSheet.avg_fuel_value[Constants.X]; y:StyleSheet.avg_fuel_value[Constants.Y]; width:StyleSheet.avg_fuel_value[Constants.WIDTH]; height:StyleSheet.avg_fuel_value[Constants.HEIGHT];color:StyleSheet.avg_fuel_value[Constants.TEXTCOLOR];styleColor:StyleSheet.avg_fuel_value[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.avg_fuel_value[Constants.PIXELSIZE]; - visible: false - style: Text.Sunken; - smooth: true - id:avg_fuel_value - text: " " - } - Text { - x:StyleSheet.avg_fuel_unit[Constants.X]; y:StyleSheet.avg_fuel_unit[Constants.Y]; width:StyleSheet.avg_fuel_unit[Constants.WIDTH]; height:StyleSheet.avg_fuel_unit[Constants.HEIGHT];color:StyleSheet.avg_fuel_unit[Constants.TEXTCOLOR];styleColor:StyleSheet.avg_fuel_unit[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.avg_fuel_unit[Constants.PIXELSIZE]; - visible: false - style: Text.Sunken; - smooth: true - id:avg_fuel_unit - text: " " - } - Text { - x:StyleSheet.avg_fuel_title[Constants.X]; y:StyleSheet.avg_fuel_title[Constants.Y]; width:StyleSheet.avg_fuel_title[Constants.WIDTH]; height:StyleSheet.avg_fuel_title[Constants.HEIGHT];color:StyleSheet.avg_fuel_title[Constants.TEXTCOLOR];styleColor:StyleSheet.avg_fuel_title[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.avg_fuel_title[Constants.PIXELSIZE]; - visible: false - style: Text.Sunken; - smooth: true - id:avg_fuel_title - text: Genivi.gettext("AvgFuel") - } - Text { - x:StyleSheet.distance_value[Constants.X]; y:StyleSheet.distance_value[Constants.Y]; width:StyleSheet.distance_value[Constants.WIDTH]; height:StyleSheet.distance_value[Constants.HEIGHT];color:StyleSheet.distance_value[Constants.TEXTCOLOR];styleColor:StyleSheet.distance_value[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.distance_value[Constants.PIXELSIZE]; - visible: false - style: Text.Sunken; - smooth: true - id:distance_value - text: " " - } - Text { - x:StyleSheet.distance_unit[Constants.X]; y:StyleSheet.distance_unit[Constants.Y]; width:StyleSheet.distance_unit[Constants.WIDTH]; height:StyleSheet.distance_unit[Constants.HEIGHT];color:StyleSheet.distance_unit[Constants.TEXTCOLOR];styleColor:StyleSheet.distance_unit[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.distance_unit[Constants.PIXELSIZE]; - visible: false - style: Text.Sunken; - smooth: true - id:distance_unit - text: " " - } - Text { - x:StyleSheet.distance_title[Constants.X]; y:StyleSheet.distance_title[Constants.Y]; width:StyleSheet.distance_title[Constants.WIDTH]; height:StyleSheet.distance_title[Constants.HEIGHT];color:StyleSheet.distance_title[Constants.TEXTCOLOR];styleColor:StyleSheet.distance_title[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.distance_title[Constants.PIXELSIZE]; - visible: false - style: Text.Sunken; - smooth: true - id:distance_title - text: Genivi.gettext("Distance") - } - Text { - x:StyleSheet.fuel_value[Constants.X]; y:StyleSheet.fuel_value[Constants.Y]; width:StyleSheet.fuel_value[Constants.WIDTH]; height:StyleSheet.fuel_value[Constants.HEIGHT];color:StyleSheet.fuel_value[Constants.TEXTCOLOR];styleColor:StyleSheet.fuel_value[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.fuel_value[Constants.PIXELSIZE]; - visible: false - style: Text.Sunken; - smooth: true - id:fuel_value - text: " " - } - Text { - x:StyleSheet.fuel_unit[Constants.X]; y:StyleSheet.fuel_unit[Constants.Y]; width:StyleSheet.fuel_unit[Constants.WIDTH]; height:StyleSheet.fuel_unit[Constants.HEIGHT];color:StyleSheet.fuel_unit[Constants.TEXTCOLOR];styleColor:StyleSheet.fuel_unit[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.fuel_unit[Constants.PIXELSIZE]; - visible: false - style: Text.Sunken; - smooth: true - id:fuel_unit - text: " " - } - Text { - x:StyleSheet.fuel_title[Constants.X]; y:StyleSheet.fuel_title[Constants.Y]; width:StyleSheet.fuel_title[Constants.WIDTH]; height:StyleSheet.fuel_title[Constants.HEIGHT];color:StyleSheet.fuel_title[Constants.TEXTCOLOR];styleColor:StyleSheet.fuel_title[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.fuel_title[Constants.PIXELSIZE]; - visible: false - style: Text.Sunken; - smooth: true - id:fuel_title - text: Genivi.gettext("FuelLevel") - } - Text { - x:StyleSheet.tank_distance_value[Constants.X]; y:StyleSheet.tank_distance_value[Constants.Y]; width:StyleSheet.tank_distance_value[Constants.WIDTH]; height:StyleSheet.tank_distance_value[Constants.HEIGHT];color:StyleSheet.tank_distance_value[Constants.TEXTCOLOR];styleColor:StyleSheet.tank_distance_value[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.tank_distance_value[Constants.PIXELSIZE]; - visible: false - style: Text.Sunken; - smooth: true - id:tank_distance_value - text: " " - } - Text { - x:StyleSheet.tank_distance_unit[Constants.X]; y:StyleSheet.tank_distance_unit[Constants.Y]; width:StyleSheet.tank_distance_unit[Constants.WIDTH]; height:StyleSheet.tank_distance_unit[Constants.HEIGHT];color:StyleSheet.tank_distance_unit[Constants.TEXTCOLOR];styleColor:StyleSheet.tank_distance_unit[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.tank_distance_unit[Constants.PIXELSIZE]; - visible: false - style: Text.Sunken; - smooth: true - id:tank_distance_unit - text: " " - } - Text { - x:StyleSheet.tank_distance_title[Constants.X]; y:StyleSheet.tank_distance_title[Constants.Y]; width:StyleSheet.tank_distance_title[Constants.WIDTH]; height:StyleSheet.tank_distance_title[Constants.HEIGHT];color:StyleSheet.tank_distance_title[Constants.TEXTCOLOR];styleColor:StyleSheet.tank_distance_title[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.tank_distance_title[Constants.PIXELSIZE]; - visible: false - style: Text.Sunken; - smooth: true - id:tank_distance_title - text: Genivi.gettext("TankDistance") - } - Text { - x:StyleSheet.predictive_tank_distance_value[Constants.X]; y:StyleSheet.predictive_tank_distance_value[Constants.Y]; width:StyleSheet.predictive_tank_distance_value[Constants.WIDTH]; height:StyleSheet.predictive_tank_distance_value[Constants.HEIGHT];color:StyleSheet.predictive_tank_distance_value[Constants.TEXTCOLOR];styleColor:StyleSheet.predictive_tank_distance_value[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.predictive_tank_distance_value[Constants.PIXELSIZE]; - visible: false - style: Text.Sunken; - smooth: true - id:predictive_tank_distance_value - text: " " - } - Text { - x:StyleSheet.predictive_tank_distance_unit[Constants.X]; y:StyleSheet.predictive_tank_distance_unit[Constants.Y]; width:StyleSheet.predictive_tank_distance_unit[Constants.WIDTH]; height:StyleSheet.predictive_tank_distance_unit[Constants.HEIGHT];color:StyleSheet.predictive_tank_distance_unit[Constants.TEXTCOLOR];styleColor:StyleSheet.predictive_tank_distance_unit[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.predictive_tank_distance_unit[Constants.PIXELSIZE]; - visible: false - style: Text.Sunken; - smooth: true - id:predictive_tank_distance_unit - text: " " - } - Text { - x:StyleSheet.predictive_tank_distance_title[Constants.X]; y:StyleSheet.predictive_tank_distance_title[Constants.Y]; width:StyleSheet.predictive_tank_distance_title[Constants.WIDTH]; height:StyleSheet.predictive_tank_distance_title[Constants.HEIGHT];color:StyleSheet.predictive_tank_distance_title[Constants.TEXTCOLOR];styleColor:StyleSheet.predictive_tank_distance_title[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.predictive_tank_distance_title[Constants.PIXELSIZE]; - visible: false - style: Text.Sunken; - smooth: true - id:predictive_tank_distance_title - text: Genivi.gettext("PredictiveTankDistance") - } - - StdButton { source:StyleSheet.reset[Constants.SOURCE]; x:StyleSheet.reset[Constants.X]; y:StyleSheet.reset[Constants.Y]; width:StyleSheet.reset[Constants.WIDTH]; height:StyleSheet.reset[Constants.HEIGHT];textColor:StyleSheet.resetText[Constants.TEXTCOLOR]; pixelSize:StyleSheet.resetText[Constants.PIXELSIZE]; - visible: false; - id:reset; text: Genivi.gettext("Reset"); disabled:false; next:select_trip1; prev:back; - onClicked:{ - if (Genivi.tripMode == "TRIP_NUMBER1") { - Genivi.fuelstopadvisor_ResetTripData(dbusIf,0); - } - if (Genivi.tripMode == "TRIP_NUMBER2") { - Genivi.fuelstopadvisor_ResetTripData(dbusIf,1); - } - updateTripMode(); - } - } - StdButton { source:StyleSheet.select_trip1[Constants.SOURCE]; x:StyleSheet.select_trip1[Constants.X]; y:StyleSheet.select_trip1[Constants.Y]; width:StyleSheet.select_trip1[Constants.WIDTH]; height:StyleSheet.select_trip1[Constants.HEIGHT]; - visible: false; - id:select_trip1; disabled:false; next:select_trip2; prev:reset; - onClicked:{ - Genivi.tripMode="TRIP_NUMBER1"; - updateTripMode(); - } - } - StdButton { source:StyleSheet.select_trip2[Constants.SOURCE]; x:StyleSheet.select_trip2[Constants.X]; y:StyleSheet.select_trip2[Constants.Y]; width:StyleSheet.select_trip2[Constants.WIDTH]; height:StyleSheet.select_trip2[Constants.HEIGHT]; - visible: false; - id:select_trip2; disabled:false; next:select_instant; prev:select_trip1; - onClicked:{ - Genivi.tripMode="TRIP_NUMBER2"; - updateTripMode(); - } - } - StdButton { source:StyleSheet.select_instant[Constants.SOURCE]; x:StyleSheet.select_instant[Constants.X]; y:StyleSheet.select_instant[Constants.Y]; width:StyleSheet.select_instant[Constants.WIDTH]; height:StyleSheet.select_instant[Constants.HEIGHT]; - visible: false; - id:select_instant; disabled:false; next:back; prev:select_trip2; - onClicked:{ - Genivi.tripMode="TRIP_INSTANT"; - updateTripMode(); - } - } - StdButton { source:StyleSheet.back[Constants.SOURCE]; x:StyleSheet.back[Constants.X]; y:StyleSheet.back[Constants.Y]; width:StyleSheet.back[Constants.WIDTH]; height:StyleSheet.back[Constants.HEIGHT];textColor:StyleSheet.backText[Constants.TEXTCOLOR]; pixelSize:StyleSheet.backText[Constants.PIXELSIZE]; - id:back; text: Genivi.gettext("Back"); disabled:false; next:reset; prev:select_instant; - onClicked:{leave(); leaveMenu();} - } - } - Component.onCompleted: { - connectSignals(); - setUnits(); - updateTripMode(); - } -} diff --git a/src/hmi/qml/application.qml b/src/hmi/qml/application.qml deleted file mode 100644 index 5b71796..0000000 --- a/src/hmi/qml/application.qml +++ /dev/null @@ -1,57 +0,0 @@ -/** -* @licence app begin@ -* SPDX-License-Identifier: MPL-2.0 -* -* \copyright Copyright (C) 2013-2014, PCA Peugeot Citroen -* -* \file MainMenu.qml -* -* \brief This file is part of the navigation hmi. -* -* \author Martin Schaller -* \author Philippe Colliot -* -* \version 1.1 -* -* This Source Code Form is subject to the terms of the -* Mozilla Public License (MPL), v. 2.0. -* If a copy of the MPL was not distributed with this file, -* You can obtain one at http://mozilla.org/MPL/2.0/. -* -* For further information see http://www.genivi.org/. -* -* List of changes: -* 2014-03-05, Philippe Colliot, set the language by default -* , , -* -* @licence end@ -*/ -import QtQuick 2.1 -import QtQuick.Controls 1.0 -import QtQuick.Layouts 1.0 -import QtQuick.Dialogs 1.0 -import "Core/style-sheets/style-constants.js" as Constants; -import "Core/style-sheets/navigation-browse-map-css.js" as StyleSheetMap; -import "Core/genivi.js" as Genivi; - -ApplicationWindow { - id: container - flags: Qt.CustomizeWindowHint - color: "transparent" - visible: true - width: StyleSheetMap.menu[Constants.WIDTH]; - height: StyleSheetMap.menu[Constants.HEIGHT]; - property Item component; - function load(page) - { - if (component) { - component.destroy(); - } - component = Qt.createQmlObject(page+"{}",container,"dynamic"); - } - - Component.onCompleted: { - Genivi.setlang("eng_USA"); //by default set to english US - load("MainMenu"); - } -} diff --git a/src/run b/src/run index abc692e..350f4dc 100755 --- a/src/run +++ b/src/run @@ -113,7 +113,7 @@ SRC_DIR=$CUR_DIR SCRIPT_DIR=$SRC_DIR/script HMI_QML_DIR=$SRC_DIR/hmi/qml -app=$HMI_QML_DIR/application.qml # hmi panel launched by default +app=$HMI_QML_DIR/NavigationApp.qml # hmi panel launched by default poidatabase=$SCRIPT_DIR/empty.db # empty poi database by default STYLE_SHEETS_GENERATED_INDICATOR=$HMI_QML_DIR/Core/style-sheets/the-style-sheets-have-been-generated-css.js REPLAYER_LOG_FILE=none diff --git a/src/set_window_location b/src/set_window_location new file mode 100755 index 0000000..9da8e87 --- /dev/null +++ b/src/set_window_location @@ -0,0 +1,19 @@ +#! /bin/bash + +# function to get the window id +function get_window_id() +{ + window_id=$(wmctrl -l | grep "$1" | tail -1 | cut -f1 -d" ") +} + +get_window_id "hmi-launcher" +wmctrl -i -r "$window_id" -e 0,100,100,800,480 + +get_window_id "navit" +wmctrl -i -r "$window_id" -e 0,100,72,800,480 + +wmctrl -a "hmi-launcher" + +get_window_id "Simulation dashboard" +wmctrl -i -r "$window_id" -e 0,100,600,800,480 + -- cgit v1.2.1