summaryrefslogtreecommitdiffstats
path: root/application/groupview/GroupView.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2019-07-21 21:12:05 +0200
committerPetr Mrázek <peterix@gmail.com>2019-07-22 01:40:52 +0200
commitd6c665387233e894a27c0b33e4b49e5d1d229aeb (patch)
tree0e22463970ba5e08d5dbf5e1f2403b0a98f03a1d /application/groupview/GroupView.cpp
parent3b32730526512be8d672931afe860e0baff76a28 (diff)
downloadMultiMC-d6c665387233e894a27c0b33e4b49e5d1d229aeb.tar
MultiMC-d6c665387233e894a27c0b33e4b49e5d1d229aeb.tar.gz
MultiMC-d6c665387233e894a27c0b33e4b49e5d1d229aeb.tar.lz
MultiMC-d6c665387233e894a27c0b33e4b49e5d1d229aeb.tar.xz
MultiMC-d6c665387233e894a27c0b33e4b49e5d1d229aeb.zip
NOISSUE Add basic accessibility support to GroupView
Diffstat (limited to 'application/groupview/GroupView.cpp')
-rw-r--r--application/groupview/GroupView.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/application/groupview/GroupView.cpp b/application/groupview/GroupView.cpp
index 625e7e5f..bc7ef6c0 100644
--- a/application/groupview/GroupView.cpp
+++ b/application/groupview/GroupView.cpp
@@ -25,6 +25,7 @@
#include <QMimeData>
#include <QCache>
#include <QScrollBar>
+#include <QAccessible>
#include "VisualGroup.h"
#include <QDebug>
@@ -88,6 +89,18 @@ void GroupView::rowsRemoved()
scheduleDelayedItemsLayout();
}
+void GroupView::currentChanged(const QModelIndex& current, const QModelIndex& previous)
+{
+ QAbstractItemView::currentChanged(current, previous);
+ // TODO: for accessibility support, implement+register a factory, steal QAccessibleTable from Qt and return an instance of it for GroupView.
+ if (QAccessible::isActive() && current.isValid()) {
+ QAccessibleEvent event(this, QAccessible::Focus);
+ event.setChild(current.row());
+ QAccessible::updateAccessibility(&event);
+ }
+}
+
+
class LocaleString : public QString
{
public: