summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMike Krus <mike.krus@kdab.com>2017-04-25 15:14:22 +0100
committerMike Krus <mike.krus@kdab.com>2017-04-28 08:33:53 +0000
commit8a845448d81d3d703fd100633d7f8e6b79a3803e (patch)
treed9c55d64b6bfb6ce7f53044cfcfe302670825deb /examples
parent98fb5b67d171874ac074f39f9958ada02f83cff7 (diff)
downloadqtivi-8a845448d81d3d703fd100633d7f8e6b79a3803e.tar.gz
Sample qface based project
Change-Id: I61567acb3d3be81e175a3a0af50fc04ebedac0e6 Reviewed-by: Dominik Holland <dominik.holland@pelagicore.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/qface-ivi-climate/backend_simulator/backend_simulator.pro61
-rwxr-xr-xexamples/qface-ivi-climate/build.sh77
-rw-r--r--examples/qface-ivi-climate/demo/demo.pro79
-rw-r--r--examples/qface-ivi-climate/demo/main.cpp69
-rw-r--r--examples/qface-ivi-climate/demo/main.qml119
-rw-r--r--examples/qface-ivi-climate/demo/qml.qrc5
-rw-r--r--examples/qface-ivi-climate/frontend/frontend.pro54
-rw-r--r--examples/qface-ivi-climate/qface-ivi-climate.pro59
-rw-r--r--examples/qface-ivi-climate/qface-ivi-climate.qface121
-rw-r--r--examples/qface-ivi-climate/qface-ivi-climate.yaml64
10 files changed, 708 insertions, 0 deletions
diff --git a/examples/qface-ivi-climate/backend_simulator/backend_simulator.pro b/examples/qface-ivi-climate/backend_simulator/backend_simulator.pro
new file mode 100644
index 0000000..53b64de
--- /dev/null
+++ b/examples/qface-ivi-climate/backend_simulator/backend_simulator.pro
@@ -0,0 +1,61 @@
+# Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB).
+# Contact: https://www.qt.io/licensing/
+#
+# This file is part of the QtIvi module of the Qt Toolkit.
+#
+# $QT_BEGIN_LICENSE:BSD-QTAS$
+# Commercial License Usage
+# Licensees holding valid commercial Qt Automotive Suite licenses may use
+# this file in accordance with the commercial license agreement provided
+# with the Software or, alternatively, in accordance with the terms
+# contained in a written agreement between you and The Qt Company. For
+# licensing terms and conditions see https://www.qt.io/terms-conditions.
+# For further information use the contact form at https://www.qt.io/contact-us.
+#
+# BSD License Usage
+# Alternatively, you may use this file under the terms of the BSD license
+# as follows:
+#
+# "Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of The Qt Company Ltd nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+#
+# $QT_END_LICENSE$
+#
+# SPDX-License-Identifier: BSD-3-Clause
+
+TEMPLATE=lib
+TARGET = example_ivi_climate
+LIBS += -L../frontend -lQtIviClimateExample
+
+CONFIG += warn_off
+INCLUDEPATH += ../frontend
+PLUGIN_TYPE = qtivi
+PLUGIN_EXTENDS = qtivi
+PLUGIN_CLASS_NAME = ClimatePlugin
+
+QT += core ivicore
+
+include(example-ivi-climate.pri)
diff --git a/examples/qface-ivi-climate/build.sh b/examples/qface-ivi-climate/build.sh
new file mode 100755
index 0000000..1f6dfba
--- /dev/null
+++ b/examples/qface-ivi-climate/build.sh
@@ -0,0 +1,77 @@
+#!/bin/bash -e
+
+# Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB).
+# Contact: https://www.qt.io/licensing/
+#
+# This file is part of the QtIvi module of the Qt Toolkit.
+#
+# $QT_BEGIN_LICENSE:BSD-QTAS$
+# Commercial License Usage
+# Licensees holding valid commercial Qt Automotive Suite licenses may use
+# this file in accordance with the commercial license agreement provided
+# with the Software or, alternatively, in accordance with the terms
+# contained in a written agreement between you and The Qt Company. For
+# licensing terms and conditions see https://www.qt.io/terms-conditions.
+# For further information use the contact form at https://www.qt.io/contact-us.
+#
+# BSD License Usage
+# Alternatively, you may use this file under the terms of the BSD license
+# as follows:
+#
+# "Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of The Qt Company Ltd nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+#
+# $QT_END_LICENSE$
+#
+# SPDX-License-Identifier: BSD-3-Clause
+
+# A die helper function
+# $1: The exit message
+# $2: The exit code
+die() {
+ echo "${1}"
+ exit ${2}
+}
+
+WORKDIR=$(dirname $0)
+GENERATOR=${WORKDIR}/../../src/ivicore/qface/generate.py
+test -x ${GENERATOR} || die "${GENERATOR} does not exists or can't be executed" 1
+out_dir=${WORKDIR}
+idlfile=qface-ivi-climate
+/bin/rm -rf ${out_dir}/frontend/*.{h,cpp,pri}
+/bin/rm -rf ${out_dir}/backend_simulator/*.{h,cpp,pri}
+${GENERATOR} --format=frontend ${WORKDIR}/${idlfile}.qface ${out_dir}/frontend || die "Generator failed" 1
+${GENERATOR} --format=backend_simulator ${WORKDIR}/${idlfile}.qface ${out_dir}/backend_simulator || die "Generator for backend failed" 1
+test -d build && /bin/rm -rf build
+test -d build && die "Cannot remove existing build folder" 1
+mkdir -p build || die "Cannot create build folder" 1
+pushd build
+project_dir=..
+qmake ${project_dir}/${idlfile}.pro || die "Failed to run qmake" 1
+make || die "Failed to build" 1
+popd
+
+die "All OK" 0
diff --git a/examples/qface-ivi-climate/demo/demo.pro b/examples/qface-ivi-climate/demo/demo.pro
new file mode 100644
index 0000000..deff433
--- /dev/null
+++ b/examples/qface-ivi-climate/demo/demo.pro
@@ -0,0 +1,79 @@
+# Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB).
+# Contact: https://www.qt.io/licensing/
+#
+# This file is part of the QtIvi module of the Qt Toolkit.
+#
+# $QT_BEGIN_LICENSE:BSD-QTAS$
+# Commercial License Usage
+# Licensees holding valid commercial Qt Automotive Suite licenses may use
+# this file in accordance with the commercial license agreement provided
+# with the Software or, alternatively, in accordance with the terms
+# contained in a written agreement between you and The Qt Company. For
+# licensing terms and conditions see https://www.qt.io/terms-conditions.
+# For further information use the contact form at https://www.qt.io/contact-us.
+#
+# BSD License Usage
+# Alternatively, you may use this file under the terms of the BSD license
+# as follows:
+#
+# "Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of The Qt Company Ltd nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+#
+# $QT_END_LICENSE$
+#
+# SPDX-License-Identifier: BSD-3-Clause
+
+TEMPLATE = app
+
+QT += qml quick
+CONFIG += c++11
+
+LIBS += -L../frontend -lQtIviClimateExample
+INCLUDEPATH += ../frontend
+
+SOURCES += main.cpp
+
+RESOURCES += qml.qrc
+
+# Additional import path used to resolve QML modules in Qt Creator's code model
+QML_IMPORT_PATH =
+
+# Additional import path used to resolve QML modules just for Qt Quick Designer
+QML_DESIGNER_IMPORT_PATH =
+
+# The following define makes your compiler emit warnings if you use
+# any feature of Qt which as been marked deprecated (the exact warnings
+# depend on your compiler). Please consult the documentation of the
+# deprecated API in order to know how to port your code away from it.
+DEFINES += QT_DEPRECATED_WARNINGS
+
+# You can also make your code fail to compile if you use deprecated APIs.
+# In order to do so, uncomment the following line.
+# You can also select to disable deprecated APIs only up to a certain version of Qt.
+#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
+
+target.path = $$[QT_INSTALL_EXAMPLES]/qface/demo
+INSTALLS += target
diff --git a/examples/qface-ivi-climate/demo/main.cpp b/examples/qface-ivi-climate/demo/main.cpp
new file mode 100644
index 0000000..245bb26
--- /dev/null
+++ b/examples/qface-ivi-climate/demo/main.cpp
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtIvi module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: BSD-3-Clause
+**
+****************************************************************************/
+
+#include <QGuiApplication>
+#include <QQmlApplicationEngine>
+
+#include <climatemodule.h>
+
+int main(int argc, char *argv[])
+{
+ QGuiApplication app(argc, argv);
+
+ ClimateModule::registerTypes();
+ ClimateModule::registerQmlTypes(QLatin1String("IviClimate"), 1, 0);
+
+ QQmlApplicationEngine engine;
+ engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
+
+ return app.exec();
+}
diff --git a/examples/qface-ivi-climate/demo/main.qml b/examples/qface-ivi-climate/demo/main.qml
new file mode 100644
index 0000000..ad496d9
--- /dev/null
+++ b/examples/qface-ivi-climate/demo/main.qml
@@ -0,0 +1,119 @@
+/****************************************************************************
+**
+** Copyright (C) 2017 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the QtIvi module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** BSD License Usage
+** Alternatively, you may use this file under the terms of the BSD license
+** as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of The Qt Company Ltd nor the names of its
+** contributors may be used to endorse or promote products derived
+** from this software without specific prior written permission.
+**
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+**
+** $QT_END_LICENSE$
+**
+** SPDX-License-Identifier: BSD-3-Clause
+**
+****************************************************************************/
+
+import QtQuick 2.7
+import QtQuick.Window 2.2
+import IviClimate 1.0
+
+Window {
+ visible: true
+ width: 640
+ height: 480
+ title: qsTr("QtIVI Climate")
+
+ ClimateControl {
+ id: climateCtrl
+ }
+
+ Column {
+ anchors.fill: parent
+ anchors.margins: 5
+
+ Text {
+ text: "Air Conditioning: " + climateCtrl.airConditioning
+ }
+ Text {
+ text: "Heater: " + climateCtrl.heater
+ }
+ Text {
+ text: "Fan Speed Level: " + climateCtrl.fanSpeedLevel
+ }
+ Text {
+ text: "Steering Wheel Heater: " + climateCtrl.steeringWheelHeater
+ }
+ Text {
+ text: "Target Temperature: " + climateCtrl.targetTemperature
+ }
+ Text {
+ text: "Seat Cooler: " + climateCtrl.seatCooler
+ }
+ Text {
+ text: "Seat Heater: " + climateCtrl.seatHeater
+ }
+ Text {
+ text: "Outside Temperature: " + climateCtrl.outsideTemperature
+ }
+ Text {
+ text: "Zone Synchronization: " + climateCtrl.zoneSynchronization
+ }
+ Text {
+ text: "Defrost: " + climateCtrl.defrost
+ }
+ Text {
+ property var vals: ["Off", "On", "Auto"]
+ text: "Recirculation Mode: " + vals[climateCtrl.recirculationMode]
+ }
+ Text {
+ text: "Recirculation: " + climateCtrl.recirculation
+ }
+ Text {
+ text: "Recirculation Sensitivity Level: " + climateCtrl.recirculationSensitivityLevel
+ }
+ Text {
+ property var vals: ["Off", "On", "Auto"]
+ text: "Climate Mode: " + vals[climateCtrl.climateMode]
+ }
+ Text {
+ text: "Automatic Climate Fan Intensity Level: " + climateCtrl.automaticClimateFanIntensityLevel
+ }
+ }
+}
diff --git a/examples/qface-ivi-climate/demo/qml.qrc b/examples/qface-ivi-climate/demo/qml.qrc
new file mode 100644
index 0000000..5f6483a
--- /dev/null
+++ b/examples/qface-ivi-climate/demo/qml.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/">
+ <file>main.qml</file>
+ </qresource>
+</RCC>
diff --git a/examples/qface-ivi-climate/frontend/frontend.pro b/examples/qface-ivi-climate/frontend/frontend.pro
new file mode 100644
index 0000000..36dda15
--- /dev/null
+++ b/examples/qface-ivi-climate/frontend/frontend.pro
@@ -0,0 +1,54 @@
+# Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB).
+# Contact: https://www.qt.io/licensing/
+#
+# This file is part of the QtIvi module of the Qt Toolkit.
+#
+# $QT_BEGIN_LICENSE:BSD-QTAS$
+# Commercial License Usage
+# Licensees holding valid commercial Qt Automotive Suite licenses may use
+# this file in accordance with the commercial license agreement provided
+# with the Software or, alternatively, in accordance with the terms
+# contained in a written agreement between you and The Qt Company. For
+# licensing terms and conditions see https://www.qt.io/terms-conditions.
+# For further information use the contact form at https://www.qt.io/contact-us.
+#
+# BSD License Usage
+# Alternatively, you may use this file under the terms of the BSD license
+# as follows:
+#
+# "Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of The Qt Company Ltd nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+#
+# $QT_END_LICENSE$
+#
+# SPDX-License-Identifier: BSD-3-Clause
+
+TARGET = QtIviClimateExample
+TEMPLATE = lib
+
+QT += ivicore ivicore-private qml quick
+
+include(example-ivi-climate.pri)
diff --git a/examples/qface-ivi-climate/qface-ivi-climate.pro b/examples/qface-ivi-climate/qface-ivi-climate.pro
new file mode 100644
index 0000000..417dbc4
--- /dev/null
+++ b/examples/qface-ivi-climate/qface-ivi-climate.pro
@@ -0,0 +1,59 @@
+# Copyright (C) 2017 Klaralvdalens Datakonsult AB (KDAB).
+# Contact: https://www.qt.io/licensing/
+#
+# This file is part of the QtIvi module of the Qt Toolkit.
+#
+# $QT_BEGIN_LICENSE:BSD-QTAS$
+# Commercial License Usage
+# Licensees holding valid commercial Qt Automotive Suite licenses may use
+# this file in accordance with the commercial license agreement provided
+# with the Software or, alternatively, in accordance with the terms
+# contained in a written agreement between you and The Qt Company. For
+# licensing terms and conditions see https://www.qt.io/terms-conditions.
+# For further information use the contact form at https://www.qt.io/contact-us.
+#
+# BSD License Usage
+# Alternatively, you may use this file under the terms of the BSD license
+# as follows:
+#
+# "Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of The Qt Company Ltd nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+#
+# $QT_END_LICENSE$
+#
+# SPDX-License-Identifier: BSD-3-Clause
+
+TEMPLATE = subdirs
+
+SUBDIRS = frontend \
+ backend_simulator \
+ demo
+
+CONFIG += ordered
+
+OTHER_FILES += \
+ qface-ivi-climate.qface \
+ qface-ivi-climate.yaml
diff --git a/examples/qface-ivi-climate/qface-ivi-climate.qface b/examples/qface-ivi-climate/qface-ivi-climate.qface
new file mode 100644
index 0000000..9e38460
--- /dev/null
+++ b/examples/qface-ivi-climate/qface-ivi-climate.qface
@@ -0,0 +1,121 @@
+module example.ivi.climate 1.0;
+
+/**
+ * The ClimateControl provides a QML interface to the climate control
+ * of the vehicle.
+ */
+@config: { zoned: true, id: "example.qtivi.ClimateControl/1.0" }
+interface ClimateControl {
+ /**
+ * @brief Value is true if the air conditioning is enabled.
+ */
+ bool airConditioning;
+ /**
+ * @brief value is true if the heater is enabled.
+ */
+ bool heater;
+ /**
+ * @brief value holds the fan speed level, where the level can be between
+ * minimumValue(off) to maximumValue (strongest).
+ */
+ int fanSpeedLevel;
+ /**
+ * @brief value holds the steering wheel heater level, where the level can
+ * be between minimumValue(off) to maximumValue (warmest).
+ */
+ int steeringWheelHeater;
+ /**
+ * @brief value holds the target temperature of the zone expressed
+ * in centigrades, where the temperature can be between
+ * minimumValue(coolest) to maximumValue (warmest).
+ */
+ int targetTemperature;
+ /**
+ * @brief value holds the seat cooler level, where the level can be
+ * between minimumValue(off) to maximumValue (coolest).
+ */
+ int seatCooler;
+ /**
+ * @brief value holds the seat heater level, where the level can be between
+ * minimumValue(off) to maximumValue (warmest).
+ */
+ int seatHeater;
+ /**
+ * @brief value holds the outside temperature of the zone expressed in
+ * centigrades, where the temperature can be between
+ * minimumValue(coolest) to maximumValue (warmest).
+ */
+ int outsideTemperature;
+ /**
+ * @brief value is true if the zone synchronization is enabled.
+ *
+ * Which zones and properties are synchronized is controlled
+ * by the backend implementing it.
+ */
+ bool zoneSynchronization;
+ /**
+ * @brief value is true if defrost is enabled. Usually that means that the fans
+ * are on the highest level to remove ice from the windshield.
+ */
+ bool defrost;
+ /**
+ * @brief value holds the recirculation mode
+ */
+ RecirculationMode recirculationMode;
+ /**
+ * @brief value is true if the recirculation is currently running.
+ */
+ bool recirculation;
+ /**
+ * @brief value holds the sensitivity level of the recirculation
+ * system when the recirculationMode is set to AutoRecirculation,
+ * where the level can be between minimumValue(least sensitive)
+ * to maximumValue(most sensitive).
+ */
+ int recirculationSensitivityLevel;
+ /**
+ * @brief value holds the climate mode
+ */
+ ClimateMode climateMode;
+ /**
+ * @brief value holds the intensity level of the fan when the climateMode
+ * is set to AutoClimate, where the level can be between
+ * minimumValue(least intensity) to maximumValue(most intensity).
+ */
+ int automaticClimateFanIntensityLevel;
+ /**
+ * @brief value holds the combination of flags indicating the areas
+ * where airflow is on.
+ */
+ AirflowDirection airflowDirections;
+}
+
+/**
+ * Control where the airflow goes
+ */
+flag AirflowDirection {
+ /**
+ * Airflow to the windshield
+ */
+ Windshield = 1,
+ /**
+ * Airflow to the dashboard
+ */
+ Dashboard = 2,
+ /**
+ * Airflow to the floor
+ */
+ Floor = 4
+}
+
+enum RecirculationMode {
+ RecirculationOff = 0x0,
+ RecirculationOn = 0x1,
+ AutoRecirculation = 0x2
+}
+
+enum ClimateMode {
+ ClimateOff = 0x0,
+ ClimateOn = 0x1,
+ AutoClimate = 0x2
+}
diff --git a/examples/qface-ivi-climate/qface-ivi-climate.yaml b/examples/qface-ivi-climate/qface-ivi-climate.yaml
new file mode 100644
index 0000000..71c8e2e
--- /dev/null
+++ b/examples/qface-ivi-climate/qface-ivi-climate.yaml
@@ -0,0 +1,64 @@
+example.ivi.climate.ClimateControl:
+ config_simulator:
+ zones: { left : FrontLeft, right : FrontRight, rear: Rear }
+
+example.ivi.climate.ClimateControl#airConditioning:
+ config_simulator:
+ default_value: true
+
+example.ivi.climate.ClimateControl#heater:
+ config_simulator:
+ default_value: true
+
+example.ivi.climate.ClimateControl#recirculation:
+ config_simulator:
+ default_value: false
+
+example.ivi.climate.ClimateControl#zoneSynchronization:
+ config_simulator:
+ default_value: false
+
+example.ivi.climate.ClimateControl#defrost:
+ config_simulator:
+ default_value: false
+
+example.ivi.climate.ClimateControl#steeringWheelHeater:
+ config_simulator:
+ default_value: 0
+
+example.ivi.climate.ClimateControl#fanSpeedLevel:
+ config_simulator:
+ default_value: 2
+ range_high: 50
+ range_low: 0
+
+example.ivi.climate.ClimateControl#recirculationMode:
+ config_simulator:
+ default_value: RecirculationMode.RecirculationOff
+
+example.ivi.climate.ClimateControl#recirculationSensitivityLevel:
+ config_simulator:
+ unsupported: true
+ default_value: 0
+
+example.ivi.climate.ClimateControl#climateMode:
+ config_simulator:
+ unsupported: true
+ default_value: ClimateMode.ClimateOn
+
+example.ivi.climate.ClimateControl#automaticClimateFanIntensityLevel:
+ config_simulator:
+ unsupported: true
+ default_value: 0
+
+example.ivi.climate.ClimateControl#targetTemperature:
+ config_simulator:
+ default_value: 0
+
+example.ivi.climate.ClimateControl#seatCooler:
+ config_simulator:
+ default_value: 0
+
+example.ivi.climate.ClimateControl#seatHeater:
+ config_simulator:
+ default_value: 0