diff options
Diffstat (limited to 'qml/models')
-rw-r--r-- | qml/models/HVACModel.qml | 47 | ||||
-rw-r--r-- | qml/models/TemperatureModel.qml | 28 | ||||
-rw-r--r-- | qml/models/qmldir | 8 |
3 files changed, 83 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; + } +} diff --git a/qml/models/TemperatureModel.qml b/qml/models/TemperatureModel.qml new file mode 100644 index 0000000..85ca415 --- /dev/null +++ b/qml/models/TemperatureModel.qml @@ -0,0 +1,28 @@ +/* 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 + +ListModel { + ListElement { text: "LO" } + ListElement { text: "16\u00b0" } + ListElement { text: "17\u00b0" } + ListElement { text: "18\u00b0" } + ListElement { text: "19\u00b0" } + ListElement { text: "20\u00b0" } + ListElement { text: "21\u00b0" } + ListElement { text: "22\u00b0" } + ListElement { text: "23\u00b0" } + ListElement { text: "24\u00b0" } + ListElement { text: "25\u00b0" } + ListElement { text: "26\u00b0" } + ListElement { text: "27\u00b0" } + ListElement { text: "28\u00b0" } + ListElement { text: "29\u00b0" } + ListElement { text: "HI" } +} diff --git a/qml/models/qmldir b/qml/models/qmldir new file mode 100644 index 0000000..d757168 --- /dev/null +++ b/qml/models/qmldir @@ -0,0 +1,8 @@ +#/* 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/. */ + +singleton HVACModel 1.0 HVACModel.qml +singleton TemperatureModel 1.0 TemperatureModel.qml |