From 76d0d1926466d42b1b25f0bac642c1e0f239074c Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Thu, 15 Sep 2011 21:41:54 +0200 Subject: Add parent and child functions to QAccessibleInterface. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Stop the mis-use of navigate to find the parent. In order to make navigation straight forward parent and child functions are now part of QAccessibleInterface. This allows navigating the hierarchy of accessible objects without the 1-based indexes in the navigate function which lead to confusion. Eventually the support for Ancestor in navigate can be completely removed and forwarded in the windows bridge if needed. In addition default parameters for virtual children. This will make the transition smooth since it allows to remove the integer already. Change-Id: I278287ce17161f9fa46797ac244676778c859576 Reviewed-on: http://codereview.qt-project.org/5024 Reviewed-by: Frederik Gladhorn Reviewed-by: Jan-Arve Sæther --- src/plugins/accessible/widgets/qaccessiblewidgets.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/plugins/accessible/widgets/qaccessiblewidgets.h') diff --git a/src/plugins/accessible/widgets/qaccessiblewidgets.h b/src/plugins/accessible/widgets/qaccessiblewidgets.h index 471dca5cab..6cb31726dd 100644 --- a/src/plugins/accessible/widgets/qaccessiblewidgets.h +++ b/src/plugins/accessible/widgets/qaccessiblewidgets.h @@ -132,6 +132,7 @@ public: int childAt(int x, int y) const; int childCount() const; int indexOfChild(const QAccessibleInterface *child) const; + QAccessibleInterface *child(int index) const; int navigate(RelationFlag relation, int entry, QAccessibleInterface **target) const; protected: @@ -273,6 +274,8 @@ public: QString actionText(int action, Text t, int child) const; bool doAction(int action, int child, const QVariantList& params = QVariantList()); int userActionCount ( int child) const; + QAccessibleInterface *parent() const; + QAccessibleInterface *child(int index) const; int navigate(RelationFlag relation, int entry, QAccessibleInterface **iface) const; int indexOfChild(const QAccessibleInterface *child) const; int childCount() const; -- cgit v1.2.3