aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/accessible/quick/qaccessiblequickview.h
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2012-12-12 11:49:21 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-04 14:16:18 +0100
commitdde63b7c5a05a2f23458ad43b7b29c2354b10dc3 (patch)
tree5972b2002af3a067ec40eda9eb18ac8da624b896 /src/plugins/accessible/quick/qaccessiblequickview.h
parentda0613abb2ac4966c87a8d92f68488744fabe64b (diff)
Accessibility: Work with QQuickWindow
Before we would only be accessible when QQView was used. While the window has the content item, that one will not appear in the hierarchy of accessible objects since it has no valueable properties to expose. Instead it's first child will be used (which was the case before when QQView was used). Change-Id: I03cefb5c8dcd8296d51ff2bfcb677386a5f1d698 Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Diffstat (limited to 'src/plugins/accessible/quick/qaccessiblequickview.h')
-rw-r--r--src/plugins/accessible/quick/qaccessiblequickview.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/plugins/accessible/quick/qaccessiblequickview.h b/src/plugins/accessible/quick/qaccessiblequickview.h
index 03061be275..2b01b18f3c 100644
--- a/src/plugins/accessible/quick/qaccessiblequickview.h
+++ b/src/plugins/accessible/quick/qaccessiblequickview.h
@@ -44,16 +44,16 @@
#include <QtGui/qaccessible2.h>
#include <QtGui/qaccessibleobject.h>
-#include <QtQuick/qquickview.h>
+#include <QtQuick/qquickwindow.h>
QT_BEGIN_NAMESPACE
#ifndef QT_NO_ACCESSIBILITY
-class QAccessibleQuickView : public QAccessibleObject
+class QAccessibleQuickWindow : public QAccessibleObject
{
public:
- QAccessibleQuickView(QQuickView *object);
+ QAccessibleQuickWindow(QQuickWindow *object);
QAccessibleInterface *parent() const;
QAccessibleInterface *child(int index) const;
@@ -66,8 +66,10 @@ public:
int indexOfChild(const QAccessibleInterface *iface) const;
QString text(QAccessible::Text text) const;
QAccessibleInterface *childAt(int x, int y) const;
+
private:
- QQuickView *view() const { return static_cast<QQuickView*>(object()); }
+ QQuickWindow *window() const { return static_cast<QQuickWindow*>(object()); }
+ QQuickItem *rootItem() const;
};
#endif // QT_NO_ACCESSIBILITY