1
/****************************************************************************
3
** Copyright (C) 2012 Digia Plc and/or its subsidiary(-ies).
4
** Contact: http://www.qt-project.org/legal
6
** This file is part of the documentation of the Qt Toolkit.
8
** $QT_BEGIN_LICENSE:BSD$
9
** You may use this file under the terms of the BSD license as follows:
11
** "Redistribution and use in source and binary forms, with or without
12
** modification, are permitted provided that the following conditions are
14
** * Redistributions of source code must retain the above copyright
15
** notice, this list of conditions and the following disclaimer.
16
** * Redistributions in binary form must reproduce the above copyright
17
** notice, this list of conditions and the following disclaimer in
18
** the documentation and/or other materials provided with the
20
** * Neither the name of Digia Plc and its Subsidiary(-ies) nor the names
21
** of its contributors may be used to endorse or promote products derived
22
** from this software without specific prior written permission.
25
** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26
** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27
** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28
** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
29
** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30
** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
31
** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
32
** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
33
** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
34
** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
35
** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
39
****************************************************************************/
44
QListIterator<float> i(list);
51
QListIterator<float> i(list);
53
while (i.hasPrevious())
54
qDebug() << i.previous();
59
QLinkedList<float> list;
61
QLinkedListIterator<float> i(list);
68
QLinkedListIterator<float> i(list);
70
while (i.hasPrevious())
71
qDebug() << i.previous();
76
QVector<float> vector;
78
QVectorIterator<float> i(vector);
85
QVectorIterator<float> i(vector);
87
while (i.hasPrevious())
88
qDebug() << i.previous();
95
QSetIterator<QString> i(set);
102
QSetIterator<QString> i(set);
104
while (i.hasPrevious())
105
qDebug() << i.previous();
112
QMutableListIterator<float> i(list);
114
qDebug() << i.next();
119
QMutableListIterator<float> i(list);
121
while (i.hasPrevious())
122
qDebug() << i.previous();
127
QMutableListIterator<int> i(list);
128
while (i.hasNext()) {
132
} else if (val == 0) {
140
QLinkedList<float> list;
142
QMutableLinkedListIterator<float> i(list);
144
qDebug() << i.next();
149
QMutableLinkedListIterator<float> i(list);
151
while (i.hasPrevious())
152
qDebug() << i.previous();
157
QMutableLinkedListIterator<int> i(list);
158
while (i.hasNext()) {
162
} else if (val == 0) {
170
QVector<float> vector;
172
QMutableVectorIterator<float> i(vector);
174
qDebug() << i.next();
179
QMutableVectorIterator<float> i(vector);
181
while (i.hasPrevious())
182
qDebug() << i.previous();
187
QMutableVectorIterator<int> i(vector);
188
while (i.hasNext()) {
192
} else if (val == 0) {
202
QMutableSetIterator<float> i(set);
204
qDebug() << i.next();
209
QMutableSetIterator<float> i(set);
211
while (i.hasPrevious())
212
qDebug() << i.previous();
217
QMutableListIterator<int> i(list);
218
while (i.hasNext()) {
220
if (val < -32768 || val > 32767)
227
QMutableLinkedListIterator<int> i(list);
228
while (i.hasNext()) {
230
if (val < -32768 || val > 32767)
237
QMutableVectorIterator<int> i(vector);
238
while (i.hasNext()) {
240
if (val < -32768 || val > 32767)
247
QMutableSetIterator<int> i(set);
248
while (i.hasNext()) {
250
if (val < -32768 || val > 32767)
257
QMutableListIterator<double> i(list);
258
while (i.hasNext()) {
259
double val = i.next();
260
i.setValue(sqrt(val));
266
QMutableLinkedListIterator<double> i(list);
267
while (i.hasNext()) {
268
double val = i.next();
269
i.setValue(sqrt(val));
275
QMutableVectorIterator<double> i(list);
276
while (i.hasNext()) {
277
double val = i.next();
278
i.setValue(sqrt(val));
284
QMap<int, QWidget *> map;
286
QMapIterator<int, QWidget *> i(map);
287
while (i.hasNext()) {
289
qDebug() << i.key() << ": " << i.value();
295
QMapIterator<int, QWidget *> i(map);
297
while (i.hasPrevious()) {
299
qDebug() << i.key() << ": " << i.value();
305
QMapIterator<int, QWidget *> i(map);
306
while (i.findNext(widget)) {
307
qDebug() << "Found widget " << widget << " under key "
314
QHash<int, QWidget *> hash;
316
QHashIterator<int, QWidget *> i(hash);
317
while (i.hasNext()) {
319
qDebug() << i.key() << ": " << i.value();
325
QHashIterator<int, QWidget *> i(hash);
327
while (i.hasPrevious()) {
329
qDebug() << i.key() << ": " << i.value();
335
QHashIterator<int, QWidget *> i(hash);
336
while (i.findNext(widget)) {
337
qDebug() << "Found widget " << widget << " under key "
344
QMap<int, QWidget *> map;
346
QMutableMapIterator<int, QWidget *> i(map);
347
while (i.hasNext()) {
349
qDebug() << i.key() << ": " << i.value();
355
QMutableMapIterator<int, QWidget *> i(map);
357
while (i.hasPrevious()) {
359
qDebug() << i.key() << ": " << i.value();
365
QMutableMapIterator<int, QWidget *> i(map);
366
while (i.findNext(widget)) {
367
qDebug() << "Found widget " << widget << " under key "
374
QMutableMapIterator<QString, QString> i(map);
375
while (i.hasNext()) {
377
if (i.key() == i.value())
384
QHash<int, QWidget *> hash;
386
QMutableHashIterator<QString, QWidget *> i(hash);
387
while (i.hasNext()) {
389
qDebug() << i.key() << ": " << i.value();
395
QMutableHashIterator<int, QWidget *> i(hash);
397
while (i.hasPrevious()) {
399
qDebug() << i.key() << ": " << i.value();
405
QMutableHashIterator<int, QWidget *> i(hash);
406
while (i.findNext(widget)) {
407
qDebug() << "Found widget " << widget << " under key "
414
QMutableHashIterator<QString, QString> i(hash);
415
while (i.hasNext()) {
417
if (i.key() == i.value())