Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
complexwidgets_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 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 COMPLEXWIDGETS_H
5#define COMPLEXWIDGETS_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 <QtWidgets/private/qtwidgetsglobal_p.h>
19#include <QtCore/qpointer.h>
20#include <QtWidgets/qaccessiblewidget.h>
21#if QT_CONFIG(itemviews)
22#include <QtWidgets/qabstractitemview.h>
23#endif
24
26
27#if QT_CONFIG(accessibility)
28
29class QAbstractButton;
30class QHeaderView;
31class QTabBar;
32class QComboBox;
33class QTitleBar;
34class QAbstractScrollArea;
35class QScrollArea;
36
37#if QT_CONFIG(scrollarea)
38class QAccessibleAbstractScrollArea : public QAccessibleWidget
39{
40public:
41 explicit QAccessibleAbstractScrollArea(QWidget *widget);
42
43 enum AbstractScrollAreaElement {
44 Self = 0,
45 Viewport,
46 HorizontalContainer,
47 VerticalContainer,
48 CornerWidget,
50 };
51
52 QAccessibleInterface *child(int index) const override;
53 int childCount() const override;
54 int indexOfChild(const QAccessibleInterface *child) const override;
55 bool isValid() const override;
56 QAccessibleInterface *childAt(int x, int y) const override;
57 QAbstractScrollArea *abstractScrollArea() const;
58
59private:
60 QWidgetList accessibleChildren() const;
61 AbstractScrollAreaElement elementType(QWidget *widget) const;
62 bool isLeftToRight() const;
63};
64
65class QAccessibleScrollArea : public QAccessibleAbstractScrollArea
66{
67public:
68 explicit QAccessibleScrollArea(QWidget *widget);
69};
70#endif // QT_CONFIG(scrollarea)
71
72#if QT_CONFIG(tabbar)
73class QAccessibleTabBar : public QAccessibleWidget
74{
75public:
76 explicit QAccessibleTabBar(QWidget *w);
77 ~QAccessibleTabBar();
78
79 QAccessibleInterface *focusChild() const override;
80 int childCount() const override;
81 QString text(QAccessible::Text t) const override;
82
83 QAccessibleInterface* child(int index) const override;
84 int indexOfChild(const QAccessibleInterface *child) const override;
85
86protected:
87 QTabBar *tabBar() const;
88 mutable QHash<int, QAccessible::Id> m_childInterfaces;
89};
90#endif // QT_CONFIG(tabbar)
91
92#if QT_CONFIG(combobox)
93class QAccessibleComboBox : public QAccessibleWidget
94{
95public:
96 explicit QAccessibleComboBox(QWidget *w);
97
98 int childCount() const override;
99 QAccessibleInterface *childAt(int x, int y) const override;
100 int indexOfChild(const QAccessibleInterface *child) const override;
101 QAccessibleInterface* child(int index) const override;
102 QAccessibleInterface* focusChild() const override;
103
104 QString text(QAccessible::Text t) const override;
105
106 QAccessible::State state() const override;
107
108 // QAccessibleActionInterface
109 QStringList actionNames() const override;
110 QString localizedActionDescription(const QString &actionName) const override;
111 void doAction(const QString &actionName) override;
112 QStringList keyBindingsForAction(const QString &actionName) const override;
113
114protected:
115 QComboBox *comboBox() const;
116};
117#endif // QT_CONFIG(combobox)
118
119#endif // QT_CONFIG(accessibility)
120
122
123#endif // COMPLEXWIDGETS_H
The QAbstractButton class is the abstract base class of button widgets, providing functionality commo...
\inmodule QtGui
The QComboBox widget is a combined button and popup list.
Definition qcombobox.h:24
\inmodule QtCore
Definition qhash.h:818
The QHeaderView class provides a header row or header column for item views.
Definition qheaderview.h:18
The QScrollArea class provides a scrolling view onto another widget.
Definition qscrollarea.h:17
\inmodule QtCore
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
The QTabBar class provides a tab bar, e.g.
Definition qtabbar.h:19
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
QOpenGLWidget * widget
[1]
QString text
else opt state
[0]
Combined button and popup list for selecting options.
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
GLuint index
[2]
GLint y
GLdouble GLdouble t
Definition qopenglext.h:243
QLayoutItem * child
[0]