aboutsummaryrefslogtreecommitdiffstats
path: root/src/qtquick1/graphicsitems/qdeclarativeitemsmodule.cpp
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@nokia.com>2011-12-07 07:48:22 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-02 15:33:52 +0100
commit27a497b3a7581a0cd76407635afca91d1f42aeef (patch)
treee4b65e5dcfc9a5be6053c24ec06d56fb82fe4c0d /src/qtquick1/graphicsitems/qdeclarativeitemsmodule.cpp
parent017a82c6702768aed68c34f319fa14da591f3df2 (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/qtquick1/graphicsitems/qdeclarativeitemsmodule.cpp')
-rw-r--r--src/qtquick1/graphicsitems/qdeclarativeitemsmodule.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/qtquick1/graphicsitems/qdeclarativeitemsmodule.cpp b/src/qtquick1/graphicsitems/qdeclarativeitemsmodule.cpp
index 0a20b949b8..24ab4df4e2 100644
--- a/src/qtquick1/graphicsitems/qdeclarativeitemsmodule.cpp
+++ b/src/qtquick1/graphicsitems/qdeclarativeitemsmodule.cpp
@@ -76,6 +76,7 @@
#include "QtQuick1/private/qdeclarativegraphicswidget_p.h"
#include "QtQuick1/private/qdeclarativeanchors_p.h"
#include "QtQuick1/private/qdeclarativepincharea_p.h"
+#include "QtQuick1/private/qdeclarativeaccessibleattached_p.h"
static QDeclarativePrivate::AutoParentResult qgraphicsobject_autoParent(QObject *obj, QObject *parent)
{
@@ -199,6 +200,11 @@ void QDeclarative1ItemModule::defineModule(QDeclarativeQtQuick1Module::Module mo
qmlRegisterRevision<QDeclarative1ImplicitSizePaintedItem,0>("QtQuick",1,0);
qmlRegisterRevision<QDeclarative1ImplicitSizePaintedItem,1>("QtQuick",1,1);
qmlRegisterUncreatableType<QDeclarative1LayoutMirroringAttached>("QtQuick",1,1,"LayoutMirroring", QDeclarative1LayoutMirroringAttached::tr("LayoutMirroring is only available via attached properties"));
+#ifndef QT_NO_ACCESSIBILITY
+ qmlRegisterUncreatableType<QDeclarativeAccessibleAttached>("QtQuick",1,0,"Accessible",QDeclarativeAccessibleAttached::tr("Accessible is only available via attached properties"));
+ qmlRegisterUncreatableType<QDeclarativeAccessibleAttached>("QtQuick",1,1,"Accessible",QDeclarativeAccessibleAttached::tr("Accessible is only available via attached properties"));
+#endif
+
} else if (module == QDeclarativeQtQuick1Module::Qt47) {
#ifdef QT_NO_MOVIE
qmlRegisterTypeNotAvailable("Qt",4,7,"AnimatedImage",