• PySide 模块
  • PySide.QtScript
  • 内容表表

    上一话题

    QScriptContext

    下一话题

    QScriptClass

    QScriptClassPropertyIterator

    概要

    函数

    虚函数

    详细描述

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

    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 )
    参数: object PySide.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 ( )
    返回类型: 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 ( )
    返回类型: 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 ( )
    返回类型: 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 ( )
    返回类型: 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 ( )
    返回类型: 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 ( )
    返回类型: PySide.QtScript.QScriptValue

    Returns the Qt Script object this iterator is traversing.

    PySide.QtScript.QScriptClassPropertyIterator. 上一 ( )

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