QScriptClassPropertyIterator Class Reference |
virtual | ~QScriptClassPropertyIterator () |
virtual QScriptValue::PropertyFlags | flags () const |
virtual bool | hasNext () const = 0 |
virtual bool | hasPrevious () const = 0 |
virtual uint | id () const |
virtual QScriptString | name () const = 0 |
virtual void | next () = 0 |
QScriptValue | object () const |
virtual void | previous () = 0 |
virtual void | toBack () = 0 |
virtual void | toFront () = 0 |
QScriptClassPropertyIterator ( const QScriptValue & object ) |
The QScriptClassPropertyIterator class provides an iterator interface for custom Qt Script objects.
This class is only relevant if you have subclassed QScriptClass and want to provide enumeration of your custom properties (e.g. when objects of your class are used with QScriptValueIterator, or with the for-in statement in scripts).
The object() function returns the Qt Script object the iterator is traversing.
toFront(), hasNext() and next() provide forward iteration.
toBack(), hasPrevious() and previous() provide backward iteration.
name(), id() and flags() return information about the last property that was jumped over using next() or previous().
See also QScriptClass::newIterator() and QScriptValueIterator.
Constructs an iterator for traversing object.
Subclasses should ensure that the iterator is set to the front of the sequence of properties (before the first property).
Destroys the iterator.
Returns the flags of the last property that was jumped over using next() or previous().
The default implementation calls the propertyFlags() function of object() with argument name().
Returns true if there is at least one item ahead of the iterator (i.e. the iterator is not at the back of the property sequence); otherwise returns false.
See also next() and hasPrevious().
Returns true if there is at least one item behind the iterator (i.e. the iterator is not at the front of the property sequence); otherwise returns false.
See also previous() and hasNext().
Returns the id of the last property that was jumped over using next() or previous().
The default implementation returns 0.
See also name().
Returns the name of the last property that was jumped over using next() or previous().
See also id().
Advances the iterator by one position.
Calling this function on an iterator located at the back of the container leads to undefined results.
See also hasNext(), previous(), and name().
Returns the Qt Script object this iterator is traversing.
Moves the iterator back by one position.
Calling this function on an iterator located at the front of the container leads to undefined results.
See also hasPrevious(), next(), and name().
Moves the iterator to the back of the QScriptValue (after the last property).
See also toFront() and previous().
Moves the iterator to the front of the QScriptValue (before the first property).
Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. | Qt 4.6-snapshot | |
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD. | ||
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP ! |
Copyright © 2000-2012 - www.developpez.com