Qt 4.8
qaccessiblecompat.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the plugins of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #ifndef QACCESSIBLECOMPAT_H
43 #define QACCESSIBLECOMPAT_H
44 
45 #include <QtGui/qaccessiblewidget.h>
46 
48 
49 #ifndef QT_NO_ACCESSIBILITY
50 
51 class Q3ListView;
52 class Q3TextEdit;
53 class Q3IconView;
54 class Q3ListBox;
55 
57 {
58 public:
60 
61  virtual int itemAt(int x, int y) const;
62  virtual QRect itemRect(int item) const;
63  virtual int itemCount() const;
64 };
65 
67 {
68 public:
69  explicit QAccessibleListView(QWidget *o);
70 
71  int itemAt(int x, int y) const;
72  QRect itemRect(int item) const;
73  int itemCount() const;
74 
75  QString text(Text t, int child) const;
76  Role role(int child) const;
77  State state(int child) const;
78 
79  bool setSelected(int child, bool on, bool extend);
80  void clearSelection();
81  QVector<int> selection() const;
82 
83 protected:
84  Q3ListView *listView() const;
85 };
86 
88 {
89 public:
90  explicit QAccessibleIconView(QWidget *o);
91 
92  int itemAt(int x, int y) const;
93  QRect itemRect(int item) const;
94  int itemCount() const;
95 
96  QString text(Text t, int child) const;
97  Role role(int child) const;
98  State state(int child) const;
99 
100  bool setSelected(int child, bool on, bool extend);
101  void clearSelection();
102  QVector<int> selection() const;
103 
104 protected:
105  Q3IconView *iconView() const;
106 };
107 
109 {
110 public:
111  explicit Q3AccessibleTextEdit(QWidget *o);
112 
113  int itemAt(int x, int y) const;
114  QRect itemRect(int item) const;
115  int itemCount() const;
116 
117  QString text(Text t, int child) const;
118  void setText(Text t, int control, const QString &text);
119  Role role(int child) const;
120 
121 protected:
122  Q3TextEdit *textEdit() const;
123 };
124 
125 class Q3WidgetStack;
126 
128 {
129 public:
130  explicit QAccessibleWidgetStack(QWidget *o);
131 
132  int childCount() const;
133  int indexOfChild(const QAccessibleInterface*) const;
134 
135  int childAt(int x, int y) const;
136 
137  int navigate(RelationFlag rel, int entry, QAccessibleInterface **target) const;
138 
139 protected:
140  Q3WidgetStack *widgetStack() const;
141 };
142 
144 {
145 public:
146  explicit QAccessibleListBox(QWidget *o);
147 
148  int itemAt(int x, int y) const;
149  QRect itemRect(int item) const;
150  int itemCount() const;
151 
152  QString text(Text t, int child) const;
153  Role role(int child) const;
154  State state(int child) const;
155 
156  bool setSelected(int child, bool on, bool extend);
157  void clearSelection();
158  QVector<int> selection() const;
159 
160 protected:
161  Q3ListBox *listBox() const;
162 };
163 
164 #endif // QT_NO_ACCESSIBILITY
165 
167 
168 #endif // QACCESSIBLECOMPAT_H
The Q3AccessibleTextEdit class implements the QAccessibleInterface for richtext editors.
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
int childCount() const
Reimplemented Function
void setText(Text t, int child, const QString &text)
Reimplemented Function
Role
This enum defines the role of an accessible object.
Definition: qaccessible.h:188
The QAccessibleIconView class implements the QAccessibleInterface for icon views. ...
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
The QString class provides a Unicode character string.
Definition: qstring.h:83
The QAccessibleWidgetStack class implements the QAccessibleInterface for widget stacks.
int indexOfChild(const QAccessibleInterface *child) const
Reimplemented Function
Q3AccessibleScrollView(QWidget *w, Role role)
Constructs a Q3AccessibleScrollView object for a widget.
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
RelationFlag
This enum type defines bit flags that can be combined to indicate the relationship between two access...
Definition: qaccessible.h:268
virtual int itemAt(int x, int y) const
Returns the ID of the item at viewport position x, y.
int childAt(int x, int y) const
Reimplemented Function
The State element defines configurations of objects and properties.
The QAccessibleWidget class implements the QAccessibleInterface for QWidgets.
virtual QRect itemRect(int item) const
Returns the location in viewport coordinates of the item with ID item.
The QAccessibleListView class implements the QAccessibleInterface for list views. ...
Role role(int child) const
Reimplemented Function
The QAccessibleInterface class defines an interface that exposes information about accessible objects...
Definition: qaccessible.h:370
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
The QAccessibleListBox class implements the QAccessibleInterface for list boxes.
virtual int itemCount() const
Returns the number of items in the scroll view.
int navigate(RelationFlag rel, int entry, QAccessibleInterface **target) const
Reimplemented Function
The Text item allows you to add formatted text to a scene.
QString text(Text t, int child) const
Reimplemented Function
State state(int child) const
Reimplemented Function