C
QDriverDistraction Class
Helper class that enables following user expereince (UX) restriction state changes. More...
Header: | #include <QDriverDistraction> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS AndroidDriverState) target_link_libraries(mytarget PRIVATE Qt6::AndroidDriverState) |
qmake: | QT += androiddriverstate |
Since: | Qt 6.4 |
Instantiated By: | DriverDistraction |
Inherits: | QObject |
Public Types
enum | QRestriction { Baseline, NoDialpad, NoFiltering, LimitStringLength, NoKeyboard, …, NoVoiceTranscription } |
flags | QRestrictions |
Properties
- currentRestrictions : const QRestrictions
- maxContentDepth : const int
- maxCumulativeContentItems : const int
- maxRestrictedStringLength : const int
Public Functions
QDriverDistraction::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(QDriverDistraction::QRestrictions restrictions) |
Static Public Members
QDriverDistraction * | instance() |
Detailed Description
Android Automotive's Driver Distraction feature is described in Driver Distraction Guidelines.
Member Type Documentation
enum QDriverDistraction::QRestriction
flags QDriverDistraction::QRestrictions
Flags for determining which Car UX Restrictions are active.
Constant | Value | Description |
---|---|---|
QDriverDistraction::Baseline | 0 | No specific restrictions in place. |
QDriverDistraction::NoDialpad | 1 << 0 | No dialpad for the purpose of initiating a phone call. |
QDriverDistraction::NoFiltering | 1 << 1 | No filtering a list with alpha-numeric character via the use of a character entry method. |
QDriverDistraction::LimitStringLength | 1 << 2 | Strings length cannot exceed the character limit. |
QDriverDistraction::NoKeyboard | 1 << 3 | No text entry for the purpose of searching or other manual text string entry activities. |
QDriverDistraction::NoVideo | 1 << 4 | No video. |
QDriverDistraction::LimitContent | 1 << 5 | Limit the number of items a user can browse through in total, in a single task. |
QDriverDistraction::NoSetup | 1 << 6 | No setup that requires form entry or interaction with external devices. |
QDriverDistraction::NoTextMessage | 1 << 7 | No Text Message. |
QDriverDistraction::NoVoiceTranscription | 1 << 8 | No 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.
Property Documentation
[read-only]
currentRestrictions : const QRestrictions
This property holds the current Car UX Restrictions state.
Access functions:
QDriverDistraction::QRestrictions | currentRestrictions() const |
Notifier signal:
void | restrictionsChanged(QDriverDistraction::QRestrictions restrictions) |
[read-only]
maxContentDepth : const int
This property holds the current maximum content depth.
Access functions:
int | maxContentDepth() const |
Notifier signal:
void | maxContentDepthChanged(int maxContentDepth) |
[read-only]
maxCumulativeContentItems : const int
This property holds the current maximum cumulative content items.
Access functions:
int | maxCumulativeContentItems() const |
Notifier signal:
void | maxCumulativeContentItemsChanged(int maxCumulativeContentItems) |
[read-only]
maxRestrictedStringLength : const int
This property holds the current maximum restricted string length.
Access functions:
int | maxRestrictedStringLength() const |
Notifier signal:
void | maxRestrictedStringLengthChanged(int maxRestrictedStringLength) |
Member Function Documentation
QDriverDistraction::QRestrictions QDriverDistraction::currentRestrictions() const
Returns the current Car UX Restrictions state.
Note: Getter function for property currentRestrictions.
[static]
QDriverDistraction *QDriverDistraction::instance()
Returns a pointer to the QDriverDistraction instance.
int QDriverDistraction::maxContentDepth() const
Returns the current maximum content depth.
Note: Getter function for property maxContentDepth.
[signal]
void QDriverDistraction::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.
Note: Notifier signal for property maxContentDepth.
int QDriverDistraction::maxCumulativeContentItems() const
Returns the current maximum cumulative content items.
Note: Getter function for property maxCumulativeContentItems.
[signal]
void QDriverDistraction::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.
Note: Notifier signal for property maxCumulativeContentItems.
int QDriverDistraction::maxRestrictedStringLength() const
Returns the current maximum restricted string length.
Note: Getter function for property maxRestrictedStringLength.
[signal]
void QDriverDistraction::maxRestrictedStringLengthChanged(int maxRestrictedStringLength)
This signal is emitted when the 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.
Note: Notifier signal for property maxRestrictedStringLength.
[signal]
void QDriverDistraction::restrictionsChanged(QDriverDistraction::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.
Note: Notifier signal for property currentRestrictions.
Available under certain Qt licenses.
Find out more.