1 | // Copyright (C) 2021 The Qt Company Ltd. |
2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
3 | |
4 | #ifndef QAccessibleQuickView_H |
5 | #define QAccessibleQuickView_H |
6 | |
7 | // |
8 | // W A R N I N G |
9 | // ------------- |
10 | // |
11 | // This file is not part of the Qt API. It exists purely as an |
12 | // implementation detail. This header file may change from version to |
13 | // version without notice, or even be removed. |
14 | // |
15 | // We mean it. |
16 | // |
17 | |
18 | #include <QtGui/qaccessibleobject.h> |
19 | #include <QtQuick/qquickwindow.h> |
20 | #include <QtCore/private/qglobal_p.h> |
21 | |
22 | QT_BEGIN_NAMESPACE |
23 | |
24 | #if QT_CONFIG(accessibility) |
25 | |
26 | class Q_QUICK_EXPORT QAccessibleQuickWindow : public QAccessibleObject |
27 | { |
28 | public: |
29 | QAccessibleQuickWindow(QQuickWindow *object); |
30 | |
31 | QAccessibleInterface *parent() const override; |
32 | QAccessibleInterface *child(int index) const override; |
33 | QAccessibleInterface *focusChild() const override; |
34 | |
35 | QAccessible::Role role() const override; |
36 | QAccessible::State state() const override; |
37 | QRect rect() const override; |
38 | |
39 | int childCount() const override; |
40 | int indexOfChild(const QAccessibleInterface *iface) const override; |
41 | QString text(QAccessible::Text text) const override; |
42 | QAccessibleInterface *childAt(int x, int y) const override; |
43 | |
44 | private: |
45 | QQuickWindow *window() const override { return static_cast<QQuickWindow*>(object()); } |
46 | QList<QQuickItem *> rootItems() const; |
47 | }; |
48 | |
49 | #endif // accessibility |
50 | |
51 | QT_END_NAMESPACE |
52 | |
53 | #endif // QAccessibleQuickView_H |
54 | |