|
1 /**************************************************************************** |
|
2 ** |
|
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
4 ** All rights reserved. |
|
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 ** |
|
7 ** This file is part of the plugins of the Qt Toolkit. |
|
8 ** |
|
9 ** $QT_BEGIN_LICENSE:LGPL$ |
|
10 ** No Commercial Usage |
|
11 ** This file contains pre-release code and may not be distributed. |
|
12 ** You may use this file in accordance with the terms and conditions |
|
13 ** contained in the Technology Preview License Agreement accompanying |
|
14 ** this package. |
|
15 ** |
|
16 ** GNU Lesser General Public License Usage |
|
17 ** Alternatively, this file may be used under the terms of the GNU Lesser |
|
18 ** General Public License version 2.1 as published by the Free Software |
|
19 ** Foundation and appearing in the file LICENSE.LGPL included in the |
|
20 ** packaging of this file. Please review the following information to |
|
21 ** ensure the GNU Lesser General Public License version 2.1 requirements |
|
22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
23 ** |
|
24 ** In addition, as a special exception, Nokia gives you certain additional |
|
25 ** rights. These rights are described in the Nokia Qt LGPL Exception |
|
26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
27 ** |
|
28 ** If you have questions regarding the use of this file, please contact |
|
29 ** Nokia at qt-info@nokia.com. |
|
30 ** |
|
31 ** |
|
32 ** |
|
33 ** |
|
34 ** |
|
35 ** |
|
36 ** |
|
37 ** |
|
38 ** $QT_END_LICENSE$ |
|
39 ** |
|
40 ****************************************************************************/ |
|
41 |
|
42 #ifndef QACCESSIBLECOMPAT_H |
|
43 #define QACCESSIBLECOMPAT_H |
|
44 |
|
45 #include <QtGui/qaccessiblewidget.h> |
|
46 |
|
47 QT_BEGIN_NAMESPACE |
|
48 |
|
49 #ifndef QT_NO_ACCESSIBILITY |
|
50 |
|
51 class Q3ListView; |
|
52 class Q3TextEdit; |
|
53 class Q3IconView; |
|
54 class Q3ListBox; |
|
55 |
|
56 class Q3AccessibleScrollView : public QAccessibleWidget |
|
57 { |
|
58 public: |
|
59 Q3AccessibleScrollView(QWidget *w, Role role); |
|
60 |
|
61 virtual int itemAt(int x, int y) const; |
|
62 virtual QRect itemRect(int item) const; |
|
63 virtual int itemCount() const; |
|
64 }; |
|
65 |
|
66 class QAccessibleListView : public Q3AccessibleScrollView |
|
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 |
|
87 class QAccessibleIconView : public Q3AccessibleScrollView |
|
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 |
|
108 class Q3AccessibleTextEdit : public Q3AccessibleScrollView |
|
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 |
|
127 class QAccessibleWidgetStack : public QAccessibleWidget |
|
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 |
|
143 class QAccessibleListBox : public Q3AccessibleScrollView |
|
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 |
|
166 QT_END_NAMESPACE |
|
167 |
|
168 #endif // QACCESSIBLECOMPAT_H |