Qt 4.8
rangecontrols.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 RANGECONTROLS_H
43 #define RANGECONTROLS_H
44 
45 #include <QtGui/qaccessiblewidget.h>
46 #include <QtGui/qaccessible2.h>
47 
49 
50 #ifndef QT_NO_ACCESSIBILITY
51 
52 class QAbstractSpinBox;
53 class QAbstractSlider;
54 class QScrollBar;
55 class QSlider;
56 class QSpinBox;
57 class QDoubleSpinBox;
58 class QDial;
59 
60 #ifndef QT_NO_SPINBOX
62 {
64 public:
66 
72  };
73 
74  int childCount() const;
75  QRect rect(int child) const;
76 
77  int navigate(RelationFlag rel, int entry, QAccessibleInterface **target) const;
78 
79  QString text(Text t, int child) const;
80  Role role(int child) const;
81 
82  bool doAction(int action, int child, const QVariantList &params);
83 
84  QVariant invokeMethodEx(Method method, int child, const QVariantList &params);
85 
86  // QAccessibleValueInterface
88  void setCurrentValue(const QVariant &value);
91 
92 protected:
94 };
95 
97 {
98 public:
99  explicit QAccessibleSpinBox(QWidget *w);
100 
101  State state(int child) const;
102 
103  bool doAction(int action, int child, const QVariantList &params);
104 
105 protected:
106  QSpinBox *spinBox() const;
107 };
108 
110 {
111 public:
113 
119  };
120 
121  int childCount() const;
122  QRect rect(int child) const;
123  int navigate(RelationFlag rel, int entry, QAccessibleInterface **target) const;
124  QVariant invokeMethodEx(QAccessible::Method method, int child, const QVariantList &params);
125  QString text(Text t, int child) const;
126  Role role(int child) const;
127  State state(int child) const;
128 
129 protected:
130  QDoubleSpinBox *doubleSpinBox() const;
131 };
132 #endif // QT_NO_SPINBOX
133 
135 {
137 public:
138  explicit QAccessibleAbstractSlider(QWidget *w, Role r = Slider);
139 
140  QVariant invokeMethodEx(Method method, int child, const QVariantList &params);
141 
142  // QAccessibleValueInterface
144  void setCurrentValue(const QVariant &value);
147 
148 protected:
149  QAbstractSlider *abstractSlider() const;
150 };
151 
152 #ifndef QT_NO_SCROLLBAR
154 {
155 public:
156  explicit QAccessibleScrollBar(QWidget *w);
157 
159  ScrollBarSelf = 0,
164  LineDown
165  };
166 
167  int childCount() const;
168 
169  QRect rect(int child) const;
170  QString text(Text t, int child) const;
171  Role role(int child) const;
172  State state(int child) const;
173 
174 protected:
175  QScrollBar *scrollBar() const;
176 };
177 #endif // QT_NO_SCROLLBAR
178 
179 #ifndef QT_NO_SLIDER
181 {
182 public:
183  explicit QAccessibleSlider(QWidget *w);
184 
186  SliderSelf = 0,
189  PageRight
190  };
191 
192  int childCount() const;
193 
194  QRect rect(int child) const;
195  QString text(Text t, int child) const;
196  Role role(int child) const;
197  State state(int child) const;
198 
199  int defaultAction(int child) const;
200  QString actionText(int action, Text t, int child) const;
201 
202 protected:
203  QSlider *slider() const;
204 };
205 #endif // QT_NO_SLIDER
206 
207 #ifndef QT_NO_DIAL
209 {
210 public:
211  explicit QAccessibleDial(QWidget *w);
212 
214  Self = 0,
216  SliderHandle
217  };
218 
219  int childCount() const;
220  QRect rect(int child) const;
221  QString text(Text textType, int child) const;
222  Role role(int child) const;
223  State state(int child) const;
224  QVariant invokeMethodEx(Method method, int child, const QVariantList &params);
225 
226 protected:
227  QDial *dial() const;
228 };
229 #endif // QT_NO_DIAL
230 
231 #endif // QT_NO_ACCESSIBILITY
232 
234 
235 #endif // RANGECONTROLS_H
The QVariant class acts like a union for the most common Qt data types.
Definition: qvariant.h:92
QRect rect(int child) const
Reimplemented Function
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
ScrollBarElements
This enum identifies the components of the scroll bar.
QString actionText(int action, Text t, int child) const
Returns the text property t of the action action supported by the object, or of the object&#39;s child if...
SpinBoxElements
This enum identifies the components of the spin box.
Definition: rangecontrols.h:67
QVariant invokeMethodEx(Method method, int child, const QVariantList &params)
int childCount() const
Reimplemented Function
Role
This enum defines the role of an accessible object.
Definition: qaccessible.h:188
The QWidget class is the base class of all user interface objects.
Definition: qwidget.h:150
void setCurrentValue(const QVariant &value)
int navigate(RelationFlag rel, int entry, QAccessibleInterface **target) const
Reimplemented Function
QAccessibleAbstractSpinBox(QWidget *w)
The QString class provides a Unicode character string.
Definition: qstring.h:83
The QScrollBar widget provides a vertical or horizontal scroll bar.
Definition: qscrollbar.h:59
#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
Method
This enum describes the possible types of methods that can be invoked on an accessible object...
Definition: qaccessible.h:311
SliderElements
This enum identifies the components of the slider.
#define Q_ACCESSIBLE_OBJECT
Definition: qaccessible2.h:108
The QSlider widget provides a vertical or horizontal slider.
Definition: qslider.h:57
The QAbstractSpinBox class provides a spinbox and a line edit to display values.
The State element defines configurations of objects and properties.
QAbstractSpinBox * abstractSpinBox() const
Returns the underlying QAbstractSpinBox.
QString text(Text t, int child) const
Reimplemented Function
The QAccessibleSlider class implements the QAccessibleInterface for sliders.
The QDoubleSpinBox class provides a spin box widget that takes doubles.
Definition: qspinbox.h:126
The QAccessibleInterface class defines an interface that exposes information about accessible objects...
Definition: qaccessible.h:370
QWidget * widget() const
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
The QAbstractSlider class provides an integer value within a range.
The QSpinBox class provides a spin box widget.
Definition: qspinbox.h:56
The QDial class provides a rounded range control (like a speedometer or potentiometer).
Definition: qdial.h:59
bool doAction(int action, int child, const QVariantList &params)
Reimplemented Function
The QAccessibleValueInterface class implements support for the IAccessibleValue interface.
Definition: qaccessible2.h:193
State state(int child) const
Returns the current state of the object, or of the object&#39;s child if child is not 0...
The QAccessibleSpinBox class implements the QAccessibleInterface for spinbox widgets.
Definition: rangecontrols.h:96
Role role(int child) const
Reimplemented Function
The QAccessibleScrollBar class implements the QAccessibleInterface for scroll bars.
The Text item allows you to add formatted text to a scene.