2 * SPDX-FileCopyrightText: 2012 Amandeep Singh <aman.dedman@gmail.com>
4 * SPDX-License-Identifier: GPL-2.0-or-later
7 #ifndef KITEMLISTCONTAINERACCESSIBLE_H
8 #define KITEMLISTCONTAINERACCESSIBLE_H
10 #include "dolphin_export.h"
12 #include <QAccessibleWidget>
14 class KItemListContainer
;
15 class KItemListViewAccessible
;
18 * The accessible interface for KItemListContainer.
20 * Truthfully, there is absolutely no reason for screen reader users to interact with this interface.
21 * It is only there to bridge the gap between custom accessible interfaces and the automatically by Qt and QWidgets provided accessible interfaces.
22 * Really, the main issue is that KItemListContainer itself is the last proper QWidget in the hierarchy while the actual main view is completely custom using
23 * QGraphicsView instead, so focus usually officially goes to KItemListContainer which messes with the custom accessibility hierarchy.
25 class DOLPHIN_EXPORT KItemListContainerAccessible
: public QAccessibleWidget
28 explicit KItemListContainerAccessible(KItemListContainer
*container
);
29 ~KItemListContainerAccessible() override
;
31 QString
text(QAccessible::Text t
) const override
;
33 QAccessibleInterface
*child(int index
) const override
;
34 QAccessibleInterface
*focusChild() const override
;
35 int childCount() const override
;
36 int indexOfChild(const QAccessibleInterface
*child
) const override
;
38 QAccessible::State
state() const override
;
39 void doAction(const QString
&actionName
) override
;
41 /** @returns the object() of this interface cast to its actual class. */
42 const KItemListContainer
*container() const;
45 #endif // KITEMLISTCONTAINERACCESSIBLE_H