/**************************************************************************** ** ** Copyright (C) 2021 The Qt Company Ltd. ** Copyright (C) 2019 Luxoft Sweden AB ** Copyright (C) 2018 Pelagicore AG ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:FDL$ ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms ** and conditions see https://www.qt.io/terms-conditions. For further ** information use the contact form at https://www.qt.io/contact-us. ** ** GNU Free Documentation License Usage ** Alternatively, this file may be used under the terms of the GNU Free ** Documentation License version 1.3 as published by the Free Software ** Foundation and appearing in the file included in the packaging of ** this file. Please review the following information to ensure ** the GNU Free Documentation License version 1.3 requirements ** will be met: https://www.gnu.org/licenses/fdl-1.3.html. ** $QT_END_LICENSE$ ** ****************************************************************************/ /*! \module QtIviVehicleFunctions \title Qt IVI Vehicle Functions C++ Classes \ingroup modules \ingroup qtivi_modules \qtvariable ivivehiclefunctions \brief C++ classes for the Qt IVI Vehicle Functions API. Qt IVI Vehicle Functions provides C++ API. \section1 Getting Started To link against the Qt IVI Vehicle Feature module, add this line to your \c qmake project file: \snippet doc_src_ivivehiclefunctions.pro 0 To use Qt IVI Vehicle Functions C++ classes in your application, use the following include statement: \snippet doc_src_qtivivehiclefunctions.cpp 0 \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: \code #include ... QIviClimateControl* m_climateControl; m_climateControl = new QIviClimateControl(this); \endcode 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. \code m_climateControl->startAutoDiscovery(); \endcode After the startAutoDiscovery method has been called, the isValid property can be used to determine if a backend was found or not. \code if (!m_climateControl->isValid()) QMessageBox::critical( ... ); // Take action here \endcode Climate general values can be get and set directly by the feature instance: \code if (!m_climateControl->airConditioningEnabled()); m_climateControl->setAirConditioningEnabled(true); \endcode Some features, like climate control, are divided into several climate zones. The names of the available zones can be checked using QIviAbstractZonedFeature::availableZones(): \code QStringList zones = m_climateControl->availableZones(); \endcode You can use QIviAbstractZonedFeature::zoneAt() to access zone functions: \code m_climateControl->zoneAt("FrontLeft")->setSeatHeater(false); \endcode Looping zones is done with QIviAbstractZonedFeature::zones(): \code const auto zones = m_climateControl->zones(); for (QClimateControl *z : zones) if (z->zone() == "FrontLeft") z->setSeatHeater(true); \endcode */ /*! \qmlmodule QtIvi.VehicleFunctions 1.0 \title Qt IVI Vehicle Functions QML Types \ingroup qmlmodules \ingroup qtivi_qmlmodules \brief QML types for the Qt IVI Vehicle Functions API. The Qt IVI Vehicle Functions QML API provides a simple way to use vehicle features in QML applications. \section1 Getting Started The QML application relies on the QML plugin loading capabilities of the Qt QML runtime. This means that an installed Qt IVI module is found automatically. To import the Qt IVI Vehicle Functions QML types, add the following import statement to your \c .qml file: \snippet doc_src_qmlivivehiclefunctions.cpp 0 Then instantiate the feature element. For most elements, autoDiscovery is set to true when applicable, but in this example we set it explicitly. \code ClimateControl { id: climateControl autoDiscovery: true } \endcode When the top-level component has been completed, the isValid property of the feature elements can be used to determine if any of the backends are missing. In some situations this is expected behavior; the isValid property can be used to enable or disable parts of the user interface. \code Component.onCompleted: { if (!climateControl.isValid) ; // Take action here } \endcode Some features, like climate control, are divided into zones. The names of the available zones can be fetched with AbstractZonedFeature::availableZones. Zones are available only when the feature is valid. \code ComboBox { model: climateControl.availableZones } \endcode With the AbstractZonedFeature::zoneAt property you can access the climate control zone-specific functions. \code climateControl.zoneAt.FrontLeft.seatHeater = true \endcode An example of how to use the AbstractZonedFeature::zones property: \code Repeater { model: climateControl.zones Text { text: modelData.zone + " seat heater level: " + modelData.seatHeater} } \endcode Interactions with the feature element are described in the feature documentation. It is possible to bind properties, call methods, and listen to signals. \section1 QML Types */ /*! \group qtivivehiclefunctions-examples \ingroup all-examples \ingroup qtivi-examples \title Qt IVI Vehicle Functions Examples \brief Examples for the Qt IVI Vehicle Functions module These are the Qt IVI Vehicle Functions examples. */