aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/accessible/quick/qaccessiblequickitem.h
diff options
context:
space:
mode:
authorJan-Arve Saether <jan-arve.saether@nokia.com>2012-01-03 09:40:16 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-12 12:21:59 +0100
commit9ab84bd46861557afb190ba4cb2481b35a7401e5 (patch)
tree32c2c128aa0783cbe0bfe9f43d437c9ac916a929 /src/plugins/accessible/quick/qaccessiblequickitem.h
parent0cafd920cced1f726a8b6422b6fb496ecf846f34 (diff)
Make QAccessibleQuickView::childAt() work properly with overlapping items
The previous code did not consider items that were overlapped due to having different z coordinates. The approach used is now the same as found in QQuickCanvas::mousePressEvent(). Strictly speaking, this is a violation of childAt (since it will disregard the implementation of childAt of all the descendants along the path down to the item actually returned.) However, I don't see any good reason for that the implementation for childAt() would be different than how mousePressEvent behaves. It should also perform better than any other solution I managed to think of. Change-Id: I2d3fa2282437c7b5533c6149c62fc456ccf2ccfa Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Diffstat (limited to 'src/plugins/accessible/quick/qaccessiblequickitem.h')
-rw-r--r--src/plugins/accessible/quick/qaccessiblequickitem.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/accessible/quick/qaccessiblequickitem.h b/src/plugins/accessible/quick/qaccessiblequickitem.h
index 5ef3a19247..75e7081dc0 100644
--- a/src/plugins/accessible/quick/qaccessiblequickitem.h
+++ b/src/plugins/accessible/quick/qaccessiblequickitem.h
@@ -77,6 +77,9 @@ protected:
QQuickItem *item() const { return static_cast<QQuickItem*>(object()); }
};
+QRect itemScreenRect(QQuickItem *item);
+
+
class QAccessibleQuickItemValueInterface: public QAccessibleQuickItem, public QAccessibleValueInterface
{
public: