diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-07-27 00:11:20 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-22 18:45:24 +0200 |
commit | 3abecf2ee9fc724af571f8c7da4302f7bee9eadb (patch) | |
tree | 2d727cd1d04e345a231ab4dcd99af1b9d2003b5b /src/plugins/platforms/android/src/qandroidplatformintegration.cpp | |
parent | 59b6a67b94fab5aa36a01beb0d8665575b678f64 (diff) |
Accessibility for Android
This enables both modes for TalkBack,
explore-by-touch and the normal swiping mode.
It is partially inspired by the BarGraphView example
of the Google/Android Eyes-Free project.
Note that for any accessibility to work you'll need
a device with api level 16 at least.
Using reflection we should be able to dynamically pick up
the classes if we have the high enough api level.
Change-Id: I11b93bead451483782a1711434d45c8f9a35996f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Diffstat (limited to 'src/plugins/platforms/android/src/qandroidplatformintegration.cpp')
-rw-r--r-- | src/plugins/platforms/android/src/qandroidplatformintegration.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/plugins/platforms/android/src/qandroidplatformintegration.cpp b/src/plugins/platforms/android/src/qandroidplatformintegration.cpp index 5ef0998a49..3e7b046edb 100644 --- a/src/plugins/platforms/android/src/qandroidplatformintegration.cpp +++ b/src/plugins/platforms/android/src/qandroidplatformintegration.cpp @@ -50,6 +50,7 @@ #include "qandroidplatformservices.h" #include "qandroidplatformfontdatabase.h" #include "qandroidplatformclipboard.h" +#include "qandroidplatformaccessibility.h" #include <QtPlatformSupport/private/qgenericunixeventdispatcher_p.h> #ifndef ANDROID_PLUGIN_OPENGL @@ -87,6 +88,9 @@ void *QAndroidPlatformNativeInterface::nativeResourceForIntegration(const QByteA QAndroidPlatformIntegration::QAndroidPlatformIntegration(const QStringList ¶mList) : m_touchDevice(0) +#ifndef QT_NO_ACCESSIBILITY + , m_accessibility(0) +#endif { Q_UNUSED(paramList); @@ -259,6 +263,15 @@ void QAndroidPlatformIntegration::setDefaultDesktopSize(int gw, int gh) m_defaultGeometryHeight = gh; } +#ifndef QT_NO_ACCESSIBILITY +QPlatformAccessibility *QAndroidPlatformIntegration::accessibility() const +{ + if (!m_accessibility) + m_accessibility = new QAndroidPlatformAccessibility(); + return m_accessibility; +} +#endif + #ifndef ANDROID_PLUGIN_OPENGL void QAndroidPlatformIntegration::setDesktopSize(int width, int height) |