qscriptvalueiterator.h

Go to the documentation of this file.
00001 /****************************************************************************
00002 **
00003 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
00004 ** All rights reserved.
00005 ** Contact: Nokia Corporation (qt-info@nokia.com)
00006 **
00007 ** This file is part of the QtScript module of the Qt Toolkit.
00008 **
00009 ** $QT_BEGIN_LICENSE:LGPL-ONLY$
00010 ** GNU Lesser General Public License Usage
00011 ** This file may be used under the terms of the GNU Lesser
00012 ** General Public License version 2.1 as published by the Free Software
00013 ** Foundation and appearing in the file LICENSE.LGPL included in the
00014 ** packaging of this file.  Please review the following information to
00015 ** ensure the GNU Lesser General Public License version 2.1 requirements
00016 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
00017 **
00018 ** If you have questions regarding the use of this file, please contact
00019 ** Nokia at qt-info@nokia.com.
00020 ** $QT_END_LICENSE$
00021 **
00022 ****************************************************************************/
00023 
00024 #ifndef QSCRIPTVALUEITERATOR_H
00025 #define QSCRIPTVALUEITERATOR_H
00026 
00027 #include <QtScript/qscriptvalue.h>
00028 
00029 #include <QtCore/qscopedpointer.h>
00030 
00031 QT_BEGIN_HEADER
00032 
00033 QT_BEGIN_NAMESPACE
00034 
00035 QT_MODULE(Script)
00036 
00037 class QString;
00038 class QScriptString;
00039 
00040 class QScriptValueIteratorPrivate;
00041 class Q_SCRIPT_EXPORT QScriptValueIterator
00042 {
00043 public:
00044     QScriptValueIterator(const QScriptValue &value);
00045     ~QScriptValueIterator();
00046 
00047     bool hasNext() const;
00048     void next();
00049 
00050     bool hasPrevious() const;
00051     void previous();
00052 
00053     QString name() const;
00054     QScriptString scriptName() const;
00055 
00056     QScriptValue value() const;
00057     void setValue(const QScriptValue &value);
00058 
00059     QScriptValue::PropertyFlags flags() const;
00060 
00061     void remove();
00062 
00063     void toFront();
00064     void toBack();
00065 
00066     QScriptValueIterator& operator=(QScriptValue &value);
00067 
00068 private:
00069     QScopedPointer<QScriptValueIteratorPrivate> d_ptr;
00070 
00071     Q_DECLARE_PRIVATE(QScriptValueIterator)
00072     Q_DISABLE_COPY(QScriptValueIterator)
00073 };
00074 
00075 QT_END_NAMESPACE
00076 
00077 QT_END_HEADER
00078 
00079 #endif // QSCRIPTVALUEITERATOR_H