diff options
author | Frederik Gladhorn <frederik.gladhorn@nokia.com> | 2011-12-07 07:48:22 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-02 15:33:52 +0100 |
commit | 27a497b3a7581a0cd76407635afca91d1f42aeef (patch) | |
tree | e4b65e5dcfc9a5be6053c24ec06d56fb82fe4c0d /src/quick/items/qquickitemsmodule.cpp | |
parent | 017a82c6702768aed68c34f319fa14da591f3df2 (diff) |
Add accessibility to qml
This consists of two parts:
An attached property for QML items and a plugin for the accessibility framework.
The attached property simply takes care of some properties (name, role)
that are needed in order to expose semantics of the application to
assistive tools.
The plugin exposes the hierarchy of QML items to the
accessibility framework.
Change-Id: I32f5603d0d9549b01b3645b205b710b9801762f7
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Diffstat (limited to 'src/quick/items/qquickitemsmodule.cpp')
-rw-r--r-- | src/quick/items/qquickitemsmodule.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quick/items/qquickitemsmodule.cpp b/src/quick/items/qquickitemsmodule.cpp index 69b9caf940..b5eb611e78 100644 --- a/src/quick/items/qquickitemsmodule.cpp +++ b/src/quick/items/qquickitemsmodule.cpp @@ -82,6 +82,7 @@ #include "qquickdroparea_p.h" #include "qquickmultipointtoucharea_p.h" #include <private/qdeclarativemetatype_p.h> +#include <QtQuick/private/qquickaccessibleattached_p.h> static QDeclarativePrivate::AutoParentResult qquickitem_autoParent(QObject *obj, QObject *parent) { @@ -215,6 +216,10 @@ static void qt_quickitems_defineModule(const char *uri, int major, int minor) qmlRegisterType<QQuickMultiPointTouchArea>("QtQuick", 2, 0, "MultiPointTouchArea"); qmlRegisterType<QQuickTouchPoint>("QtQuick", 2, 0, "TouchPoint"); qmlRegisterType<QQuickGrabGestureEvent>(); + +#ifndef QT_NO_ACCESSIBILITY + qmlRegisterUncreatableType<QQuickAccessibleAttached>("QtQuick", 2, 0, "Accessible",QQuickAccessibleAttached::tr("Accessible is only available via attached properties")); +#endif } void QQuickItemsModule::defineModule() |