source: trunk/src/plugins/accessible/compat/qaccessiblecompat.h@ 104

Last change on this file since 104 was 2, checked in by Dmitry A. Kuminov, 16 years ago

Initially imported qt-all-opensource-src-4.5.1 from Trolltech.

File size: 4.7 KB
Line 
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
47QT_BEGIN_NAMESPACE
48
49#ifndef QT_NO_ACCESSIBILITY
50
51class Q3ListView;
52class Q3TextEdit;
53class Q3IconView;
54class Q3ListBox;
55
56class Q3AccessibleScrollView : public QAccessibleWidget
57{
58public:
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
66class QAccessibleListView : public Q3AccessibleScrollView
67{
68public:
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
83protected:
84 Q3ListView *listView() const;
85};
86
87class QAccessibleIconView : public Q3AccessibleScrollView
88{
89public:
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
104protected:
105 Q3IconView *iconView() const;
106};
107
108class Q3AccessibleTextEdit : public Q3AccessibleScrollView
109{
110public:
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
121protected:
122 Q3TextEdit *textEdit() const;
123};
124
125class Q3WidgetStack;
126
127class QAccessibleWidgetStack : public QAccessibleWidget
128{
129public:
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
139protected:
140 Q3WidgetStack *widgetStack() const;
141};
142
143class QAccessibleListBox : public Q3AccessibleScrollView
144{
145public:
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
160protected:
161 Q3ListBox *listBox() const;
162};
163
164#endif // QT_NO_ACCESSIBILITY
165
166QT_END_NAMESPACE
167
168#endif // QACCESSIBLECOMPAT_H
Note: See TracBrowser for help on using the repository browser.