mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2026-06-29 18:09:59 +03:00
NOISSUE Add basic accessibility support to GroupView
This commit is contained in:
parent
3b32730526
commit
d6c6653872
11 changed files with 934 additions and 2 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue