From: Frederik Gladhorn Date: Tue, 13 Mar 2012 19:26:35 +0000 (+0100) Subject: Add active and invisible states for accessibility. X-Git-Tag: qt-v5.0.0-alpha1~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=523be17b1db2c67c61319ad9a46c3f319bbe9132;p=profile%2Fivi%2Fqtdeclarative.git Add active and invisible states for accessibility. QQuickView should expose the right states. Change-Id: I38c0ce8bea46a749efb0b9085fb0f646538698b2 Reviewed-by: Jan-Arve Sæther --- diff --git a/src/plugins/accessible/quick/qaccessiblequickview.cpp b/src/plugins/accessible/quick/qaccessiblequickview.cpp index 1823dfe..4b31c2e 100644 --- a/src/plugins/accessible/quick/qaccessiblequickview.cpp +++ b/src/plugins/accessible/quick/qaccessiblequickview.cpp @@ -41,6 +41,8 @@ #include "qaccessiblequickview.h" +#include + #include #include @@ -83,7 +85,12 @@ QAccessible::Role QAccessibleQuickView::role() const QAccessible::State QAccessibleQuickView::state() const { - return QAccessible::State(); // FIXME + QAccessible::State st; + if (view() == QGuiApplication::focusWindow()) + st.active = true; + if (!view()->isVisible()) + st.invisible = true; + return st; } QRect QAccessibleQuickView::rect() const