diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-05-19 12:28:32 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-06-06 20:23:08 +0200 |
commit | d707acfc9e357ffc86feb5d9219372c30c5ff157 (patch) | |
tree | 0e9f6d4b26b6b2d0d406546d8d0531838fc5acfb /src/plugins/platforms/ios/qiosintegration.mm | |
parent | 0f8d35ff73b80d2044e03e35d338a2acb60b8fa2 (diff) |
Accessibility iOS
This lays the foundation for iOS accessibility.
The approach is slightly different from other a11y bridges in
that we completely flaten the hierarchy of wigets/quick items to
a list. This works well with VoiceOver since there are comparatively
few elements. The cache implementation for OS X is re-used.
With this patch VoiceOver on iOS works on many applications out of the box.
For now it sends the screen changed notfification somewhat overzealous,
that will need revisiting and potentially new API in QAccessible.
Device orientation changes are not yet supported.
[ChangeLog][iOS] Accessibility was added to the iOS platform port.
This enables Qt applications to be read by VoiceOver on iOS devices.
Task-number: QTBUG-39097
Change-Id: I441e844652d528cc2fdcc444f43b54ed6fa04f0c
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Diffstat (limited to 'src/plugins/platforms/ios/qiosintegration.mm')
-rw-r--r-- | src/plugins/platforms/ios/qiosintegration.mm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/plugins/platforms/ios/qiosintegration.mm b/src/plugins/platforms/ios/qiosintegration.mm index 0fe7adff9f..3334e3a094 100644 --- a/src/plugins/platforms/ios/qiosintegration.mm +++ b/src/plugins/platforms/ios/qiosintegration.mm @@ -45,6 +45,7 @@ #include "qioswindow.h" #include "qiosbackingstore.h" #include "qiosscreen.h" +#include "qiosplatformaccessibility.h" #include "qioscontext.h" #include "qiosclipboard.h" #include "qiosinputcontext.h" @@ -67,6 +68,7 @@ QIOSIntegration::QIOSIntegration() , m_inputContext(new QIOSInputContext) , m_screen(new QIOSScreen(QIOSScreen::MainScreen)) , m_platformServices(new QIOSServices) + , m_accessibility(0) { if (![UIApplication sharedApplication]) { qWarning() @@ -106,6 +108,9 @@ QIOSIntegration::~QIOSIntegration() delete m_platformServices; m_platformServices = 0; + + delete m_accessibility; + m_accessibility = 0; } bool QIOSIntegration::hasCapability(Capability cap) const @@ -229,4 +234,11 @@ QTouchDevice *QIOSIntegration::touchDevice() return m_touchDevice; } +QPlatformAccessibility *QIOSIntegration::accessibility() const +{ + if (!m_accessibility) + m_accessibility = new QIOSPlatformAccessibility; + return m_accessibility; +} + QT_END_NAMESPACE |