// Copyright (C) 2017 Research In Motion
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only

/*!
    \page compatmap.html
    \title Compatibility Map
    \brief Overview of supported sensors for each platform

    \raw HTML

    <table cellpadding="2" cellspacing="1" border="1" width="90%">
    <tbody>
    <tr>
        <td>Color</td>
        <td>Explanation</td>
    </tr>
    <tr>
        <td bgcolor="green"></td>
        <td>The sensor is supported.</td>
    </tr>
    <tr>
        <td bgcolor="gray"></td>
        <td>The sensor is not supported.</td>
    </tr>
    </tbody>
    </table>

    <table align="center" cellpadding="2" cellspacing="1" border="1" rules="all" width="90%">
    <tbody>
    <tr>
    <td><b>Feature</b></td>
    <td><b>Android</b></td>
    <td><b>Linux</b></td>
    <td><b>iOS</b></td>
    <td><b>Windows</b></td>
    <td><b>Generic</b></td>
    </tr>
    <tr>
    <td nowrap="nowrap">Accelerometer</td>
    <td bgcolor="green"></td>
    <td bgcolor="gray"></td>
    <td bgcolor="green"></td>
    <td bgcolor="green"></td>
    <td bgcolor="gray"></td>
    </tr>
    <tr>
    <td nowrap="nowrap">Ambient Light Sensor</td>
    <td bgcolor="gray"></td>
    <td bgcolor="gray"></td>
    <td bgcolor="gray"></td>
    <td bgcolor="green"></td>
    <td bgcolor="green"></td>
    </tr>
    <tr>
    <td nowrap="nowrap">Ambient Temperature Sensor</td>
    <td bgcolor="green"></td>
    <td bgcolor="gray"></td>
    <td bgcolor="gray"></td>
    <td bgcolor="gray"></td>
    <td bgcolor="gray"></td>
    </tr>
    <tr>
    <td nowrap="nowrap">Compass</td>
    <td bgcolor="green"></td>
    <td bgcolor="green"></td>
    <td bgcolor="green"></td>
    <td bgcolor="green"></td>
    <td bgcolor="gray"></td>
    </tr>
    <tr>
    <td nowrap="nowrap">Gyroscope</td>
    <td bgcolor="green"></td>
    <td bgcolor="gray"></td>
    <td bgcolor="green"></td>
    <td bgcolor="green"></td>
    <td bgcolor="gray"></td>
    </tr>
    <tr>
    <td nowrap="nowrap">Light Sensor</td>
    <td bgcolor="green"></td>
    <td bgcolor="green"></td>
    <td bgcolor="gray"></td>
    <td bgcolor="gray"></td>
    <td bgcolor="gray"></td>
    </tr>
    <tr>
    <td nowrap="nowrap">Magnetometer</td>
    <td bgcolor="green"></td>
    <td bgcolor="gray"></td>
    <td bgcolor="green"></td>
    <td bgcolor="gray"></td>
    <td bgcolor="gray"></td>
    </tr>
    <tr>
    <td nowrap="nowrap">Orientation Sensor</td>
    <td bgcolor="gray"></td>
    <td bgcolor="green"></td>
    <td bgcolor="green"></td>
    <td bgcolor="green"></td>
    <td bgcolor="green"></td>
    </tr>
    <tr>
    <td nowrap="nowrap">Pressure Sensor</td>
    <td bgcolor="green"></td>
    <td bgcolor="gray"></td>
    <td bgcolor="green"></td>
    <td bgcolor="gray"></td>
    <td bgcolor="gray"></td>
    </tr>
    <tr>
    <td nowrap="nowrap">Proximity Sensor</td>
    <td bgcolor="green"></td>
    <td bgcolor="gray"></td>
    <td bgcolor="green"></td>
    <td bgcolor="gray"></td>
    <td bgcolor="gray"></td>
    </tr>
    <tr>
    <td nowrap="nowrap">Rotation Sensor</td>
    <td bgcolor="green"></td>
    <td bgcolor="gray"></td>
    <td bgcolor="green"></td>
    <td bgcolor="green"></td>
    <td bgcolor="green"></td>
    </tr>
    <tr>
    <td nowrap="nowrap">Tilt Sensor</td>
    <td bgcolor="gray"></td>
    <td bgcolor="gray"></td>
    <td bgcolor="green"></td>
    <td bgcolor="gray"></td>
    <td bgcolor="green"></td>
    </tr>
    </tbody>
    </table>

    \endraw

    \raw DocBook
<db:informaltable cellpadding="2" cellspacing="1" border="1" width="90%">
    <db:tbody>
    <db:tr>
        <db:td>Color</db:td>
        <db:td>Explanation</db:td>
    </db:tr>
    <db:tr>
        <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
        <db:td>The sensor is supported.</db:td>
    </db:tr>
    <db:tr>
        <db:td  class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td>
        <db:td>The sensor is not supported.</db:td>
    </db:tr>
    </db:tbody>
    </db:informaltable>


    <db:informaltable cellpadding="2" cellspacing="1" border="1" rules="all" width="90%">
    <db:tbody>
    <db:tr>
    <db:td><db:emphasis role="bold">Feature</db:emphasis></db:td>
    <db:td><db:emphasis role="bold">Android</db:emphasis></db:td>
    <db:td><db:emphasis role="bold">Linux</db:emphasis></db:td>
    <db:td><db:emphasis role="bold">iOS</db:emphasis></db:td>
    <db:td><db:emphasis role="bold">Windows</db:emphasis></db:td>
    <db:td><db:emphasis role="bold">Generic</db:emphasis></db:td>
    </db:tr>
    <db:tr>
    <db:td>Accelerometer</db:td>
    <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
    <db:td  class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td>
    <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
    <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
    <db:td  class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td>
    </db:tr>
    <db:tr>
    <db:td>Ambient Light Sensor</db:td>
    <db:td  class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td>
    <db:td  class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td>
    <db:td  class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td>
    <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
    <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
    </db:tr>
    <db:tr>
    <db:td>Ambient Temperature Sensor</db:td>
    <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
    <db:td  class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td>
    <db:td  class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td>
    <db:td  class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td>
    <db:td  class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td>
    </db:tr>
    <db:tr>
    <db:td>Compass</db:td>
    <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
    <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
    <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
    <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
    <db:td  class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td>
    </db:tr>
    <db:tr>
    <db:td>Gyroscope</db:td>
    <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
    <db:td  class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td>
    <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
    <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
    <db:td  class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td>
    </db:tr>
    <db:tr>
    <db:td>Light Sensor</db:td>
    <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
    <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
    <db:td  class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td>
    <db:td  class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td>
    <db:td  class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td>
    </db:tr>
    <db:tr>
    <db:td>Magnetometer</db:td>
    <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
    <db:td  class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td>
    <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
    <db:td  class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td>
    <db:td  class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td>
    </db:tr>
    <db:tr>
    <db:td>Orientation Sensor</db:td>
    <db:td  class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td>
    <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
    <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
    <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
    <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
    </db:tr>
    <db:tr>
    <db:td>Pressure Sensor</db:td>
    <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
    <db:td  class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td>
    <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
    <db:td  class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td>
    <db:td  class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td>
    </db:tr>
    <db:tr>
    <db:td>Proximity Sensor</db:td>
    <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
    <db:td  class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td>
    <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
    <db:td  class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td>
    <db:td  class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td>
    </db:tr>
    <db:tr>
    <db:td>Rotation Sensor</db:td>
    <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
    <db:td  class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td>
    <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
    <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
    <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
    </db:tr>
    <db:tr>
    <db:td>Tilt Sensor</db:td>
    <db:td  class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td>
    <db:td  class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td>
    <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
    <db:td  class="bgcolor-gray" ><?dbhtml bgcolor="gray" ?><?dbfo bgcolor="gray" ?></db:td>
    <db:td  class="bgcolor-green" ><?dbhtml bgcolor="green" ?><?dbfo bgcolor="green" ?></db:td>
    </db:tr>
    </db:tbody>
    </db:informaltable>
    \endraw

    In addition to the table above, each sensor type might support specific features. For example,
    a magnetometer might support returning geo values. See QSensor::isFeatureSupported() for
    additional details.

    \section1 Platform specific notes

    \section2 Windows

    The Windows backend is supported in Qt installations that were built with MSVC.

    \section2 Android

    The sensors provided by the Android backend can be read without requesting
    any Android permission.

    The only restriction concerns the sampling rate of the accelerometer,
    gyroscope, and magnetometer. Starting from Android 12 (API level 31),
    reading these sensors at a rate higher than 200 Hz requires the
    \c android.permission.HIGH_SAMPLING_RATE_SENSORS permission. This is a normal
    permission that is granted at install time without prompting the user. If the
    permission is not declared, the sampling rate is capped at 200 Hz.

    Declare the permission for the application with \l qt_add_android_permission:

    \badcode
    qt_add_android_permission(myapp
        NAME android.permission.HIGH_SAMPLING_RATE_SENSORS
    )
    \endcode

    \note When using a hand-written AndroidManifest.xml, it must contain the
    \c{<!-- %%INSERT_PERMISSIONS -->} tag for the permission to be added. See
    \l {Qt Permissions and Features}.

    \section2 HarmonyOS

    Some sensors on HarmonyOS require a permission before their data can be read:

    \list
        \li QAccelerometer requires \c ohos.permission.ACCELEROMETER.
        \li QGyroscope requires \c ohos.permission.GYROSCOPE.
    \endlist

    The other sensors provided by the HarmonyOS backend (the light sensor,
    magnetometer, and rotation sensor) can be read without any permission.

    Subscribing to a sensor whose permission has not been granted fails, and no
    readings are delivered.

    Declare a permission for the application with \c qt_add_harmonyos_permission:

    \badcode
    qt_add_harmonyos_permission(myapp
        NAME ohos.permission.ACCELEROMETER
    )
    \endcode

*/
