diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2016-11-24 17:41:34 +0100 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2016-11-24 17:41:34 +0100 |
commit | 85f44017fb18205133d369bf16c5d0022984c510 (patch) | |
tree | e450a257b95e9c60defdfbe851edfdfa820c583a /qml/models/HVACModel.qml | |
parent | b20eed56b0d712ea59a5f237eb933787e3fdf45d (diff) |
Convert amb hvac plugin to app framework bindings
Change-Id: I7e67c653c7da219beb645d752fb7afca2c968de5
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'qml/models/HVACModel.qml')
-rw-r--r-- | qml/models/HVACModel.qml | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/qml/models/HVACModel.qml b/qml/models/HVACModel.qml new file mode 100644 index 0000000..e737af4 --- /dev/null +++ b/qml/models/HVACModel.qml @@ -0,0 +1,47 @@ +/* Copyright (C) 2015, Jaguar Land Rover. All Rights Reserved. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, 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/. */ + +pragma Singleton + +import QtQuick 2.0 +import vehicle 1.0 + +Item { + property bool fanUp: false + property bool fanRight: false + property bool fanDown: false + + property bool fanAC: false + property bool fanAuto: false + property bool fanRecirc: false + + property real fanSpeed: 0 + + property bool defrostMax: false + property bool defrostFront: false + property bool defrostRear: false + + property real leftTemperature: 0 + property real rightTemperature: 0 + + property int leftSeatHeat: 0 + property int rightSeatHeat: 0 + + onFanSpeedChanged: { + var currentFan = ClimateModel.getRangeValue(fanSpeed,ClimateModel.fanStepSize); + ClimateModel.fanSpeed = currentFan; + } + + onLeftTemperatureChanged: { + var temperature = ClimateModel.getRangeValue(leftTemperature,ClimateModel.temperatureStepSize); + ClimateModel.leftTemp = temperature; + } + + onRightTemperatureChanged: { + var temperature = ClimateModel.getRangeValue(rightTemperature,ClimateModel.temperatureStepSize); + ClimateModel.rightTemp = temperature; + } +} |