summaryrefslogtreecommitdiffstats
path: root/src/widgets/accessible
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/accessible')
-rw-r--r--src/widgets/accessible/qaccessible.cpp25
-rw-r--r--src/widgets/accessible/qaccessible.h4
2 files changed, 25 insertions, 4 deletions
diff --git a/src/widgets/accessible/qaccessible.cpp b/src/widgets/accessible/qaccessible.cpp
index 10e5785cd5..e657cd0db1 100644
--- a/src/widgets/accessible/qaccessible.cpp
+++ b/src/widgets/accessible/qaccessible.cpp
@@ -822,16 +822,35 @@ const QAccessibleInterface *other, int otherChild) const
is returned.
The returned value indicates the relation of the called object to
- the \a other object, e.g. if this object is a child of \a other
- the return value will be \c Child.
+ the \a other object, e.g. if this object is a label for \a other
+ the return value will be \c Label.
+
+ Usually parent-child relations are not returned.
The return value is a combination of the bit flags in the
QAccessible::Relation enumeration.
All objects provide this information.
- \sa indexOfChild(), navigate()
+ \sa relations(), indexOfChild(), navigate()
*/
+QAccessible::Relation QAccessibleInterface::relationTo(int,
+ const QAccessibleInterface *, int) const
+{
+ return Unrelated;
+}
+
+/*!
+ Returns the meaningful relations to other widgets. Usually this will not return parent/child
+ relations, unless they are handled in a specific way such as in tree views.
+ It will typically return the labelled-by and label relations.
+
+ \sa relationTo(), navigate()
+*/
+QVector<QPair<QAccessibleInterface*, QAccessible::Relation> > QAccessibleInterface::relations() const
+{
+ return QVector<QPair<QAccessibleInterface*, Relation> >();
+}
/*!
\fn int QAccessibleInterface::childAt(int x, int y) const
diff --git a/src/widgets/accessible/qaccessible.h b/src/widgets/accessible/qaccessible.h
index 3a59810866..f03f86ce7a 100644
--- a/src/widgets/accessible/qaccessible.h
+++ b/src/widgets/accessible/qaccessible.h
@@ -379,7 +379,9 @@ public:
// relations
virtual Relation relationTo(int child, const QAccessibleInterface *other,
- int otherChild) const = 0;
+ int otherChild) const;
+ virtual QVector<QPair<QAccessibleInterface*, Relation> > relations() const;
+
virtual int childAt(int x, int y) const = 0;
// navigation