| 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 | #include "qaccessiblebridge.h" |
| 5 | |
| 6 | #if QT_CONFIG(accessibility) |
| 7 | |
| 8 | QT_BEGIN_NAMESPACE |
| 9 | |
| 10 | /*! |
| 11 | \class QAccessibleBridge |
| 12 | \brief The QAccessibleBridge class is the base class for |
| 13 | accessibility back-ends. |
| 14 | \internal |
| 15 | |
| 16 | \ingroup accessibility |
| 17 | \inmodule QtWidgets |
| 18 | |
| 19 | Qt supports Microsoft Active Accessibility (MSAA), \macos |
| 20 | Accessibility, and the Unix/X11 AT-SPI standard. By subclassing |
| 21 | QAccessibleBridge, you can support other backends than the |
| 22 | predefined ones. |
| 23 | |
| 24 | Currently, custom bridges are only supported on Unix. We might |
| 25 | add support for them on other platforms as well if there is |
| 26 | enough demand. |
| 27 | |
| 28 | \sa QAccessible, QAccessibleBridgePlugin |
| 29 | */ |
| 30 | |
| 31 | /*! |
| 32 | \fn QAccessibleBridge::~QAccessibleBridge() |
| 33 | |
| 34 | Destroys the accessibility bridge object. |
| 35 | */ |
| 36 | QAccessibleBridge::~QAccessibleBridge() |
| 37 | = default; |
| 38 | |
| 39 | /*! |
| 40 | \fn void QAccessibleBridge::setRootObject(QAccessibleInterface *object) |
| 41 | |
| 42 | This function is called by Qt at application startup to set the |
| 43 | root accessible object of the application to \a object. All other |
| 44 | accessible objects in the application can be reached by the |
| 45 | client using object navigation. |
| 46 | */ |
| 47 | |
| 48 | /*! |
| 49 | \fn void QAccessibleBridge::notifyAccessibilityUpdate(QAccessibleEvent *event) |
| 50 | |
| 51 | This function is called by Qt to notify the bridge about a change |
| 52 | in the accessibility information. The \a event specifies the interface, |
| 53 | object, reason and child element that has changed. |
| 54 | |
| 55 | \sa QAccessible::updateAccessibility() |
| 56 | */ |
| 57 | |
| 58 | /*! |
| 59 | \class QAccessibleBridgePlugin |
| 60 | \brief The QAccessibleBridgePlugin class provides an abstract |
| 61 | base for accessibility bridge plugins. |
| 62 | \internal |
| 63 | |
| 64 | \ingroup plugins |
| 65 | \ingroup accessibility |
| 66 | \inmodule QtWidgets |
| 67 | |
| 68 | Writing an accessibility bridge plugin is achieved by subclassing |
| 69 | this base class, reimplementing the pure virtual function create(), |
| 70 | and exporting the class with the Q_PLUGIN_METADATA() macro. |
| 71 | |
| 72 | \sa QAccessibleBridge, QAccessiblePlugin, {How to Create Qt Plugins} |
| 73 | */ |
| 74 | |
| 75 | /*! |
| 76 | Constructs an accessibility bridge plugin with the given \a |
| 77 | parent. This is invoked automatically by the plugin loader. |
| 78 | */ |
| 79 | QAccessibleBridgePlugin::QAccessibleBridgePlugin(QObject *parent) |
| 80 | : QObject(parent) |
| 81 | { |
| 82 | |
| 83 | } |
| 84 | |
| 85 | /*! |
| 86 | Destroys the accessibility bridge plugin. |
| 87 | |
| 88 | You never have to call this explicitly. Qt destroys a plugin |
| 89 | automatically when it is no longer used. |
| 90 | */ |
| 91 | QAccessibleBridgePlugin::~QAccessibleBridgePlugin() |
| 92 | { |
| 93 | |
| 94 | } |
| 95 | |
| 96 | /*! |
| 97 | \fn QAccessibleBridge *QAccessibleBridgePlugin::create(const QString &key) |
| 98 | |
| 99 | Creates and returns the QAccessibleBridge object corresponding to |
| 100 | the given \a key. Keys are case sensitive. |
| 101 | |
| 102 | \sa keys() |
| 103 | */ |
| 104 | |
| 105 | QT_END_NAMESPACE |
| 106 | |
| 107 | #include "moc_qaccessiblebridge.cpp" |
| 108 | |
| 109 | #endif // QT_CONFIG(accessibility) |
| 110 | |