1 /* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved.
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
13 property bool metric: false
15 function mphToKph(value) {
16 return (metric ? 1.60934 : 1 ) * value
19 property real max:Math.ceil(mphToKph(baseMaxSpeed)/30)*30
20 property real baseMaxSpeed: 255
21 property real textSpeed: prop.value
22 property real percentage: textSpeed / max * 100
24 AutomotivePropertyItem {
27 objectName: "VehicleSpeed"
30 Component.onCompleted: prop.connect();
33 Behavior on percentage {