aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--examples/vehiclefunctions/climate_qml/main.qml7
-rw-r--r--examples/vehiclefunctions/climate_widget/mainwindow.cpp27
-rw-r--r--examples/vehiclefunctions/climate_widget/mainwindow.h4
-rw-r--r--src/ivivehiclefunctions/qtiviclimatecontrol.cpp976
-rw-r--r--src/ivivehiclefunctions/qtiviclimatecontrol.h95
-rw-r--r--src/ivivehiclefunctions/qtiviclimatecontrol_p.h45
-rw-r--r--src/ivivehiclefunctions/qtiviclimatecontrolbackendinterface.cpp251
-rw-r--r--src/ivivehiclefunctions/qtiviclimatecontrolbackendinterface.h26
-rw-r--r--src/plugins/ivivehiclefunctions/climate_simulator/climatecontrolbackend.cpp91
-rw-r--r--src/plugins/ivivehiclefunctions/climate_simulator/climatecontrolbackend.h14
-rw-r--r--tests/auto/vehiclefunctions/climatecontroltest/tst_climatecontroltest.cpp217
11 files changed, 1516 insertions, 237 deletions
diff --git a/examples/vehiclefunctions/climate_qml/main.qml b/examples/vehiclefunctions/climate_qml/main.qml
index 7776b01..68c11ae 100644
--- a/examples/vehiclefunctions/climate_qml/main.qml
+++ b/examples/vehiclefunctions/climate_qml/main.qml
@@ -139,10 +139,13 @@ ApplicationWindow {
CheckBox {
text: "Air Recirculation"
- checked: climateControl.airRecirculation.value
+ checked: climateControl.recirculationMode.value === ClimateControl.RecirculationOn
enabled: climateControl.airRecirculation.available
onClicked: {
- climateControl.airRecirculation.value = checked
+ if (checked)
+ climateControl.recirculationMode.value = ClimateControl.RecirculationOn
+ else
+ climateControl.recirculationMode.value = ClimateControl.RecirculationOff
}
}
diff --git a/examples/vehiclefunctions/climate_widget/mainwindow.cpp b/examples/vehiclefunctions/climate_widget/mainwindow.cpp
index 66ac611..343a83e 100644
--- a/examples/vehiclefunctions/climate_widget/mainwindow.cpp
+++ b/examples/vehiclefunctions/climate_widget/mainwindow.cpp
@@ -101,14 +101,14 @@ MainWindow::MainWindow(QWidget *parent) :
m_climateControl, &QtIVIClimateControl::setAirConditioningEnabled);
//Air Recirculation
- ui->cb_airRecirculation->setChecked(m_climateControl->isAirRecirculationEnabled());
- ui->cb_airRecirculation->setEnabled(m_climateControl->airRecirculationAttribute().isAvailable());
- connect(m_climateControl, &QtIVIClimateControl::airRecirculationEnabledChanged,
- ui->cb_airRecirculation, &QCheckBox::setChecked);
- connect(m_climateControl, &QtIVIClimateControl::airRecirculationAttributeChanged,
+ ui->cb_airRecirculation->setChecked(m_climateControl->recirculationMode() == QtIVIClimateControl::RecirculationOn);
+ ui->cb_airRecirculation->setEnabled(m_climateControl->recirculationModeAttribute().isAvailable());
+ connect(m_climateControl, &QtIVIClimateControl::recirculationModeChanged,
+ this, &MainWindow::onAirRecirculationModeChanged);
+ connect(m_climateControl, &QtIVIClimateControl::recirculationModeAttributeChanged,
this, &MainWindow::onAirRecirculationAttributeChanged);
connect(ui->cb_airRecirculation, &QCheckBox::clicked,
- m_climateControl, &QtIVIClimateControl::setAirRecirculationEnabled);
+ this, &MainWindow::setAirRecirculationEnabled);
//Heater
ui->cb_heater->setChecked(m_climateControl->isHeaterEnabled());
@@ -127,7 +127,20 @@ MainWindow::~MainWindow()
delete ui;
}
-void MainWindow::onAirRecirculationAttributeChanged(const QtIVIPropertyAttribute<bool> & attribute)
+void MainWindow::setAirRecirculationEnabled(bool enabled)
+{
+ if (enabled)
+ m_climateControl->setRecirculationMode(QtIVIClimateControl::RecirculationOn);
+ else
+ m_climateControl->setRecirculationMode(QtIVIClimateControl::RecirculationOff);
+}
+
+void MainWindow::onAirRecirculationModeChanged(QtIVIClimateControl::RecirculationMode mode)
+{
+ ui->cb_airRecirculation->setChecked(mode == QtIVIClimateControl::RecirculationOn);
+}
+
+void MainWindow::onAirRecirculationAttributeChanged(const QtIVIPropertyAttribute<QtIVIClimateControl::RecirculationMode> & attribute)
{
ui->cb_airRecirculation->setEnabled(attribute.isAvailable());
}
diff --git a/examples/vehiclefunctions/climate_widget/mainwindow.h b/examples/vehiclefunctions/climate_widget/mainwindow.h
index 65d936a..81564bd 100644
--- a/examples/vehiclefunctions/climate_widget/mainwindow.h
+++ b/examples/vehiclefunctions/climate_widget/mainwindow.h
@@ -74,7 +74,9 @@ public:
~MainWindow();
private slots:
- void onAirRecirculationAttributeChanged(const QtIVIPropertyAttribute<bool> &attribute);
+ void setAirRecirculationEnabled(bool enabled);
+ void onAirRecirculationModeChanged(QtIVIClimateControl::RecirculationMode mode);
+ void onAirRecirculationAttributeChanged(const QtIVIPropertyAttribute<QtIVIClimateControl::RecirculationMode> &attribute);
void onHeaterAttributeChanged(const QtIVIPropertyAttribute<bool> &attribute);
void onAirConditioningAttributeChanged(const QtIVIPropertyAttribute<bool> &attribute);
void setupFlowDirectionRadioButtons(QtIVIClimateControl::AirflowDirections direction);
diff --git a/src/ivivehiclefunctions/qtiviclimatecontrol.cpp b/src/ivivehiclefunctions/qtiviclimatecontrol.cpp
index 07028c9..ec49b60 100644
--- a/src/ivivehiclefunctions/qtiviclimatecontrol.cpp
+++ b/src/ivivehiclefunctions/qtiviclimatecontrol.cpp
@@ -49,12 +49,19 @@ QtIVIClimateControlPrivate::QtIVIClimateControlPrivate(const QString &interface,
, m_airflowDirections(0)
, m_airConditioning(false)
, m_heater(false)
- , m_airRecirculation(false)
, m_targetTemperature(0)
, m_seatCooler(0)
, m_seatHeater(0)
, m_steeringWheelHeater(0)
, m_fanSpeedLevel(0)
+ , m_outsideTemperature(0)
+ , m_zoneSynchronization(false)
+ , m_defrost(false)
+ , m_recirculationMode(QtIVIClimateControl::RecirculationOff)
+ , m_recirculation(false)
+ , m_recirculationSensitivityLevel(-1)
+ , m_climateMode(QtIVIClimateControl::ClimateOff)
+ , m_automaticClimateFanIntensityLevel(0)
, q_ptr(parent)
{
}
@@ -80,12 +87,6 @@ void QtIVIClimateControlPrivate::init()
&QtIVIClimateControl::isHeaterEnabled,
&QtIVIClimateControl::heaterEnabledChanged,
&QtIVIClimateControl::setHeaterEnabled);
- m_airRecirculationProperty = QtIVIPropertyFactory<bool>::create(q,
- &QtIVIClimateControl::airRecirculationAttribute,
- &QtIVIClimateControl::airRecirculationAttributeChanged,
- &QtIVIClimateControl::isAirRecirculationEnabled,
- &QtIVIClimateControl::airRecirculationEnabledChanged,
- &QtIVIClimateControl::setAirRecirculationEnabled);
m_targetTemperatureProperty = QtIVIPropertyFactory<int>::create(q,
&QtIVIClimateControl::targetTemperatureAttribute,
&QtIVIClimateControl::targetTemperatureAttributeChanged,
@@ -116,18 +117,78 @@ void QtIVIClimateControlPrivate::init()
&QtIVIClimateControl::fanSpeedLevel,
&QtIVIClimateControl::fanSpeedLevelChanged,
&QtIVIClimateControl::setFanSpeedLevel);
+ m_outsideTemperatureProperty = QtIVIPropertyFactory<int>::create(q,
+ &QtIVIClimateControl::outsideTemperatureAttribute,
+ &QtIVIClimateControl::outsideTemperatureAttributeChanged,
+ &QtIVIClimateControl::outsideTemperature,
+ &QtIVIClimateControl::outsideTemperatureChanged);
+
+ m_zoneSynchronizationProperty = QtIVIPropertyFactory<bool>::create(q,
+ &QtIVIClimateControl::zoneSynchronizationAttribute,
+ &QtIVIClimateControl::zoneSynchronizationAttributeChanged,
+ &QtIVIClimateControl::isZoneSynchronizationEnabled,
+ &QtIVIClimateControl::zoneSynchronizationEnabledChanged,
+ &QtIVIClimateControl::setZoneSynchronizationEnabled);
+
+ m_defrostProperty = QtIVIPropertyFactory<bool>::create(q,
+ &QtIVIClimateControl::defrostAttribute,
+ &QtIVIClimateControl::defrostAttributeChanged,
+ &QtIVIClimateControl::isDefrostEnabled,
+ &QtIVIClimateControl::defrostEnabledChanged,
+ &QtIVIClimateControl::setDefrostEnabled);
+
+ m_recirculationModeProperty = QtIVIPropertyFactory<QtIVIClimateControl::RecirculationMode>::create(q,
+ &QtIVIClimateControl::recirculationModeAttribute,
+ &QtIVIClimateControl::recirculationModeAttributeChanged,
+ &QtIVIClimateControl::recirculationMode,
+ &QtIVIClimateControl::recirculationModeChanged,
+ &QtIVIClimateControl::setRecirculationMode);
+
+ m_recirculationProperty = QtIVIPropertyFactory<bool>::create(q,
+ &QtIVIClimateControl::recirculationAttribute,
+ &QtIVIClimateControl::recirculationAttributeChanged,
+ &QtIVIClimateControl::isRecirculationEnabled,
+ &QtIVIClimateControl::recirculationEnabledChanged);
+
+ m_recirculationSensitivityLevelProperty = QtIVIPropertyFactory<int>::create(q,
+ &QtIVIClimateControl::recirculationSensitivityLevelAttribute,
+ &QtIVIClimateControl::recirculationSensitivityLevelAttributeChanged,
+ &QtIVIClimateControl::recirculationSensitivityLevel,
+ &QtIVIClimateControl::recirculationSensitivityLevelChanged,
+ &QtIVIClimateControl::setRecirculationSensitivityLevel);
+
+ m_climateModeProperty = QtIVIPropertyFactory<QtIVIClimateControl::ClimateMode>::create(q,
+ &QtIVIClimateControl::climateModeAttribute,
+ &QtIVIClimateControl::climateModeAttributeChanged,
+ &QtIVIClimateControl::climateMode,
+ &QtIVIClimateControl::climateModeChanged,
+ &QtIVIClimateControl::setClimateMode);
+
+ m_automaticClimateFanIntensityLevelProperty = QtIVIPropertyFactory<int>::create(q,
+ &QtIVIClimateControl::automaticClimateFanIntensityLevelAttribute,
+ &QtIVIClimateControl::automaticClimateFanIntensityLevelAttributeChanged,
+ &QtIVIClimateControl::automaticClimateFanIntensityLevel,
+ &QtIVIClimateControl::automaticClimateFanIntensityLevelChanged,
+ &QtIVIClimateControl::setAutomaticClimateFanIntensityLevel);
}
void QtIVIClimateControlPrivate::clearToDefaults()
{
m_airConditioning = false;
m_heater = false;
- m_airRecirculation = false;
m_targetTemperature = 0;
m_seatCooler = 0;
m_seatHeater = 0;
m_steeringWheelHeater = 0;
m_fanSpeedLevel = 0;
+ m_outsideTemperature = 0;
+ m_zoneSynchronization = false;
+ m_defrost = false;
+ m_recirculationMode = QtIVIClimateControl::RecirculationOff;
+ m_recirculation = false;
+ m_recirculationSensitivityLevel = -1;
+ m_climateMode = QtIVIClimateControl::ClimateOff;
+ m_automaticClimateFanIntensityLevel = 0;
}
void QtIVIClimateControlPrivate::onAirflowDirectionsChanged(QtIVIClimateControl::AirflowDirections value, const QString &zone)
@@ -202,30 +263,6 @@ void QtIVIClimateControlPrivate::onHeaterAttributeChanged(const QtIVIPropertyAtt
emit f->heaterAttributeChanged(heaterEnabledAttribute);
}
-void QtIVIClimateControlPrivate::onAirRecirculationEnabledChanged(bool enabled, const QString &zone)
-{
- Q_Q(QtIVIClimateControl);
- QtIVIClimateControl *f = qobject_cast<QtIVIClimateControl*>(q->zoneAt(zone));
- if (!f)
- f = q;
- if (f->zone() != zone)
- return;
- f->d_func()->m_airRecirculation = enabled;
- emit f->airRecirculationEnabledChanged(enabled);
-}
-
-void QtIVIClimateControlPrivate::onAirRecirculationAttributeChanged(const QtIVIPropertyAttribute<bool> &airRecirculationEnabledAttribute, const QString &zone)
-{
- Q_Q(QtIVIClimateControl);
- QtIVIClimateControl *f = qobject_cast<QtIVIClimateControl*>(q->zoneAt(zone));
- if (!f)
- f = q;
- if (f->zone() != zone)
- return;
- f->d_func()->m_airRecirculationAttribute = airRecirculationEnabledAttribute;
- emit f->airRecirculationAttributeChanged(airRecirculationEnabledAttribute);
-}
-
void QtIVIClimateControlPrivate::onSteeringWheelHeaterChanged(int value, const QString &zone)
{
Q_Q(QtIVIClimateControl);
@@ -346,6 +383,198 @@ void QtIVIClimateControlPrivate::onSeatHeaterAttributeChanged(const QtIVIPropert
emit f->seatHeaterAttributeChanged(seatHeaterAttribute);
}
+void QtIVIClimateControlPrivate::onOutsideTemperatureChanged(int outsideTemperature, const QString &zone)
+{
+ Q_Q(QtIVIClimateControl);
+ QtIVIClimateControl *f = qobject_cast<QtIVIClimateControl*>(q->zoneAt(zone));
+ if (!f)
+ f = q;
+ if (f->zone() != zone)
+ return;
+ f->d_func()->m_outsideTemperature = outsideTemperature;
+ emit f->outsideTemperatureChanged(outsideTemperature);
+}
+
+void QtIVIClimateControlPrivate::onOutsideTemperatureAttributeChanged(const QtIVIPropertyAttribute<int> &attribute, const QString &zone)
+{
+ Q_Q(QtIVIClimateControl);
+ QtIVIClimateControl *f = qobject_cast<QtIVIClimateControl*>(q->zoneAt(zone));
+ if (!f)
+ f = q;
+ if (f->zone() != zone)
+ return;
+ f->d_func()->m_outsideTemperatureAttribute = attribute;
+ emit f->outsideTemperatureAttributeChanged(attribute);
+}
+
+void QtIVIClimateControlPrivate::onZoneSynchronizationChanged(bool zoneSynchronization, const QString &zone)
+{
+ Q_Q(QtIVIClimateControl);
+ QtIVIClimateControl *f = qobject_cast<QtIVIClimateControl*>(q->zoneAt(zone));
+ if (!f)
+ f = q;
+ if (f->zone() != zone)
+ return;
+ f->d_func()->m_zoneSynchronization = zoneSynchronization;
+ emit f->zoneSynchronizationEnabledChanged(zoneSynchronization);
+}
+
+void QtIVIClimateControlPrivate::onZoneSynchronizationAttributeChanged(const QtIVIPropertyAttribute<bool> &attribute, const QString &zone)
+{
+ Q_Q(QtIVIClimateControl);
+ QtIVIClimateControl *f = qobject_cast<QtIVIClimateControl*>(q->zoneAt(zone));
+ if (!f)
+ f = q;
+ if (f->zone() != zone)
+ return;
+ f->d_func()->m_zoneSynchronizationAttribute = attribute;
+ emit f->zoneSynchronizationAttributeChanged(attribute);
+}
+
+void QtIVIClimateControlPrivate::onDefrostChanged(bool defrost, const QString &zone)
+{
+ Q_Q(QtIVIClimateControl);
+ QtIVIClimateControl *f = qobject_cast<QtIVIClimateControl*>(q->zoneAt(zone));
+ if (!f)
+ f = q;
+ if (f->zone() != zone)
+ return;
+ f->d_func()->m_defrost = defrost;
+ emit f->defrostEnabledChanged(defrost);
+}
+
+void QtIVIClimateControlPrivate::onDefrostAttributeChanged(const QtIVIPropertyAttribute<bool> &attribute, const QString &zone)
+{
+ Q_Q(QtIVIClimateControl);
+ QtIVIClimateControl *f = qobject_cast<QtIVIClimateControl*>(q->zoneAt(zone));
+ if (!f)
+ f = q;
+ if (f->zone() != zone)
+ return;
+ f->d_func()->m_defrostAttribute = attribute;
+ emit f->defrostAttributeChanged(attribute);
+}
+
+void QtIVIClimateControlPrivate::onRecirculationModeChanged(QtIVIClimateControl::RecirculationMode recirculationMode, const QString &zone)
+{
+ Q_Q(QtIVIClimateControl);
+ QtIVIClimateControl *f = qobject_cast<QtIVIClimateControl*>(q->zoneAt(zone));
+ if (!f)
+ f = q;
+ if (f->zone() != zone)
+ return;
+ f->d_func()->m_recirculationMode = recirculationMode;
+ emit f->recirculationModeChanged(recirculationMode);
+}
+
+void QtIVIClimateControlPrivate::onRecirculationModeAttributeChanged(const QtIVIPropertyAttribute<QtIVIClimateControl::RecirculationMode> &attribute, const QString &zone)
+{
+ Q_Q(QtIVIClimateControl);
+ QtIVIClimateControl *f = qobject_cast<QtIVIClimateControl*>(q->zoneAt(zone));
+ if (!f)
+ f = q;
+ if (f->zone() != zone)
+ return;
+ f->d_func()->m_recirculationModeAttribute = attribute;
+ emit f->recirculationModeAttributeChanged(attribute);
+}
+
+void QtIVIClimateControlPrivate::onRecirculationChanged(bool recirculation, const QString &zone)
+{
+ Q_Q(QtIVIClimateControl);
+ QtIVIClimateControl *f = qobject_cast<QtIVIClimateControl*>(q->zoneAt(zone));
+ if (!f)
+ f = q;
+ if (f->zone() != zone)
+ return;
+ f->d_func()->m_recirculation = recirculation;
+ emit f->recirculationEnabledChanged(recirculation);
+}
+
+void QtIVIClimateControlPrivate::onRecirculationAttributeChanged(const QtIVIPropertyAttribute<bool> &attribute, const QString &zone)
+{
+ Q_Q(QtIVIClimateControl);
+ QtIVIClimateControl *f = qobject_cast<QtIVIClimateControl*>(q->zoneAt(zone));
+ if (!f)
+ f = q;
+ if (f->zone() != zone)
+ return;
+ f->d_func()->m_recirculationAttribute = attribute;
+ emit f->recirculationAttributeChanged(attribute);
+}
+
+void QtIVIClimateControlPrivate::onRecirculationSensitivityLevelChanged(int recirculationSensitivityLevel, const QString &zone)
+{
+ Q_Q(QtIVIClimateControl);
+ QtIVIClimateControl *f = qobject_cast<QtIVIClimateControl*>(q->zoneAt(zone));
+ if (!f)
+ f = q;
+ if (f->zone() != zone)
+ return;
+ f->d_func()->m_recirculationSensitivityLevel = recirculationSensitivityLevel;
+ emit f->recirculationSensitivityLevelChanged(recirculationSensitivityLevel);
+}
+
+void QtIVIClimateControlPrivate::onRecirculationSensitivityLevelAttributeChanged(const QtIVIPropertyAttribute<int> &attribute, const QString &zone)
+{
+ Q_Q(QtIVIClimateControl);
+ QtIVIClimateControl *f = qobject_cast<QtIVIClimateControl*>(q->zoneAt(zone));
+ if (!f)
+ f = q;
+ if (f->zone() != zone)
+ return;
+ f->d_func()->m_recirculationSensitivityLevelAttribute = attribute;
+ emit f->recirculationSensitivityLevelAttributeChanged(attribute);
+}
+
+void QtIVIClimateControlPrivate::onClimateModeChanged(QtIVIClimateControl::ClimateMode climateMode, const QString &zone)
+{
+ Q_Q(QtIVIClimateControl);
+ QtIVIClimateControl *f = qobject_cast<QtIVIClimateControl*>(q->zoneAt(zone));
+ if (!f)
+ f = q;
+ if (f->zone() != zone)
+ return;
+ f->d_func()->m_climateMode = climateMode;
+ emit f->climateModeChanged(climateMode);
+}
+
+void QtIVIClimateControlPrivate::onClimateModeAttributeChanged(const QtIVIPropertyAttribute<QtIVIClimateControl::ClimateMode> &attribute, const QString &zone)
+{
+ Q_Q(QtIVIClimateControl);
+ QtIVIClimateControl *f = qobject_cast<QtIVIClimateControl*>(q->zoneAt(zone));
+ if (!f)
+ f = q;
+ if (f->zone() != zone)
+ return;
+ f->d_func()->m_climateModeAttribute = attribute;
+ emit f->climateModeAttributeChanged(attribute);
+}
+
+void QtIVIClimateControlPrivate::onAutomaticClimateFanIntensityLevelChanged(int automaticClimateFanIntensityLevel, const QString &zone)
+{
+ Q_Q(QtIVIClimateControl);
+ QtIVIClimateControl *f = qobject_cast<QtIVIClimateControl*>(q->zoneAt(zone));
+ if (!f)
+ f = q;
+ if (f->zone() != zone)
+ return;
+ f->d_func()->m_automaticClimateFanIntensityLevel = automaticClimateFanIntensityLevel;
+ emit f->automaticClimateFanIntensityLevelChanged(automaticClimateFanIntensityLevel);
+}
+
+void QtIVIClimateControlPrivate::onAutomaticClimateFanIntensityLevelAttributeChanged(const QtIVIPropertyAttribute<int> &attribute, const QString &zone)
+{
+ Q_Q(QtIVIClimateControl);
+ QtIVIClimateControl *f = qobject_cast<QtIVIClimateControl*>(q->zoneAt(zone));
+ if (!f)
+ f = q;
+ if (f->zone() != zone)
+ return;
+ f->d_func()->m_automaticClimateFanIntensityLevelAttribute = attribute;
+ emit f->automaticClimateFanIntensityLevelAttributeChanged(attribute);
+}
+
QtIVIClimateControlBackendInterface *QtIVIClimateControlPrivate::climateControlBackend()
{
Q_Q(QtIVIClimateControl);
@@ -376,7 +605,7 @@ QtIVIClimateControlBackendInterface *QtIVIClimateControlPrivate::climateControlB
*/
/*!
- \enum QtIVIClimateControl::AirflowDirections
+ \enum QtIVIClimateControl::AirflowDirection
\value Windshield
Direct airflow along the windshield.
\value Dashboard
@@ -386,6 +615,26 @@ QtIVIClimateControlBackendInterface *QtIVIClimateControlPrivate::climateControlB
*/
/*!
+ \enum QtIVIClimateControl::RecirculationMode
+ \value RecirculationOff
+ The recirculation is turned off.
+ \value RecirculationOn
+ The recirculation is turned on.
+ \value AutoRecirculation
+ The recirculation is turning off and on automatically depending on the air quality.
+*/
+
+/*!
+ \enum QtIVIClimateControl::ClimateMode
+ \value ClimateOff
+ The climate system is turned off.
+ \value ClimateOn
+ The climate system is turned on.
+ \value AutoClimate
+ The climate system is in automatic mode and is adjusting some parts of the system automatically. E.g. lower the fan speed when the targetTemperature is reached.
+*/
+
+/*!
Constructs a climate control object to the given \a zone.
If \a zone is not provided the General zone will be created.
@@ -400,6 +649,8 @@ QtIVIClimateControl::QtIVIClimateControl(const QString &zone, QObject* parent)
qRegisterMetaType<QtIVIPropertyAttribute<int>>();
qRegisterMetaType<QtIVIPropertyAttribute<QtIVIClimateControl::AirflowDirections>>();
qRegisterMetaType<QtIVIPropertyAttribute<bool>>();
+ qRegisterMetaType<QtIVIPropertyAttribute<QtIVIClimateControl::RecirculationMode>>();
+ qRegisterMetaType<QtIVIPropertyAttribute<QtIVIClimateControl::ClimateMode>>();
}
QtIVIClimateControl::~QtIVIClimateControl()
@@ -450,10 +701,38 @@ void QtIVIClimateControl::connectToServiceObject(QtIVIServiceObject *serviceObje
d, &QtIVIClimateControlPrivate::onHeaterEnabledChanged);
QObjectPrivate::connect(backend, &QtIVIClimateControlBackendInterface::heaterAttributeChanged,
d, &QtIVIClimateControlPrivate::onHeaterAttributeChanged);
- QObjectPrivate::connect(backend, &QtIVIClimateControlBackendInterface::airRecirculationEnabledChanged,
- d, &QtIVIClimateControlPrivate::onAirRecirculationEnabledChanged);
- QObjectPrivate::connect(backend, &QtIVIClimateControlBackendInterface::airRecirculationAttributeChanged,
- d, &QtIVIClimateControlPrivate::onAirRecirculationAttributeChanged);
+ QObjectPrivate::connect(backend, &QtIVIClimateControlBackendInterface::outsideTemperatureChanged,
+ d, &QtIVIClimateControlPrivate::onOutsideTemperatureChanged);
+ QObjectPrivate::connect(backend, &QtIVIClimateControlBackendInterface::outsideTemperatureAttributeChanged,
+ d, &QtIVIClimateControlPrivate::onOutsideTemperatureAttributeChanged);
+ QObjectPrivate::connect(backend, &QtIVIClimateControlBackendInterface::zoneSynchronizationEnabledChanged,
+ d, &QtIVIClimateControlPrivate::onZoneSynchronizationChanged);
+ QObjectPrivate::connect(backend, &QtIVIClimateControlBackendInterface::zoneSynchronizationAttributeChanged,
+ d, &QtIVIClimateControlPrivate::onZoneSynchronizationAttributeChanged);
+ QObjectPrivate::connect(backend, &QtIVIClimateControlBackendInterface::defrostEnabledChanged,
+ d, &QtIVIClimateControlPrivate::onDefrostChanged);
+ QObjectPrivate::connect(backend, &QtIVIClimateControlBackendInterface::defrostAttributeChanged,
+ d, &QtIVIClimateControlPrivate::onDefrostAttributeChanged);
+ QObjectPrivate::connect(backend, &QtIVIClimateControlBackendInterface::recirculationModeChanged,
+ d, &QtIVIClimateControlPrivate::onRecirculationModeChanged);
+ QObjectPrivate::connect(backend, &QtIVIClimateControlBackendInterface::recirculationModeAttributeChanged,
+ d, &QtIVIClimateControlPrivate::onRecirculationModeAttributeChanged);
+ QObjectPrivate::connect(backend, &QtIVIClimateControlBackendInterface::recirculationEnabledChanged,
+ d, &QtIVIClimateControlPrivate::onRecirculationChanged);
+ QObjectPrivate::connect(backend, &QtIVIClimateControlBackendInterface::recirculationAttributeChanged,
+ d, &QtIVIClimateControlPrivate::onRecirculationAttributeChanged);
+ QObjectPrivate::connect(backend, &QtIVIClimateControlBackendInterface::recirculationSensitivityLevelChanged,
+ d, &QtIVIClimateControlPrivate::onRecirculationSensitivityLevelChanged);
+ QObjectPrivate::connect(backend, &QtIVIClimateControlBackendInterface::recirculationSensitivityLevelAttributeChanged,
+ d, &QtIVIClimateControlPrivate::onRecirculationSensitivityLevelAttributeChanged);
+ QObjectPrivate::connect(backend, &QtIVIClimateControlBackendInterface::climateModeChanged,
+ d, &QtIVIClimateControlPrivate::onClimateModeChanged);
+ QObjectPrivate::connect(backend, &QtIVIClimateControlBackendInterface::climateModeAttributeChanged,
+ d, &QtIVIClimateControlPrivate::onClimateModeAttributeChanged);
+ QObjectPrivate::connect(backend, &QtIVIClimateControlBackendInterface::automaticClimateFanIntensityLevelChanged,
+ d, &QtIVIClimateControlPrivate::onAutomaticClimateFanIntensityLevelChanged);
+ QObjectPrivate::connect(backend, &QtIVIClimateControlBackendInterface::automaticClimateFanIntensityLevelAttributeChanged,
+ d, &QtIVIClimateControlPrivate::onAutomaticClimateFanIntensityLevelAttributeChanged);
backend->initializeAttributes();
}
@@ -613,50 +892,6 @@ QtIVIProperty *QtIVIClimateControl::heaterProperty() const
}
/*!
- \qmlqtivipropertyBool {QtIVIVehicleFunctions::ClimateControl::airRecirculation}
-
- \e value is true if the air recirculation is enabled.
-*/
-/*!
- \property QtIVIClimateControl::airRecirculation
-
- Holds a QtIVIProperty of type \e bool where the QtIVIProperty::value() function indicates if air recirculation is enabled.
-
- \sa AttributeSystem
- \sa isAirRecirculationEnabled() setAirRecirculationEnabled() airRecirculationAttribute()
- */
-/*!
- * Returns true if air recirculation is enabled.
- *
- * \sa setAirRecirculationEnabled() airRecirculationEnabledChanged() airRecirculationAttribute()
- */
-bool QtIVIClimateControl::isAirRecirculationEnabled() const
-{
- Q_D(const QtIVIClimateControl);
- return d->m_airRecirculation;
-}
-
-/*!
- * Returns the attribute defining the boundaries and availability of the air recirculation property.
- *
- * \sa setAirRecirculationEnabled() isAirRecirculationEnabled() airRecirculationEnabledChanged()
- */
-QtIVIPropertyAttribute<bool> QtIVIClimateControl::airRecirculationAttribute() const
-{
- Q_D(const QtIVIClimateControl);
- return d->m_airRecirculationAttribute;
-}
-
-QtIVIProperty *QtIVIClimateControl::airRecirculationProperty() const
-{
- Q_D(const QtIVIClimateControl);
- return d->m_airRecirculationProperty;
-}
-
-/*!
- \qmlproperty int ClimateZone::steeringWheelHeater
- */
-/*!
\qmlqtiviproperty {int} {QtIVIVehicleFunctions::ClimateControl::steeringWheelHeater}
\e value holds the steering wheel heater level, where the level can be between \c minimumValue(off)
@@ -671,7 +906,7 @@ QtIVIProperty *QtIVIClimateControl::airRecirculationProperty() const
\sa steeringWheelHeater() setSteeringWheelHeater() steeringWheelHeaterAttribute()
*/
/*!
- * Returns the current steering wheel heater level, where the level can be between \c 0 (off) and \c 10 (warmest).
+ * Returns the current steering wheel heater level, where the level can be between \c minimumValue(off) and \c maximumValue (warmest).
*
* \sa setSteeringWheelHeater() steeringWheelHeaterChanged() steeringWheelHeaterAttribute()
*/
@@ -713,7 +948,7 @@ QtIVIProperty *QtIVIClimateControl::steeringWheelHeaterProperty() const
\sa fanSpeedLevel() setFanSpeedLevel() fanSpeedLevelAttribute()
*/
/*!
- * Returns the current fan speed level, where the level can be between \c 0 (off) and \c 10 (strongest).
+ * Returns the current fan speed level, where the level can be between \c miniumValue(off) and \c maximumValue(strongest).
*
* \sa setFanSpeedLevel() fanSpeedLevelChanged() fanSpeedLevelAttribute()
*/
@@ -743,8 +978,8 @@ QtIVIProperty *QtIVIClimateControl::fanSpeedLevelProperty() const
/*!
\qmlqtiviproperty {int} {QtIVIVehicleFunctions::ClimateControl::targetTemperature}
- \e value holds the target temperature of the zone expressed in centigrades, where the temperature can be between \c minimumValue(off)
- to \c maximumValue (strongest).
+ \e value holds the target temperature of the zone expressed in centigrades, where the temperature can be between \c minimumValue(coolest)
+ to \c maximumValue (warmest).
*/
/*!
\property QtIVIClimateControl::targetTemperature
@@ -797,7 +1032,7 @@ QtIVIProperty *QtIVIClimateControl::targetTemperatureProperty() const
\sa seatCooler() setSeatCooler() seatCoolerAttribute()
*/
/*!
- * Returns the current seat cooler level, where the level can be between \c 0 (off) and \c 10 (coolest).
+ * Returns the current seat cooler level, where the level can be between \c minimumValue(off) and \c maximumValue(coolest).
*
* \sa seatCooler() seatCoolerChanged() seatCoolerAttribute()
*/
@@ -839,7 +1074,7 @@ QtIVIProperty *QtIVIClimateControl::seatCoolerProperty() const
\sa seatHeater() setSeatHeater() seatHeaterAttribute()
*/
/*!
- * Returns the current seat heater level, where the level can be between \c 0 (off) and \c 10 (warmest).
+ * Returns the current seat heater level, where the level can be between \c minimumValue(off) and \c maximumValue(warmest).
*
* \sa seatHeater() seatHeaterChanged() seatHeaterAttribute()
*/
@@ -867,6 +1102,355 @@ QtIVIProperty *QtIVIClimateControl::seatHeaterProperty() const
}
/*!
+ \qmlqtiviproperty {int} {QtIVIVehicleFunctions::ClimateControl::outsideTemperature}
+
+ \e value holds the outside temperature of the zone expressed in centigrades, where the temperature can be between \c minimumValue(coolest)
+ to \c maximumValue (warmest).
+ */
+/*!
+ \property QtIVIClimateControl::outsideTemperature
+
+ Holds a QtIVIProperty of type \e int where the QtIVIProperty::value() function returns the current outside temperature.
+
+ \sa AttributeSystem
+ \sa outsideTemperature() outsideTemperatureAttribute()
+ */
+/*!
+ * Returns the current outside temperature expressed in centigrates.
+ *
+ * \sa outsideTemperatureChanged() outsideTemperatureAttribute()
+ */
+int QtIVIClimateControl::outsideTemperature() const
+{
+ Q_D(const QtIVIClimateControl);
+ return d->m_outsideTemperature;
+}
+
+/*!
+ * Returns the attribute defining the boundaries and availability of the outside temperature property.
+ *
+ * \sa outsideTemperature() outsideTemperatureChanged()
+ */
+QtIVIPropertyAttribute<int> QtIVIClimateControl::outsideTemperatureAttribute() const
+{
+ Q_D(const QtIVIClimateControl);
+ return d->m_outsideTemperatureAttribute;
+}
+
+QtIVIProperty *QtIVIClimateControl::outsideTemperatureProperty() const
+{
+ Q_D(const QtIVIClimateControl);
+ return d->m_outsideTemperatureProperty;
+}
+
+/*!
+ \qmlqtivipropertyBool {QtIVIVehicleFunctions::ClimateControl::zoneSynchronization}
+
+ \e value is true if the zone synchronization is enabled.
+
+ Which zones and properties are synchronized is controlled by the backend implementing it.
+*/
+/*!
+ \property QtIVIClimateControl::zoneSynchronization
+
+ Holds a QtIVIProperty of type \e bool where the QtIVIProperty::value() function indicates if zone synchronization is enabled.
+
+ Which zones and properties are synchronized is controlled by the backend implementing it.
+
+ \sa AttributeSystem
+ \sa isZoneSynchronizationEnabled() setZoneSynchronizationEnabled() zoneSynchronizationAttribute()
+ */
+/*!
+ * Returns true if zone synchronization is enabled.
+ *
+ * \sa setZoneSynchronizationEnabled() zoneSynchronizationEnabledChanged() zoneSynchronizationAttribute()
+ */
+bool QtIVIClimateControl::isZoneSynchronizationEnabled() const
+{
+ Q_D(const QtIVIClimateControl);
+ return d->m_zoneSynchronization;
+}
+
+/*!
+ * Returns the attribute defining the boundaries and availability of the zone synchronization property.
+ *
+ * \sa setZoneSynchronizationEnabled() isZoneSynchronizationEnabled() zoneSynchronizationEnabledChanged()
+ */
+QtIVIPropertyAttribute<bool> QtIVIClimateControl::zoneSynchronizationAttribute() const
+{
+ Q_D(const QtIVIClimateControl);
+ return d->m_zoneSynchronizationAttribute;
+}
+
+QtIVIProperty *QtIVIClimateControl::zoneSynchronizationProperty() const
+{
+ Q_D(const QtIVIClimateControl);
+ return d->m_zoneSynchronizationProperty;
+}
+
+/*!
+ \qmlqtivipropertyBool {QtIVIVehicleFunctions::ClimateControl::defrost}
+
+ \e value is true if defrost is enabled. Usually that means that the fans are on the highest level to remove ice from the windshield.
+*/
+/*!
+ \property QtIVIClimateControl::defrost
+
+ Holds a QtIVIProperty of type \e bool where the QtIVIProperty::value() function indicates if defrost is enabled.
+
+ \sa AttributeSystem
+ \sa isDefrostEnabled() setDefrostEnabled() defrostAttribute()
+ */
+/*!
+ * Returns true if defrost is enabled.
+ *
+ * \sa setDefrostEnabled() defrostEnabledChanged() defrostAttribute()
+ */
+bool QtIVIClimateControl::isDefrostEnabled() const
+{
+ Q_D(const QtIVIClimateControl);
+ return d->m_defrost;
+}
+
+/*!
+ * Returns the attribute defining the boundaries and availability of the defrost property.
+ *
+ * \sa setDefrostEnabled() isDefrostEnabled() defrostEnabledChanged()
+ */
+QtIVIPropertyAttribute<bool> QtIVIClimateControl::defrostAttribute() const
+{
+ Q_D(const QtIVIClimateControl);
+ return d->m_defrostAttribute;
+}
+
+QtIVIProperty *QtIVIClimateControl::defrostProperty() const
+{
+ Q_D(const QtIVIClimateControl);
+ return d->m_defrostProperty;
+}
+
+/*!
+ \qmlqtivipropertyEnum {QtIVIVehicleFunctions::ClimateControl::recirculationMode}
+
+ \e value holds the recirculation mode.
+ Available values are:
+ \value RecirculationOff
+ The recirculation is turned off.
+ \value RecirculationOn
+ The recirculation is turned on.
+ \value AutoRecirculation
+ The recirculation is turning off and on automatically depending on the air quality.
+ */
+/*!
+ \property QtIVIClimateControl::recirculationMode
+
+ Holds a QtIVIProperty of type \e QtIVIClimateControl::RecirculationMode where the QtIVIProperty::value() function returns the current recirculation mode.
+
+ \sa AttributeSystem
+ \sa recirculationMode() setRecirculationMode() recirculationModeAttribute()
+ */
+/*!
+ * Returns the current recirculation mode.
+ *
+ * \sa setRecirculationMode() recirculationModeChanged() recirculationModeAttribute()
+ */
+QtIVIClimateControl::RecirculationMode QtIVIClimateControl::recirculationMode() const
+{
+ Q_D(const QtIVIClimateControl);
+ return d->m_recirculationMode;
+}
+
+/*!
+ * Returns the attribute defining the boundaries and availability of the recirculationMode property.
+ *
+ * \sa setRecirculationMode() recirculationMode() recirculationModeChanged()
+ */
+QtIVIPropertyAttribute<QtIVIClimateControl::RecirculationMode> QtIVIClimateControl::recirculationModeAttribute() const
+{
+ Q_D(const QtIVIClimateControl);
+ return d->m_recirculationModeAttribute;
+}
+
+QtIVIProperty *QtIVIClimateControl::recirculationModeProperty() const
+{
+ Q_D(const QtIVIClimateControl);
+ return d->m_recirculationModeProperty;
+}
+
+/*!
+ \qmlqtivipropertyBool {QtIVIVehicleFunctions::ClimateControl::recirculation}
+
+ \e value is true if the recirculation is currently running.
+*/
+/*!
+ \property QtIVIClimateControl::recirculation
+
+ Holds a QtIVIProperty of type \e bool where the QtIVIProperty::value() function indicates if recirculation is running.
+
+ \sa AttributeSystem
+ \sa isRecirculationEnabled() recirculationAttribute()
+ */
+/*!
+ * Returns true if defrost is enabled.
+ *
+ * \sa recirculationEnabledChanged() recirculationAttribute()
+ */
+bool QtIVIClimateControl::isRecirculationEnabled() const
+{
+ Q_D(const QtIVIClimateControl);
+ return d->m_recirculation;
+}
+
+/*!
+ * Returns the attribute defining the boundaries and availability of the recirculation property.
+ *
+ * \sa isRecirculationEnabled() recirculationEnabledChanged()
+ */
+QtIVIPropertyAttribute<bool> QtIVIClimateControl::recirculationAttribute() const
+{
+ Q_D(const QtIVIClimateControl);
+ return d->m_recirculationAttribute;
+}
+
+QtIVIProperty *QtIVIClimateControl::recirculationProperty() const
+{
+ Q_D(const QtIVIClimateControl);
+ return d->m_recirculationProperty;
+}
+
+/*!
+ \qmlqtiviproperty {int} {QtIVIVehicleFunctions::ClimateControl::recirculationSensitivityLevel}
+
+ \e value holds the sensitivity level of the recirculation system when the recirculationMode is set to AutoRecirculation, where the level can be between \c minimumValue(least sensitive)
+ to \c maximumValue(most sensitive).
+ */
+/*!
+ \property QtIVIClimateControl::recirculationSensitivityLevel
+
+ Holds a QtIVIProperty of type \e int where the QtIVIProperty::value() function returns the current sensitivity level of the recicurlcation system when the recirculationMode is set to AutoRecirculation.
+
+ \sa AttributeSystem
+ \sa recirculationSensitivityLevel() setRecirculationSensitivityLevel() recirculationSensitivityLevelAttribute()
+ */
+/*!
+ * Returns the current sensitivity level of recicurlcation system when the recirculationMode is set to AutoRecirculation, where the level can be between \c minimumValue(least sensitive) and \c maximumValue(most sensitive).
+ *
+ * \sa setRecirculationSensitivityLevel() recirculationSensitivityLevelChanged() recirculationSensitivityLevelAttribute()
+ */
+int QtIVIClimateControl::recirculationSensitivityLevel() const
+{
+ Q_D(const QtIVIClimateControl);
+ return d->m_recirculationSensitivityLevel;
+}
+
+/*!
+ * Returns the attribute defining the boundaries and availability of the recirculationSensitivityLevel property.
+ *
+ * \sa setRecirculationSensitivityLevel() recirculationSensitivityLevel() recirculationSensitivityLevelChanged()
+ */
+QtIVIPropertyAttribute<int> QtIVIClimateControl::recirculationSensitivityLevelAttribute() const
+{
+ Q_D(const QtIVIClimateControl);
+ return d->m_recirculationSensitivityLevelAttribute;
+}
+
+QtIVIProperty *QtIVIClimateControl::recirculationSensitivityLevelProperty() const
+{
+ Q_D(const QtIVIClimateControl);
+ return d->m_recirculationSensitivityLevelProperty;
+}
+
+/*!
+ \qmlqtivipropertyEnum {QtIVIVehicleFunctions::ClimateControl::climateMode}
+
+ \e value holds the climate mode.
+ Available values are:
+ \value ClimateOff
+ The climate system is turned off.
+ \value ClimateOn
+ The climate system is turned on.
+ \value AutoClimate
+ The climate system is in automatic mode and is adjusting some parts of the system automatically. e.g. lower the fan speed when the targetTemperature is reached.
+ */
+/*!
+ \property QtIVIClimateControl::climateMode
+
+ Holds a QtIVIProperty of type \e QtIVIClimateControl::ClimateMode where the QtIVIProperty::value() function returns the current climate mode.
+
+ \sa AttributeSystem
+ \sa climateMode() setClimateMode() climateModeAttribute()
+ */
+/*!
+ * Returns the current climate mode.
+ *
+ * \sa setClimateMode() climateModeChanged() climateModeAttribute()
+ */
+QtIVIClimateControl::ClimateMode QtIVIClimateControl::climateMode() const
+{
+ Q_D(const QtIVIClimateControl);
+ return d->m_climateMode;
+}
+
+/*!
+ * Returns the attribute defining the boundaries and availability of the climateMode property.
+ *
+ * \sa isRecirculationEnabled() recirculationEnabledChanged()
+ */
+QtIVIPropertyAttribute<QtIVIClimateControl::ClimateMode> QtIVIClimateControl::climateModeAttribute() const
+{
+ Q_D(const QtIVIClimateControl);
+ return d->m_climateModeAttribute;
+}
+
+QtIVIProperty *QtIVIClimateControl::climateModeProperty() const
+{
+ Q_D(const QtIVIClimateControl);
+ return d->m_climateModeProperty;
+}
+
+/*!
+ \qmlqtiviproperty {int} {QtIVIVehicleFunctions::ClimateControl::automaticClimateFanIntensityLevel}
+
+ \e value holds the intensity level of the fan when the climateMode is set to AutoClimate, where the level can be between \c minimumValue(least intensity)
+ to \c maximumValue(most intensity).
+ */
+/*!
+ \property QtIVIClimateControl::automaticClimateFanIntensityLevel
+
+ Holds a QtIVIProperty of type \e int where the QtIVIProperty::value() function returns the current intensity level of the fan when the climateMode is set to AutoClimate.
+
+ \sa AttributeSystem
+ \sa automaticClimateFanIntensityLevel() setAutomaticClimateFanIntensityLevel() automaticClimateFanIntensityLevelAttribute()
+ */
+/*!
+ * Returns the current intensity level of the fan when the climateMode is set to AutoClimate, where the level can be between \c minimumValue(least intensity) and \c maximumValue(most intensity).
+ *
+ * \sa setAutomaticClimateFanIntensityLevel() automaticClimateFanIntensityLevelChanged() automaticClimateFanIntensityLevelAttribute()
+ */
+int QtIVIClimateControl::automaticClimateFanIntensityLevel() const
+{
+ Q_D(const QtIVIClimateControl);
+ return d->m_automaticClimateFanIntensityLevel;
+}
+
+/*!
+ * Returns the attribute defining the boundaries and availability of the climateMode property.
+ *
+ * \sa setAutomaticClimateFanIntensityLevel() automaticClimateFanIntensityLevel() automaticClimateFanIntensityLevelChanged()
+ */
+QtIVIPropertyAttribute<int> QtIVIClimateControl::automaticClimateFanIntensityLevelAttribute() const
+{
+ Q_D(const QtIVIClimateControl);
+ return d->m_automaticClimateFanIntensityLevelAttribute;
+}
+
+QtIVIProperty *QtIVIClimateControl::automaticClimateFanIntensityLevelProperty() const
+{
+ Q_D(const QtIVIClimateControl);
+ return d->m_automaticClimateFanIntensityLevelProperty;
+}
+
+/*!
* Sets the air conditioning system enabled, if \a enabled is true, otherwise it will be disabled.
*
* \sa isAirConditioningEnabled() airConditioningEnabledChanged() airConditioningAttribute()
@@ -903,19 +1487,7 @@ void QtIVIClimateControl::setHeaterEnabled(bool enabled)
}
/*!
- * Sets the air recirculation system enabled, if \a enabled is true, otherwise it will be disabled.
- *
- * \sa isAirRecirculationEnabled() steeringWheelHeaterChanged() steeringWheelHeaterAttribute()
- */
-void QtIVIClimateControl::setAirRecirculationEnabled(bool enabled)
-{
- Q_D(QtIVIClimateControl);
- if (QtIVIClimateControlBackendInterface* backend = d->climateControlBackend())
- backend->setAirRecirculationEnabled(enabled, zone());
-}
-
-/*!
- * Sets the current steering wheel heater level to \a value, where the level can be between \c 0 (off) and \c 10 (warmest).
+ * Sets the current steering wheel heater level to \a value, where the level can be between \c minimumValue(off) and \c maximumValue(warmest).
*
* \sa steeringWheelHeater() steeringWheelHeaterChanged() steeringWheelHeaterAttribute()
*/
@@ -927,7 +1499,7 @@ void QtIVIClimateControl::setSteeringWheelHeater(int value)
}
/*!
- * Sets the current fan speed level to \a value, where the level can be between \c 0 (off) and \c 10 (strongest).
+ * Sets the current fan speed level to \a value, where the level can be between \c minimumValue(off) and \c maximumValue(strongest).
*
* \sa fanSpeedLevel() fanSpeedLevelChanged() fanSpeedLevelAttribute()
*/
@@ -951,7 +1523,7 @@ void QtIVIClimateControl::setTargetTemperature(int temperature)
}
/*!
- * Sets the current seat cooler level to \a value, where the level can be between \c 0 (off) and \c 10 (coolest).
+ * Sets the current seat cooler level to \a value, where the level can be between \c minimumValue(off) and \c maximumValue(coolest).
*
* \sa seatCooler() seatCoolerChanged() seatCoolerAttribute()
*/
@@ -963,7 +1535,7 @@ void QtIVIClimateControl::setSeatCooler(int value)
}
/*!
- * Sets the current seat heater level to \a value, where the level can be between \c 0 (off) and \c 10 (warmest).
+ * Sets the current seat heater level to \a value, where the level can be between \c minimumValue(off) and \c maximumValue(warmest).
*
* \sa seatHeater() seatHeaterChanged() seatHeaterAttribute()
*/
@@ -975,6 +1547,78 @@ void QtIVIClimateControl::setSeatHeater(int value)
}
/*!
+ * Enables the zone synchronization, if \a enabled is true, otherwise it will be disabled.
+ *
+ * \sa isZoneSynchronizationEnabled() zoneSynchronizationEnabledChanged() zoneSynchronizationAttribute()
+ */
+void QtIVIClimateControl::setZoneSynchronizationEnabled(bool enabled)
+{
+ Q_D(QtIVIClimateControl);
+ if (QtIVIClimateControlBackendInterface* backend = d->climateControlBackend())
+ backend->setZoneSynchronizationEnabled(enabled, zone());
+}
+
+/*!
+ * Enables defrosting of the windshield, if \a enabled is true, otherwise it will be disabled.
+ *
+ * \sa isDefrostEnabled() defrostEnabledChanged() defrostAttribute()
+ */
+void QtIVIClimateControl::setDefrostEnabled(bool enabled)
+{
+ Q_D(QtIVIClimateControl);
+ if (QtIVIClimateControlBackendInterface* backend = d->climateControlBackend())
+ backend->setDefrostEnabled(enabled, zone());
+}
+
+/*!
+ * Sets the recirculation mode to \a recirculationMode.
+ *
+ * \sa recirculationMode() recirculationModeChanged() recirculationModeAttribute()
+ */
+void QtIVIClimateControl::setRecirculationMode(QtIVIClimateControl::RecirculationMode recirculationMode)
+{
+ Q_D(QtIVIClimateControl);
+ if (QtIVIClimateControlBackendInterface* backend = d->climateControlBackend())
+ backend->setRecirculationMode(recirculationMode, zone());
+}
+
+/*!
+ * Sets the current sensitivity level for the AutomaticRecirculation mode to \a value, where the level can be between \c minimumValue(least sensitive) and \c maximumValue(most sensitive).
+ *
+ * \sa recirculationSensitivityLevel() recirculationSensitivityLevelChanged() recirculationSensitivityLevelAttribute()
+ */
+void QtIVIClimateControl::setRecirculationSensitivityLevel(int value)
+{
+ Q_D(QtIVIClimateControl);
+ if (QtIVIClimateControlBackendInterface* backend = d->climateControlBackend())
+ backend->setRecirculationSensitivityLevel(value, zone());
+}
+
+/*!
+ * Sets the climate mode to \a climateMode.
+ *
+ * \sa climateMode() climateModeChanged() climateModeAttribute()
+ */
+void QtIVIClimateControl::setClimateMode(QtIVIClimateControl::ClimateMode climateMode)
+{
+ Q_D(QtIVIClimateControl);
+ if (QtIVIClimateControlBackendInterface* backend = d->climateControlBackend())
+ backend->setClimateMode(climateMode, zone());
+}
+
+/*!
+ * Sets the current fan intensity level for the AutomaticClimate mode to \a value, where the level can be between \c minimumValue(least intensity) and \c maximumValue(most intensity).
+ *
+ * \sa automaticClimateFanIntensityLevel() automaticClimateFanIntensityLevelChanged() automaticClimateFanIntensityLevelAttribute()
+ */
+void QtIVIClimateControl::setAutomaticClimateFanIntensityLevel(int value)
+{
+ Q_D(QtIVIClimateControl);
+ if (QtIVIClimateControlBackendInterface* backend = d->climateControlBackend())
+ backend->setAutomaticClimateFanIntensityLevel(value, zone());
+}
+
+/*!
* \fn void QtIVIClimateControl::airflowDirectionsChanged(QtIVIClimateControl::AirflowDirections value)
*
* This signal is emitted whenever the air flow directions change. The new flow directions are passed as \a value.
@@ -1017,20 +1661,6 @@ void QtIVIClimateControl::setSeatHeater(int value)
* \sa heaterAttribute() isHeaterEnabled()
*/
/*!
- * \fn void QtIVIClimateControl::airRecirculationEnabledChanged(bool enabled);
- *
- * This signal is emitted whenever the air recirculation system is turned \e on or \e off. The new value is passed as \a enabled.
- *
- * \sa isAirRecirculationEnabled() setAirRecirculationEnabled() airRecirculationAttribute()
- */
-/*!
- * \fn void QtIVIClimateControl::airRecirculationAttributeChanged(const QtIVIPropertyAttribute<bool> &attribute);
- *
- * This signal is emitted whenever the attribute for the airRecirculation property changes. The new attribute is passed as \a attribute.
- *
- * \sa airRecirculationAttribute() isAirRecirculationEnabled()
- */
-/*!
* \fn void QtIVIClimateControl::steeringWheelHeaterChanged(int value);
*
* This signal is emitted whenever the steering wheel heater level changed. The new level is passed as \a value.
@@ -1100,5 +1730,117 @@ void QtIVIClimateControl::setSeatHeater(int value)
*
* \sa heaterAttribute() isHeaterEnabled()
*/
+/*!
+ * \fn void QtIVIClimateControl::outsideTemperatureChanged(int value);
+ *
+ * This signal is emitted whenever the outside temperature changes. The new temperature is passed as \a value.
+ *
+ * \sa outsideTemperature() outsideTemperatureAttribute()
+ */
+/*!
+ * \fn void QtIVIClimateControl::outsideTemperatureAttributeChanged(const QtIVIPropertyAttribute<int> &attribute);
+ *
+ * This signal is emitted whenever the attribute for the outsideTemperature property changes. The new attribute is passed as \a attribute.
+ *
+ * \sa outsideTemperatureAttribute() outsideTemperature()
+ */
+/*!
+ * \fn void QtIVIClimateControl::zoneSynchronizationEnabledChanged(bool enabled);
+ *
+ * This signal is emitted whenever the zone synchronization is turned \e on or \e off. The new value is passed as \a enabled.
+ *
+ * \sa isZoneSynchronizationEnabled() setZoneSynchronizationEnabled() zoneSynchronizationAttribute()
+ */
+/*!
+ * \fn void QtIVIClimateControl::zoneSynchronizationAttributeChanged(const QtIVIPropertyAttribute<bool> &attribute);
+ *
+ * This signal is emitted whenever the attribute for the zoneSynchronization property changes. The new attribute is passed as \a attribute.
+ *
+ * \sa zoneSynchronizationAttribute() isZoneSynchronizationEnabled()
+ */
+/*!
+ * \fn void QtIVIClimateControl::defrostEnabledChanged(bool enabled);
+ *
+ * This signal is emitted whenever the defrost is turned \e on or \e off. The new value is passed as \a enabled.
+ *
+ * \sa isDefrostEnabled() setDefrostEnabled() defrostAttribute()
+ */
+/*!
+ * \fn void QtIVIClimateControl::defrostAttributeChanged(const QtIVIPropertyAttribute<bool> &attribute);
+ *
+ * This signal is emitted whenever the attribute for the defrost property changes. The new attribute is passed as \a attribute.
+ *
+ * \sa defrostAttribute() isDefrostEnabled()
+ */
+/*!
+ * \fn void QtIVIClimateControl::recirculationEnabledChanged(bool enabled);
+ *
+ * This signal is emitted whenever the recirculation is turned \e on or \e off. The new value is passed as \a enabled.
+ *
+ * \sa isRecirculationEnabled() recirculationAttribute()
+ */
+/*!
+ * \fn void QtIVIClimateControl::recirculationAttributeChanged(const QtIVIPropertyAttribute<bool> &attribute);
+ *
+ * This signal is emitted whenever the attribute for the heater property changes. The new attribute is passed as \a attribute.
+ *
+ * \sa recirculationAttribute() isRecirculationEnabled()
+ */
+/*!
+ * \fn void QtIVIClimateControl::recirculationModeChanged(QtIVIClimateControl::RecirculationMode value)
+ *
+ * This signal is emitted whenever the recirculation mode changes. The new recirculation mode is passed as \a value.
+ *
+ * \sa recirculationMode() setRecirculationMode() recirculationModeAttribute()
+ */
+/*!
+ * \fn void QtIVIClimateControl::recirculationModeAttributeChanged(const QtIVIPropertyAttribute<QtIVIClimateControl::RecirculationMode> &attribute);
+ *
+ * This signal is emitted whenever the attribute for the recirculationMode property changes. The new attribute is passed as \a attribute.
+ *
+ * \sa recirculationModeAttribute() recirculationMode()
+ */
+/*!
+ * \fn void QtIVIClimateControl::recirculationSensitivityLevelChanged(int value);
+ *
+ * This signal is emitted whenever the recirculation sensitivity level level changes. The new level is passed as \a value.
+ *
+ * \sa recirculationSensitivityLevel() setRecirculationSensitivityLevel() recirculationSensitivityLevelAttribute()
+ */
+/*!
+ * \fn void QtIVIClimateControl::recirculationSensitivityLevelAttributeChanged(const QtIVIPropertyAttribute<int> &attribute);
+ *
+ * This signal is emitted whenever the attribute for the recirculationSensitivityLevel property changes. The new attribute is passed as \a attribute.
+ *
+ * \sa recirculationSensitivityLevelAttribute() recirculationSensitivityLevel()
+ */
+/*!
+ * \fn void QtIVIClimateControl::climateModeChanged(QtIVIClimateControl::ClimateMode value)
+ *
+ * This signal is emitted whenever the climate mode changes. The new climate mode is passed as \a value.
+ *
+ * \sa climateMode() setClimateMode() climateModeAttribute()
+ */
+/*!
+ * \fn void QtIVIClimateControl::climateModeAttributeChanged(const QtIVIPropertyAttribute<QtIVIClimateControl::ClimateMode> &attribute);
+ *
+ * This signal is emitted whenever the attribute for the climateMode property changes. The new attribute is passed as \a attribute.
+ *
+ * \sa climateModeAttribute() climateMode()
+ */
+/*!
+ * \fn void QtIVIClimateControl::automaticClimateFanIntensityLevelChanged(int value);
+ *
+ * This signal is emitted whenever the fan intensity level changes. The new level is passed as \a value.
+ *
+ * \sa automaticClimateFanIntensityLevel() setAutomaticClimateFanIntensityLevel() automaticClimateFanIntensityLevelAttribute()
+ */
+/*!
+ * \fn void QtIVIClimateControl::automaticClimateFanIntensityLevelAttributeChanged(const QtIVIPropertyAttribute<int> &attribute);
+ *
+ * This signal is emitted whenever the attribute for the automaticClimateFanIntensityLevel property changes. The new attribute is passed as \a attribute.
+ *
+ * \sa automaticClimateFanIntensityLevelAttribute() automaticClimateFanIntensityLevel()
+ */
#include "moc_qtiviclimatecontrol.cpp"
diff --git a/src/ivivehiclefunctions/qtiviclimatecontrol.h b/src/ivivehiclefunctions/qtiviclimatecontrol.h
index 16d9017..0b7c3d8 100644
--- a/src/ivivehiclefunctions/qtiviclimatecontrol.h
+++ b/src/ivivehiclefunctions/qtiviclimatecontrol.h
@@ -59,12 +59,19 @@ class Q_QTIVIVEHICLEFUNCTIONS_EXPORT QtIVIClimateControl : public QtIVIAbstractZ
Q_PROPERTY(QtIVIProperty* airConditioning READ airConditioningProperty CONSTANT)
Q_PROPERTY(QtIVIProperty* airflowDirections READ airflowDirectionsProperty CONSTANT)
Q_PROPERTY(QtIVIProperty* heater READ heaterProperty CONSTANT)
- Q_PROPERTY(QtIVIProperty* airRecirculation READ airRecirculationProperty CONSTANT)
Q_PROPERTY(QtIVIProperty* fanSpeedLevel READ fanSpeedLevelProperty CONSTANT)
Q_PROPERTY(QtIVIProperty* steeringWheelHeater READ steeringWheelHeaterProperty CONSTANT)
Q_PROPERTY(QtIVIProperty* targetTemperature READ targetTemperatureProperty CONSTANT)
Q_PROPERTY(QtIVIProperty* seatCooler READ seatCoolerProperty CONSTANT)
Q_PROPERTY(QtIVIProperty* seatHeater READ seatHeaterProperty CONSTANT)
+ Q_PROPERTY(QtIVIProperty* outsideTemperature READ outsideTemperatureProperty CONSTANT)
+ Q_PROPERTY(QtIVIProperty* zoneSynchronization READ zoneSynchronizationProperty CONSTANT)
+ Q_PROPERTY(QtIVIProperty* defrost READ defrostProperty CONSTANT)
+ Q_PROPERTY(QtIVIProperty* recirculationMode READ recirculationModeProperty CONSTANT)
+ Q_PROPERTY(QtIVIProperty* recirculation READ recirculationProperty CONSTANT)
+ Q_PROPERTY(QtIVIProperty* recirculationSensitivityLevel READ recirculationSensitivityLevelProperty CONSTANT)
+ Q_PROPERTY(QtIVIProperty* climateMode READ climateModeProperty CONSTANT)
+ Q_PROPERTY(QtIVIProperty* automaticClimateFanIntensityLevel READ automaticClimateFanIntensityLevelProperty CONSTANT)
public:
enum AirflowDirection {
@@ -75,6 +82,20 @@ public:
Q_DECLARE_FLAGS(AirflowDirections, AirflowDirection)
Q_FLAG(AirflowDirections)
+ enum RecirculationMode {
+ RecirculationOff,
+ RecirculationOn,
+ AutoRecirculation
+ };
+ Q_ENUM(RecirculationMode)
+
+ enum ClimateMode {
+ ClimateOff,
+ ClimateOn,
+ AutoClimate
+ };
+ Q_ENUM(ClimateMode)
+
QtIVIClimateControl(const QString &zone=QString(), QObject* parent=0);
~QtIVIClimateControl();
@@ -90,9 +111,6 @@ public:
bool isHeaterEnabled() const;
QtIVIPropertyAttribute<bool> heaterAttribute() const;
QtIVIProperty* heaterProperty() const;
- bool isAirRecirculationEnabled() const;
- QtIVIPropertyAttribute<bool> airRecirculationAttribute() const;
- QtIVIProperty* airRecirculationProperty() const;
int steeringWheelHeater() const;
QtIVIPropertyAttribute<int> steeringWheelHeaterAttribute() const;
QtIVIProperty* steeringWheelHeaterProperty() const;
@@ -108,17 +126,46 @@ public:
int seatHeater() const;
QtIVIPropertyAttribute<int> seatHeaterAttribute() const;
QtIVIProperty* seatHeaterProperty() const;
+ int outsideTemperature() const;
+ QtIVIPropertyAttribute<int> outsideTemperatureAttribute() const;
+ QtIVIProperty* outsideTemperatureProperty() const;
+ bool isZoneSynchronizationEnabled() const;
+ QtIVIPropertyAttribute<bool> zoneSynchronizationAttribute() const;
+ QtIVIProperty* zoneSynchronizationProperty() const;
+ bool isDefrostEnabled() const;
+ QtIVIPropertyAttribute<bool> defrostAttribute() const;
+ QtIVIProperty* defrostProperty() const;
+ QtIVIClimateControl::RecirculationMode recirculationMode() const;
+ QtIVIPropertyAttribute<QtIVIClimateControl::RecirculationMode> recirculationModeAttribute() const;
+ QtIVIProperty* recirculationModeProperty() const;
+ bool isRecirculationEnabled() const;
+ QtIVIPropertyAttribute<bool> recirculationAttribute() const;
+ QtIVIProperty* recirculationProperty() const;
+ int recirculationSensitivityLevel() const;
+ QtIVIPropertyAttribute<int> recirculationSensitivityLevelAttribute() const;
+ QtIVIProperty* recirculationSensitivityLevelProperty() const;
+ QtIVIClimateControl::ClimateMode climateMode() const;
+ QtIVIPropertyAttribute<QtIVIClimateControl::ClimateMode> climateModeAttribute() const;
+ QtIVIProperty* climateModeProperty() const;
+ int automaticClimateFanIntensityLevel() const;
+ QtIVIPropertyAttribute<int> automaticClimateFanIntensityLevelAttribute() const;
+ QtIVIProperty* automaticClimateFanIntensityLevelProperty() const;
public Q_SLOTS:
void setAirConditioningEnabled(bool enabled);
void setAirflowDirections(QtIVIClimateControl::AirflowDirections value);
void setHeaterEnabled(bool enabled);
- void setAirRecirculationEnabled(bool enabled);
void setSteeringWheelHeater(int value);
void setFanSpeedLevel(int value);
void setTargetTemperature(int targetTemperature);
void setSeatCooler(int seatCooler);
void setSeatHeater(int seatHeater);
+ void setZoneSynchronizationEnabled(bool enabled);
+ void setDefrostEnabled(bool enabled);
+ void setRecirculationMode(QtIVIClimateControl::RecirculationMode recirculationMode);
+ void setRecirculationSensitivityLevel(int value);
+ void setClimateMode(QtIVIClimateControl::ClimateMode climateMode);
+ void setAutomaticClimateFanIntensityLevel(int value);
Q_SIGNALS:
void airflowDirectionsChanged(QtIVIClimateControl::AirflowDirections value);
@@ -127,8 +174,6 @@ Q_SIGNALS:
void airConditioningAttributeChanged(const QtIVIPropertyAttribute<bool> &attribute);
void heaterEnabledChanged(bool enabled);
void heaterAttributeChanged(const QtIVIPropertyAttribute<bool> &attribute);
- void airRecirculationEnabledChanged(bool enabled);
- void airRecirculationAttributeChanged(const QtIVIPropertyAttribute<bool> &attribute);
void steeringWheelHeaterChanged(int value);
void steeringWheelHeaterAttributeChanged(const QtIVIPropertyAttribute<int> &attribute);
void fanSpeedLevelChanged(int value);
@@ -139,6 +184,22 @@ Q_SIGNALS:
void seatCoolerAttributeChanged(const QtIVIPropertyAttribute<int> &attribute);
void seatHeaterChanged(int value);
void seatHeaterAttributeChanged(const QtIVIPropertyAttribute<int> &attribute);
+ void outsideTemperatureChanged(int value);
+ void outsideTemperatureAttributeChanged(const QtIVIPropertyAttribute<int> &attribute);
+ void zoneSynchronizationEnabledChanged(bool enabled);
+ void zoneSynchronizationAttributeChanged(const QtIVIPropertyAttribute<bool> &attribute);
+ void defrostEnabledChanged(bool enabled);
+ void defrostAttributeChanged(const QtIVIPropertyAttribute<bool> &attribute);
+ void recirculationModeChanged(QtIVIClimateControl::RecirculationMode value);
+ void recirculationModeAttributeChanged(const QtIVIPropertyAttribute<QtIVIClimateControl::RecirculationMode> &attribute);
+ void recirculationEnabledChanged(bool enabled);
+ void recirculationAttributeChanged(const QtIVIPropertyAttribute<bool> &attribute);
+ void recirculationSensitivityLevelChanged(int value);
+ void recirculationSensitivityLevelAttributeChanged(const QtIVIPropertyAttribute<int> &attribute);
+ void climateModeChanged(QtIVIClimateControl::ClimateMode value);
+ void climateModeAttributeChanged(const QtIVIPropertyAttribute<QtIVIClimateControl::ClimateMode> &attribute);
+ void automaticClimateFanIntensityLevelChanged(int value);
+ void automaticClimateFanIntensityLevelAttributeChanged(const QtIVIPropertyAttribute<int> &attribute);
protected:
QtIVIClimateControl(QtIVIClimateControlPrivate &dd, QObject *parent = Q_NULLPTR);
@@ -152,8 +213,6 @@ private:
Q_PRIVATE_SLOT(d_func(), void onAirConditioningAttributeChanged(const QtIVIPropertyAttribute<bool> &airConditioningEnabledAttribute, const QString &zone))
Q_PRIVATE_SLOT(d_func(), void onHeaterEnabledChanged(bool enabled, const QString &zone))
Q_PRIVATE_SLOT(d_func(), void onHeaterAttributeChanged(const QtIVIPropertyAttribute<bool> &heaterEnabledAttribute, const QString &zone))
- Q_PRIVATE_SLOT(d_func(), void onAirRecirculationEnabledChanged(bool enabled, const QString &zone))
- Q_PRIVATE_SLOT(d_func(), void onAirRecirculationAttributeChanged(const QtIVIPropertyAttribute<bool> &airRecirculationEnabledAttribute, const QString &zone))
Q_PRIVATE_SLOT(d_func(), void onSteeringWheelHeaterChanged(int value, const QString &zone))
Q_PRIVATE_SLOT(d_func(), void onSteeringWheelHeaterAttributeChanged(const QtIVIPropertyAttribute<int> &steeringWheelHeaterAttribute, const QString &zone))
Q_PRIVATE_SLOT(d_func(), void onFanSpeedLevelChanged(int value, const QString &zone))
@@ -164,11 +223,29 @@ private:
Q_PRIVATE_SLOT(d_func(), void onSeatCoolerAttributeChanged(const QtIVIPropertyAttribute<int> &seatCoolerAttribute, const QString &zone))
Q_PRIVATE_SLOT(d_func(), void onSeatHeaterChanged(int value, const QString &zone))
Q_PRIVATE_SLOT(d_func(), void onSeatHeaterAttributeChanged(const QtIVIPropertyAttribute<int> &seatHeaterAttribute, const QString &zone))
+ Q_PRIVATE_SLOT(d_func(), void onOutsideTemperatureChanged(int outsideTemperature, const QString &zone))
+ Q_PRIVATE_SLOT(d_func(), void onOutsideTemperatureAttributeChanged(const QtIVIPropertyAttribute<int> &attribute, const QString &zone))
+ Q_PRIVATE_SLOT(d_func(), void onZoneSynchronizationChanged(bool isZoneSynchronizationEnabled, const QString &zone))
+ Q_PRIVATE_SLOT(d_func(), void onZoneSynchronizationAttributeChanged(const QtIVIPropertyAttribute<bool> &attribute, const QString &zone))
+ Q_PRIVATE_SLOT(d_func(), void onDefrostChanged(bool isDefrostEnabled, const QString &zone))
+ Q_PRIVATE_SLOT(d_func(), void onDefrostAttributeChanged(const QtIVIPropertyAttribute<bool> &attribute, const QString &zone))
+ Q_PRIVATE_SLOT(d_func(), void onRecirculationModeChanged(QtIVIClimateControl::RecirculationMode recirculationMode, const QString &zone))
+ Q_PRIVATE_SLOT(d_func(), void onRecirculationModeAttributeChanged(const QtIVIPropertyAttribute<QtIVIClimateControl::RecirculationMode> &attribute, const QString &zone))
+ Q_PRIVATE_SLOT(d_func(), void onRecirculationChanged(bool isRecirculationEnabled, const QString &zone))
+ Q_PRIVATE_SLOT(d_func(), void onRecirculationAttributeChanged(const QtIVIPropertyAttribute<bool> &attribute, const QString &zone))
+ Q_PRIVATE_SLOT(d_func(), void onRecirculationSensitivityLevelChanged(int recirculationSensitivityLevel, const QString &zone))
+ Q_PRIVATE_SLOT(d_func(), void onRecirculationSensitivityLevelAttributeChanged(const QtIVIPropertyAttribute<int> &attribute, const QString &zone))
+ Q_PRIVATE_SLOT(d_func(), void onClimateModeChanged(QtIVIClimateControl::ClimateMode climateMode, const QString &zone))
+ Q_PRIVATE_SLOT(d_func(), void onClimateModeAttributeChanged(const QtIVIPropertyAttribute<QtIVIClimateControl::ClimateMode> &attribute, const QString &zone))
+ Q_PRIVATE_SLOT(d_func(), void onAutomaticClimateFanIntensityLevelChanged(int automaticClimateFanIntensityLevel, const QString &zone))
+ Q_PRIVATE_SLOT(d_func(), void onAutomaticClimateFanIntensityLevelAttributeChanged(const QtIVIPropertyAttribute<int> &attribute, const QString &zone))
};
QT_END_NAMESPACE
Q_DECLARE_METATYPE(QtIVIPropertyAttribute<QtIVIClimateControl::AirflowDirections>)
+Q_DECLARE_METATYPE(QtIVIPropertyAttribute<QtIVIClimateControl::RecirculationMode>)
+Q_DECLARE_METATYPE(QtIVIPropertyAttribute<QtIVIClimateControl::ClimateMode>)
Q_DECLARE_OPERATORS_FOR_FLAGS(QtIVIClimateControl::AirflowDirections)
#endif // CLIMATECONTROL_H
diff --git a/src/ivivehiclefunctions/qtiviclimatecontrol_p.h b/src/ivivehiclefunctions/qtiviclimatecontrol_p.h
index 8c88162..784b094 100644
--- a/src/ivivehiclefunctions/qtiviclimatecontrol_p.h
+++ b/src/ivivehiclefunctions/qtiviclimatecontrol_p.h
@@ -74,8 +74,6 @@ public:
void onAirConditioningAttributeChanged(const QtIVIPropertyAttribute<bool> &airConditioningEnabledAttribute, const QString &zone);
void onHeaterEnabledChanged(bool enabled, const QString &zone);
void onHeaterAttributeChanged(const QtIVIPropertyAttribute<bool> &heaterEnabledAttribute, const QString &zone);
- void onAirRecirculationEnabledChanged(bool enabled, const QString &zone);
- void onAirRecirculationAttributeChanged(const QtIVIPropertyAttribute<bool> &airRecirculationEnabledAttribute, const QString &zone);
void onSteeringWheelHeaterChanged(int value, const QString &zone);
void onSteeringWheelHeaterAttributeChanged(const QtIVIPropertyAttribute<int> &steeringWheelHeaterAttribute, const QString &zone);
void onFanSpeedLevelChanged(int value, const QString &zone);
@@ -86,6 +84,22 @@ public:
void onSeatCoolerAttributeChanged(const QtIVIPropertyAttribute<int> &seatCoolerAttribute, const QString &zone);
void onSeatHeaterChanged(int value, const QString &zone);
void onSeatHeaterAttributeChanged(const QtIVIPropertyAttribute<int> &seatHeaterAttribute, const QString &zone);
+ void onOutsideTemperatureChanged(int outsideTemperature, const QString &zone);
+ void onOutsideTemperatureAttributeChanged(const QtIVIPropertyAttribute<int> &attribute, const QString &zone);
+ void onZoneSynchronizationChanged(bool zoneSynchronization, const QString &zone);
+ void onZoneSynchronizationAttributeChanged(const QtIVIPropertyAttribute<bool> &attribute, const QString &zone);
+ void onDefrostChanged(bool defrost, const QString &zone);
+ void onDefrostAttributeChanged(const QtIVIPropertyAttribute<bool> &attribute, const QString &zone);
+ void onRecirculationModeChanged(QtIVIClimateControl::RecirculationMode recirculationMode, const QString &zone);
+ void onRecirculationModeAttributeChanged(const QtIVIPropertyAttribute<QtIVIClimateControl::RecirculationMode> &attribute, const QString &zone);
+ void onRecirculationChanged(bool recirculation, const QString &zone);
+ void onRecirculationAttributeChanged(const QtIVIPropertyAttribute<bool> &attribute, const QString &zone);
+ void onRecirculationSensitivityLevelChanged(int recirculationSensitivityLevel, const QString &zone);
+ void onRecirculationSensitivityLevelAttributeChanged(const QtIVIPropertyAttribute<int> &attribute, const QString &zone);
+ void onClimateModeChanged(QtIVIClimateControl::ClimateMode climateMode, const QString &zone);
+ void onClimateModeAttributeChanged(const QtIVIPropertyAttribute<QtIVIClimateControl::ClimateMode> &attribute, const QString &zone);
+ void onAutomaticClimateFanIntensityLevelChanged(int automaticClimateFanIntensityLevel, const QString &zone);
+ void onAutomaticClimateFanIntensityLevelAttributeChanged(const QtIVIPropertyAttribute<int> &attribute, const QString &zone);
QtIVIClimateControlBackendInterface* climateControlBackend();
@@ -98,9 +112,6 @@ public:
bool m_heater;
QtIVIPropertyAttribute<bool> m_heaterAttribute;
QtIVIProperty *m_heaterProperty;
- bool m_airRecirculation;
- QtIVIPropertyAttribute<bool> m_airRecirculationAttribute;
- QtIVIProperty *m_airRecirculationProperty;
int m_targetTemperature;
QtIVIPropertyAttribute<int> m_targetTemperatureAttribute;
QtIVIProperty *m_targetTemperatureProperty;
@@ -116,6 +127,30 @@ public:
int m_fanSpeedLevel;
QtIVIPropertyAttribute<int> m_fanSpeedLevelAttribute;
QtIVIProperty *m_fanSpeedLevelProperty;
+ int m_outsideTemperature;
+ QtIVIPropertyAttribute<int> m_outsideTemperatureAttribute;
+ QtIVIProperty *m_outsideTemperatureProperty;
+ bool m_zoneSynchronization;
+ QtIVIPropertyAttribute<bool> m_zoneSynchronizationAttribute;
+ QtIVIProperty *m_zoneSynchronizationProperty;
+ bool m_defrost;
+ QtIVIPropertyAttribute<bool> m_defrostAttribute;
+ QtIVIProperty *m_defrostProperty;
+ QtIVIClimateControl::RecirculationMode m_recirculationMode;
+ QtIVIPropertyAttribute<QtIVIClimateControl::RecirculationMode> m_recirculationModeAttribute;
+ QtIVIProperty *m_recirculationModeProperty;
+ bool m_recirculation;
+ QtIVIPropertyAttribute<bool> m_recirculationAttribute;
+ QtIVIProperty *m_recirculationProperty;
+ int m_recirculationSensitivityLevel;
+ QtIVIPropertyAttribute<int> m_recirculationSensitivityLevelAttribute;
+ QtIVIProperty *m_recirculationSensitivityLevelProperty;
+ QtIVIClimateControl::ClimateMode m_climateMode;
+ QtIVIPropertyAttribute<QtIVIClimateControl::ClimateMode> m_climateModeAttribute;
+ QtIVIProperty *m_climateModeProperty;
+ int m_automaticClimateFanIntensityLevel;
+ QtIVIPropertyAttribute<int> m_automaticClimateFanIntensityLevelAttribute;
+ QtIVIProperty *m_automaticClimateFanIntensityLevelProperty;
QtIVIClimateControl * const q_ptr;
Q_DECLARE_PUBLIC(QtIVIClimateControl)
diff --git a/src/ivivehiclefunctions/qtiviclimatecontrolbackendinterface.cpp b/src/ivivehiclefunctions/qtiviclimatecontrolbackendinterface.cpp
index dc8bec8..39bdb15 100644
--- a/src/ivivehiclefunctions/qtiviclimatecontrolbackendinterface.cpp
+++ b/src/ivivehiclefunctions/qtiviclimatecontrolbackendinterface.cpp
@@ -75,8 +75,8 @@ QtIVIClimateControlBackendInterface::QtIVIClimateControlBackendInterface(QObject
* Sets the target temperature of \a zone to \a value, where the \a value is expressed in
* centigrades and may be range limited by the backend.
*
- * This method is expected to emit a \l targetTemperatureChanged() signal when receiving a new
- * \a value. The signal is expected to be emitted if the given \a value is out of range and no
+ * This method is expected to emit a \l targetTemperatureChanged() signal when the internal state changes
+ * due to this function call. The signal is even expected to be emitted if the given \a value is out of range and no
* actual change takes place.
*
* \sa targetTemperatureChanged()
@@ -85,11 +85,10 @@ QtIVIClimateControlBackendInterface::QtIVIClimateControlBackendInterface(QObject
/*!
* \fn virtual void QtIVIClimateControlBackendInterface::setSeatCooler(int value, const QString &zone) = 0
*
- * Sets the seat ventilation level of \a zone to \a value, where \a value can be \c 0 (off) or
- * between \c 1 (least cool) to \c 10 (coolest).
+ * Sets the seat ventilation level of \a zone to \a value. The range can be defined using the attribute system.
*
- * This method is expected to emit a \l seatCoolerChanged() signal when receiving a new
- * \a value. The signal is expected to be emitted if the given \a value is out of range and no
+ * This method is expected to emit a \l seatCoolerChanged() signal when the internal state changes
+ * due to this function call. The signal is even expected to be emitted if the given \a value is out of range and no
* actual change takes place.
*
* \sa seatCoolerChanged()
@@ -98,11 +97,10 @@ QtIVIClimateControlBackendInterface::QtIVIClimateControlBackendInterface(QObject
/*!
* \fn virtual void QtIVIClimateControlBackendInterface::setSeatHeater(int value, const QString &zone) = 0;
*
- * Sets the seat heater level of \a zone to \a value, where \a value can be \c 0 (off) or between
- * \c 1 (least warm) to \c 10 (warmest).
+ * Sets the seat heater level of \a zone to \a value. The range can be defined using the attribute system.
*
- * This method is expected to emit a \l seatHeaterChanged() signal when receiving a new
- * \a value. The signal is expected to be emitted if the given \a value is out of range and no
+ * This method is expected to emit a \l seatHeaterChanged() signal when the internal state changes
+ * due to this function call. The signal is even expected to be emitted if the given \a value is out of range and no
* actual change takes place.
*
* \sa seatHeaterChanged()
@@ -113,8 +111,8 @@ QtIVIClimateControlBackendInterface::QtIVIClimateControlBackendInterface(QObject
*
* Sets the \a zone air flow directions to \a airflowDirections.
*
- * This method is expected to emit the \l airflowDirectionsChanged() signal when receiving a
- * new \a airflowDirections.
+ * This method is expected to emit the \l airflowDirectionsChanged() signal when the internal state changes
+ * due to this function call.
*
* \sa airflowDirectionsChanged()
*/
@@ -124,8 +122,8 @@ QtIVIClimateControlBackendInterface::QtIVIClimateControlBackendInterface(QObject
*
* Enables or disables the \a zone air conditioning based on \a enabled.
*
- * This method is expected to emit the \l airConditioningEnabledChanged() signal when receiving a
- * new \a enabled.
+ * This method is expected to emit the \l airConditioningEnabledChanged() signal when the internal state changes
+ * due to this function call.
*
* \sa airConditioningEnabledChanged()
*/
@@ -135,8 +133,8 @@ QtIVIClimateControlBackendInterface::QtIVIClimateControlBackendInterface(QObject
*
* Enables or disables the \a zone heater based on \a enabled.
*
- * This method is expected to emit the \l heaterEnabledChanged() signal when receiving a
- * new \a enabled.
+ * This method is expected to emit the \l heaterEnabledChanged() signal when the internal state changes
+ * due to this function call.
*
* \sa heaterEnabledChanged()
*/
@@ -146,8 +144,8 @@ QtIVIClimateControlBackendInterface::QtIVIClimateControlBackendInterface(QObject
*
* Enables or disables the \a zone air recirculation based on \a enabled.
*
- * This method is expected to emit the \l airRecirculationEnabledChanged() signal when receiving a
- * new \a enabled.
+ * This method is expected to emit the \l airRecirculationEnabledChanged() signal when the internal state changes
+ * due to this function call.
*
* \sa airRecirculationEnabledChanged()
*/
@@ -155,11 +153,10 @@ QtIVIClimateControlBackendInterface::QtIVIClimateControlBackendInterface(QObject
/*!
* \fn virtual void QtIVIClimateControlBackendInterface::setSteeringWheelHeater(int value, const QString &zone) = 0
*
- * Sets the steering wheel heater level of \a zone to \a value, where \a value can be \c 0 (off)
- * or between \c 1 (least warm) to \c 10 (warmest).
+ * Sets the steering wheel heater level of \a zone to \a value. The range can be defined using the attribute system.
*
- * This method is expected to emit a \l steeringWheelHeaterChanged() signal when receiving a new
- * \a value. The signal is expected to be emitted if the given \a value is out of range and no
+ * This method is expected to emit a \l steeringWheelHeaterChanged() signal when the internal state changes
+ * due to this function call. The signal is even expected to be emitted if the given \a value is out of range and no
* actual change takes place.
*
* \sa steeringWheelHeaterChanged()
@@ -168,17 +165,84 @@ QtIVIClimateControlBackendInterface::QtIVIClimateControlBackendInterface(QObject
/*!
* \fn virtual void QtIVIClimateControlBackendInterface::setFanSpeedLevel(int value, const QString &zone) = 0
*
- * Sets the fan speed level of \a zone to \a value, where \a value can be \c 0 (off) or between
- * \c 1 (weakest) to \c 10 (strongest).
+ * Sets the fan speed level of \a zone to \a value. The range can be defined using the attribute system.
*
- * This method is expected to emit a \l fanSpeedLevelChanged() signal when receiving a new
- * \a value. The signal is expected to be emitted if the given \a value is out of range and no
+ * This method is expected to emit a \l fanSpeedLevelChanged() signal when the internal state changes
+ * due to this function call. The signal is even expected to be emitted if the given \a value is out of range and no
* actual change takes place.
*
* \sa fanSpeedLevelChanged()
*/
/*!
+ * \fn virtual void QtIVIClimateControlBackendInterface::setZoneSynchronizationEnabled(bool enabled, const QString &zone) = 0
+ *
+ * Enables or disables the \a zone synchronization based on \a enabled.
+ *
+ * This method is expected to emit the \l zoneSynchronizationEnabledChanged() signal when the internal state changes
+ * due to this function call.
+ *
+ * \sa zoneSynchronizationEnabledChanged()
+ */
+
+/*!
+ * \fn virtual void QtIVIClimateControlBackendInterface::setDefrostEnabled(bool enabled, const QString &zone) = 0
+ *
+ * Enables or disables the \a zone defrost mode based on \a enabled.
+ *
+ * This method is expected to emit the \l defrostEnabledChanged() signal when the internal state changes
+ * due to this function call.
+ *
+ * \sa defrostEnabledChanged()
+ */
+
+/*!
+ * \fn virtual void QtIVIClimateControlBackendInterface::setRecirculationMode(QtIVIClimateControl::RecirculationMode, const QString &zone) = 0;
+ *
+ * Sets the \a zone recirculation mode to \a recirculationMode.
+ *
+ * This method is expected to emit the \l recirculationModeChanged() signal when the internal state changes
+ * due to this function call.
+ *
+ * \sa recirculationModeChanged()
+ */
+
+/*!
+ * \fn virtual void QtIVIClimateControlBackendInterface::setRecirculationSensitivityLevel(int value, const QString &zone) = 0
+ *
+ * Sets the recirculation sensitivity level of \a zone to \a value. The range can be defined using the attribute system.
+ *
+ * This method is expected to emit a \l recirculationSensitivityLevelChanged() signal when the internal state changes
+ * due to this function call. The signal is even expected to be emitted if the given \a value is out of range and no
+ * actual change takes place.
+ *
+ * \sa recirculationSensitivityLevelChanged()
+ */
+
+/*!
+ * \fn virtual void QtIVIClimateControlBackendInterface::setClimateMode(QtIVIClimateControl::ClimateMode, const QString &zone) = 0;
+ *
+ * Sets the \a zone climate mode to \a climateMode.
+ *
+ * This method is expected to emit the \l climateModeChanged() signal when the internal state changes
+ * due to this function call.
+ *
+ * \sa climateModeChanged()
+ */
+
+/*!
+ * \fn virtual void QtIVIClimateControlBackendInterface::setAutomaticClimateFanIntensityLevel(int value, const QString &zone) = 0
+ *
+ * Sets the fan intensity level for the AutomaticClimate mode of \a zone to \a value. The range can be defined using the attribute system.
+ *
+ * This method is expected to emit a \l automaticClimateFanIntensityLevelChanged() signal when the internal state changes
+ * due to this function call. The signal is even expected to be emitted if the given \a value is out of range and no
+ * actual change takes place.
+ *
+ * \sa automaticClimateFanIntensityLevelChanged()
+ */
+
+/*!
* \fn virtual void QtIVIClimateControlBackendInterface::targetTemperatureChanged(int value, const QString &zone = QString()) = 0
*
* The signal is emitted when the target temperature for \a zone is changed to \a value, where
@@ -196,8 +260,7 @@ QtIVIClimateControlBackendInterface::QtIVIClimateControlBackendInterface(QObject
/*!
* \fn virtual void QtIVIClimateControlBackendInterface::seatCoolerChanged(int value, const QString &zone = QString()) = 0
*
- * The signal is emitted when the seat cooler level is changed for \a zone to \a value, where the
- * \a value can be \c 0 (off) or between \c 1 (least cool) to \c 10 (coolest).
+ * The signal is emitted when the seat cooler level is changed for \a zone to \a value. The range can be defined using the attribute system.
*
* \sa setSeatCooler()
*/
@@ -211,8 +274,7 @@ QtIVIClimateControlBackendInterface::QtIVIClimateControlBackendInterface(QObject
/*!
* \fn virtual void QtIVIClimateControlBackendInterface::seatHeaterChanged(int value, const QString &zone = QString()) = 0
*
- * The signal is emitted when the seat heater level is changed for \a zone to \a value, where the
- * \a value can be \c 0 (off) or between \c 1 (least warm) to \c 10 (warmest).
+ * The signal is emitted when the seat heater level is changed for \a zone to \a value. The range can be defined using the attribute system.
*
* \sa setSeatHeater()
*/
@@ -266,45 +328,140 @@ QtIVIClimateControlBackendInterface::QtIVIClimateControlBackendInterface(QObject
*/
/*!
- * \fn virtual void QtIVIClimateControlBackendInterface::airRecirculationEnabledChanged(bool enabled, const QString &zone = QString()) = 0
+ * \fn virtual void QtIVIClimateControlBackendInterface::steeringWheelHeaterChanged(int level, const QString &zone = QString()) = 0
*
- * The signal is emitted when the \a zone air recirculation state is changed to \a enabled.
+ * The signals is emitted when the steering wheel heater level of \a zone is changed to \a level. The range can be defined using the attribute system.
*
- * \sa setAirRecirculationEnabled()
+ * \sa setSteeringWheelHeater()
*/
/*!
- * \fn void QtIVIClimateControlBackendInterface::airRecirculationAttributeChanged(const QtIVIPropertyAttribute<bool> &attribute, const QString &zone = QString());
+ * \fn void QtIVIClimateControlBackendInterface::steeringWheelHeaterAttributeChanged(const QtIVIPropertyAttribute<int> &attribute, const QString &zone = QString());
*
- * The signal is emitted when the air recirculation state attribute for \a zone is changed to \a attribute.
+ * The signal is emitted when the steering wheel heater level attribute for \a zone is changed to \a attribute.
*/
/*!
- * \fn virtual void QtIVIClimateControlBackendInterface::steeringWheelHeaterChanged(int level, const QString &zone = QString()) = 0
+ * \fn virtual void QtIVIClimateControlBackendInterface::fanSpeedLevelChanged(int level, const QString &zone = QString()) = 0
*
- * The signals ie emitted when the steering wheel heater level of \a zone is changed to \a level, where the
- * \a level can be \c 0 (off) or between \c 1 (least warm) to \c 10 (warmest).
+ * The signals is emitted when the fan speel level of \a zone is changed to \a level. The range can be defined using the attribute system.
*
- * \sa setSteeringWheelHeater()
+ * \sa setFanSpeedLevel()
*/
/*!
- * \fn void QtIVIClimateControlBackendInterface::steeringWheelHeaterAttributeChanged(const QtIVIPropertyAttribute<int> &attribute, const QString &zone = QString());
+ * \fn void QtIVIClimateControlBackendInterface::fanSpeedLevelAttributeChanged(const QtIVIPropertyAttribute<int> &attribute, const QString &zone = QString());
*
- * The signal is emitted when the steering wheel heater level attribute for \a zone is changed to \a attribute.
+ * The signal is emitted when the recirculation sensitivity level for \a zone is changed to \a attribute.
*/
/*!
- * \fn virtual void QtIVIClimateControlBackendInterface::fanSpeedLevelChanged(int level, const QString &zone = QString()) = 0
+ * \fn virtual void QtIVIClimateControlBackendInterface::outsideTemperatureChanged(int value, const QString &zone = QString()) = 0
*
- * The signals ie emitted when the fan speel level of \a zone is changed to \a level, where the \a level
- * can be \c 0 (off) or between \c 1 (weakest) to \c 10 (strongest).
+ * The signal is emitted when the outside temperature for \a zone is changed to \a value, where
+ * value is expressed in centigrades.
+ */
+
+/*!
+ * \fn void QtIVIClimateControlBackendInterface::outsideTemperatureAttributeChanged(const QtIVIPropertyAttribute<int> &attribute, const QString &zone = QString());
*
- * \sa setFanSpeedLevel()
+ * The signal is emitted when the outside temperature attribute for \a zone is changed to \a attribute.
*/
/*!
- * \fn void QtIVIClimateControlBackendInterface::fanSpeedLevelAttributeChanged(const QtIVIPropertyAttribute<int> &attribute, const QString &zone = QString());
+ * \fn virtual void QtIVIClimateControlBackendInterface::zoneSynchronizationEnabledChanged(bool enabled, const QString &zone = QString()) = 0
+ *
+ * The signal is emitted when the \a zone synchronization state is changed to \a enabled.
+ *
+ * \sa setZoneSynchronizationEnabled()
+ */
+
+/*!
+ * \fn void QtIVIClimateControlBackendInterface::zoneSynchronizationAttributeChanged(const QtIVIPropertyAttribute<bool> &attribute, const QString &zone = QString());
+ *
+ * The signal is emitted when the zone synchronization state attribute for \a zone is changed to \a attribute.
+ */
+
+
+/*!
+ * \fn virtual void QtIVIClimateControlBackendInterface::defrostEnabledChanged(bool enabled, const QString &zone = QString()) = 0
+ *
+ * The signal is emitted when the \a zone defrost state is changed to \a enabled.
+ *
+ * \sa setDefrostEnabled()
+ */
+
+/*!
+ * \fn void QtIVIClimateControlBackendInterface::defrostAttributeChanged(const QtIVIPropertyAttribute<bool> &attribute, const QString &zone = QString());
+ *
+ * The signal is emitted when the defrost state attribute for \a zone is changed to \a attribute.
+ */
+
+
+/*!
+ * \fn virtual void QtIVIClimateControlBackendInterface::recirculationModeChanged(QtIVIClimateControl::RecirculationMode recirculationMode, const QString &zone = QString()) = 0
+ *
+ * The signal is emitted when the \a zone recirculation mode changed to \a recirculationMode.
+ *
+ * \sa setRecirculationMode()
+ */
+
+/*!
+ * \fn void QtIVIClimateControlBackendInterface::recirculationModeAttributeChanged(const QtIVIPropertyAttribute<QtIVIClimateControl::RecirculationMode> &attribute, const QString &zone = QString());
+ *
+ * The signal is emitted when the recirculation mode attribute for \a zone is changed to \a attribute.
+ */
+
+/*!
+ * \fn virtual void QtIVIClimateControlBackendInterface::recirculationEnabledChanged(bool enabled, const QString &zone = QString()) = 0
+ *
+ * The signal is emitted when the \a zone recirculation state is changed to \a enabled.
+ */
+
+/*!
+ * \fn void QtIVIClimateControlBackendInterface::recirculationAttributeChanged(const QtIVIPropertyAttribute<bool> &attribute, const QString &zone = QString());
+ *
+ * The signal is emitted when the recirculation state attribute for \a zone is changed to \a attribute.
+ */
+
+/*!
+ * \fn virtual void QtIVIClimateControlBackendInterface::recirculationSensitivityLevelChanged(int level, const QString &zone = QString()) = 0
+ *
+ * The signals is emitted when the recirculation sensitivity level for \a zone is changed to \a level. The range can be defined using the attribute system.
+ *
+ * \sa setRecirculationSensitivityLevel()
+ */
+
+/*!
+ * \fn void QtIVIClimateControlBackendInterface::recirculationSensitivityLevelAttributeChanged(const QtIVIPropertyAttribute<int> &attribute, const QString &zone = QString());
+ *
+ * The signal is emitted when the fan intensity level for the AutomaticClimate mode for \a zone is changed to \a attribute.
+ */
+
+/*!
+ * \fn virtual void QtIVIClimateControlBackendInterface::climateModeChanged(QtIVIClimateControl::ClimateMode climateMode, const QString &zone = QString()) = 0
+ *
+ * The signal is emitted when the \a zone climate mode changed to \a climateMode.
+ *
+ * \sa setAirflowDirections()
+ */
+
+/*!
+ * \fn void QtIVIClimateControlBackendInterface::climateModeAttributeChanged(const QtIVIPropertyAttribute<QtIVIClimateControl::ClimateMode> &attribute, const QString &zone = QString());
+ *
+ * The signal is emitted when the climate mode attribute for \a zone is changed to \a attribute.
+ */
+
+/*!
+ * \fn virtual void QtIVIClimateControlBackendInterface::automaticClimateFanIntensityLevelChanged(int level, const QString &zone = QString()) = 0
+ *
+ * The signals is emitted when the fan intensity level for the AutomaticClimate mode for \a zone is changed to \a level. The range can be defined using the attribute system.
+ *
+ * \sa setAutomaticClimateFanIntensityLevel()
+ */
+
+/*!
+ * \fn void QtIVIClimateControlBackendInterface::automaticClimateFanIntensityLevelAttributeChanged(const QtIVIPropertyAttribute<int> &attribute, const QString &zone = QString());
*
- * The signal is emitted when the fan speed level attribute for \a zone is changed to \a attribute.
+ * The signal is emitted when the fan intensity level for the AutomaticClimate mode for \a zone is changed to \a attribute.
*/
diff --git a/src/ivivehiclefunctions/qtiviclimatecontrolbackendinterface.h b/src/ivivehiclefunctions/qtiviclimatecontrolbackendinterface.h
index 382a808..58b5fed 100644
--- a/src/ivivehiclefunctions/qtiviclimatecontrolbackendinterface.h
+++ b/src/ivivehiclefunctions/qtiviclimatecontrolbackendinterface.h
@@ -62,11 +62,15 @@ public:
virtual void setSeatHeater(int value, const QString &zone) = 0;
virtual void setSteeringWheelHeater(int value, const QString &zone) = 0;
virtual void setFanSpeedLevel(int value, const QString &zone) = 0;
-
virtual void setAirflowDirections(QtIVIClimateControl::AirflowDirections airflowDirections, const QString &zone) = 0;
virtual void setAirConditioningEnabled(bool enabled, const QString &zone) = 0;
virtual void setHeaterEnabled(bool enabled, const QString &zone) = 0;
- virtual void setAirRecirculationEnabled(bool enabled, const QString &zone) = 0;
+ virtual void setZoneSynchronizationEnabled(bool zoneSynchronization, const QString &zone) = 0;
+ virtual void setDefrostEnabled(bool defrost, const QString &zone) = 0;
+ virtual void setRecirculationMode(QtIVIClimateControl::RecirculationMode recirculationMode, const QString &zone) = 0;
+ virtual void setRecirculationSensitivityLevel(int recirculationSensitivityLevel, const QString &zone) = 0;
+ virtual void setClimateMode(QtIVIClimateControl::ClimateMode climateMode, const QString &zone) = 0;
+ virtual void setAutomaticClimateFanIntensityLevel(int automaticClimateFanIntensityLevel, const QString &zone) = 0;
Q_SIGNALS:
void targetTemperatureChanged(int value, const QString &zone = QString());
@@ -85,8 +89,22 @@ Q_SIGNALS:
void airConditioningAttributeChanged(const QtIVIPropertyAttribute<bool> &attribute, const QString &zone = QString());
void heaterEnabledChanged(bool value, const QString &zone = QString());
void heaterAttributeChanged(const QtIVIPropertyAttribute<bool> &attribute, const QString &zone = QString());
- void airRecirculationEnabledChanged(bool value, const QString &zone = QString());
- void airRecirculationAttributeChanged(const QtIVIPropertyAttribute<bool> &attribute, const QString &zone = QString());
+ void outsideTemperatureChanged(int outsideTemperature, const QString &zone = QString());
+ void outsideTemperatureAttributeChanged(const QtIVIPropertyAttribute<int> &outsideTemperature, const QString &zone = QString());
+ void zoneSynchronizationEnabledChanged(bool zoneSynchronization, const QString &zone = QString());
+ void zoneSynchronizationAttributeChanged(const QtIVIPropertyAttribute<bool> &zoneSynchronization, const QString &zone = QString());
+ void defrostEnabledChanged(bool defrost, const QString &zone = QString());
+ void defrostAttributeChanged(const QtIVIPropertyAttribute<bool> &defrost, const QString &zone = QString());
+ void recirculationModeChanged(QtIVIClimateControl::RecirculationMode recirculationMode, const QString &zone = QString());
+ void recirculationModeAttributeChanged(const QtIVIPropertyAttribute<QtIVIClimateControl::RecirculationMode> &recirculationMode, const QString &zone = QString());
+ void recirculationEnabledChanged(bool recirculation, const QString &zone = QString());
+ void recirculationAttributeChanged(const QtIVIPropertyAttribute<bool> &recirculation, const QString &zone = QString());
+ void recirculationSensitivityLevelChanged(int recirculationSensitivityLevel, const QString &zone = QString());
+ void recirculationSensitivityLevelAttributeChanged(const QtIVIPropertyAttribute<int> &recirculationSensitivityLevel, const QString &zone = QString());
+ void climateModeChanged(QtIVIClimateControl::ClimateMode climateMode, const QString &zone = QString());
+ void climateModeAttributeChanged(const QtIVIPropertyAttribute<QtIVIClimateControl::ClimateMode> &climateMode, const QString &zone = QString());
+ void automaticClimateFanIntensityLevelChanged(int automaticClimateFanIntensityLevel, const QString &zone = QString());
+ void automaticClimateFanIntensityLevelAttributeChanged(const QtIVIPropertyAttribute<int> &automaticClimateFanIntensityLevel, const QString &zone = QString());
};
QT_END_NAMESPACE
diff --git a/src/plugins/ivivehiclefunctions/climate_simulator/climatecontrolbackend.cpp b/src/plugins/ivivehiclefunctions/climate_simulator/climatecontrolbackend.cpp
index 23f714f..9656d6e 100644
--- a/src/plugins/ivivehiclefunctions/climate_simulator/climatecontrolbackend.cpp
+++ b/src/plugins/ivivehiclefunctions/climate_simulator/climatecontrolbackend.cpp
@@ -49,8 +49,14 @@ ClimateControlBackend::ClimateControlBackend(QObject *parent) :
m_airCondition(true),
m_heater(true),
m_airRecirculation(false),
+ m_zoneSynchronization(false),
+ m_defrost(false),
m_steeringWheelHeater(0),
- m_fanSpeed(2)
+ m_fanSpeed(2),
+ m_recirculationMode(QtIVIClimateControl::RecirculationOff),
+ m_recirculationSensitivityLevel(0),
+ m_climateMode(QtIVIClimateControl::ClimateOn),
+ m_automaticClimateFanIntensityLevel(0)
{
ZoneBackend leftZone;
@@ -92,21 +98,37 @@ QStringList ClimateControlBackend::availableZones() const
void ClimateControlBackend::initializeAttributes()
{
- QVector<QtIVIClimateControl::AirflowDirections> list;
- list << (QtIVIClimateControl::Floor | QtIVIClimateControl::Dashboard) << QtIVIClimateControl::Floor << QtIVIClimateControl::Dashboard;
- emit airflowDirectionsAttributeChanged(QtIVIPropertyAttribute<QtIVIClimateControl::AirflowDirections>(list));
+ QVector<QtIVIClimateControl::AirflowDirections> airflow;
+ airflow << (QtIVIClimateControl::Floor | QtIVIClimateControl::Dashboard) << QtIVIClimateControl::Floor << QtIVIClimateControl::Dashboard;
+ emit airflowDirectionsAttributeChanged(QtIVIPropertyAttribute<QtIVIClimateControl::AirflowDirections>(airflow));
emit airflowDirectionsChanged(m_flowDirection);
emit airConditioningAttributeChanged(QtIVIPropertyAttribute<bool>(true));
emit airConditioningEnabledChanged(m_airCondition);
emit heaterAttributeChanged(QtIVIPropertyAttribute<bool>(true));
emit heaterEnabledChanged(m_heater);
- emit airRecirculationAttributeChanged(QtIVIPropertyAttribute<bool>(true));
- emit airRecirculationEnabledChanged(m_airRecirculation);
+ emit zoneSynchronizationEnabledChanged(m_zoneSynchronization);
+ emit zoneSynchronizationAttributeChanged(QtIVIPropertyAttribute<bool>(true));
+ emit defrostEnabledChanged(m_defrost);
+ emit defrostAttributeChanged(QtIVIPropertyAttribute<bool>(true));
emit steeringWheelHeaterAttributeChanged(QtIVIPropertyAttribute<int>(false));
emit steeringWheelHeaterChanged(m_steeringWheelHeater);
emit fanSpeedLevelAttributeChanged(QtIVIPropertyAttribute<int>(0, 10));
emit fanSpeedLevelChanged(m_fanSpeed);
+ QVector<QtIVIClimateControl::RecirculationMode> recirculation;
+ recirculation << QtIVIClimateControl::RecirculationOff << QtIVIClimateControl::RecirculationOn;
+ emit recirculationModeChanged(m_recirculationMode);
+ emit recirculationModeAttributeChanged(QtIVIPropertyAttribute<QtIVIClimateControl::RecirculationMode>(recirculation));
+ emit recirculationSensitivityLevelChanged(m_recirculationSensitivityLevel);
+ emit recirculationSensitivityLevelAttributeChanged(QtIVIPropertyAttribute<int>(false));
+
+ QVector<QtIVIClimateControl::ClimateMode> climate;
+ climate << QtIVIClimateControl::ClimateOff << QtIVIClimateControl::ClimateOn;
+ emit climateModeChanged(m_climateMode);
+ emit climateModeAttributeChanged(QtIVIPropertyAttribute<QtIVIClimateControl::ClimateMode>(climate));
+ emit automaticClimateFanIntensityLevelChanged(m_automaticClimateFanIntensityLevel);
+ emit automaticClimateFanIntensityLevelAttributeChanged(QtIVIPropertyAttribute<int>(false));
+
foreach (QString zone, availableZones()) {
emit targetTemperatureAttributeChanged(m_zoneMap[zone].targetTemperatureAttribute, zone);
emit targetTemperatureChanged(m_zoneMap[zone].targetTemperature, zone);
@@ -226,13 +248,60 @@ void ClimateControlBackend::setHeaterEnabled(bool val, const QString &zone)
emit heaterEnabledChanged(val);
}
-void ClimateControlBackend::setAirRecirculationEnabled(bool val, const QString &zone)
+void ClimateControlBackend::setZoneSynchronizationEnabled(bool zoneSynchronization, const QString &zone)
+{
+ if (!zone.isEmpty() || m_zoneSynchronization == zoneSynchronization)
+ return;
+
+ qWarning() << "SIMULATION ZoneSynchronization changed to" << zoneSynchronization;
+
+ m_zoneSynchronization = zoneSynchronization;
+ emit zoneSynchronizationEnabledChanged(zoneSynchronization);
+}
+
+void ClimateControlBackend::setDefrostEnabled(bool defrost, const QString &zone)
+{
+ if (!zone.isEmpty() || m_defrost == defrost)
+ return;
+
+ qWarning() << "SIMULATION Defrost changed to" << defrost;
+
+ m_defrost = defrost;
+ emit defrostEnabledChanged(defrost);
+}
+
+void ClimateControlBackend::setRecirculationMode(QtIVIClimateControl::RecirculationMode recirculationMode, const QString &zone)
{
- if (!zone.isEmpty() || m_airRecirculation == val)
+ if (!zone.isEmpty() || m_recirculationMode == recirculationMode)
return;
- qWarning() << "SIMULATION AirRecirculationEnabled changed to" << val;
+ qWarning() << "SIMULATION RecirculationMode changed to" << recirculationMode;
+
+ m_recirculationMode = recirculationMode;
+ emit recirculationModeChanged(recirculationMode);
+}
- m_airRecirculation = val;
- emit airRecirculationEnabledChanged(val);
+void ClimateControlBackend::setRecirculationSensitivityLevel(int recirculationSensitivityLevel, const QString &zone)
+{
+ Q_UNUSED(recirculationSensitivityLevel);
+ Q_UNUSED(zone);
+ qWarning() << "SIMULATION Setting RecirculationSensitivityLevel is not supported!";
+}
+
+void ClimateControlBackend::setClimateMode(QtIVIClimateControl::ClimateMode climateMode, const QString &zone)
+{
+ if (!zone.isEmpty() || m_climateMode == climateMode)
+ return;
+
+ qWarning() << "SIMULATION ZoneSynchronization changed to" << climateMode;
+
+ m_climateMode = climateMode;
+ emit climateModeChanged(climateMode);
+}
+
+void ClimateControlBackend::setAutomaticClimateFanIntensityLevel(int automaticClimateFanIntensityLevel, const QString &zone)
+{
+ Q_UNUSED(automaticClimateFanIntensityLevel);
+ Q_UNUSED(zone);
+ qWarning() << "SIMULATION Setting AutomaticClimateFanIntensityLevel is not supported!";
}
diff --git a/src/plugins/ivivehiclefunctions/climate_simulator/climatecontrolbackend.h b/src/plugins/ivivehiclefunctions/climate_simulator/climatecontrolbackend.h
index 89081e4..8ee25c1 100644
--- a/src/plugins/ivivehiclefunctions/climate_simulator/climatecontrolbackend.h
+++ b/src/plugins/ivivehiclefunctions/climate_simulator/climatecontrolbackend.h
@@ -56,7 +56,6 @@ public:
void initializeAttributes();
- QtIVIPropertyAttribute<int> targetTemperatureAttribute(const QString &zone) const;
void setTargetTemperature(int val, const QString &zone);
void setSeatCooler(int val, const QString &zone);
void setSeatHeater(int val, const QString &zone);
@@ -65,7 +64,12 @@ public:
void setAirflowDirections(QtIVIClimateControl::AirflowDirections direction, const QString &zone);
void setAirConditioningEnabled(bool val, const QString &zone);
void setHeaterEnabled(bool val, const QString &zone);
- void setAirRecirculationEnabled(bool val, const QString &zone);
+ void setZoneSynchronizationEnabled(bool zoneSynchronization, const QString &zone);
+ void setDefrostEnabled(bool defrost, const QString &zone);
+ void setRecirculationMode(QtIVIClimateControl::RecirculationMode recirculationMode, const QString &zone);
+ void setRecirculationSensitivityLevel(int recirculationSensitivityLevel, const QString &zone);
+ void setClimateMode(QtIVIClimateControl::ClimateMode climateMode, const QString &zone);
+ void setAutomaticClimateFanIntensityLevel(int automaticClimateFanIntensityLevel, const QString &zone);
private:
@@ -73,8 +77,14 @@ private:
bool m_airCondition;
bool m_heater;
bool m_airRecirculation;
+ bool m_zoneSynchronization;
+ bool m_defrost;
int m_steeringWheelHeater;
int m_fanSpeed;
+ QtIVIClimateControl::RecirculationMode m_recirculationMode;
+ int m_recirculationSensitivityLevel;
+ QtIVIClimateControl::ClimateMode m_climateMode;
+ int m_automaticClimateFanIntensityLevel;
struct ZoneBackend {
int targetTemperature;
diff --git a/tests/auto/vehiclefunctions/climatecontroltest/tst_climatecontroltest.cpp b/tests/auto/vehiclefunctions/climatecontroltest/tst_climatecontroltest.cpp
index 522b046..ddbf09d 100644
--- a/tests/auto/vehiclefunctions/climatecontroltest/tst_climatecontroltest.cpp
+++ b/tests/auto/vehiclefunctions/climatecontroltest/tst_climatecontroltest.cpp
@@ -43,12 +43,30 @@ public:
, m_airConditioningAttribute(QtIVIPropertyAttribute<bool>(true))
, m_heaterEnabled(false)
, m_heaterAttribute(QtIVIPropertyAttribute<bool>(true))
- , m_airRecirculationEnabled(false)
- , m_airRecirculationAttribute(QtIVIPropertyAttribute<bool>(true))
+ , m_zoneSynchronizationEnabled(false)
+ , m_zoneSynchronizationAttribute(QtIVIPropertyAttribute<bool>(true))
+ , m_defrostEnabled(false)
+ , m_defrostAttribute(QtIVIPropertyAttribute<bool>(true))
+ , m_recirculationMode(QtIVIClimateControl::RecirculationOff)
+ , m_recirculationSensitivityLevel(0)
+ , m_recirculationSensitivityLevelAttribute(QtIVIPropertyAttribute<int>(0, 10))
+ , m_climateMode(QtIVIClimateControl::ClimateOff)
+ , m_automaticClimateFanIntensityLevel(0)
+ , m_automaticClimateFanIntensityLevelAttribute(QtIVIPropertyAttribute<int>(0, 10))
+ , m_outsideTemperature(0)
+ , m_outsideTemperatureAttribute(QtIVIPropertyAttribute<int>(0, 10))
+ , m_recirculationEnabled(false)
+ , m_recirculationAttribute(true)
{
QVector<QtIVIClimateControl::AirflowDirections> list;
list << (QtIVIClimateControl::Floor | QtIVIClimateControl::Dashboard) << QtIVIClimateControl::Floor << QtIVIClimateControl::Dashboard;
m_airflowDirectionsAttribute = list;
+ QVector<QtIVIClimateControl::RecirculationMode> recirculation;
+ recirculation << QtIVIClimateControl::RecirculationOff << QtIVIClimateControl::RecirculationOn;
+ m_recirculationModeAttribute = recirculation;
+ QVector<QtIVIClimateControl::ClimateMode> climate;
+ climate << QtIVIClimateControl::ClimateOff << QtIVIClimateControl::ClimateOn;
+ m_climateModeAttribute = climate;
m_zones << "FrontLeft" << "Upper" << "Lower";
foreach (const QString &z, m_zones) {
m_zoneTargetTemperature[z] = 0;
@@ -78,8 +96,22 @@ public:
emit airConditioningAttributeChanged(m_airConditioningAttribute);
emit heaterEnabledChanged(m_heaterEnabled);
emit heaterAttributeChanged(m_heaterAttribute);
- emit airRecirculationEnabledChanged(m_airRecirculationEnabled);
- emit airRecirculationAttributeChanged(m_airRecirculationAttribute);
+ emit zoneSynchronizationEnabledChanged(m_zoneSynchronizationEnabled);
+ emit zoneSynchronizationAttributeChanged(m_zoneSynchronizationAttribute);
+ emit defrostEnabledChanged(m_defrostEnabled);
+ emit defrostAttributeChanged(m_defrostAttribute);
+ emit outsideTemperatureChanged(m_outsideTemperature);
+ emit recirculationModeChanged(m_recirculationMode);
+ emit recirculationModeAttributeChanged(m_recirculationModeAttribute);
+ emit recirculationSensitivityLevelChanged(m_recirculationSensitivityLevel);
+ emit recirculationSensitivityLevelAttributeChanged(m_recirculationSensitivityLevelAttribute);
+ emit climateModeChanged(m_climateMode);
+ emit climateModeAttributeChanged(m_climateModeAttribute);
+ emit automaticClimateFanIntensityLevelChanged(m_automaticClimateFanIntensityLevel);
+ emit automaticClimateFanIntensityLevelAttributeChanged(m_automaticClimateFanIntensityLevelAttribute);
+ emit outsideTemperatureAttributeChanged(m_outsideTemperatureAttribute);
+ emit recirculationEnabledChanged(m_recirculationEnabled);
+ emit recirculationAttributeChanged(m_recirculationAttribute);
QStringList zones = availableZones();
zones.removeLast(); // Do not init zone "Dummy"
@@ -223,25 +255,6 @@ public:
}
}
- void setAirRecirculationEnabled(bool e, const QString &z) Q_DECL_OVERRIDE
- {
- Q_UNUSED(z)
- if (m_airRecirculationEnabled != e) {
- m_airRecirculationEnabled = e;
- emit airRecirculationEnabledChanged(m_airRecirculationEnabled);
- }
- }
-
-
- void setAirRecirculationAttribute(QtIVIPropertyAttribute<bool> attribute, const QString &z)
- {
- Q_UNUSED(z)
- if (m_airRecirculationAttribute != attribute) {
- m_airRecirculationAttribute = attribute;
- emit airRecirculationAttributeChanged(m_airRecirculationAttribute, z);
- }
- }
-
void setSteeringWheelHeater(int t, const QString &z) Q_DECL_OVERRIDE
{
if (!m_zoneSteeringWheelHeater.contains(z))
@@ -291,6 +304,126 @@ public:
}
}
+ void setZoneSynchronizationEnabled(bool zoneSynchronization, const QString &z) Q_DECL_OVERRIDE
+ {
+ Q_UNUSED(z)
+ if (m_zoneSynchronizationEnabled != zoneSynchronization) {
+ m_zoneSynchronizationEnabled = zoneSynchronization;
+ emit zoneSynchronizationEnabledChanged(zoneSynchronization);
+ }
+ }
+
+ void setZoneSynchronizationAttribute(QtIVIPropertyAttribute<bool> attribute, const QString &z)
+ {
+ Q_UNUSED(z)
+ if (m_zoneSynchronizationAttribute != attribute) {
+ m_zoneSynchronizationAttribute = attribute;
+ emit zoneSynchronizationAttributeChanged(attribute, z);
+ }
+ }
+
+ void setDefrostEnabled(bool defrost, const QString &z) Q_DECL_OVERRIDE
+ {
+ Q_UNUSED(z)
+ if (m_defrostEnabled != defrost) {
+ m_defrostEnabled = defrost;
+ emit defrostEnabledChanged(defrost);
+ }
+ }
+
+ void setDefrostAttribute(QtIVIPropertyAttribute<bool> attribute, const QString &z)
+ {
+ Q_UNUSED(z)
+ if (m_defrostAttribute != attribute) {
+ m_defrostAttribute = attribute;
+ emit defrostAttributeChanged(attribute, z);
+ }
+ }
+
+ void setRecirculationMode(QtIVIClimateControl::RecirculationMode recirculationMode, const QString &z) Q_DECL_OVERRIDE
+ {
+ Q_UNUSED(z)
+ if (m_recirculationMode != recirculationMode) {
+ m_recirculationMode = recirculationMode;
+ emit recirculationModeChanged(recirculationMode);
+ }
+ }
+
+ void setRecirculationModeAttribute(QtIVIPropertyAttribute<QtIVIClimateControl::RecirculationMode> attribute, const QString &z)
+ {
+ Q_UNUSED(z)
+ if (m_recirculationModeAttribute != attribute) {
+ m_recirculationModeAttribute = attribute;
+ emit recirculationModeAttributeChanged(attribute, z);
+ }
+ }
+
+ void setRecirculationSensitivityLevel(int recirculationSensitivityLevel, const QString &z) Q_DECL_OVERRIDE
+ {
+ Q_UNUSED(z)
+
+ if (recirculationSensitivityLevel < 0 || recirculationSensitivityLevel > 10) {
+ qWarning() << "Attempted to set recirculationSensitivityLevel to" << recirculationSensitivityLevel << " which is out of range (0-10).";
+ return;
+ }
+
+ if (m_recirculationSensitivityLevel != recirculationSensitivityLevel) {
+ m_recirculationSensitivityLevel = recirculationSensitivityLevel;
+ emit recirculationSensitivityLevelChanged(recirculationSensitivityLevel);
+ }
+ }
+
+ void setRecirculationSensitivityLevelAttribute(QtIVIPropertyAttribute<int> attribute, const QString &z)
+ {
+ Q_UNUSED(z)
+ if (m_recirculationSensitivityLevelAttribute != attribute) {
+ m_recirculationSensitivityLevelAttribute = attribute;
+ emit recirculationSensitivityLevelAttributeChanged(attribute, z);
+ }
+ }
+
+ void setClimateMode(QtIVIClimateControl::ClimateMode climateMode, const QString &z) Q_DECL_OVERRIDE
+ {
+ Q_UNUSED(z)
+ if (m_climateMode != climateMode) {
+ m_climateMode = climateMode;
+ emit climateModeChanged(climateMode);
+ }
+ }
+
+ void setClimateModeAttribute(QtIVIPropertyAttribute<QtIVIClimateControl::ClimateMode> attribute, const QString &z)
+ {
+ Q_UNUSED(z)
+ if (m_climateModeAttribute != attribute) {
+ m_climateModeAttribute = attribute;
+ emit climateModeAttributeChanged(attribute, z);
+ }
+ }
+
+ void setAutomaticClimateFanIntensityLevel(int automaticClimateFanIntensityLevel, const QString &z) Q_DECL_OVERRIDE
+ {
+ Q_UNUSED(z)
+
+ if (automaticClimateFanIntensityLevel < 0 || automaticClimateFanIntensityLevel > 10) {
+ qWarning() << "Attempted to set automaticClimateFanIntensityLevel to" << automaticClimateFanIntensityLevel << " which is out of range (0-10).";
+ return;
+ }
+
+ if (m_automaticClimateFanIntensityLevel != automaticClimateFanIntensityLevel) {
+ m_automaticClimateFanIntensityLevel = automaticClimateFanIntensityLevel;
+ emit automaticClimateFanIntensityLevelChanged(automaticClimateFanIntensityLevel);
+ }
+ }
+
+ void setAutomaticClimateFanIntensityLevelAttribute(QtIVIPropertyAttribute<int> attribute, const QString &z)
+ {
+ Q_UNUSED(z)
+ if (m_automaticClimateFanIntensityLevelAttribute != attribute) {
+ m_automaticClimateFanIntensityLevelAttribute = attribute;
+ emit automaticClimateFanIntensityLevelAttributeChanged(attribute, z);
+ }
+ }
+
private:
QtIVIClimateControl::AirflowDirections m_airflowDirections;
QtIVIPropertyAttribute<QtIVIClimateControl::AirflowDirections> m_airflowDirectionsAttribute;
@@ -298,8 +431,22 @@ private:
QtIVIPropertyAttribute<bool> m_airConditioningAttribute;
bool m_heaterEnabled;
QtIVIPropertyAttribute<bool> m_heaterAttribute;
- bool m_airRecirculationEnabled;
- QtIVIPropertyAttribute<bool> m_airRecirculationAttribute;
+ bool m_zoneSynchronizationEnabled;
+ QtIVIPropertyAttribute<bool> m_zoneSynchronizationAttribute;
+ bool m_defrostEnabled;
+ QtIVIPropertyAttribute<bool> m_defrostAttribute;
+ QtIVIClimateControl::RecirculationMode m_recirculationMode;
+ QtIVIPropertyAttribute<QtIVIClimateControl::RecirculationMode> m_recirculationModeAttribute;
+ int m_recirculationSensitivityLevel;
+ QtIVIPropertyAttribute<int> m_recirculationSensitivityLevelAttribute;
+ QtIVIClimateControl::ClimateMode m_climateMode;
+ QtIVIPropertyAttribute<QtIVIClimateControl::ClimateMode> m_climateModeAttribute;
+ int m_automaticClimateFanIntensityLevel;
+ QtIVIPropertyAttribute<int> m_automaticClimateFanIntensityLevelAttribute;
+ int m_outsideTemperature;
+ QtIVIPropertyAttribute<int> m_outsideTemperatureAttribute;
+ bool m_recirculationEnabled;
+ QtIVIPropertyAttribute<bool> m_recirculationAttribute;
QMap<QString, int> m_zoneTargetTemperature;
QMap<QString, int> m_zoneSeatCooler;
@@ -381,11 +528,14 @@ private slots:
void testAirConditioningEnabled();
void testHeaterEnabled();
- void testAirRecirculationEnabled();
+ void testZoneSynchronizationEnabled();
+ void testDefrostEnabled();
+
+ void testRecirculationSensitivityLevel();
+ void testAutomaticClimateFanIntensityLevel();
void testZoneFanSpeedLevel();
void testZoneSteeringWheelHeater();
-
void testZoneTargetTemperature();
void testZoneSeatCooler();
void testZoneSeatHeater();
@@ -459,11 +609,11 @@ void ClimateControlTest::testClearServiceObject()
}
/* For testing integer properties of the climate control */
-#define TEST_INTEGER_PROPERTY(_prop_, _capitalProp_, _attribute_, _capitalAttribute_) \
+#define TEST_INTEGER_PROPERTY(_prop_, _capitalProp_) \
void ClimateControlTest::test##_capitalProp_() { \
ClimateControlTestServiceObject *service = new ClimateControlTestServiceObject(); \
manager->registerService(service, service->interfaces()); \
- service->testBackend()->set##_capitalProp_(0); \
+ service->testBackend()->set##_capitalProp_(0, ""); \
QtIVIClimateControl cc; \
cc.startAutoDiscovery(); \
QtIVIProperty* property = cc.property(#_prop_).value<QtIVIProperty*>(); \
@@ -477,12 +627,12 @@ void ClimateControlTest::test##_capitalProp_() { \
QCOMPARE(valueSpy.takeFirst().at(0).toInt(), 5); \
QCOMPARE(cc._prop_(), 5); \
QCOMPARE(property->property("value").toInt(), 5); \
- service->testBackend()->set##_capitalProp_(8); \
+ service->testBackend()->set##_capitalProp_(8, ""); \
QCOMPARE(valueSpy.count(), 1); \
QCOMPARE(valueSpy.takeFirst().at(0).toInt(), 8); \
QCOMPARE(cc._prop_(), 8); \
QCOMPARE(property->property("value").toInt(), 8); \
- property.setProperty("value", 6); \
+ property->setProperty("value", 6); \
QCOMPARE(valueSpy.count(), 1); \
QCOMPARE(valueSpy.takeFirst().at(0).toInt(), 6); \
QCOMPARE(cc._prop_(), 6); \
@@ -641,7 +791,10 @@ void ClimateControlTest::testZoneWithout##_capitalProp_() { \
TEST_BOOLEAN_PROPERTY(airConditioning, AirConditioning)
TEST_BOOLEAN_PROPERTY(heater, Heater)
-TEST_BOOLEAN_PROPERTY(airRecirculation, AirRecirculation)
+TEST_BOOLEAN_PROPERTY(zoneSynchronization, ZoneSynchronization)
+TEST_BOOLEAN_PROPERTY(defrost, Defrost)
+TEST_INTEGER_PROPERTY(recirculationSensitivityLevel, RecirculationSensitivityLevel)
+TEST_INTEGER_PROPERTY(automaticClimateFanIntensityLevel, AutomaticClimateFanIntensityLevel)
TEST_INTEGER_ZONE_PROPERTY(fanSpeedLevel, FanSpeedLevel)
TEST_INTEGER_ZONE_PROPERTY(steeringWheelHeater, SteeringWheelHeater)
TEST_INTEGER_ZONE_PROPERTY(targetTemperature, TargetTemperature)