C

QAndroidDriverDistraction Class

Helper class that enables following user experience (UX) restriction state changes. More...

Header: #include <QAndroidDriverDistraction>
CMake: find_package(Qt6 REQUIRED COMPONENTS AndroidAutomotiveVehicle)
target_link_libraries(mytarget PRIVATE Qt6::AndroidAutomotiveVehicle)
Since: Qt 6.4
Inherits: QObject

Public Types

enum QRestriction { Baseline, NoDialpad, NoFiltering, LimitStringLength, NoKeyboard, …, NoVoiceTranscription }
flags QRestrictions

Public Functions

QAndroidDriverDistraction::QRestrictions currentRestrictions() const
int maxContentDepth() const
int maxCumulativeContentItems() const
int maxRestrictedStringLength() const

Signals

void maxContentDepthChanged(int maxContentDepth)
void maxCumulativeContentItemsChanged(int maxCumulativeContentItems)
void maxRestrictedStringLengthChanged(int maxRestrictedStringLength)
void restrictionsChanged(QAndroidDriverDistraction::QRestrictions restrictions)

Static Public Members

QAndroidDriverDistraction *instance()

Detailed Description

Android Automotive's Driver Distraction feature is described in Driver Distraction Guidelines.

Member Type Documentation

enum QAndroidDriverDistraction::QRestriction
flags QAndroidDriverDistraction::QRestrictions

Flags for determining which Car UX Restrictions are active.

ConstantValueDescription
QAndroidDriverDistraction::Baseline0No specific restrictions in place.
QAndroidDriverDistraction::NoDialpad1 << 0No dialpad for the purpose of initiating a phone call.
QAndroidDriverDistraction::NoFiltering1 << 1No filtering a list with alpha-numeric character via the use of a character entry method.
QAndroidDriverDistraction::LimitStringLength1 << 2Strings length cannot exceed the character limit.
QAndroidDriverDistraction::NoKeyboard1 << 3No text entry for the purpose of searching or other manual text string entry activities.
QAndroidDriverDistraction::NoVideo1 << 4No video.
QAndroidDriverDistraction::LimitContent1 << 5Limit the number of items a user can browse through in total, in a single task.
QAndroidDriverDistraction::NoSetup1 << 6No setup that requires form entry or interaction with external devices.
QAndroidDriverDistraction::NoTextMessage1 << 7No Text Message.
QAndroidDriverDistraction::NoVoiceTranscription1 << 8No text transcription (live or leave behind) of voice can be shown.

The QRestrictions type is a typedef for QFlags<QRestriction>. It stores an OR combination of QRestriction values.

Member Function Documentation

QAndroidDriverDistraction::QRestrictions QAndroidDriverDistraction::currentRestrictions() const

Returns the current Car UX Restrictions state.

[static] QAndroidDriverDistraction *QAndroidDriverDistraction::instance()

Returns a pointer to the QAndroidDriverDistraction instance.

int QAndroidDriverDistraction::maxContentDepth() const

Returns the current maximum content depth.

[signal] void QAndroidDriverDistraction::maxContentDepthChanged(int maxContentDepth)

This signal is emitted when the maximum allowable number of content depth levels or view traversals through any one path in a single task changed. The maxContentDepth indicates the new maximum number of content depth.

int QAndroidDriverDistraction::maxCumulativeContentItems() const

Returns the current maximum cumulative content items.

[signal] void QAndroidDriverDistraction::maxCumulativeContentItemsChanged(int maxCumulativeContentItems)

This signal is emitted when the maximum allowable number of content items that can be displayed to a user during traversal through any one path in a single task changed. The maxCumulativeContentItems indicates the new maximum number of content items changed.

int QAndroidDriverDistraction::maxRestrictedStringLength() const

Returns the current maximum restricted string length.

[signal] void QAndroidDriverDistraction::maxRestrictedStringLengthChanged(int maxRestrictedStringLength)

This signal is emitted when the maximum length of general purpose strings that can be displayed, levels or view traversals through any one path in a single task, has changed. The maxRestrictedStringLength indicates the new maximum string length.

[signal] void QAndroidDriverDistraction::restrictionsChanged(QAndroidDriverDistraction::QRestrictions restrictions)

This signal is emitted when Car UX Restrictions that are active have changed. The restrictions parameter indicates the new combination of active Car UX Restrictions.

Available under certain Qt licenses.
Find out more.