Qt IVI Vehicle Functions C++ Classes
C++ classes for the Qt IVI Vehicle Functions API. More...
Classes
Provides an interface to the climate control | |
Backend interface for QIviClimateControl | |
Provides an interface to the window control | |
Backend interface for QIviWindowControl | |
Holds all the enums defined in the QtIviVehicleFunctions module | |
Factory methods for all structs defined in the QtIviVehicleFunctions module |
Detailed Description
Qt IVI Vehicle Functions provides C++ API.
Getting Started
To link against the Qt IVI Vehicle Feature module, add this line to your qmake
project file:
QT += ivivehiclefunctions
To use Qt IVI Vehicle Functions C++ classes in your application, use the following include statement:
#include <QtIviVehicleFunctions>
Note: If you are only using a few classes from this module, it's recommended to include only those specific classes instead of the whole module.
To use feature elements, simply include the header file and instantiate the element:
#include <QtIviVehicleFunctions/QIviClimateControl> ... QIviClimateControl* m_climateControl; m_climateControl = new QIviClimateControl(this);
In order to trigger the auto discovery mechanism, call the startAutoDiscovery method. This will load the appropriate backend and set a service object for the feature element. Please notice that calling this method sets the autoDiscovery property to true. To use dynamic services, simply do not call this method.
m_climateControl->startAutoDiscovery();
After the startAutoDiscovery method has been called, the isValid property can be used to determine if a backend was found or not.
if (!m_climateControl->isValid()) QMessageBox::critical( ... ); // Take action here
Climate general values can be get and set directly by the feature instance:
if (!m_climateControl->airConditioningEnabled()); m_climateControl->setAirConditioningEnabled(true);
Some features, like climate control, are divided into several climate zones. The names of the available zones can be checked using QIviAbstractZonedFeature::availableZones():
QStringList zones = m_climateControl->availableZones();
You can use QIviAbstractZonedFeature::zoneAt() to access zone functions:
m_climateControl->zoneAt("FrontLeft")->setSeatHeater(false);
Looping zones is done with QIviAbstractZonedFeature::zones():
const auto zones = m_climateControl->zones(); for (QClimateControl *z : zones) if (z->zone() == "FrontLeft") z->setSeatHeater(true);
© 2020 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.