rangecontrols.cpp

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

Generated by Squish Coco Non-Commercial 4.3.0-BETA-master-30-08-2018-4cb69e9