1 | /****************************************************************************
|
---|
2 | **
|
---|
3 | ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
---|
4 | ** Contact: Qt Software Information ([email protected])
|
---|
5 | **
|
---|
6 | ** This file is part of the plugins of the Qt Toolkit.
|
---|
7 | **
|
---|
8 | ** $QT_BEGIN_LICENSE:LGPL$
|
---|
9 | ** Commercial Usage
|
---|
10 | ** Licensees holding valid Qt Commercial licenses may use this file in
|
---|
11 | ** accordance with the Qt Commercial License Agreement provided with the
|
---|
12 | ** Software or, alternatively, in accordance with the terms contained in
|
---|
13 | ** a written agreement between you and Nokia.
|
---|
14 | **
|
---|
15 | ** GNU Lesser General Public License Usage
|
---|
16 | ** Alternatively, this file may be used under the terms of the GNU Lesser
|
---|
17 | ** General Public License version 2.1 as published by the Free Software
|
---|
18 | ** Foundation and appearing in the file LICENSE.LGPL included in the
|
---|
19 | ** packaging of this file. Please review the following information to
|
---|
20 | ** ensure the GNU Lesser General Public License version 2.1 requirements
|
---|
21 | ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
|
---|
22 | **
|
---|
23 | ** In addition, as a special exception, Nokia gives you certain
|
---|
24 | ** additional rights. These rights are described in the Nokia Qt LGPL
|
---|
25 | ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
|
---|
26 | ** package.
|
---|
27 | **
|
---|
28 | ** GNU General Public License Usage
|
---|
29 | ** Alternatively, this file may be used under the terms of the GNU
|
---|
30 | ** General Public License version 3.0 as published by the Free Software
|
---|
31 | ** Foundation and appearing in the file LICENSE.GPL included in the
|
---|
32 | ** packaging of this file. Please review the following information to
|
---|
33 | ** ensure the GNU General Public License version 3.0 requirements will be
|
---|
34 | ** met: http://www.gnu.org/copyleft/gpl.html.
|
---|
35 | **
|
---|
36 | ** If you are unsure which license is appropriate for your use, please
|
---|
37 | ** contact the sales department at [email protected].
|
---|
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
|
---|