Absolute File Name: | /home/qt/qt5_coco/qt5/qtbase/src/widgets/accessible/rangecontrols.cpp |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | - | |||||||
4 | - | |||||||
5 | - | |||||||
6 | - | |||||||
7 | - | |||||||
8 | - | |||||||
9 | QAccessibleAbstractSpinBox::QAccessibleAbstractSpinBox(QWidget *w) | - | ||||||
10 | : QAccessibleWidget(w, QAccessible::SpinBox), lineEdit(nullptr) | - | ||||||
11 | { | - | ||||||
12 | ((!(abstractSpinBox())) ? qt_assert("abstractSpinBox()",__FILE__,66) : qt_noop()); | - | ||||||
13 | } never executed: end of block | 0 | ||||||
14 | - | |||||||
15 | QAccessibleAbstractSpinBox::~QAccessibleAbstractSpinBox() | - | ||||||
16 | { | - | ||||||
17 | delete lineEdit; | - | ||||||
18 | } never executed: end of block | 0 | ||||||
19 | - | |||||||
20 | - | |||||||
21 | - | |||||||
22 | - | |||||||
23 | QAbstractSpinBox *QAccessibleAbstractSpinBox::abstractSpinBox() const | - | ||||||
24 | { | - | ||||||
25 | return never executed: qobject_cast<QAbstractSpinBox*>(object());return qobject_cast<QAbstractSpinBox*>(object()); never executed: return qobject_cast<QAbstractSpinBox*>(object()); | 0 | ||||||
26 | } | - | ||||||
27 | - | |||||||
28 | QAccessibleInterface *QAccessibleAbstractSpinBox::lineEditIface() const | - | ||||||
29 | { | - | ||||||
30 | - | |||||||
31 | if (!lineEdit
| 0 | ||||||
32 | lineEdit = new QAccessibleLineEdit(abstractSpinBox()->lineEdit()); never executed: lineEdit = new QAccessibleLineEdit(abstractSpinBox()->lineEdit()); | 0 | ||||||
33 | return never executed: lineEdit;return lineEdit; never executed: return lineEdit; | 0 | ||||||
34 | } | - | ||||||
35 | - | |||||||
36 | QString QAccessibleAbstractSpinBox::text(QAccessible::Text t) const | - | ||||||
37 | { | - | ||||||
38 | if (t == QAccessible::Value
| 0 | ||||||
39 | return never executed: abstractSpinBox()->text();return abstractSpinBox()->text(); never executed: return abstractSpinBox()->text(); | 0 | ||||||
40 | return never executed: QAccessibleWidget::text(t);return QAccessibleWidget::text(t); never executed: return QAccessibleWidget::text(t); | 0 | ||||||
41 | } | - | ||||||
42 | - | |||||||
43 | void *QAccessibleAbstractSpinBox::interface_cast(QAccessible::InterfaceType t) | - | ||||||
44 | { | - | ||||||
45 | if (t == QAccessible::ValueInterface
| 0 | ||||||
46 | return never executed: static_cast<QAccessibleValueInterface*>(this);return static_cast<QAccessibleValueInterface*>(this); never executed: return static_cast<QAccessibleValueInterface*>(this); | 0 | ||||||
47 | if (t == QAccessible::TextInterface
| 0 | ||||||
48 | return never executed: static_cast<QAccessibleTextInterface*>(this);return static_cast<QAccessibleTextInterface*>(this); never executed: return static_cast<QAccessibleTextInterface*>(this); | 0 | ||||||
49 | if (t == QAccessible::EditableTextInterface
| 0 | ||||||
50 | return never executed: static_cast<QAccessibleEditableTextInterface*>(this);return static_cast<QAccessibleEditableTextInterface*>(this); never executed: return static_cast<QAccessibleEditableTextInterface*>(this); | 0 | ||||||
51 | return never executed: QAccessibleWidget::interface_cast(t);return QAccessibleWidget::interface_cast(t); never executed: return QAccessibleWidget::interface_cast(t); | 0 | ||||||
52 | } | - | ||||||
53 | - | |||||||
54 | QVariant QAccessibleAbstractSpinBox::currentValue() const | - | ||||||
55 | { | - | ||||||
56 | return never executed: abstractSpinBox()->property("value");return abstractSpinBox()->property("value"); never executed: return abstractSpinBox()->property("value"); | 0 | ||||||
57 | } | - | ||||||
58 | - | |||||||
59 | void QAccessibleAbstractSpinBox::setCurrentValue(const QVariant &value) | - | ||||||
60 | { | - | ||||||
61 | abstractSpinBox()->setProperty("value", value); | - | ||||||
62 | } never executed: end of block | 0 | ||||||
63 | - | |||||||
64 | QVariant QAccessibleAbstractSpinBox::maximumValue() const | - | ||||||
65 | { | - | ||||||
66 | return never executed: abstractSpinBox()->property("maximum");return abstractSpinBox()->property("maximum"); never executed: return abstractSpinBox()->property("maximum"); | 0 | ||||||
67 | } | - | ||||||
68 | - | |||||||
69 | QVariant QAccessibleAbstractSpinBox::minimumValue() const | - | ||||||
70 | { | - | ||||||
71 | return never executed: abstractSpinBox()->property("minimum");return abstractSpinBox()->property("minimum"); never executed: return abstractSpinBox()->property("minimum"); | 0 | ||||||
72 | } | - | ||||||
73 | - | |||||||
74 | QVariant QAccessibleAbstractSpinBox::minimumStepSize() const | - | ||||||
75 | { | - | ||||||
76 | return never executed: abstractSpinBox()->property("stepSize");return abstractSpinBox()->property("stepSize"); never executed: return abstractSpinBox()->property("stepSize"); | 0 | ||||||
77 | } | - | ||||||
78 | - | |||||||
79 | void QAccessibleAbstractSpinBox::addSelection(int startOffset, int endOffset) | - | ||||||
80 | { | - | ||||||
81 | lineEditIface()->textInterface()->addSelection(startOffset, endOffset); | - | ||||||
82 | } never executed: end of block | 0 | ||||||
83 | - | |||||||
84 | QString QAccessibleAbstractSpinBox::attributes(int offset, int *startOffset, int *endOffset) const | - | ||||||
85 | { | - | ||||||
86 | return never executed: lineEditIface()->textInterface()->attributes(offset, startOffset, endOffset);return lineEditIface()->textInterface()->attributes(offset, startOffset, endOffset); never executed: return lineEditIface()->textInterface()->attributes(offset, startOffset, endOffset); | 0 | ||||||
87 | } | - | ||||||
88 | - | |||||||
89 | int QAccessibleAbstractSpinBox::cursorPosition() const | - | ||||||
90 | { | - | ||||||
91 | return never executed: lineEditIface()->textInterface()->cursorPosition();return lineEditIface()->textInterface()->cursorPosition(); never executed: return lineEditIface()->textInterface()->cursorPosition(); | 0 | ||||||
92 | } | - | ||||||
93 | - | |||||||
94 | QRect QAccessibleAbstractSpinBox::characterRect(int offset) const | - | ||||||
95 | { | - | ||||||
96 | return never executed: lineEditIface()->textInterface()->characterRect(offset);return lineEditIface()->textInterface()->characterRect(offset); never executed: return lineEditIface()->textInterface()->characterRect(offset); | 0 | ||||||
97 | } | - | ||||||
98 | - | |||||||
99 | int QAccessibleAbstractSpinBox::selectionCount() const | - | ||||||
100 | { | - | ||||||
101 | return never executed: lineEditIface()->textInterface()->selectionCount();return lineEditIface()->textInterface()->selectionCount(); never executed: return lineEditIface()->textInterface()->selectionCount(); | 0 | ||||||
102 | } | - | ||||||
103 | - | |||||||
104 | int QAccessibleAbstractSpinBox::offsetAtPoint(const QPoint &point) const | - | ||||||
105 | { | - | ||||||
106 | return never executed: lineEditIface()->textInterface()->offsetAtPoint(point);return lineEditIface()->textInterface()->offsetAtPoint(point); never executed: return lineEditIface()->textInterface()->offsetAtPoint(point); | 0 | ||||||
107 | } | - | ||||||
108 | - | |||||||
109 | void QAccessibleAbstractSpinBox::selection(int selectionIndex, int *startOffset, int *endOffset) const | - | ||||||
110 | { | - | ||||||
111 | lineEditIface()->textInterface()->selection(selectionIndex, startOffset, endOffset); | - | ||||||
112 | } never executed: end of block | 0 | ||||||
113 | - | |||||||
114 | QString QAccessibleAbstractSpinBox::text(int startOffset, int endOffset) const | - | ||||||
115 | { | - | ||||||
116 | return never executed: lineEditIface()->textInterface()->text(startOffset, endOffset);return lineEditIface()->textInterface()->text(startOffset, endOffset); never executed: return lineEditIface()->textInterface()->text(startOffset, endOffset); | 0 | ||||||
117 | } | - | ||||||
118 | - | |||||||
119 | QString QAccessibleAbstractSpinBox::textBeforeOffset(int offset, QAccessible::TextBoundaryType boundaryType, int *startOffset, int *endOffset) const | - | ||||||
120 | { | - | ||||||
121 | return never executed: lineEditIface()->textInterface()->textBeforeOffset(offset, boundaryType, startOffset, endOffset);return lineEditIface()->textInterface()->textBeforeOffset(offset, boundaryType, startOffset, endOffset); never executed: return lineEditIface()->textInterface()->textBeforeOffset(offset, boundaryType, startOffset, endOffset); | 0 | ||||||
122 | } | - | ||||||
123 | - | |||||||
124 | QString QAccessibleAbstractSpinBox::textAfterOffset(int offset, QAccessible::TextBoundaryType boundaryType, int *startOffset, int *endOffset) const | - | ||||||
125 | { | - | ||||||
126 | return never executed: lineEditIface()->textInterface()->textAfterOffset(offset, boundaryType, startOffset, endOffset);return lineEditIface()->textInterface()->textAfterOffset(offset, boundaryType, startOffset, endOffset); never executed: return lineEditIface()->textInterface()->textAfterOffset(offset, boundaryType, startOffset, endOffset); | 0 | ||||||
127 | } | - | ||||||
128 | - | |||||||
129 | QString QAccessibleAbstractSpinBox::textAtOffset(int offset, QAccessible::TextBoundaryType boundaryType, int *startOffset, int *endOffset) const | - | ||||||
130 | { | - | ||||||
131 | return never executed: lineEditIface()->textInterface()->textAtOffset(offset, boundaryType, startOffset, endOffset);return lineEditIface()->textInterface()->textAtOffset(offset, boundaryType, startOffset, endOffset); never executed: return lineEditIface()->textInterface()->textAtOffset(offset, boundaryType, startOffset, endOffset); | 0 | ||||||
132 | } | - | ||||||
133 | - | |||||||
134 | void QAccessibleAbstractSpinBox::removeSelection(int selectionIndex) | - | ||||||
135 | { | - | ||||||
136 | lineEditIface()->textInterface()->removeSelection(selectionIndex); | - | ||||||
137 | } never executed: end of block | 0 | ||||||
138 | - | |||||||
139 | void QAccessibleAbstractSpinBox::setCursorPosition(int position) | - | ||||||
140 | { | - | ||||||
141 | lineEditIface()->textInterface()->setCursorPosition(position); | - | ||||||
142 | } never executed: end of block | 0 | ||||||
143 | - | |||||||
144 | void QAccessibleAbstractSpinBox::setSelection(int selectionIndex, int startOffset, int endOffset) | - | ||||||
145 | { | - | ||||||
146 | lineEditIface()->textInterface()->setSelection(selectionIndex, startOffset, endOffset); | - | ||||||
147 | } never executed: end of block | 0 | ||||||
148 | - | |||||||
149 | int QAccessibleAbstractSpinBox::characterCount() const | - | ||||||
150 | { | - | ||||||
151 | return never executed: lineEditIface()->textInterface()->characterCount();return lineEditIface()->textInterface()->characterCount(); never executed: return lineEditIface()->textInterface()->characterCount(); | 0 | ||||||
152 | } | - | ||||||
153 | - | |||||||
154 | void QAccessibleAbstractSpinBox::scrollToSubstring(int startIndex, int endIndex) | - | ||||||
155 | { | - | ||||||
156 | lineEditIface()->textInterface()->scrollToSubstring(startIndex, endIndex); | - | ||||||
157 | } never executed: end of block | 0 | ||||||
158 | - | |||||||
159 | void QAccessibleAbstractSpinBox::deleteText(int startOffset, int endOffset) | - | ||||||
160 | { | - | ||||||
161 | lineEditIface()->editableTextInterface()->deleteText(startOffset, endOffset); | - | ||||||
162 | } never executed: end of block | 0 | ||||||
163 | - | |||||||
164 | void QAccessibleAbstractSpinBox::insertText(int offset, const QString &text) | - | ||||||
165 | { | - | ||||||
166 | lineEditIface()->editableTextInterface()->insertText(offset, text); | - | ||||||
167 | } never executed: end of block | 0 | ||||||
168 | - | |||||||
169 | void QAccessibleAbstractSpinBox::replaceText(int startOffset, int endOffset, const QString &text) | - | ||||||
170 | { | - | ||||||
171 | lineEditIface()->editableTextInterface()->replaceText(startOffset, endOffset, text); | - | ||||||
172 | } never executed: end of block | 0 | ||||||
173 | QAccessibleSpinBox::QAccessibleSpinBox(QWidget *w) | - | ||||||
174 | : QAccessibleAbstractSpinBox(w) | - | ||||||
175 | { | - | ||||||
176 | ((!(spinBox())) ? qt_assert("spinBox()",__FILE__,243) : qt_noop()); | - | ||||||
177 | addControllingSignal(QLatin1String("valueChanged(int)")); | - | ||||||
178 | addControllingSignal(QLatin1String("valueChanged(QString)")); | - | ||||||
179 | } never executed: end of block | 0 | ||||||
180 | - | |||||||
181 | - | |||||||
182 | - | |||||||
183 | - | |||||||
184 | QSpinBox *QAccessibleSpinBox::spinBox() const | - | ||||||
185 | { | - | ||||||
186 | return never executed: qobject_cast<QSpinBox*>(object());return qobject_cast<QSpinBox*>(object()); never executed: return qobject_cast<QSpinBox*>(object()); | 0 | ||||||
187 | } | - | ||||||
188 | - | |||||||
189 | - | |||||||
190 | - | |||||||
191 | QAccessibleDoubleSpinBox::QAccessibleDoubleSpinBox(QWidget *widget) | - | ||||||
192 | : QAccessibleAbstractSpinBox(widget) | - | ||||||
193 | { | - | ||||||
194 | ((!(qobject_cast<QDoubleSpinBox *>(widget))) ? qt_assert("qobject_cast<QDoubleSpinBox *>(widget)",__FILE__,261) : qt_noop()); | - | ||||||
195 | addControllingSignal(QLatin1String("valueChanged(double)")); | - | ||||||
196 | addControllingSignal(QLatin1String("valueChanged(QString)")); | - | ||||||
197 | } never executed: end of block | 0 | ||||||
198 | - | |||||||
199 | - | |||||||
200 | - | |||||||
201 | - | |||||||
202 | QDoubleSpinBox *QAccessibleDoubleSpinBox::doubleSpinBox() const | - | ||||||
203 | { | - | ||||||
204 | return never executed: static_cast<QDoubleSpinBox*>(object());return static_cast<QDoubleSpinBox*>(object()); never executed: return static_cast<QDoubleSpinBox*>(object()); | 0 | ||||||
205 | } | - | ||||||
206 | - | |||||||
207 | QString QAccessibleDoubleSpinBox::text(QAccessible::Text textType) const | - | ||||||
208 | { | - | ||||||
209 | if (textType == QAccessible::Value
| 0 | ||||||
210 | return never executed: doubleSpinBox()->textFromValue(doubleSpinBox()->value());return doubleSpinBox()->textFromValue(doubleSpinBox()->value()); never executed: return doubleSpinBox()->textFromValue(doubleSpinBox()->value()); | 0 | ||||||
211 | return never executed: QAccessibleWidget::text(textType);return QAccessibleWidget::text(textType); never executed: return QAccessibleWidget::text(textType); | 0 | ||||||
212 | } | - | ||||||
213 | QAccessibleScrollBar::QAccessibleScrollBar(QWidget *w) | - | ||||||
214 | : QAccessibleAbstractSlider(w, QAccessible::ScrollBar) | - | ||||||
215 | { | - | ||||||
216 | ((!(scrollBar())) ? qt_assert("scrollBar()",__FILE__,299) : qt_noop()); | - | ||||||
217 | addControllingSignal(QLatin1String("valueChanged(int)")); | - | ||||||
218 | } never executed: end of block | 0 | ||||||
219 | - | |||||||
220 | - | |||||||
221 | QScrollBar *QAccessibleScrollBar::scrollBar() const | - | ||||||
222 | { | - | ||||||
223 | return never executed: qobject_cast<QScrollBar*>(object());return qobject_cast<QScrollBar*>(object()); never executed: return qobject_cast<QScrollBar*>(object()); | 0 | ||||||
224 | } | - | ||||||
225 | - | |||||||
226 | QString QAccessibleScrollBar::text(QAccessible::Text t) const | - | ||||||
227 | { | - | ||||||
228 | if (t == QAccessible::Value
| 0 | ||||||
229 | return never executed: QString::number(scrollBar()->value());return QString::number(scrollBar()->value()); never executed: return QString::number(scrollBar()->value()); | 0 | ||||||
230 | return never executed: QAccessibleAbstractSlider::text(t);return QAccessibleAbstractSlider::text(t); never executed: return QAccessibleAbstractSlider::text(t); | 0 | ||||||
231 | } | - | ||||||
232 | QAccessibleSlider::QAccessibleSlider(QWidget *w) | - | ||||||
233 | : QAccessibleAbstractSlider(w) | - | ||||||
234 | { | - | ||||||
235 | ((!(slider())) ? qt_assert("slider()",__FILE__,334) : qt_noop()); | - | ||||||
236 | addControllingSignal(QLatin1String("valueChanged(int)")); | - | ||||||
237 | } never executed: end of block | 0 | ||||||
238 | - | |||||||
239 | - | |||||||
240 | QSlider *QAccessibleSlider::slider() const | - | ||||||
241 | { | - | ||||||
242 | return never executed: qobject_cast<QSlider*>(object());return qobject_cast<QSlider*>(object()); never executed: return qobject_cast<QSlider*>(object()); | 0 | ||||||
243 | } | - | ||||||
244 | - | |||||||
245 | QString QAccessibleSlider::text(QAccessible::Text t) const | - | ||||||
246 | { | - | ||||||
247 | if (t == QAccessible::Value
| 0 | ||||||
248 | return never executed: QString::number(slider()->value());return QString::number(slider()->value()); never executed: return QString::number(slider()->value()); | 0 | ||||||
249 | - | |||||||
250 | return never executed: QAccessibleAbstractSlider::text(t);return QAccessibleAbstractSlider::text(t); never executed: return QAccessibleAbstractSlider::text(t); | 0 | ||||||
251 | } | - | ||||||
252 | - | |||||||
253 | QAccessibleAbstractSlider::QAccessibleAbstractSlider(QWidget *w, QAccessible::Role r) | - | ||||||
254 | : QAccessibleWidget(w, r) | - | ||||||
255 | { | - | ||||||
256 | ((!(qobject_cast<QAbstractSlider *>(w))) ? qt_assert("qobject_cast<QAbstractSlider *>(w)",__FILE__,355) : qt_noop()); | - | ||||||
257 | } never executed: end of block | 0 | ||||||
258 | - | |||||||
259 | void *QAccessibleAbstractSlider::interface_cast(QAccessible::InterfaceType t) | - | ||||||
260 | { | - | ||||||
261 | if (t == QAccessible::ValueInterface
| 0 | ||||||
262 | return never executed: static_cast<QAccessibleValueInterface*>(this);return static_cast<QAccessibleValueInterface*>(this); never executed: return static_cast<QAccessibleValueInterface*>(this); | 0 | ||||||
263 | return never executed: QAccessibleWidget::interface_cast(t);return QAccessibleWidget::interface_cast(t); never executed: return QAccessibleWidget::interface_cast(t); | 0 | ||||||
264 | } | - | ||||||
265 | - | |||||||
266 | QVariant QAccessibleAbstractSlider::currentValue() const | - | ||||||
267 | { | - | ||||||
268 | return never executed: abstractSlider()->value();return abstractSlider()->value(); never executed: return abstractSlider()->value(); | 0 | ||||||
269 | } | - | ||||||
270 | - | |||||||
271 | void QAccessibleAbstractSlider::setCurrentValue(const QVariant &value) | - | ||||||
272 | { | - | ||||||
273 | abstractSlider()->setValue(value.toInt()); | - | ||||||
274 | } never executed: end of block | 0 | ||||||
275 | - | |||||||
276 | QVariant QAccessibleAbstractSlider::maximumValue() const | - | ||||||
277 | { | - | ||||||
278 | return never executed: abstractSlider()->maximum();return abstractSlider()->maximum(); never executed: return abstractSlider()->maximum(); | 0 | ||||||
279 | } | - | ||||||
280 | - | |||||||
281 | QVariant QAccessibleAbstractSlider::minimumValue() const | - | ||||||
282 | { | - | ||||||
283 | return never executed: abstractSlider()->minimum();return abstractSlider()->minimum(); never executed: return abstractSlider()->minimum(); | 0 | ||||||
284 | } | - | ||||||
285 | - | |||||||
286 | QVariant QAccessibleAbstractSlider::minimumStepSize() const | - | ||||||
287 | { | - | ||||||
288 | return never executed: abstractSlider()->singleStep();return abstractSlider()->singleStep(); never executed: return abstractSlider()->singleStep(); | 0 | ||||||
289 | } | - | ||||||
290 | - | |||||||
291 | QAbstractSlider *QAccessibleAbstractSlider::abstractSlider() const | - | ||||||
292 | { | - | ||||||
293 | return never executed: static_cast<QAbstractSlider *>(object());return static_cast<QAbstractSlider *>(object()); never executed: return static_cast<QAbstractSlider *>(object()); | 0 | ||||||
294 | } | - | ||||||
295 | - | |||||||
296 | - | |||||||
297 | - | |||||||
298 | - | |||||||
299 | - | |||||||
300 | QAccessibleDial::QAccessibleDial(QWidget *widget) | - | ||||||
301 | : QAccessibleAbstractSlider(widget, QAccessible::Dial) | - | ||||||
302 | { | - | ||||||
303 | ((!(qobject_cast<QDial *>(widget))) ? qt_assert("qobject_cast<QDial *>(widget)",__FILE__,402) : qt_noop()); | - | ||||||
304 | addControllingSignal(QLatin1String("valueChanged(int)")); | - | ||||||
305 | } never executed: end of block | 0 | ||||||
306 | - | |||||||
307 | QString QAccessibleDial::text(QAccessible::Text textType) const | - | ||||||
308 | { | - | ||||||
309 | if (textType == QAccessible::Value
| 0 | ||||||
310 | return never executed: QString::number(dial()->value());return QString::number(dial()->value()); never executed: return QString::number(dial()->value()); | 0 | ||||||
311 | - | |||||||
312 | return never executed: QAccessibleAbstractSlider::text(textType);return QAccessibleAbstractSlider::text(textType); never executed: return QAccessibleAbstractSlider::text(textType); | 0 | ||||||
313 | } | - | ||||||
314 | - | |||||||
315 | QDial *QAccessibleDial::dial() const | - | ||||||
316 | { | - | ||||||
317 | return never executed: static_cast<QDial*>(object());return static_cast<QDial*>(object()); never executed: return static_cast<QDial*>(object()); | 0 | ||||||
318 | } | - | ||||||
319 | - | |||||||
320 | - | |||||||
321 | - | |||||||
322 | - | |||||||
323 | - | |||||||
Switch to Source code | Preprocessed file |