Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qandroidplatformaccessibility.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5
8
10QAndroidPlatformAccessibility::QAndroidPlatformAccessibility()
11{ }
12
13QAndroidPlatformAccessibility::~QAndroidPlatformAccessibility()
14{ }
15
16void QAndroidPlatformAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *event)
17{
18 if (!isActive() || event == nullptr || !event->accessibleInterface())
19 return;
20
21 // We do not need implementation of all events, as current statues are polled
22 // by QtAccessibilityDelegate.java on every accessibility interaction.
23 // Currently we only send notification about the element's position change,
24 // so that the element can be moved on the screen if it's focused.
25
26 if (event->type() == QAccessible::LocationChanged) {
28 } else if (event->type() == QAccessible::ObjectHide) {
30 } else if (event->type() == QAccessible::ObjectShow) {
32 } else if (event->type() == QAccessible::Focus) {
34 } else if (event->type() == QAccessible::ValueChanged) {
36 } else if (event->type() == QAccessible::ScrollingEnd) {
38 } else if (event->type() == QAccessible::NameChanged
39 || event->type() == QAccessible::DescriptionChanged) {
41 } else if (event->type() == QAccessible::Announcement) {
42 auto *announcementEvent = static_cast<QAccessibleAnnouncementEvent *>(event);
43 QtAndroidAccessibility::notifyAnnouncementEvent(announcementEvent->uniqueId(),
44 announcementEvent->message());
45 }
46}
47
48void QAndroidPlatformAccessibility::setRootObject(QObject *obj)
49{
50 QPlatformAccessibility::setRootObject(obj);
52}
53
54QT_END_NAMESPACE
Combined button and popup list for selecting options.
void notifyDescriptionOrNameChanged(uint accessibilityObjectId)
void notifyObjectShow(uint accessibilityObjectId)
void notifyLocationChange(uint accessibilityObjectId)
void notifyObjectFocus(uint accessibilityObjectId)
void createAccessibilityContextObject(QObject *parent)
void notifyObjectHide(uint accessibilityObjectId)
void notifyValueChanged(uint accessibilityObjectId)
void notifyScrolledEvent(uint accessiblityObjectId)