QScriptClassPropertyIterator

Inheritance diagram of QScriptClassPropertyIterator

Synopsis

Functions

Virtual functions

Detailed Description

The PySide.QtScript.QScriptClassPropertyIterator class provides an iterator interface for custom Qt Script objects.

This class is only relevant if you have subclassed PySide.QtScript.QScriptClass and want to provide enumeration of your custom properties (e.g. when objects of your class are used with PySide.QtScript.QScriptValueIterator , or with the for-in statement in scripts).

The PySide.QtScript.QScriptClassPropertyIterator.object() function returns the Qt Script object the iterator is traversing.

PySide.QtScript.QScriptClassPropertyIterator.toFront() , PySide.QtScript.QScriptClassPropertyIterator.hasNext() and PySide.QtScript.QScriptClassPropertyIterator.next() provide forward iteration.

PySide.QtScript.QScriptClassPropertyIterator.toBack() , PySide.QtScript.QScriptClassPropertyIterator.hasPrevious() and PySide.QtScript.QScriptClassPropertyIterator.previous() provide backward iteration.

PySide.QtScript.QScriptClassPropertyIterator.name() , PySide.QtScript.QScriptClassPropertyIterator.id() and PySide.QtScript.QScriptClassPropertyIterator.flags() return information about the last property that was jumped over using PySide.QtScript.QScriptClassPropertyIterator.next() or PySide.QtScript.QScriptClassPropertyIterator.previous() .

class PySide.QtScript.QScriptClassPropertyIterator(object)
Parameters:objectPySide.QtScript.QScriptValue

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).

PySide.QtScript.QScriptClassPropertyIterator.flags()
Return type:PySide.QtScript.QScriptValue.PropertyFlags

Returns the flags of the last property that was jumped over using PySide.QtScript.QScriptClassPropertyIterator.next() or PySide.QtScript.QScriptClassPropertyIterator.previous() .

The default implementation calls the propertyFlags() function of PySide.QtScript.QScriptClassPropertyIterator.object() with argument PySide.QtScript.QScriptClassPropertyIterator.name() .

PySide.QtScript.QScriptClassPropertyIterator.hasNext()
Return type:PySide.QtCore.bool

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.

PySide.QtScript.QScriptClassPropertyIterator.hasPrevious()
Return type:PySide.QtCore.bool

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.

PySide.QtScript.QScriptClassPropertyIterator.id()
Return type:PySide.QtCore.uint

Returns the id of the last property that was jumped over using PySide.QtScript.QScriptClassPropertyIterator.next() or PySide.QtScript.QScriptClassPropertyIterator.previous() .

The default implementation returns 0.

PySide.QtScript.QScriptClassPropertyIterator.name()
Return type:PySide.QtScript.QScriptString

Returns the name of the last property that was jumped over using PySide.QtScript.QScriptClassPropertyIterator.next() or PySide.QtScript.QScriptClassPropertyIterator.previous() .

PySide.QtScript.QScriptClassPropertyIterator.next()

Advances the iterator by one position.

Calling this function on an iterator located at the back of the container leads to undefined results.

PySide.QtScript.QScriptClassPropertyIterator.object()
Return type:PySide.QtScript.QScriptValue

Returns the Qt Script object this iterator is traversing.

PySide.QtScript.QScriptClassPropertyIterator.previous()

Moves the iterator back by one position.

Calling this function on an iterator located at the front of the container leads to undefined results.

PySide.QtScript.QScriptClassPropertyIterator.toBack()

Moves the iterator to the back of the PySide.QtScript.QScriptValue (after the last property).

PySide.QtScript.QScriptClassPropertyIterator.toFront()

Moves the iterator to the front of the PySide.QtScript.QScriptValue (before the first property).