diff options
author | asanoaozora <fifitaneki@hotmail.com> | 2017-03-28 15:48:29 +0200 |
---|---|---|
committer | asanoaozora <fifitaneki@hotmail.com> | 2017-03-28 15:48:29 +0200 |
commit | bc3328a4fcc3960a23c92eafee76d4cdf9997c90 (patch) | |
tree | f7b6e5bffbd99cd509622d88148834aa002a8603 | |
parent | 0ebe19a50c918eefe0b45185e873042b84a8b9c9 (diff) | |
download | navigation-bc3328a4fcc3960a23c92eafee76d4cdf9997c90.tar.gz |
clean up translations, improve keyboard management
-rwxr-xr-x | src/build.sh | 3 | ||||
-rw-r--r-- | src/hmi/qml/Core/NavigationAppKeyboard.qml | 168 | ||||
-rw-r--r-- | src/hmi/qml/Core/genivi-capi.js | 133 | ||||
-rw-r--r-- | src/hmi/qml/Core/genivi-origin.js | 133 | ||||
-rw-r--r-- | src/hmi/qml/Core/translations/deu_DEU.js | 85 | ||||
-rw-r--r-- | src/hmi/qml/Core/translations/eng_USA.js | 85 | ||||
-rw-r--r-- | src/hmi/qml/Core/translations/fra_FRA.js | 86 | ||||
-rw-r--r-- | src/hmi/qml/Core/translations/jpn_JPN.js | 111 | ||||
-rw-r--r-- | src/hmi/qml/NavigationApp.qml | 13 | ||||
-rw-r--r-- | src/hmi/qml/NavigationAppBrowseMap.qml | 78 | ||||
-rw-r--r-- | src/hmi/qml/NavigationAppPOI.qml | 4 | ||||
-rw-r--r-- | src/hmi/qml/NavigationAppSearch.qml | 8 | ||||
-rw-r--r-- | src/hmi/qml/NavigationAppTokyo.qml | 11 |
13 files changed, 416 insertions, 502 deletions
diff --git a/src/build.sh b/src/build.sh index 7b6a815..195e4d5 100755 --- a/src/build.sh +++ b/src/build.sh @@ -136,6 +136,9 @@ then sed -i -e 's/(const TimeStampedEnum::/(const ::v4::org::genivi::navigation::navigationcore::NavigationCoreTypes::TimeStampedEnum::/' ./poi-service/poi-server-capi/src-gen/v4/org/genivi/navigation/navigationcore/LocationInput.hpp sed -i -e 's/(const TimeStampedEnum::/(const ::v4::org::genivi::navigation::navigationcore::NavigationCoreTypes::TimeStampedEnum::/' ./poi-service/poi-server-capi/src-gen/v4/org/genivi/navigation/navigationcore/MapMatchedPosition.hpp fi + echo 'replace a missing font in the configuration file of navit instances' + sed -i -e 's/Liberation Sans/TakaoPGothic/' ./navigation/navit/navit/navit_genivi_mapviewer.xml + sed -i -e 's/Liberation Sans/TakaoPGothic/' ./navigation/navit/navit/navit_genivi_navigationcore.xml fi make cd ../ diff --git a/src/hmi/qml/Core/NavigationAppKeyboard.qml b/src/hmi/qml/Core/NavigationAppKeyboard.qml index 8f5b6dd..72e0cb9 100644 --- a/src/hmi/qml/Core/NavigationAppKeyboard.qml +++ b/src/hmi/qml/Core/NavigationAppKeyboard.qml @@ -28,9 +28,9 @@ import "genivi.js" as Genivi; Item { id: keyboard; - property real w: (keyboard.width*Genivi.kbdRowRatio)/(Genivi.kbdRows*(1+Genivi.kbdRowRatio)-1); + property real w: (keyboard.width*Genivi.kbdColumnRatio)/(Genivi.kbdColumns*(1+Genivi.kbdColumnRatio)-1); property real h: (keyboard.height*Genivi.kbdLineRatio)/(Genivi.kbdLines*(1+Genivi.kbdLineRatio)-1); - property real wspc: w/Genivi.kbdRowRatio; + property real wspc: w/Genivi.kbdColumnRatio; property real hspc: h/Genivi.kbdLineRatio; property Item destination; property Item layout; @@ -42,14 +42,7 @@ Item { property bool activekeys_enabled; property string shiftlevel; signal keypress(string what); - - function takeFocus(dir) { - if (dir > 0) { - key1.forceActiveFocus(); - } else { - key32.forceActiveFocus(); - } - } + property var buttonList:[]; function keytext(what) { @@ -109,124 +102,55 @@ Item { shift(shiftlevel); } + function activateAllKeys() + { + var keys; + keys='\b'+'␣'+"ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + if(g_language==="eng"){ + }else{ + if(g_language==="fra"){ + }else{ + if(g_language==="jpn"){ + keys+="あかさたなはまやらわいきしちにひみりをうくすつぬふむゆるんえけせてねへめれ”おこそとのほもよろ°"; + }else{ + if(g_language==="deu"){ + } + } + } + } + setactivekeys(keys,true); + } + 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); - } + var l=Genivi.keyboardLayout[what]; + for(var i=0;i<buttonList.length;i++){ + set(buttonList[i],l[i]) + } } Column { + id:keyboardFrame 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 } - } + Component.onCompleted: { + var index=0; + for(var i=0;i<Genivi.kbdLines;i++){ + var row=Qt.createQmlObject('import QtQuick 2.1 ; Row {}',keyboardFrame,'dynamic'); + row.spacing=keyboard.wspc; + for(var j=0;j<Genivi.kbdColumns;j++){ + buttonList[index] =Qt.createQmlObject('import QtQuick 2.1 ; KButton {}',row,'dynamic'); + index++; + } + } + } } + + Component.onCompleted: { + if (destination.text.length && secondLayout) { + shift(secondLayout); + } else { + shift(firstLayout); + } + } } diff --git a/src/hmi/qml/Core/genivi-capi.js b/src/hmi/qml/Core/genivi-capi.js index d8b5c66..d96b2f1 100644 --- a/src/hmi/qml/Core/genivi-capi.js +++ b/src/hmi/qml/Core/genivi-capi.js @@ -63,6 +63,10 @@ var route_calculated=false; var reroute_requested=false; var location_input_activated=true; +var scaleList; +var minZoomId; +var maxZoomId; + var entryback = new Array; var entrybackheapsize=0; entryback[entrybackheapsize]=""; @@ -134,12 +138,6 @@ data['display_on_map']='show_current_position'; //display current position of th historyOfLastEnteredLocationDepth=10; //max number of items into the history is set to historyOfLastEnteredLocationDepth-1 tripMode="TRIP_NUMBER1"; -//keyboard parameters -var kbdRows=8; //number of rows per line -var kbdRowRatio=4; //size of row spacing (ratio) -var kbdLines=4; //number of lines -var kbdLineRatio=4; //size of line spacing (ratio) - //dump functions for debug function dump2(prefix,index,args) { @@ -209,6 +207,86 @@ function time(seconds) } } +// Keyboard parameters +var kbdColumns; //number of columns per line +var kbdColumnRatio; //size of column spacing (ratio) +var kbdLines; //number of lines +var kbdLineRatio; //size of line spacing (ratio) +var kbdFirstLayout; +var kbdSecondLayout; +var keyboardLayout; +var germanLayout={ + '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','␣','','','123','ÄÖÜ','←', + ], + 'ÄÖÜ':['Ä','Ö','Ü','ß','','','','', + '','','','','','','','', + '','','','','','','','', + '','','','','','123','ABC','←', + ], + '123':['0','1','2','3','4','5','6','7', + '8','9','-','.',',','','','', + '','','','','','','','', + '','','','','','ABC','ÄÖÜ','←', + ], +}; +var frenchLayout={ + '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','␣','','','123','','←', + ], + '123':['0','1','2','3','4','5','6','7', + '8','9','-','.',',','','','', + '','','','','','','','', + '','','','','','ABC','','←', + ], +}; +var englishLayout={ + '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','␣','','','123','','←', + ], + '123':['0','1','2','3','4','5','6','7', + '8','9','-','.',',','','','', + '','','','','','','','', + '','','','','','ABC','','←', + ], +}; +var japaneseLayout={ + 'かな':['あ','か','さ','た','な','は','ま','や','ら','わ', + 'い','き','し','ち','に','ひ','み','','り','を', + 'う','く','す','つ','ぬ','ふ','む','ゆ','る','ん', + 'え','け','せ','て','ね','へ','め','','れ','”', + 'お','こ','そ','と','の','ほ','も','よ','ろ','°', + 'カナ','ABC','123','','','','','','','←', + ], + 'カナ':['ア','カ','サ','タ','ナ','ハ','マ','ヤ','ラ','ワ', + 'イ','キ','シ','チ','ニ','ヒ','ミ','','リ','ヲ', + 'ウ','ク','ス','ツ','ヌ','フ','ム','ユ','ル','ン', + 'エ','ケ','セ','テ','ネ','ヘ','メ','','レ','”', + 'オ','コ','ソ','ト','ノ','ホ','モ','ヨ','ロ','°', + 'かな','ABC','123','','','','','','ー','←', + ], + 'ABC':['A','Z','E','R','T','Y','U','I','O','P', + 'Q','S','D','F','G','H','J','K','L','M', + 'W','X','C','V','B','N','','','','', + '','','','','','','','','','', + '','','','','','','','','','', + 'かな','','123','','␣','','','','','←', + ], + '123':['0','1','2','3','4','5','6','7','8','9', + '','','','','','','','','','', + '','','','','','','','','','', + '','','','','','','','','','', + '','','','','','','','','','', + 'かな','ABC','','','','','','','','←', + ], +}; + // Language and text function setlang(language,country,script) { @@ -217,6 +295,44 @@ function setlang(language,country,script) g_script=script; translations = new Array; Qt.include("translations/"+g_language + "_" + g_country+".js"); + if(g_language==="eng"){ + keyboardLayout=englishLayout; + kbdColumns=8; //number of rows per line + kbdColumnRatio=4; //size of row spacing (ratio) + kbdLines=4; //number of lines + kbdLineRatio=4; //size of line spacing (ratio) + }else{ + if(g_language==="fra"){ + keyboardLayout=frenchLayout; + kbdColumns=8; //number of rows per line + kbdColumnRatio=4; //size of row spacing (ratio) + kbdLines=4; //number of lines + kbdLineRatio=4; //size of line spacing (ratio) + }else{ + if(g_language==="jpn"){ + keyboardLayout=japaneseLayout; + kbdColumns=10; //number of rows per line + kbdColumnRatio=4; //size of row spacing (ratio) + kbdLines=6; //number of lines + kbdLineRatio=4; //size of line spacing (ratio) + }else{ + if(g_language==="deu"){ + keyboardLayout=germanLayout; + kbdColumns=8; //number of rows per line + kbdColumnRatio=4; //size of row spacing (ratio) + kbdLines=4; //number of lines + kbdLineRatio=4; //size of line spacing (ratio) + }else{ + //default + keyboardLayout=germanLayout; + kbdColumns=8; //number of rows per line + kbdColumnRatio=4; //size of row spacing (ratio) + kbdLines=4; //number of lines + kbdLineRatio=4; //size of line spacing (ratio) + } + } + } + } } // Default position (for showroom mode) @@ -790,6 +906,11 @@ function mapviewer_GetMapViewScale(dbusIf) return mapviewercontrol_get(dbusIf,"getMapViewScale", []); } +function mapviewer_GetScaleList(dbusIf) +{ + return mapviewercontrol_get(dbusIf,"getScaleList", []); +} + function mapviewer_GetDisplayedRoutes(dbusIf) { return mapviewercontrol_get(dbusIf,"getDisplayedRoutes", []); diff --git a/src/hmi/qml/Core/genivi-origin.js b/src/hmi/qml/Core/genivi-origin.js index bdcc7db..85b8640 100644 --- a/src/hmi/qml/Core/genivi-origin.js +++ b/src/hmi/qml/Core/genivi-origin.js @@ -63,6 +63,10 @@ var route_calculated=false; var reroute_requested=false; var location_input_activated=true; +var scaleList; +var minZoomId; +var maxZoomId; + var entryback = new Array; var entrybackheapsize=0; entryback[entrybackheapsize]=""; @@ -134,12 +138,6 @@ data['display_on_map']='show_current_position'; //display current position of th historyOfLastEnteredLocationDepth=10; //max number of items into the history is set to historyOfLastEnteredLocationDepth-1 tripMode="TRIP_NUMBER1"; -//keyboard parameters -var kbdRows=8; //number of rows per line -var kbdRowRatio=4; //size of row spacing (ratio) -var kbdLines=4; //number of lines -var kbdLineRatio=4; //size of line spacing (ratio) - //dump functions for debug function dump2(prefix,index,args) { @@ -209,6 +207,86 @@ function time(seconds) } } +// Keyboard parameters +var kbdColumns; //number of columns per line +var kbdColumnRatio; //size of column spacing (ratio) +var kbdLines; //number of lines +var kbdLineRatio; //size of line spacing (ratio) +var kbdFirstLayout; +var kbdSecondLayout; +var keyboardLayout; +var germanLayout={ + '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','␣','','','123','ÄÖÜ','←', + ], + 'ÄÖÜ':['Ä','Ö','Ü','ß','','','','', + '','','','','','','','', + '','','','','','','','', + '','','','','','123','ABC','←', + ], + '123':['0','1','2','3','4','5','6','7', + '8','9','-','.',',','','','', + '','','','','','','','', + '','','','','','ABC','ÄÖÜ','←', + ], +}; +var frenchLayout={ + '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','␣','','','123','','←', + ], + '123':['0','1','2','3','4','5','6','7', + '8','9','-','.',',','','','', + '','','','','','','','', + '','','','','','ABC','','←', + ], +}; +var englishLayout={ + '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','␣','','','123','','←', + ], + '123':['0','1','2','3','4','5','6','7', + '8','9','-','.',',','','','', + '','','','','','','','', + '','','','','','ABC','','←', + ], +}; +var japaneseLayout={ + 'かな':['あ','か','さ','た','な','は','ま','や','ら','わ', + 'い','き','し','ち','に','ひ','み','','り','を', + 'う','く','す','つ','ぬ','ふ','む','ゆ','る','ん', + 'え','け','せ','て','ね','へ','め','','れ','”', + 'お','こ','そ','と','の','ほ','も','よ','ろ','°', + 'カナ','ABC','123','','','','','','','←', + ], + 'カナ':['ア','カ','サ','タ','ナ','ハ','マ','ヤ','ラ','ワ', + 'イ','キ','シ','チ','ニ','ヒ','ミ','','リ','ヲ', + 'ウ','ク','ス','ツ','ヌ','フ','ム','ユ','ル','ン', + 'エ','ケ','セ','テ','ネ','ヘ','メ','','レ','”', + 'オ','コ','ソ','ト','ノ','ホ','モ','ヨ','ロ','°', + 'かな','ABC','123','','','','','','ー','←', + ], + 'ABC':['A','Z','E','R','T','Y','U','I','O','P', + 'Q','S','D','F','G','H','J','K','L','M', + 'W','X','C','V','B','N','','','','', + '','','','','','','','','','', + '','','','','','','','','','', + 'かな','','123','','␣','','','','','←', + ], + '123':['0','1','2','3','4','5','6','7','8','9', + '','','','','','','','','','', + '','','','','','','','','','', + '','','','','','','','','','', + '','','','','','','','','','', + 'かな','ABC','','','','','','','','←', + ], +}; + // Language and text function setlang(language,country,script) { @@ -217,6 +295,44 @@ function setlang(language,country,script) g_script=script; translations = new Array; Qt.include("translations/"+g_language + "_" + g_country+".js"); + if(g_language==="eng"){ + keyboardLayout=englishLayout; + kbdColumns=8; //number of rows per line + kbdColumnRatio=4; //size of row spacing (ratio) + kbdLines=4; //number of lines + kbdLineRatio=4; //size of line spacing (ratio) + }else{ + if(g_language==="fra"){ + keyboardLayout=frenchLayout; + kbdColumns=8; //number of rows per line + kbdColumnRatio=4; //size of row spacing (ratio) + kbdLines=4; //number of lines + kbdLineRatio=4; //size of line spacing (ratio) + }else{ + if(g_language==="jpn"){ + keyboardLayout=japaneseLayout; + kbdColumns=10; //number of rows per line + kbdColumnRatio=4; //size of row spacing (ratio) + kbdLines=6; //number of lines + kbdLineRatio=4; //size of line spacing (ratio) + }else{ + if(g_language==="deu"){ + keyboardLayout=germanLayout; + kbdColumns=8; //number of rows per line + kbdColumnRatio=4; //size of row spacing (ratio) + kbdLines=4; //number of lines + kbdLineRatio=4; //size of line spacing (ratio) + }else{ + //default + keyboardLayout=germanLayout; + kbdColumns=8; //number of rows per line + kbdColumnRatio=4; //size of row spacing (ratio) + kbdLines=4; //number of lines + kbdLineRatio=4; //size of line spacing (ratio) + } + } + } + } } // Default position (for showroom mode) @@ -788,6 +904,11 @@ function mapviewer_GetMapViewScale(dbusIf) return mapviewercontrol_get(dbusIf,"GetMapViewScale", []); } +function mapviewer_GetScaleList(dbusIf) +{ + return mapviewercontrol_get(dbusIf,"GetScaleList", []); +} + function mapviewer_GetDisplayedRoutes(dbusIf) { return mapviewercontrol_get(dbusIf,"GetDisplayedRoutes", []); diff --git a/src/hmi/qml/Core/translations/deu_DEU.js b/src/hmi/qml/Core/translations/deu_DEU.js index b1f9730..56674fc 100644 --- a/src/hmi/qml/Core/translations/deu_DEU.js +++ b/src/hmi/qml/Core/translations/deu_DEU.js @@ -26,95 +26,39 @@ * * @licence end@ */ -//MainMenu -translations["MainMenu"]="MAIN MENU"; translations["Navigation"]="NAVI"; translations["Mapview"]="MAP"; translations["Poi"]="POI"; translations["Configuration"]="CONFIG"; translations["Trip"]="TRIP"; -//NavigationSearch -translations["NavigationSearch"]="SEARCH"; -translations["SearchMode"]="SEARCH MODE"; -translations["History"]="HISTORY"; - -//NavigationSearchAddress -translations["NavigationSearchAddress"]="SEARCH BY ADDRESS"; translations["Country"]="COUNTRY"; translations["City"]="CITY"; translations["Street"]="STREET"; translations["Number"]="NUMBER"; -//NavigationSearchCoordinates -translations["NavigationSearchCoordinates"]="SEARCH BY COORDINATES"; -translations["Latitude"]="LATITUDE"; -translations["Longitude"]="LONGITUDE"; - -//NavigationSearchFreeText -translations["NavigationSearchFreeText"]="SEARCH BY FREE TEXT"; -translations["Text"]="TEXT"; - -//NavigationSearchHistory -translations["NavigationSearchHistory"]="HISTORY OF LAST LOCATIONS" - -//NavigationSettings -translations["NavigationSettings"]="SETTINGS"; -translations["Simulation"]="SIMULATION"; -translations["Speed"]="SPEED"; -translations["Preference"]="PREFERENCE"; -translations["LanguageAndUnits"]="LANG&UNITS"; -translations["Mode"]="MODE"; -translations["OnMapView"]="ON MAP VIEW"; - -//NavigationSettingsPreferences -translations["NavigationSettingsPreferences"]="PREFERENCES"; -translations["CostModel"]="COST MODEL"; -translations["Shortest"]="SHORTEST"; -translations["Fastest"]="FASTEST"; translations["RoutingPreferences"]="ROUTING PREFERENCES"; translations["Ferries"]="FERRIES"; translations["TollRoads"]="TOLL ROADS"; translations["MotorWays"]="MOTORWAYS"; - -//NavigationSettingsLanguageAndUnits -translations["NavigationSettingsLanguageAndUnits"]="LANGUAGE AND UNITS"; +translations["CostModel"]="COST MODEL"; +translations["Shortest"]="SHORTEST"; +translations["Fastest"]="FASTEST"; translations["Language"]="LANGUAGE"; translations["Units"]="UNITS"; +translations["Showroom"]="SHOWROOM"; +translations["Autoguidance"]="AUTOGUIDE"; +translations["Simulation"]="SIMULATION"; -//NavigationRoute -translations["NavigationRoute"]="ROUTE"; -translations["EnteredLocation"]="ENTERED LOCATION"; -translations["Position"]="POSITION"; -translations["Destination"]="DESTINATION"; -translations["Route"]="ROUTE"; -translations["GoTo"]="GO TO"; - -//NavigationCalculatedRoute -translations["NavigationCalculatedRoute"]="GUIDANCE"; translations["RouteDistance"]="DISTANCE"; translations["RouteTime"]="TIME"; translations["Guidance"]="GUIDANCE"; translations["DisplayRoute"]="DISPLAY"; -translations["OnMap"]="ON MAP"; -translations["InAList"]="IN A LIST"; translations["StatusTitle"]="STATUS"; translations["CalculatedRouteInProgress"]="CALCULATION IN PROGRESS"; translations["CalculatedRouteFailed"]="CALCULATION FAILED"; translations["CalculatedRouteSuccess"]="ROUTE AVAILABLE"; -//NavigationRouteDescription -translations["NavigationRouteDescription"]="MANEUVER LIST"; - -//CameraSettings -translations["CameraSettings"]="CAMERA SETTINGS"; - -//Entry -translations["Entry"]="ENTRY"; - -//NavigationBrowseMap -translations["NavigationBrowseMap"]="BROWSE MAP"; -translations["NavigationCurrentStreet"]="CURRENT STREET"; translations["FSAWarning"]="Refill"; translations["NoGuidance"]="No guidance"; translations["NoManeuver"]="No maneuver"; @@ -134,11 +78,6 @@ translations["Join"]="Jo"; translations["Day"]="Da"; translations["Night"]="Ni"; -//NavigationManeuversList -translations["NavigationManeuversList"]="MANEUVER LIST"; - -//TripComputer -translations["TripComputer"]="TRIP COMPUTER"; translations["AvgSpeed"]="AVG SPEED"; translations["AvgFuel"]="AVG FUEL"; translations["Distance"]="DISTANCE"; @@ -147,25 +86,13 @@ translations["TankDistance"]="TANK DISTANCE"; translations["PredictiveTankDistance"]="PREDICTIVE\nTANK DISTANCE"; translations["Reset"]="RESET"; -//POI -translations["POI"]="POINTS OF INTEREST"; -translations["SearchResult"]="SEARCH RESULT"; -translations["SelectedStation"]="SELECTED STATION"; translations["Selected"]="SELECTED"; -translations["SearchForPOI"]="SEARCH"; -translations["Reroute"]="REROUTE"; -translations["DisplayPOI"]="DISPLAY"; -//Common texts -translations["Ok"]="OK"; translations["On"]="ON"; translations["Off"]="OFF"; translations["Back"]="BACK"; -translations["Menu"]="MENU"; translations["Cancel"]="CANCEL"; translations["Quit"]="QUIT"; -translations["Showroom"]="SHOWROOM"; -translations["Autoguidance"]="AUTOGUIDE"; translations["Element"]="NAME"; diff --git a/src/hmi/qml/Core/translations/eng_USA.js b/src/hmi/qml/Core/translations/eng_USA.js index cb0e874..643bba5 100644 --- a/src/hmi/qml/Core/translations/eng_USA.js +++ b/src/hmi/qml/Core/translations/eng_USA.js @@ -26,95 +26,39 @@ * * @licence end@ */ -//MainMenu -translations["MainMenu"]="MAIN MENU"; translations["Navigation"]="NAVI"; translations["Mapview"]="MAP"; translations["Poi"]="POI"; translations["Configuration"]="CONFIG"; translations["Trip"]="TRIP"; -//NavigationSearch -translations["NavigationSearch"]="SEARCH"; -translations["SearchMode"]="SEARCH MODE"; -translations["History"]="HISTORY"; - -//NavigationSearchAddress -translations["NavigationSearchAddress"]="SEARCH BY ADDRESS"; translations["Country"]="COUNTRY"; translations["City"]="CITY"; translations["Street"]="STREET"; translations["Number"]="NUMBER"; -//NavigationSearchCoordinates -translations["NavigationSearchCoordinates"]="SEARCH BY COORDINATES"; -translations["Latitude"]="LATITUDE"; -translations["Longitude"]="LONGITUDE"; - -//NavigationSearchFreeText -translations["NavigationSearchFreeText"]="SEARCH BY FREE TEXT"; -translations["Text"]="TEXT"; - -//NavigationSearchHistory -translations["NavigationSearchHistory"]="HISTORY OF LAST LOCATIONS" - -//NavigationSettings -translations["NavigationSettings"]="SETTINGS"; -translations["Simulation"]="SIMULATION"; -translations["Speed"]="SPEED"; -translations["Preference"]="PREFERENCE"; -translations["LanguageAndUnits"]="LANG&UNITS"; -translations["Mode"]="MODE"; -translations["OnMapView"]="ON MAP VIEW"; - -//NavigationSettingsPreferences -translations["NavigationSettingsPreferences"]="PREFERENCES"; -translations["CostModel"]="COST MODEL"; -translations["Shortest"]="SHORTEST"; -translations["Fastest"]="FASTEST"; translations["RoutingPreferences"]="ROUTING PREFERENCES"; translations["Ferries"]="FERRIES"; translations["TollRoads"]="TOLL ROADS"; translations["MotorWays"]="MOTORWAYS"; - -//NavigationSettingsLanguageAndUnits -translations["NavigationSettingsLanguageAndUnits"]="LANGUAGE AND UNITS"; +translations["CostModel"]="COST MODEL"; +translations["Shortest"]="SHORTEST"; +translations["Fastest"]="FASTEST"; translations["Language"]="LANGUAGE"; translations["Units"]="UNITS"; +translations["Showroom"]="SHOWROOM"; +translations["Autoguidance"]="AUTOGUIDE"; +translations["Simulation"]="SIMULATION"; -//NavigationRoute -translations["NavigationRoute"]="ROUTE"; -translations["EnteredLocation"]="ENTERED LOCATION"; -translations["Position"]="POSITION"; -translations["Destination"]="DESTINATION"; -translations["Route"]="ROUTE"; -translations["GoTo"]="GO TO"; - -//NavigationCalculatedRoute -translations["NavigationCalculatedRoute"]="GUIDANCE"; translations["RouteDistance"]="DISTANCE"; translations["RouteTime"]="TIME"; translations["Guidance"]="GUIDANCE"; translations["DisplayRoute"]="DISPLAY"; -translations["OnMap"]="ON MAP"; -translations["InAList"]="IN A LIST"; translations["StatusTitle"]="STATUS"; translations["CalculatedRouteInProgress"]="CALCULATION IN PROGRESS"; translations["CalculatedRouteFailed"]="CALCULATION FAILED"; translations["CalculatedRouteSuccess"]="ROUTE AVAILABLE"; -//NavigationRouteDescription -translations["NavigationRouteDescription"]="MANEUVER LIST"; - -//CameraSettings -translations["CameraSettings"]="CAMERA SETTINGS"; - -//Entry -translations["Entry"]="ENTRY"; - -//NavigationBrowseMap -translations["NavigationBrowseMap"]="BROWSE MAP"; -translations["NavigationCurrentStreet"]="CURRENT STREET"; translations["FSAWarning"]="Refill"; translations["NoGuidance"]="No guidance"; translations["NoManeuver"]="No maneuver"; @@ -134,11 +78,6 @@ translations["Join"]="Jo"; translations["Day"]="Da"; translations["Night"]="Ni"; -//NavigationManeuversList -translations["NavigationManeuversList"]="MANEUVER LIST"; - -//TripComputer -translations["TripComputer"]="TRIP COMPUTER"; translations["AvgSpeed"]="AVG SPEED"; translations["AvgFuel"]="AVG FUEL"; translations["Distance"]="DISTANCE"; @@ -147,25 +86,13 @@ translations["TankDistance"]="TANK DISTANCE"; translations["PredictiveTankDistance"]="PREDICTIVE\nTANK DISTANCE"; translations["Reset"]="RESET"; -//POI -translations["POI"]="POINTS OF INTEREST"; -translations["SearchResult"]="SEARCH RESULT"; -translations["SelectedStation"]="SELECTED STATION"; translations["Selected"]="SELECTED"; -translations["SearchForPOI"]="SEARCH"; -translations["Reroute"]="REROUTE"; -translations["DisplayPOI"]="DISPLAY"; -//Common texts -translations["Ok"]="OK"; translations["On"]="ON"; translations["Off"]="OFF"; translations["Back"]="BACK"; -translations["Menu"]="MENU"; translations["Cancel"]="CANCEL"; translations["Quit"]="QUIT"; -translations["Showroom"]="SHOWROOM"; -translations["Autoguidance"]="AUTOGUIDE"; translations["Element"]="NAME"; diff --git a/src/hmi/qml/Core/translations/fra_FRA.js b/src/hmi/qml/Core/translations/fra_FRA.js index 6bc3176..480da8c 100644 --- a/src/hmi/qml/Core/translations/fra_FRA.js +++ b/src/hmi/qml/Core/translations/fra_FRA.js @@ -26,95 +26,39 @@ * * @licence end@ */ -//MainMenu -translations["MainMenu"]="MENU PRINCIPAL"; translations["Navigation"]="NAVI"; translations["Mapview"]="MAP"; translations["Poi"]="POI"; translations["Configuration"]="CONFIG"; translations["Trip"]="TRIP"; -//NavigationSearch -translations["NavigationSearch"]="CHERCHER UN LIEU"; -translations["SearchMode"]="RECHERCHER"; -translations["History"]="HISTORIQUE"; - -//NavigationSearchAddress -translations["NavigationSearchAddress"]="SAISIR UNE ADRESSE"; translations["Country"]="PAYS"; translations["City"]="VILLE"; translations["Street"]="RUE"; translations["Number"]="NUMERO"; -//NavigationSearchCoordinates -translations["NavigationSearchCoordinates"]="SAISIR DES COORDONNEES GPS"; -translations["Latitude"]="LATITUDE"; -translations["Longitude"]="LONGITUDE"; - -//NavigationSearchFreeText -translations["NavigationSearchFreeText"]="SAISIR UN MOT"; -translations["Text"]="TEXTE"; - -//NavigationSearchHistory -translations["NavigationSearchHistory"]="DERNIERES DESTINATIONS" - -//NavigationSettings -translations["NavigationSettings"]="CONFIGURATION"; -translations["Simulation"]="SIMULATION"; -translations["Speed"]="VITESSE"; -translations["Preference"]="PREFERENCE"; -translations["LanguageAndUnits"]="LANG&UNITES"; -translations["Mode"]="MODE"; -translations["OnMapView"]="ON MAP VIEW"; - -//NavigationSettingsPreferences -translations["NavigationSettingsPreferences"]="PREFERENCES"; -translations["CostModel"]="COST MODEL"; -translations["Shortest"]="SHORTEST"; -translations["Fastest"]="FASTEST"; translations["RoutingPreferences"]="ROUTING PREFERENCES"; translations["Ferries"]="FERRIES"; translations["TollRoads"]="TOLL ROADS"; translations["MotorWays"]="MOTORWAYS"; - -//NavigationSettingsLanguageAndUnits -translations["NavigationSettingsLanguageAndUnits"]="LANGUE ET UNITES"; +translations["CostModel"]="COST MODEL"; +translations["Shortest"]="SHORTEST"; +translations["Fastest"]="FASTEST"; translations["Language"]="LANGAGE"; translations["Units"]="UNITES"; +translations["Showroom"]="SHOWROOM"; +translations["Autoguidance"]="AUTOGUIDE"; +translations["Simulation"]="SIMULATION"; -//NavigationRoute -translations["NavigationRoute"]="ITINERAIRE"; -translations["EnteredLocation"]="SELECTION SAISIE"; -translations["Position"]="POSITION"; -translations["Destination"]="DESTINATION"; -translations["Route"]="ROUTE"; -translations["GoTo"]="GO TO"; - -//NavigationCalculatedRoute -translations["NavigationCalculatedRoute"]="GUIDAGE"; translations["RouteDistance"]="DISTANCE"; translations["RouteTime"]="DUREE"; translations["Guidance"]="GUIDAGE"; translations["DisplayRoute"]="AFFICHER"; -translations["OnMap"]="CARTE"; -translations["InAList"]="LISTE"; translations["StatusTitle"]="STATUS"; translations["CalculatedRouteInProgress"]="CALCULATION IN PROGRESS"; translations["CalculatedRouteFailed"]="CALCULATION FAILED"; translations["CalculatedRouteSuccess"]="ROUTE AVAILABLE"; -//NavigationRouteDescription -translations["NavigationRouteDescription"]="LISTE DES MANOEUVRES"; - -//CameraSettings -translations["CameraSettings"]="REGLAGE DE LA CAMERA"; - -//Entry -translations["Entry"]="SAISIE"; - -//NavigationBrowseMap -translations["NavigationBrowseMap"]="EXPLORER LA CARTE"; -translations["NavigationCurrentStreet"]="RUE ACTUELLE"; translations["FSAWarning"]="Refill"; translations["NoGuidance"]="No guidance"; translations["NoManeuver"]="No maneuver"; @@ -134,12 +78,6 @@ translations["Join"]="Jo"; translations["Day"]="Da"; translations["Night"]="Ni"; - -//NavigationManeuversList -translations["NavigationManeuversList"]="LISTE DES MANEUVRES"; - -//TripComputer -translations["TripComputer"]="ORDINATEUR DE BORD"; translations["AvgSpeed"]="VITESSE MOYENNE"; translations["AvgFuel"]="CONSO MOYENNE"; translations["Distance"]="DISTANCE"; @@ -148,25 +86,13 @@ translations["TankDistance"]="AUTONOMIE"; translations["PredictiveTankDistance"]="AUTONOMIE\nPREDICTIVE"; translations["Reset"]="RAZ"; -//POI -translations["POI"]="POINTS D'INTERET"; -translations["SearchResult"]="RESULTATS"; -translations["SelectedStation"]="STATION CHOISIE"; translations["Selected"]="SELECTION"; -translations["SearchForPOI"]="CHERCHER"; -translations["Reroute"]="REROUTER"; -translations["DisplayPOI"]="AFFICHER"; -//Common texts -translations["Ok"]="OK"; translations["On"]="ON"; translations["Off"]="OFF"; translations["Back"]="RETOUR"; -translations["Menu"]="MENU"; translations["Cancel"]="ANNUL"; translations["Quit"]="QUITTER"; -translations["Showroom"]="SHOWROOM"; -translations["Autoguidance"]="AUTOGUIDE"; translations["Element"]="NAME"; diff --git a/src/hmi/qml/Core/translations/jpn_JPN.js b/src/hmi/qml/Core/translations/jpn_JPN.js index 021c64f..39b8855 100644 --- a/src/hmi/qml/Core/translations/jpn_JPN.js +++ b/src/hmi/qml/Core/translations/jpn_JPN.js @@ -26,104 +26,48 @@ * * @licence end@ */ -//MainMenu -translations["MainMenu"]="FSA メニュー"; -translations["Navigation"]="NAVI"; -translations["Mapview"]="MAP"; -translations["Poi"]="POI"; -translations["Configuration"]="CONFIG"; +translations["Navigation"]="ナビ"; +translations["Mapview"]="地図"; +translations["Poi"]="地点"; +translations["Configuration"]="設定"; translations["Trip"]="TRIP"; -//NavigationSearch -translations["NavigationSearch"]="検索"; -translations["SearchMode"]="検索の方法"; -translations["History"]="ヒストリ"; - -//NavigationSearchAddress -translations["NavigationSearchAddress"]="SEARCH BY ADDRESS"; translations["Country"]="国"; translations["City"]="町"; translations["Street"]="道"; translations["Number"]="番号"; -//NavigationSearchCoordinates -translations["NavigationSearchCoordinates"]="SEARCH BY COORDINATES"; -translations["Latitude"]="緯度"; -translations["Longitude"]="軽度"; - -//NavigationSearchFreeText -translations["NavigationSearchFreeText"]="SEARCH BY FREE TEXT"; -translations["Text"]="TEXT"; - -//NavigationSearchHistory -translations["NavigationSearchHistory"]="目的地のヒストリ" - -//NavigationSettings -translations["NavigationSettings"]="設定"; -translations["Simulation"]="SIMULATION"; -translations["Speed"]="SPEED"; -translations["Preference"]="PREFERENCE"; -translations["LanguageAndUnits"]="LANG&UNITS"; -translations["Mode"]="MODE"; -translations["OnMapView"]="ON MAP VIEW"; - -//NavigationSettingsPreferences -translations["NavigationSettingsPreferences"]="PREFERENCES"; -translations["CostModel"]="COST MODEL"; -translations["Shortest"]="SHORTEST"; -translations["Fastest"]="FASTEST"; translations["RoutingPreferences"]="ROUTING PREFERENCES"; translations["Ferries"]="FERRIES"; translations["TollRoads"]="TOLL ROADS"; translations["MotorWays"]="MOTORWAYS"; - -//NavigationSettingsLanguageAndUnits -translations["NavigationSettingsLanguageAndUnits"]="言語とユニット"; +translations["CostModel"]="COST MODEL"; +translations["Shortest"]="SHORTEST"; +translations["Fastest"]="FASTEST"; translations["Language"]="言語"; translations["Units"]="ユニット"; +translations["Showroom"]="ショールーム"; +translations["Autoguidance"]="AUTOGUIDE"; +translations["Simulation"]="SIMULATION"; -//NavigationRoute -translations["NavigationRoute"]="ROUTE"; -translations["EnteredLocation"]="ENTERED LOCATION"; -translations["Position"]="POSITION"; -translations["Destination"]="目的地"; -translations["Route"]="ROUTE"; -translations["GoTo"]="GO TO"; - -//NavigationCalculatedRoute -translations["NavigationCalculatedRoute"]="GUIDANCE"; -translations["RouteDistance"]="DISTANCE"; -translations["RouteTime"]="TIME"; -translations["Guidance"]="GUIDANCE"; -translations["DisplayRoute"]="DISPLAY"; -translations["OnMap"]="ON MAP"; -translations["InAList"]="IN A LIST"; -translations["StatusTitle"]="STATUS"; +translations["RouteDistance"]="距離"; +translations["RouteTime"]="時間"; +translations["Guidance"]="ガイダンス"; +translations["DisplayRoute"]="ルート"; +translations["StatusTitle"]="ステータス"; translations["CalculatedRouteInProgress"]="CALCULATION IN PROGRESS"; translations["CalculatedRouteFailed"]="CALCULATION FAILED"; translations["CalculatedRouteSuccess"]="ROUTE AVAILABLE"; -//NavigationRouteDescription -translations["NavigationRouteDescription"]="MANEUVER LIST"; - -//CameraSettings -translations["CameraSettings"]="CAMERA SETTINGS"; - -//Entry -translations["Entry"]="文字入力"; - -//NavigationBrowseMap -translations["NavigationBrowseMap"]="地図を調べる"; -translations["NavigationCurrentStreet"]="現在地"; translations["FSAWarning"]="Refill"; translations["NoGuidance"]="No guidance"; translations["NoManeuver"]="No maneuver"; //CameraSettings -translations["North"]="北緯"; -translations["South"]="南緯"; -translations["East"]="東経"; -translations["West"]="西経"; +translations["North"]="北"; +translations["South"]="南"; +translations["East"]="東"; +translations["West"]="西"; translations["CameraTilt"]="Tilt"; translations["CameraHeight"]="Height"; translations["CameraDistance"]="Dist"; @@ -134,11 +78,6 @@ translations["Join"]="Jo"; translations["Day"]="Da"; translations["Night"]="Ni"; -//NavigationManeuversList -translations["NavigationManeuversList"]="操作表示"; - -//TripComputer -translations["TripComputer"]="TRIP COMPUTER"; translations["AvgSpeed"]="AVG SPEED"; translations["AvgFuel"]="AVG FUEL"; translations["Distance"]="距離"; @@ -147,26 +86,14 @@ translations["TankDistance"]="TANK DISTANCE"; translations["PredictiveTankDistance"]="PREDICTIVE\nTANK DISTANCE"; translations["Reset"]="RESET"; -//POI -translations["POI"]="POINTS OF INTEREST"; -translations["SearchResult"]="結果表"; -translations["SelectedStation"]="SELECTED STATION"; translations["Selected"]="SELECTED"; -translations["SearchForPOI"]="検索"; -translations["Reroute"]="REROUTE"; -translations["DisplayPOI"]="表示"; -//Common texts -translations["Ok"]="OK"; translations["On"]="ON"; translations["Off"]="OFF"; translations["Back"]="BACK"; -translations["Menu"]="MENU"; translations["Cancel"]="キャンセル"; translations["Quit"]="QUIT"; -translations["Showroom"]="SHOWROOM"; -translations["Autoguidance"]="AUTOGUIDE"; translations["Element"]="NAME"; diff --git a/src/hmi/qml/NavigationApp.qml b/src/hmi/qml/NavigationApp.qml index 8df2a5d..c512d39 100644 --- a/src/hmi/qml/NavigationApp.qml +++ b/src/hmi/qml/NavigationApp.qml @@ -56,17 +56,26 @@ ApplicationWindow { id:dbusIf; } + function initScale() + { + var res=Genivi.mapviewer_GetScaleList(dbusIf); + Genivi.scaleList=res[1]; + Genivi.minZoomId=Genivi.scaleList[1][1]; + Genivi.maxZoomId=Genivi.scaleList[Genivi.scaleList.length-1][1]; + } + Component.onCompleted: { //set persistent data Genivi.setlang("eng","USA","Latn"); //set to english US - Genivi.setDefaultPosition(46.202038,6.146845,19); // (rue Jean Calvin Genève) + Genivi.setDefaultPosition(46.202038,6.146845,392); // (rue Jean Calvin Genève) Genivi.setDefaultAddress("Switzerland","Lausanne","Rue de Midi","8"); // preferred address //configure the middleware Genivi.navigationcore_configuration_SetLocale(dbusIf,Genivi.g_language,Genivi.g_country,Genivi.g_script); - //launch the map viewer + //launch the map viewer and init the scale list Genivi.mapviewer_handle(dbusIf,width,height,Genivi.MAPVIEWER_MAIN_MAP); + initScale(); //launch the HMI load("NavigationAppMain"); diff --git a/src/hmi/qml/NavigationAppBrowseMap.qml b/src/hmi/qml/NavigationAppBrowseMap.qml index 0ae8762..4a721b3 100644 --- a/src/hmi/qml/NavigationAppBrowseMap.qml +++ b/src/hmi/qml/NavigationAppBrowseMap.qml @@ -48,8 +48,8 @@ NavigationAppHMIMenu { prev: menub property bool north:false; property int speedValueSent: 0; - property bool displayManeuvers:false; - property double earthRadius: 6371009; + property bool displayManeuvers:false; + property int currentZoomId; //------------------------------------------// // Management of the DBus exchanges @@ -105,9 +105,6 @@ NavigationAppHMIMenu { function guidanceManeuverChanged(args) { Genivi.hookSignal("guidanceManeuverChanged"); - // TODO: Create possibility to poll information? - // console.log("guidanceManeuverChanged"); - // Genivi.dump("",args); maneuverAdvice.text=Genivi.Maneuver[args[1]]; } @@ -115,8 +112,6 @@ NavigationAppHMIMenu { function guidanceWaypointReached(args) { Genivi.hookSignal("guidanceWaypointReached"); - // console.log("guidanceWaypointReached"); - // Genivi.dump("",args); if (args[2]) { maneuverAdvice.text="Destination reached"; } else { @@ -243,16 +238,18 @@ NavigationAppHMIMenu { property Item mapViewScaleChangedSignal; function mapViewScaleChanged(args) { - Genivi.hookSignal("mapViewScaleChanged"); + Genivi.hookSignal("mapViewScaleChanged"); var text=args[3].toString(); - if (args[5] === Genivi.MAPVIEWER_MAX) { + currentZoomId=args[3]; + if(currentZoomId===Genivi.maxZoomId){ text+="*"; - } else { - if (args[5] === Genivi.MAPVIEWER_MIN) + }else{ + if(currentZoomId===Genivi.minZoomId){ text="*"+text; + } } zoomlevel.text=text; - setScale(); + setScale(currentZoomId); } function connectSignals() @@ -665,14 +662,17 @@ NavigationAppHMIMenu { { var res=Genivi.mapviewer_GetMapViewScale(dbusIf); var text=res[1].toString(); - if (res[3] === Genivi.MAPVIEWER_MAX) { + currentZoomId=res[1]; + if(currentZoomId===Genivi.maxZoomId){ text+="*"; - } else { - if (res[3] === Genivi.MAPVIEWER_MIN) + }else{ + if(currentZoomId===Genivi.minZoomId){ text="*"+text; + } } zoomlevel.text=text; - } + setScale(currentZoomId); + } function getManeuversList() { @@ -773,15 +773,34 @@ NavigationAppHMIMenu { Genivi.mapmatchedposition_StartSimulation(dbusIf); } - function setScale() + function setScale(scaleId) { - var res=Genivi.mapviewer_ConvertPixelCoordsToGeoCoords(dbusIf,width/2,height/2); - var latitude=res[3][1][1]; - res=Genivi.mapviewer_ConvertPixelCoordsToGeoCoords(dbusIf,width/2+1,height/2+1); - var deltaLatitude=latitude-res[3][1][1]; - var kilometerPerPixel=earthRadius*Math.sin((deltaLatitude*Math.PI)/360); - //StyleSheetScale.scale_bar[Constants.WIDTH] - console.log(kilometerPerPixel) + for(var index=0;index<Genivi.scaleList.length/2;index++) + { + if(scaleId===Genivi.scaleList[index*2+1][1]) + { + var barLength; + if(Genivi.scaleList[index*2+1][5]===Genivi.MAPVIEWER_METER){ + barLength=(Genivi.scaleList[index*2+1][3]*1000)/Genivi.scaleList[index*2+1][7]; + scale_bar.width=barLength; + right.x=left.x+left.width+scale_bar.width; + scaleValue.text=Genivi.scaleList[index*2+1][3]+" m"; + }else{ + if(Genivi.scaleList[index*2+1][5]===Genivi.MAPVIEWER_KM){ + barLength=(Genivi.scaleList[index*2+1][3]*1000000)/Genivi.scaleList[index*2+1][7]; + scale_bar.width=barLength; + right.x=left.x+left.width+scale_bar.width; + scaleValue.text=Genivi.scaleList[index*2+1][3]+" km"; + } + } + break; + } + + } + + scale_bar.update(); + right.update(); + } function showManeuversList() @@ -996,8 +1015,9 @@ NavigationAppHMIMenu { 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(); + if(currentZoomId>Genivi.minZoomId){ + Genivi.mapviewer_SetMapViewScaleByDelta(dbusIf,1); + } } } @@ -1014,8 +1034,9 @@ NavigationAppHMIMenu { 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(); + if(currentZoomId<Genivi.maxZoomId){ + Genivi.mapviewer_SetMapViewScaleByDelta(dbusIf,-1); + } } } @@ -1548,5 +1569,6 @@ NavigationAppHMIMenu { } } showZoom(); + initScale(); } } diff --git a/src/hmi/qml/NavigationAppPOI.qml b/src/hmi/qml/NavigationAppPOI.qml index 5a4a193..98439cd 100644 --- a/src/hmi/qml/NavigationAppPOI.qml +++ b/src/hmi/qml/NavigationAppPOI.qml @@ -276,8 +276,8 @@ NavigationAppHMIMenu { x:StyleSheet.keyboardArea[Constants.X]; y:StyleSheet.keyboardArea[Constants.Y]; width:StyleSheet.keyboardArea[Constants.WIDTH]; height:StyleSheet.keyboardArea[Constants.HEIGHT]; id: keyboardArea; destination: poiValue; - firstLayout: "ABC"; - secondLayout: "abc"; + firstLayout: Genivi.kbdFirstLayout; + secondLayout: Genivi.kbdSecondLayout; next: select_search; prev: poiKeyboard; onKeypress: { } diff --git a/src/hmi/qml/NavigationAppSearch.qml b/src/hmi/qml/NavigationAppSearch.qml index ccf4a94..5399ee8 100644 --- a/src/hmi/qml/NavigationAppSearch.qml +++ b/src/hmi/qml/NavigationAppSearch.qml @@ -326,8 +326,6 @@ NavigationAppHMIMenu { function routeCalculationFailed(args) { Genivi.hookSignal("routeCalculationFailed"); - //console.log("routeCalculationFailed:"); - //Genivi.dump("",args); statusValue.text=Genivi.gettext("CalculatedRouteFailed"); Genivi.route_calculated = false; @@ -643,7 +641,7 @@ NavigationAppHMIMenu { { spell(''); } else { //there's a bug for street - keyboardArea.setactivekeys('\b'+"aAuUeEbBnNrRsSiIhHfFdDcC(kK otvVgGwWmMOTjJpPlLyYzZqQ*",true); + keyboardArea.activateAllKeys(); listArea.model.clear(); } } @@ -1025,8 +1023,8 @@ NavigationAppHMIMenu { id: keyboardArea; visible: false; destination: countryValue; // by default - firstLayout: "ABC"; - secondLayout: "abc"; + firstLayout: Genivi.kbdFirstLayout; + secondLayout: Genivi.kbdSecondLayout; next: listArea; prev: numberKeyboard; onKeypress: { spell(what); } diff --git a/src/hmi/qml/NavigationAppTokyo.qml b/src/hmi/qml/NavigationAppTokyo.qml index 13beeb4..85bd04d 100644 --- a/src/hmi/qml/NavigationAppTokyo.qml +++ b/src/hmi/qml/NavigationAppTokyo.qml @@ -56,6 +56,14 @@ ApplicationWindow { id:dbusIf; } + function initScale() + { + var res=Genivi.mapviewer_GetScaleList(dbusIf); + Genivi.scaleList=res[1]; + Genivi.minZoomId=Genivi.scaleList[1][1]; + Genivi.maxZoomId=Genivi.scaleList[Genivi.scaleList.length-1][1]; + } + Component.onCompleted: { //set persistent data Genivi.setlang("jpn","JPN","Hrkt"); //set to japanese @@ -65,8 +73,9 @@ ApplicationWindow { Genivi.setDefaultAddress("Japan","東京","井ノ頭通り","17"); // preferred address Genivi.navigationcore_configuration_SetLocale(dbusIf,Genivi.g_language,Genivi.g_country,Genivi.g_script); - //launch the map viewer + //launch the map viewer and init the scale list Genivi.mapviewer_handle(dbusIf,width,height,Genivi.MAPVIEWER_MAIN_MAP); + initScale(); //launch the HMI load("NavigationAppMain"); |