/** * @licence app begin@ * SPDX-License-Identifier: MPL-2.0 * * \copyright Copyright (C) 2013-2014, PCA Peugeot Citroen * * \file NavigationSettingsPreferences.qml * * \brief This file is part of the navigation hmi. * * \author Martin Schaller * \author Philippe Colliot * * \version 1.1 * * This Source Code Form is subject to the terms of the * Mozilla Public License (MPL), v. 2.0. * If a copy of the MPL was not distributed with this file, * You can obtain one at http://mozilla.org/MPL/2.0/. * * For further information see http://www.genivi.org/. * * List of changes: * 2014-03-05, Philippe Colliot, migration to the new HMI design * , , * * @licence end@ */ import QtQuick 2.1 import "Core" import "Core/genivi.js" as Genivi; import "Core/style-sheets/style-constants.js" as Constants; import "Core/style-sheets/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