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
4
7
9QAndroidPlatformAccessibility::QAndroidPlatformAccessibility()
10{ }
11
12QAndroidPlatformAccessibility::~QAndroidPlatformAccessibility()
13{ }
14
15void QAndroidPlatformAccessibility::notifyAccessibilityUpdate(QAccessibleEvent *event)
16{
17 if (!isActive() || event == nullptr || !event->accessibleInterface())
18 return;
19
20 // We do not need implementation of all events, as current statues are polled
21 // by QtAccessibilityDelegate.java on every accessibility interaction.
22 // Currently we only send notification about the element's position change,
23 // so that the element can be moved on the screen if it's focused.
24
25 if (event->type() == QAccessible::LocationChanged) {
27 } else if (event->type() == QAccessible::ObjectHide) {
29 } else if (event->type() == QAccessible::ObjectShow) {
31 } else if (event->type() == QAccessible::Focus) {
33 } else if (event->type() == QAccessible::ValueChanged) {
35 } else if (event->type() == QAccessible::ScrollingEnd) {
37 } else if (event->type() == QAccessible::NameChanged
38 || event->type() == QAccessible::DescriptionChanged) {
40 } else if (event->type() == QAccessible::Announcement) {
41 auto *announcementEvent = static_cast<QAccessibleAnnouncementEvent *>(event);
42 QtAndroidAccessibility::notifyAnnouncementEvent(announcementEvent->uniqueId(),
43 announcementEvent->message());
44 }
45}
46
47void QAndroidPlatformAccessibility::setRootObject(QObject *obj)
48{
49 QPlatformAccessibility::setRootObject(obj);
51}
52
53QT_END_NAMESPACE
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)