summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorasanoaozora <fifitaneki@hotmail.com>2016-12-20 15:41:19 +0100
committerasanoaozora <fifitaneki@hotmail.com>2016-12-20 15:41:19 +0100
commit4234b74480e6684051852598a4f31976a8db437d (patch)
tree2af092b4ac9142ef986f83514c4eeffcddc6a939
parentc95dd55257c739c930bfd4ca7070b6405b6ef8a4 (diff)
downloadnavigation-4234b74480e6684051852598a4f31976a8db437d.tar.gz
preparation of a more simple HMI: pre-release version
-rw-r--r--src/hmi/qml/CameraSettings.qml379
-rw-r--r--src/hmi/qml/Core/EntryField.qml104
-rw-r--r--src/hmi/qml/Core/Keyboard.qml231
-rw-r--r--src/hmi/qml/Core/gimp/draft-theme/800x480/button-keyboard.xcfbin1942 -> 0 bytes
-rw-r--r--src/hmi/qml/Core/gimp/draft-theme/LICENSE8
-rw-r--r--src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMap.xcf (renamed from src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMap.xcf)bin1010456 -> 1010456 bytes
-rwxr-xr-xsrc/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapBottom.xcf (renamed from src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapBottom.xcf)bin69225 -> 69228 bytes
-rwxr-xr-xsrc/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapGuidance.xcf (renamed from src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapGuidance.xcf)bin8119 -> 8119 bytes
-rwxr-xr-xsrc/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapManeuver.xcf (renamed from src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapManeuver.xcf)bin15573 -> 15573 bytes
-rwxr-xr-xsrc/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapRoute.xcf (renamed from src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapRoute.xcf)bin23675 -> 23675 bytes
-rwxr-xr-xsrc/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapScroll.xcf (renamed from src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapScroll.xcf)bin8053 -> 8053 bytes
-rwxr-xr-xsrc/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapSettings.xcf (renamed from src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapSettings.xcf)bin28147 -> 28147 bytes
-rwxr-xr-xsrc/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapSimulation.xcf (renamed from src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapSimulation.xcf)bin32052 -> 32052 bytes
-rw-r--r--src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapTop.xcf (renamed from src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapTop.xcf)bin35714 -> 35714 bytes
-rwxr-xr-xsrc/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppMain.xcf (renamed from src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppMain.xcf)bin1680115 -> 1680115 bytes
-rw-r--r--src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppPOI.xcf (renamed from src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppPOI.xcf)bin169106 -> 169106 bytes
-rw-r--r--src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSearch.xcf (renamed from src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSearch.xcf)bin297119 -> 293217 bytes
-rw-r--r--src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSettings.xcf (renamed from src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSettings.xcf)bin654650 -> 654650 bytes
-rw-r--r--src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSettingsPreference.xcf (renamed from src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSettingsPreference.xcf)bin1055776 -> 1055776 bytes
-rw-r--r--src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSettingsSettingsLanguageAndUnits.xcf (renamed from src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSettingsSettingsLanguageAndUnits.xcf)bin751999 -> 751999 bytes
-rw-r--r--src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppTripComputer.xcf (renamed from src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppTripComputer.xcf)bin471763 -> 471763 bytes
-rwxr-xr-xsrc/hmi/qml/Core/gimp/gdp-theme/800x480/fsa-main-menu.xcfbin1777075 -> 0 bytes
-rw-r--r--src/hmi/qml/Core/gimp/gdp-theme/800x480/fsa-poi-menu.xcfbin756072 -> 0 bytes
-rwxr-xr-xsrc/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-bottom.xcfbin69221 -> 0 bytes
-rwxr-xr-xsrc/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-guidance.xcfbin8115 -> 0 bytes
-rwxr-xr-xsrc/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-route.xcfbin32656 -> 0 bytes
-rwxr-xr-xsrc/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-scroll.xcfbin8049 -> 0 bytes
-rwxr-xr-xsrc/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-settings.xcfbin26984 -> 0 bytes
-rwxr-xr-xsrc/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-simulation.xcfbin32048 -> 0 bytes
-rw-r--r--src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-top.xcfbin35710 -> 0 bytes
-rw-r--r--src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map.xcfbin1009790 -> 0 bytes
-rw-r--r--src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-calculated-route-menu.xcfbin830190 -> 0 bytes
-rw-r--r--src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-route-menu.xcfbin744655 -> 0 bytes
-rw-r--r--src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-search-address-menu.xcfbin629366 -> 0 bytes
-rw-r--r--src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-search-coordinates-menu.xcfbin612257 -> 0 bytes
-rw-r--r--src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-search-freetext-menu.xcfbin698160 -> 0 bytes
-rw-r--r--src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-search-menu.xcfbin716548 -> 0 bytes
-rw-r--r--src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-settings-language-and-units-menu.xcfbin752000 -> 0 bytes
-rw-r--r--src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-settings-menu.xcfbin650741 -> 0 bytes
-rw-r--r--src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-settings-preference-menu.xcfbin1055777 -> 0 bytes
-rw-r--r--src/hmi/qml/Core/gimp/gdp-theme/800x480/trip-computer-menu.xcfbin471763 -> 0 bytes
-rw-r--r--src/hmi/qml/Entry.qml214
-rw-r--r--src/hmi/qml/EntryFreeText.qml235
-rw-r--r--src/hmi/qml/MainMenu.qml130
-rw-r--r--src/hmi/qml/NavigationAppBrowseMap.qml9
-rw-r--r--src/hmi/qml/NavigationAppMain.qml16
-rw-r--r--src/hmi/qml/NavigationAppPOI.qml1
-rw-r--r--src/hmi/qml/NavigationAppSearch.qml101
-rw-r--r--src/hmi/qml/NavigationBrowseMap.qml920
-rw-r--r--src/hmi/qml/NavigationCalculatedRoute.qml255
-rw-r--r--src/hmi/qml/NavigationManeuversList.qml102
-rw-r--r--src/hmi/qml/NavigationRoute.qml229
-rw-r--r--src/hmi/qml/NavigationRouteDescription.qml96
-rw-r--r--src/hmi/qml/NavigationSearch.qml96
-rw-r--r--src/hmi/qml/NavigationSearchAddress.qml362
-rw-r--r--src/hmi/qml/NavigationSearchCoordinates.qml113
-rw-r--r--src/hmi/qml/NavigationSearchFreeText.qml183
-rw-r--r--src/hmi/qml/NavigationSearchHistory.qml100
-rw-r--r--src/hmi/qml/NavigationSettings.qml454
-rw-r--r--src/hmi/qml/NavigationSettingsLanguageAndUnits.qml194
-rw-r--r--src/hmi/qml/NavigationSettingsPreferences.qml220
-rw-r--r--src/hmi/qml/POI.qml245
-rw-r--r--src/hmi/qml/TripComputer.qml440
-rw-r--r--src/hmi/qml/application.qml57
-rwxr-xr-xsrc/run2
-rwxr-xr-xsrc/set_window_location19
66 files changed, 103 insertions, 5412 deletions
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 <martin.schaller@it-schaller.de>
-* \author Philippe Colliot <philippe.colliot@mpsa.com>
-*
-* \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
-* <date>, <name>, <description of change>
-*
-* @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 <martin.schaller@it-schaller.de>
-* \author Philippe Colliot <philippe.colliot@mpsa.com>
-*
-* \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
-* <date>, <name>, <description of change>
-*
-* @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 <martin.schaller@it-schaller.de>
-*
-* \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:
-* <date>, <name>, <description of change>
-*
-* @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/button-keyboard.xcf b/src/hmi/qml/Core/gimp/draft-theme/800x480/button-keyboard.xcf
deleted file mode 100644
index 23fdc4a..0000000
--- a/src/hmi/qml/Core/gimp/draft-theme/800x480/button-keyboard.xcf
+++ /dev/null
Binary files 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 <philippe.colliot@mpsa.com>
-
-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/draft-theme/800x480/NavigationAppBrowseMap.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMap.xcf
index 3e85a28..3e85a28 100644
--- a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMap.xcf
+++ b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMap.xcf
Binary files differ
diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapBottom.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapBottom.xcf
index 25cbdd3..cc9d0a2 100755
--- a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapBottom.xcf
+++ b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapBottom.xcf
Binary files differ
diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapGuidance.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapGuidance.xcf
index 464e3d6..464e3d6 100755
--- a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapGuidance.xcf
+++ b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapGuidance.xcf
Binary files differ
diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapManeuver.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapManeuver.xcf
index a9467d6..a9467d6 100755
--- a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapManeuver.xcf
+++ b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapManeuver.xcf
Binary files differ
diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapRoute.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapRoute.xcf
index a444646..a444646 100755
--- a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapRoute.xcf
+++ b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapRoute.xcf
Binary files differ
diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapScroll.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapScroll.xcf
index 27f6842..27f6842 100755
--- a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapScroll.xcf
+++ b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapScroll.xcf
Binary files differ
diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapSettings.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapSettings.xcf
index 891d2cb..891d2cb 100755
--- a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapSettings.xcf
+++ b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapSettings.xcf
Binary files differ
diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapSimulation.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapSimulation.xcf
index 8b3c580..8b3c580 100755
--- a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapSimulation.xcf
+++ b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapSimulation.xcf
Binary files differ
diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapTop.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapTop.xcf
index d447405..d447405 100644
--- a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppBrowseMapTop.xcf
+++ b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppBrowseMapTop.xcf
Binary files differ
diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppMain.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppMain.xcf
index 5011705..5011705 100755
--- a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppMain.xcf
+++ b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppMain.xcf
Binary files differ
diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppPOI.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppPOI.xcf
index 94fdd35..94fdd35 100644
--- a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppPOI.xcf
+++ b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppPOI.xcf
Binary files differ
diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSearch.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSearch.xcf
index d1caeaa..aae49ef 100644
--- a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSearch.xcf
+++ b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSearch.xcf
Binary files differ
diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSettings.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSettings.xcf
index b76582b..b76582b 100644
--- a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSettings.xcf
+++ b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSettings.xcf
Binary files differ
diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSettingsPreference.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSettingsPreference.xcf
index a15a2db..a15a2db 100644
--- a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSettingsPreference.xcf
+++ b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSettingsPreference.xcf
Binary files differ
diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSettingsSettingsLanguageAndUnits.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSettingsSettingsLanguageAndUnits.xcf
index a950bda..a950bda 100644
--- a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSettingsSettingsLanguageAndUnits.xcf
+++ b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppSettingsSettingsLanguageAndUnits.xcf
Binary files differ
diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppTripComputer.xcf b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppTripComputer.xcf
index 0fb21ff..0fb21ff 100644
--- a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppTripComputer.xcf
+++ b/src/hmi/qml/Core/gimp/gdp-theme/800x480/NavigationAppTripComputer.xcf
Binary files 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
--- a/src/hmi/qml/Core/gimp/gdp-theme/800x480/fsa-main-menu.xcf
+++ /dev/null
Binary files 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
--- a/src/hmi/qml/Core/gimp/gdp-theme/800x480/fsa-poi-menu.xcf
+++ /dev/null
Binary files 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
--- a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-bottom.xcf
+++ /dev/null
Binary files 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
--- a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-guidance.xcf
+++ /dev/null
Binary files 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
--- a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-route.xcf
+++ /dev/null
Binary files 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
--- a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-scroll.xcf
+++ /dev/null
Binary files 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
--- a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-settings.xcf
+++ /dev/null
Binary files 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
--- a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-simulation.xcf
+++ /dev/null
Binary files 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
--- a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map-top.xcf
+++ /dev/null
Binary files 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
--- a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-browse-map.xcf
+++ /dev/null
Binary files 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
--- a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-calculated-route-menu.xcf
+++ /dev/null
Binary files 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
--- a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-route-menu.xcf
+++ /dev/null
Binary files 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
--- a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-search-address-menu.xcf
+++ /dev/null
Binary files 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
--- a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-search-coordinates-menu.xcf
+++ /dev/null
Binary files 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
--- a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-search-freetext-menu.xcf
+++ /dev/null
Binary files 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
--- a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-search-menu.xcf
+++ /dev/null
Binary files 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
--- a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-settings-language-and-units-menu.xcf
+++ /dev/null
Binary files 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
--- a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-settings-menu.xcf
+++ /dev/null
Binary files 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
--- a/src/hmi/qml/Core/gimp/gdp-theme/800x480/navigation-settings-preference-menu.xcf
+++ /dev/null
Binary files 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
--- a/src/hmi/qml/Core/gimp/gdp-theme/800x480/trip-computer-menu.xcf
+++ /dev/null
Binary files 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 <martin.schaller@it-schaller.de>
-*
-* \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:
-* <date>, <name>, <description of change>
-*
-* @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 <martin.schaller@it-schaller.de>
-*
-* \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:
-* <date>, <name>, <description of change>
-*
-* @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 <martin.schaller@it-schaller.de>
-* \author Philippe Colliot <philippe.colliot@mpsa.com>
-*
-* \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
-* <date>, <name>, <description of change>
-*
-* @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 <martin.schaller@it-schaller.de>
-*
-* \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:
-* <date>, <name>, <description of change>
-*
-* @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<res[3].length;i+=4){
- if (res[3][i+1]== Genivi.NAVIGATIONCORE_SPEED){
- vehicleSpeedValue.text=res[3][i+3][3][1];
- }
- }
- }
-
- function simulationSpeedChanged(args)
- {
- Genivi.hookSignal("simulationSpeedChanged");
- if (args[1] == 0) {
- speedValue.text="0";
- speedValueSent=0;
- }
- if (args[1] == 1) {
- speedValue.text="1/4";
- speedValueSent=1;
- }
- if (args[1] == 2) {
- speedValue.text="1/2";
- speedValueSent=2;
- }
- if (args[1] == 4) {
- speedValue.text="1";
- speedValueSent=3;
- }
- if (args[1] == 8) {
- speedValue.text="2";
- speedValueSent=4;
- }
- if (args[1] == 16) {
- speedValue.text="4";
- speedValueSent=5;
- }
- if (args[1] == 32) {
- speedValue.text="8";
- speedValueSent=6;
- }
- if (args[1] == 64) {
- speedValue.text="16";
- speedValueSent=7;
- }
- }
-
- function simulationStatusChanged(args)
- {
- Genivi.hookSignal("simulationStatusChanged");
- if (args[1] != Genivi.NAVIGATIONCORE_SIMULATION_STATUS_NO_SIMULATION)
- {
- on_off.setState("ON");
- if (args[1] == Genivi.NAVIGATIONCORE_SIMULATION_STATUS_PAUSED || args[1] == Genivi.NAVIGATIONCORE_SIMULATION_STATUS_FIXED_POSITION)
- {
- simu_mode.setState("PAUSE");
- }
- else
- {
- if (args[1] == Genivi.NAVIGATIONCORE_SIMULATION_STATUS_RUNNING)
- {
- simu_mode.setState("PLAY");
- }
- }
- }
- else
- {
- on_off.setState("OFF");
- simu_mode.setState("FREE");
- }
-}
-
- function updateSimulation()
- {
- var res=Genivi.mapmatchedposition_GetSimulationStatus(dbusIf);
- if (res[1] != Genivi.NAVIGATIONCORE_SIMULATION_STATUS_NO_SIMULATION)
- {
- on_off.setState("ON");
- if (res[1] == Genivi.NAVIGATIONCORE_SIMULATION_STATUS_PAUSED || res[1] == Genivi.NAVIGATIONCORE_SIMULATION_STATUS_FIXED_POSITION)
- {
- simu_mode.setState("PAUSE");
- }
- else
- {
- if (res[1] == Genivi.NAVIGATIONCORE_SIMULATION_STATUS_RUNNING)
- {
- simu_mode.setState("PLAY");
- }
- }
- }
- else
- {
- on_off.setState("OFF");
- simu_mode.setState("FREE");
- }
-
- var res1=Genivi.mapmatchedposition_GetSimulationSpeed(dbusIf);
- if (res1[1] == 0) {
- speedValue.text="0";
- speedValueSent=0;
- }
- if (res1[1] == 1) {
- speedValue.text="1/4";
- speedValueSent=1;
- }
- if (res1[1] == 2) {
- speedValue.text="1/2";
- speedValueSent=2;
- }
- if (res1[1] == 4) {
- speedValue.text="1";
- speedValueSent=3;
- }
- if (res1[1] == 8) {
- speedValue.text="2";
- speedValueSent=4;
- }
- if (res1[1] == 16) {
- speedValue.text="4";
- speedValueSent=5;
- }
- if (res1[1] == 32) {
- speedValue.text="8";
- speedValueSent=6;
- }
- if (res1[1] == 64) {
- speedValue.text="16";
- speedValueSent=7;
- }
- }
-
- 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 updateAddress()
- {
- var res=Genivi.mapmatchedposition_GetCurrentAddress(dbusIf);
- if (res[3][1] == Genivi.NAVIGATIONCORE_STREET) {
- currentroad.text=res[3][3][3][1];
- } else {
- currentroad.text="";
- }
- }
-
- function mapmatchedpositionAddressUpdate(args)
- {
- Genivi.hookSignal("mapmatchedpositionAddressUpdate");
- updateAddress();
- }
-
- function showZoom()
- {
- var res=Genivi.mapviewer_GetMapViewScale(dbusIf);
- var text=res[1].toString();
- if (res[3] === Genivi.MAPVIEWER_MAX) {
- text+="*";
- } else {
- if (res[3] === Genivi.MAPVIEWER_MIN)
- text="*"+text;
- }
- zoomlevel.text=text;
- }
-
- function fuelStopAdvisorWarning(args)
- {
- Genivi.hookSignal("fuelStopAdvisorWarning");
- if (args[1] == 1)
- {
- fsamessageText.text=Genivi.gettext("FSAWarning");
- select_search_for_refill_in_top.visible=true;
- }
- else
- {
- fsamessageText.text=" ";
- select_search_for_refill_in_top.visible=false;
- }
- }
-
- function connectSignals()
- {
- guidanceWaypointReachedSignal=Genivi.connect_guidanceWaypointReachedSignal(dbusIf,menu);
- guidanceManeuverChangedSignal=Genivi.connect_guidanceManeuverChangedSignal(dbusIf,menu);
- guidancePositionOnRouteChangedSignal=Genivi.connect_guidancePositionOnRouteChangedSignal(dbusIf,menu);
- simulationStatusChangedSignal=Genivi.connect_simulationStatusChangedSignal(dbusIf,menu);
- simulationSpeedChangedSignal=Genivi.connect_simulationSpeedChangedSignal(dbusIf,menu);
- mapmatchedpositionPositionUpdateSignal=Genivi.connect_mapmatchedpositionPositionUpdateSignal(dbusIf,menu);
- mapmatchedpositionAddressUpdateSignal=Genivi.connect_mapmatchedpositionAddressUpdateSignal(dbusIf,menu);
- fuelStopAdvisorSignal=Genivi.connect_fuelStopAdvisorSignal(dbusIf,menu);
- }
-
- function disconnectSignals()
- {
- guidanceWaypointReachedSignal.destroy();
- guidanceManeuverChangedSignal.destroy();
- guidancePositionOnRouteChangedSignal.destroy();
- simulationStatusChangedSignal.destroy();
- simulationSpeedChangedSignal.destroy();
- mapmatchedpositionPositionUpdateSignal.destroy();
- mapmatchedpositionAddressUpdateSignal.destroy();
- fuelStopAdvisorSignal.destroy();
- }
-
- function routeOverview()
- {
- disconnectSignals();
- entryMenu("NavigationCalculatedRoute",menu);
- }
-
- function toggleOrientation()
- {
- north=!north;
- if (north) {
- Genivi.mapviewer_SetCameraHeadingAngle(dbusIf,0);
- orientation.setState("D");
- } else {
- Genivi.mapviewer_SetCameraHeadingTrackUp(dbusIf);
- orientation.setState("N");
- }
- }
-
- function updateGuidance()
- {
- var res=Genivi.guidance_GetGuidanceStatus(dbusIf);
- if (res[1] == Genivi.NAVIGATIONCORE_INACTIVE) {
- guidanceStatus.setState("OFF");
- Genivi.guidance_activated = false;
- //Guidance inactive, so inform the trip computer
- Genivi.fuelstopadvisor_SetFuelAdvisorSettings(dbusIf,0,0);
- maneuverAdvice.text=Genivi.gettext("NoGuidance");
- maneuverIcon.source=StyleSheetGuidance.maneuverIcon[Constants.SOURCE]; //no icon by default
- distancetomaneuverValue.text="----";
- distancetodestinationValue.text="----";
- timetodestinationValue.text="----";
- roadaftermaneuverValue.text="----";
- return;
- } else {
- guidanceStatus.setState("ON");
- Genivi.guidance_activated = true;
- //Guidance active, so inform the trip computer (refresh)
- Genivi.fuelstopadvisor_SetFuelAdvisorSettings(dbusIf,1,50);
- }
-
- var maneuversList=Genivi.guidance_GetManeuversList(dbusIf,1,0);
- var numberOfManeuvers=maneuversList[3];
- //only one maneuver is considered
- var maneuver=maneuversList[5][1];
- var roadNumberAfterManeuver=maneuver[1];
- var roadNameAfterManeuver=maneuver[3];
- var roadPropertyAfterManeuver=maneuver[5];
- var drivingSide=maneuver[7];
- var offsetOfNextManeuver=maneuver[9];
- var items=maneuver[11][1];
- var offsetOfManeuver=items[1];
- var travelTime=items[3];
- var direction=items[5];
- var maneuverType=items[7];
- var maneuverData=items[9];
- if (maneuverData[1] == Genivi.NAVIGATIONCORE_DIRECTION)
- {
- guidanceStatus.setState("ON");
- Genivi.guidance_activated = true;
- maneuverIcon.source=Genivi.ManeuverDirectionIcon[maneuverData[3][3][1]];
- //Genivi.ManeuverType[subarray[j+1][7]] contains CROSSROAD and is removed for the moment
- distancetomaneuverValue.text=Genivi.distance(offsetOfManeuver);
- roadaftermaneuverValue.text=roadNameAfterManeuver;
- }
-
- res=Genivi.guidance_GetDestinationInformation(dbusIf);
- distancetodestinationValue.text = Genivi.distance(res[1]);
- timetodestinationValue.text = Genivi.time(res[3]);
-
- updateAddress();
- }
-
- function stopGuidance()
- {
- Genivi.guidance_StopGuidance(dbusIf);
- updateGuidance();
- }
-
- function startGuidance()
- {
- Genivi.guidance_StartGuidance(dbusIf,Genivi.routing_handle(dbusIf));
- updateGuidance();
- updateSimulation();
- updateAddress();
- }
-
- function stopSimulation()
- {
- Genivi.mapmatchedposition_SetSimulationMode(dbusIf,0);
- }
-
- function startSimulation()
- {
- Genivi.mapmatchedposition_SetSimulationMode(dbusIf,1);
- Genivi.mapmatchedposition_StartSimulation(dbusIf);
- }
-
- Rectangle {
- id:map
- x:0
- y:0
- height:menu.height
- width:menu.width
- color:"transparent"
-
- Rectangle {
- color:"transparent"
- width: StyleSheetTop.navigation_browse_map_top_background[Constants.WIDTH]
- height: StyleSheetTop.navigation_browse_map_top_background[Constants.HEIGHT]
- x: StyleSheetMap.top_area[Constants.X]
- y: StyleSheetMap.top_area[Constants.Y]
- HMIBgImage {
- id: top
- opacity: 0.8
- image:StyleSheetTop.navigation_browse_map_top_background[Constants.SOURCE];
- anchors { fill: parent; topMargin: parent.headlineHeight}
-
- SmartText {
- x:StyleSheetTop.fsamessageText[Constants.X]; y:StyleSheetTop.fsamessageText[Constants.Y]; width:StyleSheetTop.fsamessageText[Constants.WIDTH]; height:StyleSheetTop.fsamessageText[Constants.HEIGHT];color:StyleSheetTop.fsamessageText[Constants.TEXTCOLOR];styleColor:StyleSheetTop.fsamessageText[Constants.STYLECOLOR]; font.pixelSize:StyleSheetTop.fsamessageText[Constants.PIXELSIZE];
- id:fsamessageText
- visible: true
- text:""
- }
-
- StdButton {
- source:StyleSheetTop.select_search_for_refill_in_top[Constants.SOURCE]; x:StyleSheetTop.select_search_for_refill_in_top[Constants.X]; y:StyleSheetTop.select_search_for_refill_in_top[Constants.Y]; width:StyleSheetTop.select_search_for_refill_in_top[Constants.WIDTH]; height:StyleSheetTop.select_search_for_refill_in_top[Constants.HEIGHT];
- id:select_search_for_refill_in_top
- visible:false
- explode: false
- onClicked: {
- disconnectSignals();
- entryMenu("POI",menu);
- }
- }
-
- SmartText {
- x:StyleSheetTop.roadaftermaneuverValue[Constants.X]; y:StyleSheetTop.roadaftermaneuverValue[Constants.Y]; width:StyleSheetTop.roadaftermaneuverValue[Constants.WIDTH]; height:StyleSheetTop.roadaftermaneuverValue[Constants.HEIGHT];color:StyleSheetTop.roadaftermaneuverValue[Constants.TEXTCOLOR];styleColor:StyleSheetTop.roadaftermaneuverValue[Constants.STYLECOLOR]; font.pixelSize:StyleSheetTop.roadaftermaneuverValue[Constants.PIXELSIZE];
- visible: true
- id:roadaftermaneuverValue
- text: " "
- }
-
- Text {
- x:StyleSheetTop.speedValue[Constants.X]; y:StyleSheetTop.speedValue[Constants.Y]; width:StyleSheetTop.speedValue[Constants.WIDTH]; height:StyleSheetTop.speedValue[Constants.HEIGHT];color:StyleSheetTop.speedValue[Constants.TEXTCOLOR];styleColor:StyleSheetTop.speedValue[Constants.STYLECOLOR]; font.pixelSize:StyleSheetTop.speedValue[Constants.PIXELSIZE];
- visible: true
- style: Text.Sunken;
- smooth: true
- id:vehicleSpeedValue
- text: "---"
- }
-
- Text {
- x:StyleSheetTop.speedUnit[Constants.X]; y:StyleSheetTop.speedUnit[Constants.Y]; width:StyleSheetTop.speedUnit[Constants.WIDTH]; height:StyleSheetTop.speedUnit[Constants.HEIGHT];color:StyleSheetTop.speedUnit[Constants.TEXTCOLOR];styleColor:StyleSheetTop.speedUnit[Constants.STYLECOLOR]; font.pixelSize:StyleSheetTop.speedUnit[Constants.PIXELSIZE];
- visible: true
- style: Text.Sunken;
- smooth: true
- id:speedUnit
- text: "km/h"
- }
- }
- }
-
- Rectangle {
- color:"transparent"
- width: StyleSheetBottom.navigation_browse_map_bottom_background[Constants.WIDTH]
- height: StyleSheetBottom.navigation_browse_map_bottom_background[Constants.HEIGHT]
- x: StyleSheetMap.bottom_area[Constants.X]
- y: StyleSheetMap.bottom_area[Constants.Y]
- HMIBgImage {
- id: bottom
- opacity: 0.8
- image:StyleSheetBottom.navigation_browse_map_bottom_background[Constants.SOURCE];
- anchors { fill: parent; topMargin: parent.headlineHeight}
-
- 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;
- onClicked: {
- disconnectSignals();
- leaveMenu();;
- }
- }
-
- StdButton {
- x:StyleSheetBottom.directiondestination[Constants.X]; y:StyleSheetBottom.directiondestination[Constants.Y]; width:StyleSheetBottom.directiondestination[Constants.WIDTH]; height:StyleSheetBottom.directiondestination[Constants.HEIGHT];
- id:orientation; next:zoomin; prev:menub; disabled:false;
- source:StyleSheetBottom.directiondestination[Constants.SOURCE]; //todo call get status
- property int status: 0;
- function setState(name)
- {
- if (name=="D")
- {
- status=1;
- source=StyleSheetBottom.directionnorth[Constants.SOURCE];
- }
- else
- {
- status=0;
- source=StyleSheetBottom.directiondestination[Constants.SOURCE];
- }
- }
- onClicked:
- {
- toggleOrientation();
- }
- }
-
- SmartText {
- x:StyleSheetBottom.currentroad[Constants.X]; y:StyleSheetBottom.currentroad[Constants.Y]; width:StyleSheetBottom.currentroad[Constants.WIDTH]; height:StyleSheetBottom.currentroad[Constants.HEIGHT];color:StyleSheetBottom.currentroad[Constants.TEXTCOLOR];styleColor:StyleSheetBottom.currentroad[Constants.STYLECOLOR]; font.pixelSize:StyleSheetBottom.currentroad[Constants.PIXELSIZE];
- visible: true
- id:currentroad
- text: "-------"
- }
-
- StdButton {
- source:StyleSheetBottom.zoomin[Constants.SOURCE]; x:StyleSheetBottom.zoomin[Constants.X]; y:StyleSheetBottom.zoomin[Constants.Y]; width:StyleSheetBottom.zoomin[Constants.WIDTH]; height:StyleSheetBottom.zoomin[Constants.HEIGHT];
- id:zoomin; next:zoomout; prev:orientation;
- onClicked: {
- Genivi.mapviewer_SetMapViewScaleByDelta(dbusIf,1);
- showZoom();
- }
- }
-
- Text {
- x:StyleSheetBottom.zoomlevel[Constants.X]; y:StyleSheetBottom.zoomlevel[Constants.Y]; width:StyleSheetBottom.zoomlevel[Constants.WIDTH]; height:StyleSheetBottom.zoomlevel[Constants.HEIGHT];color:StyleSheetBottom.zoomlevel[Constants.TEXTCOLOR];styleColor:StyleSheetBottom.zoomlevel[Constants.STYLECOLOR]; font.pixelSize:StyleSheetBottom.zoomlevel[Constants.PIXELSIZE];
- visible: true
- style: Text.Sunken;
- smooth: true
- id:zoomlevel
- text: " "
- }
-
- 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;
- onClicked: {
- Genivi.mapviewer_SetMapViewScaleByDelta(dbusIf,-1);
- showZoom();
- }
- }
-
- 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;
- onClicked: {
- disconnectSignals();
- entryMenu("CameraSettings",menu);
- }
- }
-
- StdButton {
- x:StyleSheetBottom.guidanceon[Constants.X]; y:StyleSheetBottom.guidanceon[Constants.Y]; width:StyleSheetBottom.guidanceon[Constants.WIDTH]; height:StyleSheetBottom.guidanceon[Constants.HEIGHT];
- id:guidanceStatus; next:zoomin; prev:menub; disabled:false;
- source:StyleSheetBottom.guidanceoff[Constants.SOURCE]; //todo call get status
- property int status: 1;
- function setState(name)
- {
- if (name=="ON")
- {
- status=1;
- source=StyleSheetBottom.guidanceoff[Constants.SOURCE];
- guidance.visible=true;
- route.visible=true;
- simulation.visible=true;
- }
- else
- {
- status=0;
- source=StyleSheetBottom.guidanceon[Constants.SOURCE];
- guidance.visible=false;
- route.visible=false;
- simulation.visible=false;
- if (Genivi.route_calculated == true)
- {
- visible=true; //it's possible to restart the current route
- }
- else {
- visible=false; //no route calculated
- }
- }
- }
- onClicked:
- {
- if(status)
- {
- stopGuidance();
- stopSimulation();
- }
- else {
- startGuidance();
- }
- }
- }
- }
- }
-
- Rectangle {
- color:"transparent"
- width: StyleSheetRoute.navigation_browse_map_route_background[Constants.WIDTH]
- height: StyleSheetRoute.navigation_browse_map_route_background[Constants.HEIGHT]
- x: StyleSheetMap.route_area[Constants.X]
- y: StyleSheetMap.route_area[Constants.Y]
- HMIBgImage {
- id: route
- opacity: 0.8
- image:StyleSheetRoute.navigation_browse_map_route_background[Constants.SOURCE]
- anchors { fill: parent; topMargin: parent.headlineHeight}
- MouseArea {
- anchors.fill: parent
- onClicked: {
- routeOverview();
- }
- }
-
- Text {
- x:StyleSheetRoute.timetodestinationValue[Constants.X]; y:StyleSheetRoute.timetodestinationValue[Constants.Y]; width:StyleSheetRoute.timetodestinationValue[Constants.WIDTH]; height:StyleSheetRoute.timetodestinationValue[Constants.HEIGHT];color:StyleSheetRoute.timetodestinationValue[Constants.TEXTCOLOR];styleColor:StyleSheetRoute.timetodestinationValue[Constants.STYLECOLOR]; font.pixelSize:StyleSheetRoute.timetodestinationValue[Constants.PIXELSIZE];
- visible: true
- style: Text.Sunken;
- smooth: true
- id:timetodestinationValue
- text: "-------"
- }
-
- Text {
- x:StyleSheetRoute.distancetodestinationValue[Constants.X]; y:StyleSheetRoute.distancetodestinationValue[Constants.Y]; width:StyleSheetRoute.distancetodestinationValue[Constants.WIDTH]; height:StyleSheetRoute.distancetodestinationValue[Constants.HEIGHT];color:StyleSheetRoute.distancetodestinationValue[Constants.TEXTCOLOR];styleColor:StyleSheetRoute.distancetodestinationValue[Constants.STYLECOLOR]; font.pixelSize:StyleSheetRoute.distancetodestinationValue[Constants.PIXELSIZE];
- visible: true
- style: Text.Sunken;
- smooth: true
- id:distancetodestinationValue
- text: "----"
- }
-
- }
- }
-
- Rectangle {
- color:"transparent"
- width: StyleSheetGuidance.navigation_browse_map_guidance_background[Constants.WIDTH]
- height: StyleSheetGuidance.navigation_browse_map_guidance_background[Constants.HEIGHT]
- x: StyleSheetMap.guidance_area[Constants.X]
- y: StyleSheetMap.guidance_area[Constants.Y]
- HMIBgImage {
- id: guidance
- opacity: 0.8
- image:StyleSheetGuidance.navigation_browse_map_guidance_background[Constants.SOURCE]
- anchors { fill: parent; topMargin: parent.headlineHeight}
- MouseArea {
- anchors.fill: parent
- onClicked: {
- var res=Genivi.guidance_GetGuidanceStatus(dbusIf);
- if (res[1] != Genivi.NAVIGATIONCORE_INACTIVE) {
- disconnectSignals();
- entryMenu("NavigationManeuversList",menu);
- }
- }
- }
-
- Text {
- x:StyleSheetGuidance.distancetomaneuverValue[Constants.X]; y:StyleSheetGuidance.distancetomaneuverValue[Constants.Y]; width:StyleSheetGuidance.distancetomaneuverValue[Constants.WIDTH]; height:StyleSheetGuidance.distancetomaneuverValue[Constants.HEIGHT];color:StyleSheetGuidance.distancetomaneuverValue[Constants.TEXTCOLOR];styleColor:StyleSheetGuidance.distancetomaneuverValue[Constants.STYLECOLOR]; font.pixelSize:StyleSheetGuidance.distancetomaneuverValue[Constants.PIXELSIZE];
- visible: true
- style: Text.Sunken;
- smooth: true
- id:distancetomaneuverValue
- text: " "
- }
-
- Text {
- x:StyleSheetGuidance.maneuverAdvice[Constants.X]; y:StyleSheetGuidance.maneuverAdvice[Constants.Y]; width:StyleSheetGuidance.maneuverAdvice[Constants.WIDTH]; height:StyleSheetGuidance.maneuverAdvice[Constants.HEIGHT];color:StyleSheetGuidance.maneuverAdvice[Constants.TEXTCOLOR];styleColor:StyleSheetGuidance.maneuverAdvice[Constants.STYLECOLOR]; font.pixelSize:StyleSheetGuidance.maneuverAdvice[Constants.PIXELSIZE];
- visible: true
- style: Text.Sunken;
- smooth: true
- id:maneuverAdvice
- text: " "
- }
-
- BorderImage {
- id: maneuverIcon
- source:StyleSheetGuidance.maneuverIcon[Constants.SOURCE]; x:StyleSheetGuidance.maneuverIcon[Constants.X]; y:StyleSheetGuidance.maneuverIcon[Constants.Y]; width:StyleSheetGuidance.maneuverIcon[Constants.WIDTH]; height:StyleSheetGuidance.maneuverIcon[Constants.HEIGHT];
- border.left: 0; border.top: 0
- border.right: 0; border.bottom: 0
- }
- }
- }
-
- Rectangle {
- color:"transparent"
- width: StyleSheetScroll.navigation_browse_map_scroll_background[Constants.WIDTH]
- height: StyleSheetScroll.navigation_browse_map_scroll_background[Constants.HEIGHT]
- x: StyleSheetMap.scroll_area[Constants.X]
- y: StyleSheetMap.scroll_area[Constants.Y]
- HMIBgImage {
- opacity: 0.8
- property real panX: 40 //delta in pixel for x panning
- property real panY: 40 //delta in pixel for y panning
- id: scroll
- image:StyleSheetScroll.navigation_browse_map_scroll_background[Constants.SOURCE];
- anchors { fill: parent; topMargin: parent.headlineHeight}
-
- StdButton {
- source:StyleSheetScroll.scrollup[Constants.SOURCE]; x:StyleSheetScroll.scrollup[Constants.X]; y:StyleSheetScroll.scrollup[Constants.Y]; width:StyleSheetScroll.scrollup[Constants.WIDTH]; height:StyleSheetScroll.scrollup[Constants.HEIGHT];
- id:scrollup; next:scrollleft; prev:scrolldown;
- onPressed: {Genivi.mapviewer_SetMapViewPan(dbusIf,Genivi.MAPVIEWER_PAN_START,map.width/2,map.height/2);}
- onReleased: {Genivi.mapviewer_SetMapViewPan(dbusIf,Genivi.MAPVIEWER_PAN_END,map.width/2,map.height/2 + scroll.panY);}
- }
-
- StdButton {
- source:StyleSheetScroll.scrollleft[Constants.SOURCE]; x:StyleSheetScroll.scrollleft[Constants.X]; y:StyleSheetScroll.scrollleft[Constants.Y]; width:StyleSheetScroll.scrollleft[Constants.WIDTH]; height:StyleSheetScroll.scrollleft[Constants.HEIGHT];
- id:scrollleft; next:scrollright; prev:scrollup;
- onPressed: {Genivi.mapviewer_SetMapViewPan(dbusIf,Genivi.MAPVIEWER_PAN_START,map.width/2,map.height/2);}
- onReleased: {Genivi.mapviewer_SetMapViewPan(dbusIf,Genivi.MAPVIEWER_PAN_END,map.width/2 + scroll.panX,map.height/2);}
- }
-
- StdButton {
- source:StyleSheetScroll.scrollright[Constants.SOURCE]; x:StyleSheetScroll.scrollright[Constants.X]; y:StyleSheetScroll.scrollright[Constants.Y]; width:StyleSheetScroll.scrollright[Constants.WIDTH]; height:StyleSheetScroll.scrollright[Constants.HEIGHT];
- id:scrollright; next:scrolldown; prev:scrollleft;
- onPressed: {Genivi.mapviewer_SetMapViewPan(dbusIf,Genivi.MAPVIEWER_PAN_START,map.width/2,map.height/2);}
- onReleased: {Genivi.mapviewer_SetMapViewPan(dbusIf,Genivi.MAPVIEWER_PAN_END,map.width/2 - scroll.panX,map.height/2);}
- }
-
- StdButton {
- source:StyleSheetScroll.scrolldown[Constants.SOURCE]; x:StyleSheetScroll.scrolldown[Constants.X]; y:StyleSheetScroll.scrolldown[Constants.Y]; width:StyleSheetScroll.scrolldown[Constants.WIDTH]; height:StyleSheetScroll.scrolldown[Constants.HEIGHT];
- id:scrolldown; next:scrollup; prev:scrollright;
- onPressed: {Genivi.mapviewer_SetMapViewPan(dbusIf,Genivi.MAPVIEWER_PAN_START,map.width/2,map.height/2);}
- onReleased: {Genivi.mapviewer_SetMapViewPan(dbusIf,Genivi.MAPVIEWER_PAN_END,map.width/2,map.height/2 - scroll.panY);}
- }
- }
- }
-
- Rectangle {
- color:"transparent"
-
- width: StyleSheetSimulation.navigation_browse_map_simulation_background[Constants.WIDTH]
- height: StyleSheetSimulation.navigation_browse_map_simulation_background[Constants.HEIGHT]
- x: StyleSheetMap.simulation_area[Constants.X]
- y: StyleSheetMap.simulation_area[Constants.Y]
- HMIBgImage {
- id: simulation
- opacity: {
- if (Genivi.simulationPanelOnMapview==true)
- {
- opacity=0.8;
- }
- else
- {
- opacity=0;
- }
- }
- image:StyleSheetSimulation.navigation_browse_map_simulation_background[Constants.SOURCE];
- anchors { fill: parent; topMargin: parent.headlineHeight}
- Text {
- x:StyleSheetSimulation.speedValue_popup[Constants.X]; y:StyleSheetSimulation.speedValue_popup[Constants.Y]; width:StyleSheetSimulation.speedValue_popup[Constants.WIDTH]; height:StyleSheetSimulation.speedValue_popup[Constants.HEIGHT];color:StyleSheetSimulation.speedValue_popup[Constants.TEXTCOLOR];styleColor:StyleSheetSimulation.speedValue_popup[Constants.STYLECOLOR]; font.pixelSize:StyleSheetSimulation.speedValue_popup[Constants.PIXELSIZE];
- id:speedValue
- style: Text.Sunken;
- smooth: true
- text: ""
- }
- StdButton {
- source:StyleSheetSimulation.speed_down_popup[Constants.SOURCE]; x:StyleSheetSimulation.speed_down_popup[Constants.X]; y:StyleSheetSimulation.speed_down_popup[Constants.Y]; width:StyleSheetSimulation.speed_down_popup[Constants.WIDTH]; height:StyleSheetSimulation.speed_down_popup[Constants.HEIGHT];
- id:speed_down; disabled:false; next:speed_up; prev:simu_mode;
- onClicked:
- {
- if (speedValueSent > 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 <martin.schaller@it-schaller.de>
-* \author Philippe Colliot <philippe.colliot@mpsa.com>
-*
-* \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
-* <date>, <name>, <description of change>
-*
-* @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<res[1].length;i+=4)
- {
- if (res[1][i+1] == Genivi.NAVIGATIONCORE_TOTAL_TIME)
- {
- time = res[1][i+3][3][1];
- }
- else
- {
- if (Genivi.NAVIGATIONCORE_TOTAL_DISTANCE)
- {
- distance = res[1][i+3][3][1];
- }
- }
- }
-
- distanceValue.text =Genivi.distance(distance);
- timeValue.text= Genivi.time(time);
-
- // Give the route handle to the FSA
- Genivi.fuelstopadvisor_SetRouteHandle(dbusIf,Genivi.g_routing_handle);
- updateStartStop();
- }
-
- function connectSignals()
- {
- routeCalculationSuccessfulSignal=Genivi.connect_routeCalculationSuccessfulSignal(dbusIf,menu);
- routeCalculationFailedSignal=Genivi.connect_routeCalculationFailedSignal(dbusIf,menu);
- routeCalculationProgressUpdateSignal=Genivi.connect_routeCalculationProgressUpdateSignal(dbusIf,menu);
- }
-
- function disconnectSignals()
- {
- routeCalculationSuccessfulSignal.destroy();
- routeCalculationFailedSignal.destroy();
- routeCalculationProgressUpdateSignal.destroy();
- }
-
-
- HMIBgImage {
- image:StyleSheet.navigation_calculated_route_menu_background[Constants.SOURCE];
- anchors { fill: parent; topMargin: parent.headlineHeight}
-
- Text {
- x:StyleSheet.guidanceTitle[Constants.X]; y:StyleSheet.guidanceTitle[Constants.Y]; width:StyleSheet.guidanceTitle[Constants.WIDTH]; height:StyleSheet.guidanceTitle[Constants.HEIGHT];color:StyleSheet.guidanceTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.guidanceTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.guidanceTitle[Constants.PIXELSIZE];
- id:guidanceTitle;
- style: Text.Sunken;
- smooth: true
- text: Genivi.gettext("Guidance")
- }
-
- Text {
- x:StyleSheet.displayRouteTitle[Constants.X]; y:StyleSheet.displayRouteTitle[Constants.Y]; width:StyleSheet.displayRouteTitle[Constants.WIDTH]; height:StyleSheet.displayRouteTitle[Constants.HEIGHT];color:StyleSheet.displayRouteTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.displayRouteTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.displayRouteTitle[Constants.PIXELSIZE];
- id:displayRouteTitle;
- style: Text.Sunken;
- smooth: true
- text: Genivi.gettext("DisplayRoute")
- }
-
-
- Text {
- x:StyleSheet.distanceTitle[Constants.X]; y:StyleSheet.distanceTitle[Constants.Y]; width:StyleSheet.distanceTitle[Constants.WIDTH]; height:StyleSheet.distanceTitle[Constants.HEIGHT];color:StyleSheet.distanceTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.distanceTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.distanceTitle[Constants.PIXELSIZE];
- id:distanceTitle;
- style: Text.Sunken;
- smooth: true
- text: Genivi.gettext("RouteDistance")
- }
-
- SmartText {
- x:StyleSheet.distanceValue[Constants.X]; y:StyleSheet.distanceValue[Constants.Y]; width:StyleSheet.distanceValue[Constants.WIDTH]; height:StyleSheet.distanceValue[Constants.HEIGHT];color:StyleSheet.distanceValue[Constants.TEXTCOLOR];styleColor:StyleSheet.distanceValue[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.distanceValue[Constants.PIXELSIZE];
- id:distanceValue
- text: ""
- }
-
- Text {
- x:StyleSheet.timeTitle[Constants.X]; y:StyleSheet.timeTitle[Constants.Y]; width:StyleSheet.timeTitle[Constants.WIDTH]; height:StyleSheet.timeTitle[Constants.HEIGHT];color:StyleSheet.timeTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.timeTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.timeTitle[Constants.PIXELSIZE];
- id:timeTitle;
- style: Text.Sunken;
- smooth: true
- text: Genivi.gettext("RouteTime")
- }
-
- SmartText {
- x:StyleSheet.timeValue[Constants.X]; y:StyleSheet.timeValue[Constants.Y]; width:StyleSheet.timeValue[Constants.WIDTH]; height:StyleSheet.timeValue[Constants.HEIGHT];color:StyleSheet.timeValue[Constants.TEXTCOLOR];styleColor:StyleSheet.timeValue[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.timeValue[Constants.PIXELSIZE];
- id:timeValue
- text: ""
- }
-
- Text {
- x:StyleSheet.statusTitle[Constants.X]; y:StyleSheet.statusTitle[Constants.Y]; width:StyleSheet.statusTitle[Constants.WIDTH]; height:StyleSheet.statusTitle[Constants.HEIGHT];color:StyleSheet.statusTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.statusTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.statusTitle[Constants.PIXELSIZE];
- id:statusTitle;
- style: Text.Sunken;
- smooth: true
- text: Genivi.gettext("StatusTitle")
- }
-
- SmartText {
- x:StyleSheet.statusValue[Constants.X]; y:StyleSheet.statusValue[Constants.Y]; width:StyleSheet.statusValue[Constants.WIDTH]; height:StyleSheet.statusValue[Constants.HEIGHT];color:StyleSheet.statusValue[Constants.TEXTCOLOR];styleColor:StyleSheet.statusValue[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.statusValue[Constants.PIXELSIZE];
- id:statusValue
- text: ""
- }
-
- StdButton {
- source:StyleSheet.show_route_on_map[Constants.SOURCE]; x:StyleSheet.show_route_on_map[Constants.X]; y:StyleSheet.show_route_on_map[Constants.Y]; width:StyleSheet.show_route_on_map[Constants.WIDTH]; height:StyleSheet.show_route_on_map[Constants.HEIGHT];
- id: show_route_on_map
- disabled:true; next:show_route_in_list; prev:back
- onClicked: {
- disconnectSignals();
- Genivi.data["mapback"]="NavigationCalculatedRoute";
- Genivi.data["show_route_handle"]=Genivi.routing_handle(dbusIf);
- Genivi.data["zoom_route_handle"]=Genivi.routing_handle(dbusIf);
- mapMenu();
- }
- }
- StdButton {
- source:StyleSheet.show_route_in_list[Constants.SOURCE]; x:StyleSheet.show_route_in_list[Constants.X]; y:StyleSheet.show_route_in_list[Constants.Y]; width:StyleSheet.show_route_in_list[Constants.WIDTH]; height:StyleSheet.show_route_in_list[Constants.HEIGHT];
- id:show_route_in_list;
- disabled:true; next:back; prev:show_route_on_map;
- onClicked: {
- entryMenu("NavigationRouteDescription",menu);
- }
- }
-
- StdButton {
- source:StyleSheet.guidance_start[Constants.SOURCE]; x:StyleSheet.guidance_start[Constants.X]; y:StyleSheet.guidance_start[Constants.Y]; width:StyleSheet.guidance_start[Constants.WIDTH]; height:StyleSheet.guidance_start[Constants.HEIGHT];textColor:StyleSheet.startText[Constants.TEXTCOLOR]; pixelSize:StyleSheet.startText[Constants.PIXELSIZE];
- id:guidance_start; text: Genivi.gettext("On"); disabled:true; next:guidance_stop; prev:show_route_on_map
- onClicked: {
- disconnectSignals();
- Genivi.guidance_StartGuidance(dbusIf,Genivi.routing_handle(dbusIf));
- Genivi.data["mapback"]="NavigationCalculatedRoute";
- Genivi.data["show_route_handle"]=Genivi.routing_handle(dbusIf);
- Genivi.data["show_current_position"]=true;
- mapMenu();
- }
- }
- StdButton {
- source:StyleSheet.guidance_stop[Constants.SOURCE]; x:StyleSheet.guidance_stop[Constants.X]; y:StyleSheet.guidance_stop[Constants.Y]; width:StyleSheet.guidance_stop[Constants.WIDTH]; height:StyleSheet.guidance_stop[Constants.HEIGHT];textColor:StyleSheet.stopText[Constants.TEXTCOLOR]; pixelSize:StyleSheet.stopText[Constants.PIXELSIZE];
- id:guidance_stop;text: Genivi.gettext("Off"); disabled:true; next:show_route_on_map; prev:guidance_start
- onClicked: {
- Genivi.guidance_StopGuidance(dbusIf);
- guidance_start.disabled=false;
- guidance_stop.disabled=true;
- }
- }
- 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:show_route_on_map; prev:show_route_in_list;
- onClicked: {
- disconnectSignals();
- leaveMenu();
- }
- }
- }
-
- Component.onCompleted: {
- //console.log(Genivi.data);
- connectSignals();
- if (Genivi.data["calculate_route"]) {
- Genivi.routing_CalculateRoute(dbusIf);
- delete(Genivi.data["calculate_route"]);
- } else {
- routeCalculationSuccessful("dummy");
- }
- updateStartStop();
- }
-}
diff --git a/src/hmi/qml/NavigationManeuversList.qml b/src/hmi/qml/NavigationManeuversList.qml
deleted file mode 100644
index 4097644..0000000
--- a/src/hmi/qml/NavigationManeuversList.qml
+++ /dev/null
@@ -1,102 +0,0 @@
-/**
-* @licence app begin@
-* SPDX-License-Identifier: MPL-2.0
-*
-* \copyright Copyright (C) 2013-2014, PCA Peugeot Citroen
-*
-* \file NavigationManeuversList.qml
-*
-* \brief This file is part of the navigation hmi.
-*
-* \author Martin Schaller <martin.schaller@it-schaller.de>
-* \author Philippe Colliot <philippe.colliot@mpsa.com>
-*
-* \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
-* <date>, <name>, <description of change>
-*
-* @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 <martin.schaller@it-schaller.de>
-* \author Philippe Colliot <philippe.colliot@mpsa.com>
-*
-* \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
-* <date>, <name>, <description of change>
-*
-* @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<res[3].length;i+=4){
- if ((res[3][i+1]== Genivi.NAVIGATIONCORE_LATITUDE) && (res[3][i+3][3][1] != 0)){
- oklat=1;
- } else {
- if ((res[3][i+1]== Genivi.NAVIGATIONCORE_LONGITUDE) && (res[3][i+3][3][1] != 0)){
- oklong=1;
- }
- }
- }
- if ((oklat == 1) && (oklong == 1) && Genivi.data['destination']) {
- calculate_curr.disabled=false;
- } else {
- calculate_curr.disabled=true;
- }
- }
-
- function mapmatchedpositionPositionUpdate(args)
- {
- Genivi.hookSignal("mapmatchedpositionPositionUpdate");
- updateCurrentPosition();
- }
-
- function connectSignals()
- {
- mapmatchedpositionPositionUpdateSignal=Genivi.connect_mapmatchedpositionPositionUpdateSignal(dbusIf,menu);
- }
-
- function disconnectSignals()
- {
- mapmatchedpositionPositionUpdateSignal.destroy();
- }
-
- DBusIf {
- id:dbusIf
- }
-
- HMIBgImage {
- image:StyleSheet.navigation_route_menu_background[Constants.SOURCE];
- anchors { fill: parent; topMargin: parent.headlineHeight}
-
- Text {
- x:StyleSheet.locationTitle[Constants.X]; y:StyleSheet.locationTitle[Constants.Y]; width:StyleSheet.locationTitle[Constants.WIDTH]; height:StyleSheet.locationTitle[Constants.HEIGHT];color:StyleSheet.locationTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.locationTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.locationTitle[Constants.PIXELSIZE];
- style: Text.Sunken;
- smooth: true
- id:locationTitle
- text: Genivi.gettext("EnteredLocation")
- }
-
- SmartText {
- x:StyleSheet.locationValue[Constants.X]; y:StyleSheet.locationValue[Constants.Y]; width:StyleSheet.locationValue[Constants.WIDTH]; height:StyleSheet.locationValue[Constants.HEIGHT];color:StyleSheet.locationValue[Constants.TEXTCOLOR];styleColor:StyleSheet.locationValue[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.locationValue[Constants.PIXELSIZE];
- id:locationValue
- }
-
- Text {
- x:StyleSheet.positionTitle[Constants.X]; y:StyleSheet.positionTitle[Constants.Y]; width:StyleSheet.positionTitle[Constants.WIDTH]; height:StyleSheet.positionTitle[Constants.HEIGHT];color:StyleSheet.positionTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.positionTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.positionTitle[Constants.PIXELSIZE];
- style: Text.Sunken;
- smooth: true
- id:positionTitle
- text: Genivi.gettext("Position")
- }
-
- SmartText {
- x:StyleSheet.positionValue[Constants.X]; y:StyleSheet.positionValue[Constants.Y]; width:StyleSheet.positionValue[Constants.WIDTH]; height:StyleSheet.positionValue[Constants.HEIGHT];color:StyleSheet.positionValue[Constants.TEXTCOLOR];styleColor:StyleSheet.positionValue[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.positionValue[Constants.PIXELSIZE];
- id:positionValue
- }
-
- Text {
- x:StyleSheet.destinationTitle[Constants.X]; y:StyleSheet.destinationTitle[Constants.Y]; width:StyleSheet.destinationTitle[Constants.WIDTH]; height:StyleSheet.destinationTitle[Constants.HEIGHT];color:StyleSheet.destinationTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.destinationTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.destinationTitle[Constants.PIXELSIZE];
- style: Text.Sunken;
- smooth: true
- id:destinationTitle
- text: Genivi.gettext("Destination")
- }
-
- SmartText {
- x:StyleSheet.destinationValue[Constants.X]; y:StyleSheet.destinationValue[Constants.Y]; width:StyleSheet.destinationValue[Constants.WIDTH]; height:StyleSheet.destinationValue[Constants.HEIGHT];color:StyleSheet.destinationValue[Constants.TEXTCOLOR];styleColor:StyleSheet.destinationValue[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.destinationValue[Constants.PIXELSIZE];
- id:destinationValue
- }
-
- StdButton {
- source:StyleSheet.show_location_on_map[Constants.SOURCE]; x:StyleSheet.show_location_on_map[Constants.X]; y:StyleSheet.show_location_on_map[Constants.Y]; width:StyleSheet.show_location_on_map[Constants.WIDTH]; height:StyleSheet.show_location_on_map[Constants.HEIGHT];
- id:show; disabled:false; next:destination; prev:back;
- onClicked: {
- Genivi.data['show_position']=new Array;
- Genivi.data['show_position']['lat']=Genivi.data['lat'];
- Genivi.data['show_position']['lon']=Genivi.data['lon'];
- Genivi.data["mapback"]="NavigationRoute";
- disconnectSignals();
- mapMenu();
- }
- }
-
- StdButton {
- source:StyleSheet.set_as_position[Constants.SOURCE]; x:StyleSheet.set_as_position[Constants.X]; y:StyleSheet.set_as_position[Constants.Y]; width:StyleSheet.set_as_position[Constants.WIDTH]; height:StyleSheet.set_as_position[Constants.HEIGHT];
- id:position; disabled:false; next:calculate; prev:destination;
- onClicked: {
- Genivi.data['position']=new Array;
- Genivi.data['position']['lat']=Genivi.data['lat'];
- Genivi.data['position']['lon']=Genivi.data['lon'];
- Genivi.data['position']['description']=Genivi.data['description'];
- setLocation();
- if (Genivi.data['destination'])
- calculate.disabled=false;
- }
- }
-
- StdButton {
- source:StyleSheet.set_as_destination[Constants.SOURCE]; x:StyleSheet.set_as_destination[Constants.X]; y:StyleSheet.set_as_destination[Constants.Y]; width:StyleSheet.set_as_destination[Constants.WIDTH]; height:StyleSheet.set_as_destination[Constants.HEIGHT];
- id:destination; disabled:false; next:position; prev:show;
- onClicked: {
- 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'];
- setLocation();
- if (Genivi.data['position'])
- calculate.disabled=false;
- updateCurrentPosition();
- }
- }
-
- StdButton {
- source:StyleSheet.route[Constants.SOURCE]; x:StyleSheet.route[Constants.X]; y:StyleSheet.route[Constants.Y]; width:StyleSheet.route[Constants.WIDTH]; height:StyleSheet.route[Constants.HEIGHT];textColor:StyleSheet.routeText[Constants.TEXTCOLOR]; pixelSize:StyleSheet.routeText[Constants.PIXELSIZE];
- id:calculate; text: Genivi.gettext("Route");
- onClicked: {
- var position,destination;
- position=Genivi.latlon_to_map(Genivi.data['position']);
- destination=Genivi.latlon_to_map(Genivi.data['destination']);
- Genivi.routing_SetWaypoints(dbusIf,false,position,destination);
- Genivi.data['calculate_route']=true;
- disconnectSignals();
- Genivi.data['lat']='';
- Genivi.data['lon']='';
- entryMenu("NavigationCalculatedRoute",menu);
- }
- disabled:!(Genivi.data['position'] && Genivi.data['destination']); next:calculate_curr; prev:position
- }
-
- StdButton {
- 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;
- destination=Genivi.latlon_to_map(Genivi.data['destination']);
- position="";
- Genivi.routing_SetWaypoints(dbusIf,true,position,destination);
- Genivi.data['calculate_route']=true;
- disconnectSignals();
- Genivi.data['lat']='';
- Genivi.data['lon']='';
- entryMenu("NavigationCalculatedRoute",menu);
- }
- disabled:true; next:back; prev:calculate
- }
-
- 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");
- onClicked: {
- disconnectSignals();
- Genivi.data['lat']='';
- Genivi.data['lon']='';
- leaveMenu();
- }
- disabled:false; next:show; prev:calculate_curr;
- }
-
- }
- Component.onCompleted: {
- setLocation();
- updateCurrentPosition();
- connectSignals();
- }
-}
diff --git a/src/hmi/qml/NavigationRouteDescription.qml b/src/hmi/qml/NavigationRouteDescription.qml
deleted file mode 100644
index 8bae341..0000000
--- a/src/hmi/qml/NavigationRouteDescription.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 NavigationRouteDescription.qml
-*
-* \brief This file is part of the navigation hmi.
-*
-* \author Martin Schaller <martin.schaller@it-schaller.de>
-* \author Philippe Colliot <philippe.colliot@mpsa.com>
-*
-* \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
-* <date>, <name>, <description of change>
-*
-* @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 <martin.schaller@it-schaller.de>
-* \author Philippe Colliot <philippe.colliot@mpsa.com>
-*
-* \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
-* <date>, <name>, <description of change>
-*
-* @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 <martin.schaller@it-schaller.de>
-* \author Philippe Colliot <philippe.colliot@mpsa.com>
-*
-* \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
-* <date>, <name>, <description of change>
-*
-* @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 <martin.schaller@it-schaller.de>
-* \author Philippe Colliot <philippe.colliot@mpsa.com>
-*
-* \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
-* <date>, <name>, <description of change>
-*
-* @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 <martin.schaller@it-schaller.de>
-* \author Philippe Colliot <philippe.colliot@mpsa.com>
-*
-* \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
-* <date>, <name>, <description of change>
-*
-* @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 <martin.schaller@it-schaller.de>
-* \author Philippe Colliot <philippe.colliot@mpsa.com>
-*
-* \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
-* <date>, <name>, <description of change>
-*
-* @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 <martin.schaller@it-schaller.de>
-* \author Philippe Colliot <philippe.colliot@mpsa.com>
-*
-* \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
-* <date>, <name>, <description of change>
-*
-* @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 <martin.schaller@it-schaller.de>
-* \author Philippe Colliot <philippe.colliot@mpsa.com>
-*
-* \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
-* <date>, <name>, <description of change>
-*
-* @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 <martin.schaller@it-schaller.de>
-* \author Philippe Colliot <philippe.colliot@mpsa.com>
-*
-* \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
-* <date>, <name>, <description of change>
-*
-* @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<roadPreferenceList.length; i+=2)
- {
- roadPreferenceMode=roadPreferenceList[i+1][1];
- roadPreferenceSource=roadPreferenceList[i+1][3];
- Genivi.roadPreferenceList[roadPreferenceSource]=roadPreferenceMode;
-
- if(roadPreferenceSource == Genivi.NAVIGATIONCORE_FERRY)
- {
- if(roadPreferenceMode == Genivi.NAVIGATIONCORE_AVOID)
- {
- ferries_yes.disabled=false;
- ferries_no.disabled=true;
- }
- else
- {
- ferries_yes.disabled=true;
- ferries_no.disabled=false;
- }
- }
- else
- {
- if(roadPreferenceSource == Genivi.NAVIGATIONCORE_TOLL_ROADS)
- {
- if(roadPreferenceMode == Genivi.NAVIGATIONCORE_AVOID)
- {
- toll_roads_yes.disabled=false;
- toll_roads_no.disabled=true;
- }
- else
- {
- toll_roads_yes.disabled=true;
- toll_roads_no.disabled=false;
- }
- }
- else
- {
- if(roadPreferenceSource == Genivi.NAVIGATIONCORE_HIGHWAYS_MOTORWAYS)
- {
- if(roadPreferenceMode == Genivi.NAVIGATIONCORE_AVOID)
- {
- motorways_yes.disabled=false;
- motorways_no.disabled=true;
- }
- else
- {
- motorways_yes.disabled=true;
- motorways_no.disabled=false;
- }
- }
- }
- }
- }
- }
-
- function use(preferenceSource)
- {
- Genivi.roadPreferenceList[preferenceSource]=Genivi.NAVIGATIONCORE_USE;
- update();
- }
-
- function avoid(preferenceSource)
- {
- Genivi.roadPreferenceList[preferenceSource]=Genivi.NAVIGATIONCORE_AVOID;
- update();
- }
-
- HMIBgImage {
- id: content
- image:StyleSheet.navigation_settings_preference_menu_background[Constants.SOURCE];
- anchors { fill: parent; topMargin: parent.headlineHeight}
- Text {
- x:StyleSheet.costModelTitle[Constants.X]; y:StyleSheet.costModelTitle[Constants.Y]; width:StyleSheet.costModelTitle[Constants.WIDTH]; height:StyleSheet.costModelTitle[Constants.HEIGHT];color:StyleSheet.costModelTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.costModelTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.costModelTitle[Constants.PIXELSIZE];
- id:costModelTitle;
- style: Text.Sunken;
- smooth: true
- text: Genivi.gettext("CostModel")
- }
-
- Text {
- x:StyleSheet.routingPreferencesTitle[Constants.X]; y:StyleSheet.routingPreferencesTitle[Constants.Y]; width:StyleSheet.routingPreferencesTitle[Constants.WIDTH]; height:StyleSheet.routingPreferencesTitle[Constants.HEIGHT];color:StyleSheet.routingPreferencesTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.routingPreferencesTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.routingPreferencesTitle[Constants.PIXELSIZE];
- id:routingPreferencesTitle;
- style: Text.Sunken;
- smooth: true
- text: Genivi.gettext("RoutingPreferences")
- }
-
- Text {
- x:StyleSheet.ferriesText[Constants.X]; y:StyleSheet.ferriesText[Constants.Y]; width:StyleSheet.ferriesText[Constants.WIDTH]; height:StyleSheet.ferriesText[Constants.HEIGHT];color:StyleSheet.ferriesText[Constants.TEXTCOLOR];styleColor:StyleSheet.ferriesText[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.ferriesText[Constants.PIXELSIZE];
- id: ferriesText;
- style: Text.Sunken;
- smooth: true
- text: Genivi.gettext("Ferries")
- }
- StdButton { source:StyleSheet.allow_ferries[Constants.SOURCE]; x:StyleSheet.allow_ferries[Constants.X]; y:StyleSheet.allow_ferries[Constants.Y]; width:StyleSheet.allow_ferries[Constants.WIDTH]; height:StyleSheet.allow_ferries[Constants.HEIGHT];
- id:ferries_yes; next:back; prev:back; onClicked:{use(Genivi.NAVIGATIONCORE_FERRY)}}
- StdButton { source:StyleSheet.avoid_ferries[Constants.SOURCE]; x:StyleSheet.avoid_ferries[Constants.X]; y:StyleSheet.avoid_ferries[Constants.Y]; width:StyleSheet.avoid_ferries[Constants.WIDTH]; height:StyleSheet.avoid_ferries[Constants.HEIGHT];
- id:ferries_no; next:back; prev:back; onClicked:{avoid(Genivi.NAVIGATIONCORE_FERRY)}}
-
- Text {
- x:StyleSheet.tollRoadsText[Constants.X]; y:StyleSheet.tollRoadsText[Constants.Y]; width:StyleSheet.tollRoadsText[Constants.WIDTH]; height:StyleSheet.tollRoadsText[Constants.HEIGHT];color:StyleSheet.tollRoadsText[Constants.TEXTCOLOR];styleColor:StyleSheet.tollRoadsText[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.tollRoadsText[Constants.PIXELSIZE];
- id: tollRoadsText;
- style: Text.Sunken;
- smooth: true
- text: Genivi.gettext("TollRoads")
- }
- StdButton { source:StyleSheet.allow_tollRoads[Constants.SOURCE]; x:StyleSheet.allow_tollRoads[Constants.X]; y:StyleSheet.allow_tollRoads[Constants.Y]; width:StyleSheet.allow_tollRoads[Constants.WIDTH]; height:StyleSheet.allow_tollRoads[Constants.HEIGHT];
- id:toll_roads_yes; next:back; prev:back; onClicked:{use(Genivi.NAVIGATIONCORE_TOLL_ROADS)}}
- StdButton { source:StyleSheet.avoid_tollRoads[Constants.SOURCE]; x:StyleSheet.avoid_tollRoads[Constants.X]; y:StyleSheet.avoid_tollRoads[Constants.Y]; width:StyleSheet.avoid_tollRoads[Constants.WIDTH]; height:StyleSheet.avoid_tollRoads[Constants.HEIGHT];
- id:toll_roads_no; next:back; prev:back; onClicked:{avoid(Genivi.NAVIGATIONCORE_TOLL_ROADS)}}
-
- Text {
- x:StyleSheet.motorWaysText[Constants.X]; y:StyleSheet.motorWaysText[Constants.Y]; width:StyleSheet.motorWaysText[Constants.WIDTH]; height:StyleSheet.motorWaysText[Constants.HEIGHT];color:StyleSheet.motorWaysText[Constants.TEXTCOLOR];styleColor:StyleSheet.motorWaysText[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.motorWaysText[Constants.PIXELSIZE];
- id:motorWaysText;
- style: Text.Sunken;
- smooth: true
- text: Genivi.gettext("MotorWays")
- }
- StdButton { source:StyleSheet.allow_motorways[Constants.SOURCE]; x:StyleSheet.allow_motorways[Constants.X]; y:StyleSheet.allow_motorways[Constants.Y]; width:StyleSheet.allow_motorways[Constants.WIDTH]; height:StyleSheet.allow_motorways[Constants.HEIGHT];
- id:motorways_yes; next:back; prev:back; onClicked:{use(Genivi.NAVIGATIONCORE_HIGHWAYS_MOTORWAYS)}}
- StdButton { source:StyleSheet.avoid_motorways[Constants.SOURCE]; x:StyleSheet.avoid_motorways[Constants.X]; y:StyleSheet.avoid_motorways[Constants.Y]; width:StyleSheet.avoid_motorways[Constants.WIDTH]; height:StyleSheet.avoid_motorways[Constants.HEIGHT];
- id:motorways_no; next:back; prev:back; onClicked:{avoid(Genivi.NAVIGATIONCORE_HIGHWAYS_MOTORWAYS)}}
-
- 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:{leaveMenu();}}
-
- }
-
- Component.onCompleted: {
- var res=Genivi.routing_GetCostModel(dbusIf);
- var costmodel=res[1];
- var costModelsList=Genivi.routing_GetSupportedCostModels(dbusIf);
- for (var i = 0 ; i < costModelsList[1].length ; i+=2) {
- var button=Qt.createQmlObject('import QtQuick 2.1 ; import "Core"; StdButton { }',content,'dynamic');
- button.source=StyleSheet.cost_model[Constants.SOURCE];
- button.x=StyleSheet.cost_model[Constants.X];
- button.y=StyleSheet.cost_model[Constants.Y] + i*50; //to be improved
- button.width=StyleSheet.cost_model[Constants.WIDTH];
- button.height=StyleSheet.cost_model[Constants.HEIGHT];
- button.textColor=StyleSheet.costModelValue[Constants.TEXTCOLOR];
- button.pixelSize=StyleSheet.costModelValue[Constants.PIXELSIZE];
- button.userdata=costModelsList[1][i+1];
- button.text=Genivi.CostModels[button.userdata];
- button.disabled=button.userdata == costmodel;
- button.clicked.connect(
- function(what) {
- Genivi.routing_SetCostModel(dbusIf,what.userdata);
- pageOpen(menu.pagefile); //reload the page
- }
- );
- }
-
- update();
- }
-}
diff --git a/src/hmi/qml/POI.qml b/src/hmi/qml/POI.qml
deleted file mode 100644
index 8cc7e4a..0000000
--- a/src/hmi/qml/POI.qml
+++ /dev/null
@@ -1,245 +0,0 @@
-/**
-* @licence app begin@
-* SPDX-License-Identifier: MPL-2.0
-*
-* \copyright Copyright (C) 2013-2014, PCA Peugeot Citroen
-*
-* \file POI.qml
-*
-* \brief This file is part of the FSA hmi.
-*
-* \author Martin Schaller <martin.schaller@it-schaller.de>
-* \author Philippe Colliot <philippe.colliot@mpsa.com>
-*
-* \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
-* <date>, <name>, <description of change>
-*
-* @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<position[3].length;i+=4){
- if ((position[3][i+1]== Genivi.NAVIGATIONCORE_LATITUDE) && (position[3][i+3][3][1] != 0)){
- latitude=position[3][i+3][3][1];
- } else {
- if ((position[3][i+1]== Genivi.NAVIGATIONCORE_LONGITUDE) && (position[3][i+3][3][1] != 0)){
- longitude=position[3][i+3][3][1];
- }
- }
- }
- if (!latitude && !longitude) {
- model.clear();
- model.append({"name":"No position available"});
- return;
- }
- var categories=Genivi.poisearch_GetAvailableCategories(dbusIf);
- for (i = 0 ; i < categories.length ; i+=2) {
- if (categories[i+1][1][3] == 'fuel') {
- Genivi.fuelCategoryId=categories[i+1][1][1];
- }
- }
-
- Genivi.poisearch_SetCenter(dbusIf,latitude,longitude,0);
- var categoriesAndRadiusList=[];
- var categoriesAndRadius=[];
- categoriesAndRadius[0]=Genivi.fuelCategoryId;
- categoriesAndRadius[1]=Genivi.radius;
- categoriesAndRadiusList[0]=categoriesAndRadius;
- Genivi.poisearch_SetCategories(dbusIf,categoriesAndRadiusList);
- Genivi.poisearch_StartPoiSearch(dbusIf,"",Genivi.POISERVICE_SORT_BY_DISTANCE);
- var attributeList=[];
- attributeList[0]=0;
- var res=Genivi.poisearch_RequestResultList(dbusIf,Genivi.offset,Genivi.maxWindowSize,attributeList);
- var res_win=res[5];
- for (i = 0 ; i < res_win.length ; i+=2) {
- var id=res_win[i+1][1];
- ids.push(id);
- Genivi.poi_data[id]=[];
- Genivi.poi_data[id].id=id;
- Genivi.poi_data[id].distance=res_win[i+1][3];
- }
- var details=Genivi.poisearch_GetPoiDetails(dbusIf,ids);
- for (i = 0 ; i < details[1].length ; i+=2) {
- var poi_details=details[1][i+1];
- id=poi_details[1][1];
- Genivi.poi_data[id].name=poi_details[1][3];
- Genivi.poi_data[id].lat=poi_details[1][5][1];
- Genivi.poi_data[id].lon=poi_details[1][5][3];
- }
- model.clear();
- for (i = 0 ; i < ids.length ; i+=1) {
- id=ids[i];
- var poi_data=Genivi.poi_data[id];
- model.append({"name":Genivi.distance(poi_data.distance)+" "+poi_data.name,"number":id});
- }
- }
- }
- 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];
- id:searchTitle;
- style: Text.Sunken;
- smooth: true
- text: Genivi.gettext("SearchForPOI")
- }
- StdButton {
- source:StyleSheet.select_reroute[Constants.SOURCE]; x:StyleSheet.select_reroute[Constants.X]; y:StyleSheet.select_reroute[Constants.Y]; width:StyleSheet.select_reroute[Constants.WIDTH]; height:StyleSheet.select_reroute[Constants.HEIGHT];
- id:select_reroute;
-
- disabled:true;
- next:select_display_on_map; prev:select_search_for_refill
- onClicked: {
- var destination=Genivi.latlon_to_map(Genivi.poi_data[Genivi.poi_id]);
- var position="";
- Genivi.routing_SetWaypoints(dbusIf,true,position,destination);
- Genivi.data['calculate_route']=true;
- Genivi.data['lat']='';
- Genivi.data['lon']='';
- if (Genivi.guidance_activated == true)
- {
- mapMenu();
- }
- else {
- pageOpen("NavigationCalculatedRoute");
- }
- }
- }
- Text {
- x:StyleSheet.rerouteTitle[Constants.X]; y:StyleSheet.rerouteTitle[Constants.Y]; width:StyleSheet.rerouteTitle[Constants.WIDTH]; height:StyleSheet.rerouteTitle[Constants.HEIGHT];color:StyleSheet.rerouteTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.rerouteTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.rerouteTitle[Constants.PIXELSIZE];
- id:rerouteTitle;
- style: Text.Sunken;
- smooth: true
- text: Genivi.gettext("Reroute")
- }
- StdButton {
- source:StyleSheet.select_display_on_map[Constants.SOURCE]; x:StyleSheet.select_display_on_map[Constants.X]; y:StyleSheet.select_display_on_map[Constants.Y]; width:StyleSheet.select_display_on_map[Constants.WIDTH]; height:StyleSheet.select_display_on_map[Constants.HEIGHT];
- id:select_display_on_map;
-
- disabled:true;
- next:back; prev:select_reroute
- onClicked: {
- var poi_data=Genivi.poi_data[Genivi.poi_id];
- Genivi.data['show_position']=new Array;
- Genivi.data['show_position']['lat']=poi_data.lat;
- Genivi.data['show_position']['lon']=poi_data.lon;
- Genivi.data['mapback']="POI";
- mapMenu();
- }
- }
- Text {
- x:StyleSheet.displayTitle[Constants.X]; y:StyleSheet.displayTitle[Constants.Y]; width:StyleSheet.displayTitle[Constants.WIDTH]; height:StyleSheet.displayTitle[Constants.HEIGHT];color:StyleSheet.displayTitle[Constants.TEXTCOLOR];styleColor:StyleSheet.displayTitle[Constants.STYLECOLOR]; font.pixelSize:StyleSheet.displayTitle[Constants.PIXELSIZE];
- id:displayTitle;
- style: Text.Sunken;
- smooth: true;
- text: Genivi.gettext("DisplayPOI")
- }
- 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:select_search_for_refill; prev:select_display_on_map;
- onClicked: {
- leaveMenu();
- }
- }
- }
- Component.onCompleted: {
- Genivi.poi_data=[];
- update();
- }
-}
diff --git a/src/hmi/qml/TripComputer.qml b/src/hmi/qml/TripComputer.qml
deleted file mode 100644
index 68f5295..0000000
--- a/src/hmi/qml/TripComputer.qml
+++ /dev/null
@@ -1,440 +0,0 @@
-/**
-* @licence app begin@
-* SPDX-License-Identifier: MPL-2.0
-*
-* \copyright Copyright (C) 2013-2014, PCA Peugeot Citroen
-*
-* \file TripComputer.qml
-*
-* \brief This file is part of the FSA hmi.
-*
-* \author Martin Schaller <martin.schaller@it-schaller.de>
-* \author Philippe Colliot <philippe.colliot@mpsa.com>
-*
-* \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
-* <date>, <name>, <description of change>
-*
-* @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 <martin.schaller@it-schaller.de>
-* \author Philippe Colliot <philippe.colliot@mpsa.com>
-*
-* \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
-* <date>, <name>, <description of change>
-*
-* @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
+