summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorasanoaozora <fifitaneki@hotmail.com>2016-11-29 17:38:22 +0100
committerasanoaozora <fifitaneki@hotmail.com>2016-11-29 17:38:22 +0100
commitf2e6283261a8741d0be6fc4c6aab91a56e30bc59 (patch)
treef78de85cd8ce0c3684d3b4d738bc5b6439b8c20e /src
parent10671e67622bd92b2aace2ed04dafddfebcb8ab4 (diff)
downloadnavigation-f2e6283261a8741d0be6fc4c6aab91a56e30bc59.tar.gz
preparation of a more simple HMI: search menu in progress
Diffstat (limited to 'src')
-rw-r--r--src/hmi/qml/Core/NavigationAppEntryField.qml96
-rwxr-xr-xsrc/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppMain.xcfbin1757819 -> 1680115 bytes
-rw-r--r--src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSearch.xcfbin256336 -> 251362 bytes
-rw-r--r--src/hmi/qml/NavigationAppMain.qml2
-rw-r--r--src/hmi/qml/NavigationAppSearch.qml92
-rw-r--r--src/hmi/qml/NavigationAppSettings.qml454
-rw-r--r--src/hmi/qml/NavigationAppSettingsLanguageAndUnits.qml194
-rw-r--r--src/hmi/qml/NavigationAppSettingsPreferences.qml220
-rwxr-xr-xsrc/kill-all8
9 files changed, 1040 insertions, 26 deletions
diff --git a/src/hmi/qml/Core/NavigationAppEntryField.qml b/src/hmi/qml/Core/NavigationAppEntryField.qml
new file mode 100644
index 0000000..589b514
--- /dev/null
+++ b/src/hmi/qml/Core/NavigationAppEntryField.qml
@@ -0,0 +1,96 @@
+/**
+* @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);
+ }
+ }
+ }
+ }
+}
diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppMain.xcf b/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppMain.xcf
index 6a39bd7..5011705 100755
--- a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppMain.xcf
+++ b/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppMain.xcf
Binary files differ
diff --git a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSearch.xcf b/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSearch.xcf
index acf78d0..5aaed43 100644
--- a/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSearch.xcf
+++ b/src/hmi/qml/Core/gimp/draft-theme/800x480/NavigationAppSearch.xcf
Binary files differ
diff --git a/src/hmi/qml/NavigationAppMain.qml b/src/hmi/qml/NavigationAppMain.qml
index a7b3a6b..976356e 100644
--- a/src/hmi/qml/NavigationAppMain.qml
+++ b/src/hmi/qml/NavigationAppMain.qml
@@ -56,6 +56,8 @@ HMIMenu {
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; explode:false; next:mapview; prev:quit; onClicked: {
+ Genivi.preloadMode=true;
+ Genivi.route_calculated = false;
entryMenu("NavigationAppSearch",menu);
}
}
diff --git a/src/hmi/qml/NavigationAppSearch.qml b/src/hmi/qml/NavigationAppSearch.qml
index a71d631..15827fe 100644
--- a/src/hmi/qml/NavigationAppSearch.qml
+++ b/src/hmi/qml/NavigationAppSearch.qml
@@ -45,6 +45,7 @@ NavigationAppHMIMenu {
property string routeText:" "
property real lat
property real lon
+ property bool vehicleLocated
function loadWithCountry()
{
@@ -82,9 +83,9 @@ NavigationAppHMIMenu {
}
}
if ((oklat == 1) && (oklong == 1) && Genivi.data['destination']) {
- calculate_curr.disabled=false;
+ vehicleLocated=true;
} else {
- calculate_curr.disabled=true;
+ vehicleLocated=false;
}
}
@@ -225,7 +226,7 @@ NavigationAppHMIMenu {
// Check if the destination is guidable
var guidable=args[3];
if (guidable) {
- ok.disabled=false;
+ calculate_curr.disabled=false;
}
else
{
@@ -307,7 +308,7 @@ NavigationAppHMIMenu {
function accept(what)
{
- ok.disabled=true;
+ calculate_curr.disabled=true;
Genivi.locationinput_SetSelectionCriterion(dbusIf,what.criterion);
Genivi.locationinput_Search(dbusIf,what.text,10);
}
@@ -338,7 +339,14 @@ NavigationAppHMIMenu {
id: countryTitle
text: Genivi.gettext("Country");
}
- EntryField {
+ StdButton {
+ source:StyleSheet.countryKeyboard[Constants.SOURCE]; x:StyleSheet.countryKeyboard[Constants.X]; y:StyleSheet.countryKeyboard[Constants.Y]; width:StyleSheet.countryKeyboard[Constants.WIDTH]; height:StyleSheet.countryKeyboard[Constants.HEIGHT];
+ id:countryKeyboard; disabled:false; next:cityKeyboard; prev:back; explode:false;
+ onClicked: {
+ countryValue.callEntry()
+ }
+ }
+ NavigationAppEntryField {
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
@@ -349,30 +357,20 @@ NavigationAppHMIMenu {
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 {
+ StdButton {
+ source:StyleSheet.cityKeyboard[Constants.SOURCE]; x:StyleSheet.cityKeyboard[Constants.X]; y:StyleSheet.cityKeyboard[Constants.Y]; width:StyleSheet.cityKeyboard[Constants.WIDTH]; height:StyleSheet.cityKeyboard[Constants.HEIGHT];
+ id:cityKeyboard; disabled:false; next:streetKeyboard; prev:countryKeyboard; explode:false;
+ onClicked: {
+ cityValue.callEntry()
+ }
+ }
+ NavigationAppEntryField {
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
@@ -383,13 +381,44 @@ NavigationAppHMIMenu {
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");
+ }
+ StdButton {
+ source:StyleSheet.streetKeyboard[Constants.SOURCE]; x:StyleSheet.streetKeyboard[Constants.X]; y:StyleSheet.streetKeyboard[Constants.Y]; width:StyleSheet.streetKeyboard[Constants.WIDTH]; height:StyleSheet.streetKeyboard[Constants.HEIGHT];
+ id:streetKeyboard; disabled:false; next:numberKeyboard; prev:cityKeyboard; explode:false;
+ onClicked: {
+ streetValue.callEntry()
+ }
+ }
+ NavigationAppEntryField {
+ 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.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 {
+ StdButton {
+ source:StyleSheet.numberKeyboard[Constants.SOURCE]; x:StyleSheet.numberKeyboard[Constants.X]; y:StyleSheet.numberKeyboard[Constants.Y]; width:StyleSheet.numberKeyboard[Constants.WIDTH]; height:StyleSheet.numberKeyboard[Constants.HEIGHT];
+ id:numberKeyboard; disabled:false; next:back; prev:streetKeyboard; explode:false;
+ onClicked: {
+ numberValue.callEntry()
+ }
+ }
+ NavigationAppEntryField {
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
@@ -510,6 +539,7 @@ NavigationAppHMIMenu {
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"); explode:false;
+ visible: (vehicleLocated);
onClicked: {
var position,destination;
//save address for next time
@@ -537,9 +567,15 @@ NavigationAppHMIMenu {
disconnectSignals();
Genivi.data['lat']='';
Genivi.data['lon']='';
- entryMenu("NavigationCalculatedRoute",menu);
}
- disabled:true; next:back; prev:calculate_curr
+ disabled:true; next:back; prev:numberKeyboard
+ }
+
+ 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; explode:false; next:back; prev:calculate_curr; onClicked: {
+ entryMenu("NavigationAppSettings",menu);
+ }
}
StdButton {
@@ -558,6 +594,8 @@ NavigationAppHMIMenu {
Component.onCompleted: {
connectSignals();
+ vehicleLocated = false;
+
//Test if the navigation server is connected
var res=Genivi.navigationcore_session_GetVersion(dbusIf);
if (res[0] != "error") {
@@ -592,6 +630,8 @@ NavigationAppHMIMenu {
{
loadWithCountry();
}
+
+ updateCurrentPosition();
/*
// Check is route is active
if (Genivi.data["calculate_route"]) {
diff --git a/src/hmi/qml/NavigationAppSettings.qml b/src/hmi/qml/NavigationAppSettings.qml
new file mode 100644
index 0000000..3e7a21d
--- /dev/null
+++ b/src/hmi/qml/NavigationAppSettings.qml
@@ -0,0 +1,454 @@
+/**
+* @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/NavigationAppSettings-css.js" as StyleSheet;
+import lbs.plugin.dbusif 1.0
+
+HMIMenu {
+ id: menu
+ property string pagefile:"NavigationAppSettings"
+ 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_app_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; explode:false; 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; explode:false; 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; explode:false; 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; explode:false; 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("NavigationAppSettingsPreferences",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("NavigationAppSettingsLanguageAndUnits",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; explode:false; 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/NavigationAppSettingsLanguageAndUnits.qml b/src/hmi/qml/NavigationAppSettingsLanguageAndUnits.qml
new file mode 100644
index 0000000..01b912f
--- /dev/null
+++ b/src/hmi/qml/NavigationAppSettingsLanguageAndUnits.qml
@@ -0,0 +1,194 @@
+/**
+* @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/NavigationAppSettingsSettingsLanguageAndUnits-css.js" as StyleSheet;
+import lbs.plugin.dbusif 1.0
+
+HMIMenu {
+ id: menu
+ property string pagefile:"NavigationAppSettingsLanguageAndUnits"
+ 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_app_settings_language_and_units_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; explode:false; 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; explode:false; 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; explode:false; 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; explode:false; 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; explode:false; 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; explode:false; 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/NavigationAppSettingsPreferences.qml b/src/hmi/qml/NavigationAppSettingsPreferences.qml
new file mode 100644
index 0000000..949d7dc
--- /dev/null
+++ b/src/hmi/qml/NavigationAppSettingsPreferences.qml
@@ -0,0 +1,220 @@
+/**
+* @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/NavigationAppSettingsPreference-css.js" as StyleSheet;
+import lbs.plugin.dbusif 1.0
+import lbs.plugin.preference 1.0
+
+HMIMenu {
+ id: menu
+ property string pagefile:"NavigationAppSettingsPreferences"
+
+ 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_app_settings_preference_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; explode:false; 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; explode:false; 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; explode:false; 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; explode:false; 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; explode:false; 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; explode:false; 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/kill-all b/src/kill-all
new file mode 100755
index 0000000..05490e8
--- /dev/null
+++ b/src/kill-all
@@ -0,0 +1,8 @@
+#!/bin/sh
+echo 'kill all remaining process'
+kill -9 `ps -ef | grep navit | grep -v grep | awk '{print $2}'`
+kill -9 `ps -ef | grep poi-server | grep -v grep | awk '{print $2}'`
+kill -9 `ps -ef | grep hmi-launcher | grep -v grep | awk '{print $2}'`
+kill -9 `ps -ef | grep fuel-stop-advis | grep -v grep | awk '{print $2}'`
+kill -9 `ps -ef | grep ambd | grep -v grep | awk '{print $2}'`
+