File: qscriptclasspropertyiterator.html

package info (click to toggle)
python-qt4 4.7.3-1%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 28,504 kB
  • ctags: 4,680
  • sloc: python: 28,738; cpp: 8,897; sh: 245; xml: 243; makefile: 150
file content (51 lines) | stat: -rw-r--r-- 10,412 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QScriptClassPropertyIterator Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="../pyqt4ref.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QScriptClassPropertyIterator Class Reference<br /><sup><sup>[<a href="qtscript.html">QtScript</a> module]</sup></sup></h1><p>The QScriptClassPropertyIterator class provides an iterator interface for custom Qt Script objects. <a href="#details">More...</a></p>
<h3>Methods</h3><ul><li><div class="fn" /><b><a href="qscriptclasspropertyiterator.html#QScriptClassPropertyIterator">__init__</a></b> (<i>self</i>, QScriptValue)</li><li><div class="fn" />QScriptValue.PropertyFlags <b><a href="qscriptclasspropertyiterator.html#flags">flags</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qscriptclasspropertyiterator.html#hasNext">hasNext</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qscriptclasspropertyiterator.html#hasPrevious">hasPrevious</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qscriptclasspropertyiterator.html#id">id</a></b> (<i>self</i>)</li><li><div class="fn" />QScriptString <b><a href="qscriptclasspropertyiterator.html#name">name</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qscriptclasspropertyiterator.html#next">next</a></b> (<i>self</i>)</li><li><div class="fn" />QScriptValue <b><a href="qscriptclasspropertyiterator.html#object">object</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qscriptclasspropertyiterator.html#previous">previous</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qscriptclasspropertyiterator.html#toBack">toBack</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qscriptclasspropertyiterator.html#toFront">toFront</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QScriptClassPropertyIterator class provides an iterator interface for custom Qt Script objects.</p>
<p>This class is only relevant if you have subclassed <a href="qscriptclass.html">QScriptClass</a> and want to provide enumeration of your custom properties (e.g. when objects of your class are used with <a href="qscriptvalueiterator.html">QScriptValueIterator</a>, or with the for-in statement in scripts).</p>
<p>The <a href="qscriptclasspropertyiterator.html#object">object</a>() function returns the Qt Script object the iterator is traversing.</p>
<p><a href="qscriptclasspropertyiterator.html#toFront">toFront</a>(), <a href="qscriptclasspropertyiterator.html#hasNext">hasNext</a>() and <a href="qscriptclasspropertyiterator.html#next">next</a>() provide forward iteration.</p>
<p><a href="qscriptclasspropertyiterator.html#toBack">toBack</a>(), <a href="qscriptclasspropertyiterator.html#hasPrevious">hasPrevious</a>() and <a href="qscriptclasspropertyiterator.html#previous">previous</a>() provide backward iteration.</p>
<p><a href="qscriptclasspropertyiterator.html#name">name</a>(), <a href="qscriptclasspropertyiterator.html#id">id</a>() and <a href="qscriptclasspropertyiterator.html#flags">flags</a>() return information about the last property that was jumped over using <a href="qscriptclasspropertyiterator.html#next">next</a>() or <a href="qscriptclasspropertyiterator.html#previous">previous</a>().</p>
<p>See also <a href="qscriptclass.html#newIterator">QScriptClass.newIterator</a>() and <a href="qscriptvalueiterator.html">QScriptValueIterator</a>.</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QScriptClassPropertyIterator" />QScriptClassPropertyIterator.__init__ (<i>self</i>, <a href="qscriptvalue.html">QScriptValue</a>)</h3><p>Constructs an iterator for traversing <i>object</i>.</p>
<p>Subclasses should ensure that the iterator is set to the front of the sequence of properties (before the first property).</p>
<a name="//apple_ref/cpp/instm/QScriptClassPropertyIterator/~QScriptClassPropertyIterator" />
<h3 class="fn"><a name="flags" /><a href="qscriptvalue-propertyflags.html">QScriptValue.PropertyFlags</a> QScriptClassPropertyIterator.flags (<i>self</i>)</h3><p>Returns the flags of the last property that was jumped over using <a href="qscriptclasspropertyiterator.html#next">next</a>() or <a href="qscriptclasspropertyiterator.html#previous">previous</a>().</p>
<p>The default implementation calls the propertyFlags() function of <a href="qscriptclasspropertyiterator.html#object">object</a>() with argument <a href="qscriptclasspropertyiterator.html#name">name</a>().</p>
<a name="//apple_ref/cpp/instm/QScriptClassPropertyIterator/hasNext" />
<h3 class="fn"><a name="hasNext" />bool QScriptClassPropertyIterator.hasNext (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns true if there is at least one item ahead of the iterator (i.e. the iterator is <i>not</i> at the back of the property sequence); otherwise returns false.</p>
<p>See also <a href="qscriptclasspropertyiterator.html#next">next</a>() and <a href="qscriptclasspropertyiterator.html#hasPrevious">hasPrevious</a>().</p>
<a name="//apple_ref/cpp/instm/QScriptClassPropertyIterator/hasPrevious" />
<h3 class="fn"><a name="hasPrevious" />bool QScriptClassPropertyIterator.hasPrevious (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns true if there is at least one item behind the iterator (i.e. the iterator is <i>not</i> at the front of the property sequence); otherwise returns false.</p>
<p>See also <a href="qscriptclasspropertyiterator.html#previous">previous</a>() and <a href="qscriptclasspropertyiterator.html#hasNext">hasNext</a>().</p>
<a name="//apple_ref/cpp/instm/QScriptClassPropertyIterator/id" />
<h3 class="fn"><a name="id" />int QScriptClassPropertyIterator.id (<i>self</i>)</h3><p>Returns the id of the last property that was jumped over using <a href="qscriptclasspropertyiterator.html#next">next</a>() or <a href="qscriptclasspropertyiterator.html#previous">previous</a>().</p>
<p>The default implementation returns 0.</p>
<p>See also <a href="qscriptclasspropertyiterator.html#name">name</a>().</p>
<a name="//apple_ref/cpp/instm/QScriptClassPropertyIterator/name" />
<h3 class="fn"><a name="name" /><a href="qscriptstring.html">QScriptString</a> QScriptClassPropertyIterator.name (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Returns the name of the last property that was jumped over using <a href="qscriptclasspropertyiterator.html#next">next</a>() or <a href="qscriptclasspropertyiterator.html#previous">previous</a>().</p>
<p>See also <a href="qscriptclasspropertyiterator.html#id">id</a>().</p>
<a name="//apple_ref/cpp/instm/QScriptClassPropertyIterator/next" />
<h3 class="fn"><a name="next" />QScriptClassPropertyIterator.next (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Advances the iterator by one position.</p>
<p>Calling this function on an iterator located at the back of the container leads to undefined results.</p>
<p>See also <a href="qscriptclasspropertyiterator.html#hasNext">hasNext</a>(), <a href="qscriptclasspropertyiterator.html#previous">previous</a>(), and <a href="qscriptclasspropertyiterator.html#name">name</a>().</p>
<a name="//apple_ref/cpp/instm/QScriptClassPropertyIterator/object" />
<h3 class="fn"><a name="object" /><a href="qscriptvalue.html">QScriptValue</a> QScriptClassPropertyIterator.object (<i>self</i>)</h3><p>Returns the Qt Script object this iterator is traversing.</p>
<a name="//apple_ref/cpp/instm/QScriptClassPropertyIterator/previous" />
<h3 class="fn"><a name="previous" />QScriptClassPropertyIterator.previous (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Moves the iterator back by one position.</p>
<p>Calling this function on an iterator located at the front of the container leads to undefined results.</p>
<p>See also <a href="qscriptclasspropertyiterator.html#hasPrevious">hasPrevious</a>(), <a href="qscriptclasspropertyiterator.html#next">next</a>(), and <a href="qscriptclasspropertyiterator.html#name">name</a>().</p>
<a name="//apple_ref/cpp/instm/QScriptClassPropertyIterator/toBack" />
<h3 class="fn"><a name="toBack" />QScriptClassPropertyIterator.toBack (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Moves the iterator to the back of the <a href="qscriptvalue.html">QScriptValue</a> (after the last property).</p>
<p>See also <a href="qscriptclasspropertyiterator.html#toFront">toFront</a>() and <a href="qscriptclasspropertyiterator.html#previous">previous</a>().</p>
<a name="//apple_ref/cpp/instm/QScriptClassPropertyIterator/toFront" />
<h3 class="fn"><a name="toFront" />QScriptClassPropertyIterator.toFront (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>Moves the iterator to the front of the <a href="qscriptvalue.html">QScriptValue</a> (before the first property).</p>
<p>See also <a href="qscriptclasspropertyiterator.html#toBack">toBack</a>() and <a href="qscriptclasspropertyiterator.html#next">next</a>().</p>
<p /><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.7.3 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2010</td><td align="right" width="25%">Qt&#160;4.6.2</td></tr></table></div></address></body></html>