Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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, public QAccessibleSelectionInterface
74{
75public:
76 explicit QAccessibleTabBar(QWidget *w);
77 ~QAccessibleTabBar();
78
79 void *interface_cast(QAccessible::InterfaceType t) override;
80
81 QAccessibleInterface *focusChild() const override;
82 int childCount() const override;
83 QString text(QAccessible::Text t) const override;
84
85 QAccessibleInterface* child(int index) const override;
86 int indexOfChild(const QAccessibleInterface *child) const override;
87
88 // QAccessibleSelectionInterface
89 int selectedItemCount() const override;
90 QList<QAccessibleInterface*> selectedItems() const override;
91 QAccessibleInterface* selectedItem(int selectionIndex) const override;
92 bool isSelected(QAccessibleInterface *childItem) const override;
93 bool select(QAccessibleInterface *childItem) override;
94 bool unselect(QAccessibleInterface *childItem) override;
95 bool selectAll() override;
96 bool clear() override;
97
98protected:
99 QTabBar *tabBar() const;
100 mutable QHash<int, QAccessible::Id> m_childInterfaces;
101};
102#endif // QT_CONFIG(tabbar)
103
104#if QT_CONFIG(combobox)
105class QAccessibleComboBox : public QAccessibleWidget
106{
107public:
108 explicit QAccessibleComboBox(QWidget *w);
109
110 int childCount() const override;
111 QAccessibleInterface *childAt(int x, int y) const override;
112 int indexOfChild(const QAccessibleInterface *child) const override;
113 QAccessibleInterface* child(int index) const override;
114 QAccessibleInterface* focusChild() const override;
115
116 QString text(QAccessible::Text t) const override;
117
118 QAccessible::State state() const override;
119
120 // QAccessibleActionInterface
121 QStringList actionNames() const override;
122 QString localizedActionDescription(const QString &actionName) const override;
123 void doAction(const QString &actionName) override;
124 QStringList keyBindingsForAction(const QString &actionName) const override;
125
126protected:
127 QComboBox *comboBox() const;
128};
129#endif // QT_CONFIG(combobox)
130
131#endif // QT_CONFIG(accessibility)
132
134
135#endif // COMPLEXWIDGETS_H
The QAbstractButton class is the abstract base class of button widgets, providing functionality commo...
\inmodule QtGui
The QComboBox widget combines a button with a dropdown list.
Definition qcombobox.h:24
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:129
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]
b clear()
QString text
else opt state
[0]
Combined button and popup list for selecting options.
static jboolean selectAll(JNIEnv *, jobject)
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
GLuint index
[2]
GLint y
GLdouble GLdouble t
Definition qopenglext.h:243
selection select(topLeft, bottomRight)
QLayoutItem * child
[0]