summaryrefslogtreecommitdiffstats
path: root/src/plugins/accessible/widgets/qaccessiblemenu.h
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@nokia.com>2011-09-15 21:41:54 +0200
committerQt by Nokia <qt-info@nokia.com>2011-09-19 12:06:13 +0200
commit76d0d1926466d42b1b25f0bac642c1e0f239074c (patch)
tree84397813957307cf1ac393ac29d045acc6e08846 /src/plugins/accessible/widgets/qaccessiblemenu.h
parent3647a00d47fd774daccce9f143cc2046fb59099d (diff)
Add parent and child functions to QAccessibleInterface.
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 <frederik.gladhorn@nokia.com> Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Diffstat (limited to 'src/plugins/accessible/widgets/qaccessiblemenu.h')
-rw-r--r--src/plugins/accessible/widgets/qaccessiblemenu.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/accessible/widgets/qaccessiblemenu.h b/src/plugins/accessible/widgets/qaccessiblemenu.h
index ce73629360..0144bf90b9 100644
--- a/src/plugins/accessible/widgets/qaccessiblemenu.h
+++ b/src/plugins/accessible/widgets/qaccessiblemenu.h
@@ -65,6 +65,8 @@ public:
QString text(Text t, int child) const;
Role role(int child) const;
State state(int child) const;
+ QAccessibleInterface *child(int index) const;
+ QAccessibleInterface *parent() const;
int navigate(RelationFlag relation, int entry, QAccessibleInterface **target) const;
int indexOfChild( const QAccessibleInterface *child ) const;
@@ -81,6 +83,7 @@ class QAccessibleMenuBar : public QAccessibleWidget
public:
explicit QAccessibleMenuBar(QWidget *w);
+ QAccessibleInterface *child(int index) const;
int childCount() const;
int childAt(int x, int y) const;
@@ -113,6 +116,9 @@ public:
virtual bool doAction ( int action, int child, const QVariantList & params = QVariantList() );
virtual int indexOfChild ( const QAccessibleInterface * child ) const;
virtual bool isValid () const;
+
+ QAccessibleInterface *parent() const;
+ QAccessibleInterface *child(int index) const;
virtual int navigate ( RelationFlag relation, int entry, QAccessibleInterface ** target ) const;
virtual QObject * object () const;
virtual QRect rect ( int child ) const;