summaryrefslogtreecommitdiffstats
path: root/src/plugins/accessible/widgets/complexwidgets.cpp
diff options
context:
space:
mode:
authorJan-Arve Saether <jan-arve.saether@nokia.com>2012-01-06 15:51:53 +0100
committerQt by Nokia <qt-info@nokia.com>2012-01-12 15:05:57 +0100
commit1133c0dd2230499b24d7f92634531bb633ee00f6 (patch)
tree019862768fa9533f7b12ab8f57c061d4959a7648 /src/plugins/accessible/widgets/complexwidgets.cpp
parentad163821356dfab943cbc848d82039c171f0346d (diff)
Remove all references to QAccessible::(Up|Down|Left|Right)
It is now the resonsibility of the bridge to support this (by querying for QAccessibleInterface::rect()) The windows bridge (currently the only bridge in need of this) has already been updated to reflect this in commit 7dca461620ee6d8cce3a74acf2e1530d4497bff9 Change-Id: Ief1339ab6edc118e2d47e3875e09fa885db65c2f Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Diffstat (limited to 'src/plugins/accessible/widgets/complexwidgets.cpp')
-rw-r--r--src/plugins/accessible/widgets/complexwidgets.cpp114
1 files changed, 0 insertions, 114 deletions
diff --git a/src/plugins/accessible/widgets/complexwidgets.cpp b/src/plugins/accessible/widgets/complexwidgets.cpp
index 94eb535791..a8f477e261 100644
--- a/src/plugins/accessible/widgets/complexwidgets.cpp
+++ b/src/plugins/accessible/widgets/complexwidgets.cpp
@@ -414,120 +414,6 @@ bool QAccessibleAbstractScrollArea::isValid() const
return (QAccessibleWidget::isValid() && abstractScrollArea() && abstractScrollArea()->viewport());
}
-int QAccessibleAbstractScrollArea::navigate(QAccessible::RelationFlag relation, int entry, QAccessibleInterface **target) const
-{
- if (!target)
- return -1;
-
- *target = 0;
-
- QWidget *targetWidget = 0;
- QWidget *entryWidget = 0;
-
- if (relation == QAccessible::Left || relation == QAccessible::Up || relation == QAccessible::Right || relation == QAccessible::Down) {
- QWidgetList children = accessibleChildren();
- if (entry < 0 || entry > children.count())
- return -1;
-
- if (entry == Self)
- entryWidget = abstractScrollArea();
- else
- entryWidget = children.at(entry - 1);
- AbstractScrollAreaElement entryElement = elementType(entryWidget);
-
- // Not one of the most beautiful switches I've ever seen, but I believe it has
- // to be like this since each case need special handling.
- // It might be possible to make it more general, but I'll leave that as an exercise
- // to the reader. :-)
- switch (relation) {
- case QAccessible::Left:
- if (entry < 1)
- break;
- switch (entryElement) {
- case Viewport:
- if (!isLeftToRight())
- targetWidget = abstractScrollArea()->verticalScrollBar();
- break;
- case HorizontalContainer:
- if (!isLeftToRight())
- targetWidget = abstractScrollArea()->cornerWidget();
- break;
- case VerticalContainer:
- if (isLeftToRight())
- targetWidget = abstractScrollArea()->viewport();
- break;
- case CornerWidget:
- if (isLeftToRight())
- targetWidget = abstractScrollArea()->horizontalScrollBar();
- break;
- default:
- break;
- }
- break;
- case QAccessible::Right:
- if (entry < 1)
- break;
- switch (entryElement) {
- case Viewport:
- if (isLeftToRight())
- targetWidget = abstractScrollArea()->verticalScrollBar();
- break;
- case HorizontalContainer:
- targetWidget = abstractScrollArea()->cornerWidget();
- break;
- case VerticalContainer:
- if (!isLeftToRight())
- targetWidget = abstractScrollArea()->viewport();
- break;
- case CornerWidget:
- if (!isLeftToRight())
- targetWidget = abstractScrollArea()->horizontalScrollBar();
- break;
- default:
- break;
- }
- break;
- case QAccessible::Up:
- if (entry < 1)
- break;
- switch (entryElement) {
- case HorizontalContainer:
- targetWidget = abstractScrollArea()->viewport();
- break;
- case CornerWidget:
- targetWidget = abstractScrollArea()->verticalScrollBar();
- break;
- default:
- break;
- }
- break;
- case QAccessible::Down:
- if (entry < 1)
- break;
- switch (entryElement) {
- case Viewport:
- targetWidget = abstractScrollArea()->horizontalScrollBar();
- break;
- case VerticalContainer:
- targetWidget = abstractScrollArea()->cornerWidget();
- break;
- default:
- break;
- }
- break;
- default:
- break;
- }
- } else {
- return QAccessibleWidget::navigate(relation, entry, target);
- }
-
- if (qobject_cast<const QScrollBar *>(targetWidget))
- targetWidget = targetWidget->parentWidget();
- *target = QAccessible::queryAccessibleInterface(targetWidget);
- return *target ? 0: -1;
-}
-
QAccessibleInterface *QAccessibleAbstractScrollArea::childAt(int x, int y) const
{
if (!abstractScrollArea()->isVisible())