~ubuntu-branches/ubuntu/precise/python-qt4/precise-proposed

« back to all changes in this revision

Viewing changes to doc/html/qabstractfileengineiterator.html

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell, Jonathan Riddell
  • Date: 2010-11-08 16:13:33 UTC
  • mfrom: (1.5.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20101108161333-0nec4wu0nz3wpf9r
Tags: 4.8.1-0ubuntu1
[ Jonathan Riddell ]
* New upstream release
* Build against python-sip-dev 4.11.2
* Remove kubuntu_02_fix-scpk-and-flag-issue.diff merged upstream
* Install __init__.py into /usr/lib/python3.2/dist-packages/PyQt4,
  fixes Python 3 support
* Add QtDeclarative to python-qt4
* Add kubuntu_03_uiparser.diff from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
td.postheader { font-family: sans-serif }
7
7
tr.address { font-family: sans-serif }
8
8
body { background: #ffffff; color: black; }
9
 
</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">QAbstractFileEngineIterator Class Reference<br /><sup><sup>[<a href="qtcore.html">QtCore</a> module]</sup></sup></h1><p>The QAbstractFileEngineIterator class provides an iterator interface for custom file engines. <a href="#details">More...</a></p>
10
 
<h3>Methods</h3><ul><li><div class="fn" /><b><a href="qabstractfileengineiterator.html#QAbstractFileEngineIterator">__init__</a></b> (<i>self</i>, QDir.Filters, QStringList)</li><li><div class="fn" />QFileInfo <b><a href="qabstractfileengineiterator.html#currentFileInfo">currentFileInfo</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qabstractfileengineiterator.html#currentFileName">currentFileName</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qabstractfileengineiterator.html#currentFilePath">currentFilePath</a></b> (<i>self</i>)</li><li><div class="fn" />QDir.Filters <b><a href="qabstractfileengineiterator.html#filters">filters</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qabstractfileengineiterator.html#hasNext">hasNext</a></b> (<i>self</i>)</li><li><div class="fn" />QStringList <b><a href="qabstractfileengineiterator.html#nameFilters">nameFilters</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qabstractfileengineiterator.html#next">next</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qabstractfileengineiterator.html#path">path</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QAbstractFileEngineIterator class provides an iterator interface for custom file engines.</p>
11
 
<p>If all you want is to iterate over entries in a directory, see <a href="qdiriterator.html">QDirIterator</a> instead. This class is only for custom file engine authors.</p>
12
 
<p>QAbstractFileEngineIterator is a unidirectional single-use virtual iterator that plugs into <a href="qdiriterator.html">QDirIterator</a>, providing transparent proxy iteration for custom file engines.</p>
13
 
<p>You can subclass QAbstractFileEngineIterator to provide an iterator when writing your own file engine. To plug the iterator into your file system, you simply return an instance of this subclass from a reimplementation of <a href="qabstractfileengine.html#beginEntryList">QAbstractFileEngine.beginEntryList</a>().</p>
 
9
</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">QAbstractFileEngineIterator Class Reference<br /><sup><sup>[<a href="qtcore.html">QtCore</a> module]</sup></sup></h1><p>The QAbstractFileEngineIterator class provides an iterator
 
10
interface for custom file engines. <a href="#details">More...</a></p>
 
11
 
 
12
<h3>Methods</h3><ul><li><div class="fn" /><b><a href="qabstractfileengineiterator.html#QAbstractFileEngineIterator">__init__</a></b> (<i>self</i>, QDir.Filters, QStringList)</li><li><div class="fn" />QFileInfo <b><a href="qabstractfileengineiterator.html#currentFileInfo">currentFileInfo</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qabstractfileengineiterator.html#currentFileName">currentFileName</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qabstractfileengineiterator.html#currentFilePath">currentFilePath</a></b> (<i>self</i>)</li><li><div class="fn" />QDir.Filters <b><a href="qabstractfileengineiterator.html#filters">filters</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qabstractfileengineiterator.html#hasNext">hasNext</a></b> (<i>self</i>)</li><li><div class="fn" />QStringList <b><a href="qabstractfileengineiterator.html#nameFilters">nameFilters</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qabstractfileengineiterator.html#next">next</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qabstractfileengineiterator.html#path">path</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QAbstractFileEngineIterator class provides an iterator
 
13
interface for custom file engines.</p>
 
14
<p>If all you want is to iterate over entries in a directory, see
 
15
<a href="qdiriterator.html">QDirIterator</a> instead. This class is
 
16
only for custom file engine authors.</p>
 
17
<p>QAbstractFileEngineIterator is a unidirectional single-use
 
18
virtual iterator that plugs into <a href="qdiriterator.html">QDirIterator</a>, providing transparent proxy
 
19
iteration for custom file engines.</p>
 
20
<p>You can subclass QAbstractFileEngineIterator to provide an
 
21
iterator when writing your own file engine. To plug the iterator
 
22
into your file system, you simply return an instance of this
 
23
subclass from a reimplementation of <a href="qabstractfileengine.html#beginEntryList">QAbstractFileEngine.beginEntryList</a>().</p>
14
24
<p>Example:</p>
15
 
<pre> QAbstractFileEngineIterator *
 
25
<pre class="highlightedCode brush: cpp">
 
26
 QAbstractFileEngineIterator *
16
27
 CustomFileEngine.beginEntryList(QDir.Filters filters, const QStringList &amp;filterNames)
17
28
 {
18
29
     return new CustomFileEngineIterator(filters, filterNames);
19
 
 }</pre>
20
 
<p>QAbstractFileEngineIterator is associated with a path, name filters, and entry filters. The path is the directory that the iterator lists entries in. The name filters and entry filters are provided for file engines that can optimize directory listing at the iterator level (e.g., network file systems that need to minimize network traffic), but they can also be ignored by the iterator subclass; QAbstractFileEngineIterator already provides the required filtering logics in the matchesFilters() function. You can call dirName() to get the directory name, <a href="qabstractfileengineiterator.html#nameFilters">nameFilters</a>() to get a stringlist of name filters, and <a href="qabstractfileengineiterator.html#filters">filters</a>() to get the entry filters.</p>
21
 
<p>The pure virual function <a href="qabstractfileengineiterator.html#hasNext">hasNext</a>() returns true if the current directory has at least one more entry (i.e., the directory name is valid and accessible, and we have not reached the end of the entry list), and false otherwise. Reimplement <a href="qabstractfileengineiterator.html#next">next</a>() to seek to the next entry.</p>
22
 
<p>The pure virtual function <a href="qabstractfileengineiterator.html#currentFileName">currentFileName</a>() returns the name of the current entry without advancing the iterator. The <a href="qabstractfileengineiterator.html#currentFilePath">currentFilePath</a>() function is provided for convenience; it returns the full path of the current entry.</p>
23
 
<p>Here is an example of how to implement an interator that returns each of three fixed entries in sequence.</p>
24
 
<pre> class CustomIterator : public QAbstractFileEngineIterator
 
30
 }
 
31
</pre>
 
32
<p>QAbstractFileEngineIterator is associated with a path, name
 
33
filters, and entry filters. The path is the directory that the
 
34
iterator lists entries in. The name filters and entry filters are
 
35
provided for file engines that can optimize directory listing at
 
36
the iterator level (e.g., network file systems that need to
 
37
minimize network traffic), but they can also be ignored by the
 
38
iterator subclass; QAbstractFileEngineIterator already provides the
 
39
required filtering logics in the matchesFilters() function. You can
 
40
call dirName() to get the directory name, <a href="qabstractfileengineiterator.html#nameFilters">nameFilters</a>() to
 
41
get a stringlist of name filters, and <a href="qabstractfileengineiterator.html#filters">filters</a>() to get the
 
42
entry filters.</p>
 
43
<p>The pure virual function <a href="qabstractfileengineiterator.html#hasNext">hasNext</a>() returns
 
44
true if the current directory has at least one more entry (i.e.,
 
45
the directory name is valid and accessible, and we have not reached
 
46
the end of the entry list), and false otherwise. Reimplement
 
47
<a href="qabstractfileengineiterator.html#next">next</a>() to seek
 
48
to the next entry.</p>
 
49
<p>The pure virtual function <a href="qabstractfileengineiterator.html#currentFileName">currentFileName</a>()
 
50
returns the name of the current entry without advancing the
 
51
iterator. The <a href="qabstractfileengineiterator.html#currentFilePath">currentFilePath</a>()
 
52
function is provided for convenience; it returns the full path of
 
53
the current entry.</p>
 
54
<p>Here is an example of how to implement an interator that returns
 
55
each of three fixed entries in sequence.</p>
 
56
<pre class="highlightedCode brush: cpp">
 
57
 class CustomIterator : public QAbstractFileEngineIterator
25
58
 {
26
59
 public:
27
60
     CustomIterator(const QStringList &amp;nameFilters, QDir.Filters filters)
53
86
 private:
54
87
     QStringList entries;
55
88
     int index;
56
 
 };</pre>
57
 
<p>Note: QAbstractFileEngineIterator does not deal with QDir.IteratorFlags; it simply returns entries for a single directory.</p>
58
 
<p>See also <a href="qdiriterator.html">QDirIterator</a>.</p>
59
 
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QAbstractFileEngineIterator" />QAbstractFileEngineIterator.__init__ (<i>self</i>, <a href="qdir-filters.html">QDir.Filters</a>, QStringList)</h3><p>Constructs a <a href="qabstractfileengineiterator.html">QAbstractFileEngineIterator</a>, using the entry filters <i>filters</i>, and wildcard name filters <i>nameFilters</i>.</p>
60
 
<a name="//apple_ref/cpp/instm/QAbstractFileEngineIterator/~QAbstractFileEngineIterator" />
61
 
<h3 class="fn"><a name="currentFileInfo" /><a href="qfileinfo.html">QFileInfo</a> QAbstractFileEngineIterator.currentFileInfo (<i>self</i>)</h3><p>The virtual function returns a <a href="qfileinfo.html">QFileInfo</a> for the current directory entry. This function is provided for convenience. It can also be slightly faster that creating a <a href="qfileinfo.html">QFileInfo</a> object yourself, as the object returned by this function might contain cached information that <a href="qfileinfo.html">QFileInfo</a> otherwise would have to access through the file engine.</p>
 
89
 };
 
90
</pre>
 
91
<p>Note: QAbstractFileEngineIterator does not deal with
 
92
QDir.IteratorFlags; it simply returns entries for a single
 
93
directory.</p>
 
94
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QAbstractFileEngineIterator" />QAbstractFileEngineIterator.__init__ (<i>self</i>, <a href="qdir-filters.html">QDir.Filters</a>, QStringList)</h3><p>Constructs a <a href="qabstractfileengineiterator.html">QAbstractFileEngineIterator</a>,
 
95
using the entry filters <i>filters</i>, and wildcard name filters
 
96
<i>nameFilters</i>.</p>
 
97
 
 
98
 
 
99
<h3 class="fn"><a name="currentFileInfo" /><a href="qfileinfo.html">QFileInfo</a> QAbstractFileEngineIterator.currentFileInfo (<i>self</i>)</h3><p>The virtual function returns a <a href="qfileinfo.html">QFileInfo</a> for the current directory entry.
 
100
This function is provided for convenience. It can also be slightly
 
101
faster that creating a <a href="qfileinfo.html">QFileInfo</a>
 
102
object yourself, as the object returned by this function might
 
103
contain cached information that <a href="qfileinfo.html">QFileInfo</a> otherwise would have to access
 
104
through the file engine.</p>
62
105
<p>See also <a href="qabstractfileengineiterator.html#currentFileName">currentFileName</a>().</p>
63
 
<a name="//apple_ref/cpp/instm/QAbstractFileEngineIterator/currentFileName" />
64
 
<h3 class="fn"><a name="currentFileName" />QString QAbstractFileEngineIterator.currentFileName (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>This pure virtual function returns the name of the current directory entry, excluding the path.</p>
 
106
 
 
107
 
 
108
<h3 class="fn"><a name="currentFileName" />QString QAbstractFileEngineIterator.currentFileName (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>This pure virtual function returns the name of the current
 
109
directory entry, excluding the path.</p>
65
110
<p>See also <a href="qabstractfileengineiterator.html#currentFilePath">currentFilePath</a>().</p>
66
 
<a name="//apple_ref/cpp/instm/QAbstractFileEngineIterator/currentFilePath" />
67
 
<h3 class="fn"><a name="currentFilePath" />QString QAbstractFileEngineIterator.currentFilePath (<i>self</i>)</h3><p>Returns the path to the current directory entry. It's the same as prepending <a href="qabstractfileengineiterator.html#path">path</a>() to the return value of <a href="qabstractfileengineiterator.html#currentFileName">currentFileName</a>().</p>
 
111
 
 
112
 
 
113
<h3 class="fn"><a name="currentFilePath" />QString QAbstractFileEngineIterator.currentFilePath (<i>self</i>)</h3><p>Returns the path to the current directory entry. It's the same
 
114
as prepending <a href="qabstractfileengineiterator.html#pathx">path</a>() to the return
 
115
value of <a href="qabstractfileengineiterator.html#currentFileName">currentFileName</a>().</p>
68
116
<p>See also <a href="qabstractfileengineiterator.html#currentFileName">currentFileName</a>().</p>
69
 
<a name="//apple_ref/cpp/instm/QAbstractFileEngineIterator/filters" />
 
117
 
 
118
 
70
119
<h3 class="fn"><a name="filters" /><a href="qdir-filters.html">QDir.Filters</a> QAbstractFileEngineIterator.filters (<i>self</i>)</h3><p>Returns the entry filters for this iterator.</p>
71
 
<p>See also <a href="qdir.html#filter">QDir.filter</a>(), <a href="qabstractfileengineiterator.html#nameFilters">nameFilters</a>(), and <a href="qabstractfileengineiterator.html#path">path</a>().</p>
72
 
<a name="//apple_ref/cpp/instm/QAbstractFileEngineIterator/hasNext" />
73
 
<h3 class="fn"><a name="hasNext" />bool QAbstractFileEngineIterator.hasNext (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>This pure virtual function returns true if there is at least one more entry in the current directory (i.e., the iterator path is valid and accessible, and the iterator has not reached the end of the entry list).</p>
 
120
<p>See also <a href="qdir.html#filter">QDir.filter</a>(), <a href="qabstractfileengineiterator.html#nameFilters">nameFilters</a>(),
 
121
and <a href="qabstractfileengineiterator.html#pathx">path</a>().</p>
 
122
 
 
123
 
 
124
<h3 class="fn"><a name="hasNext" />bool QAbstractFileEngineIterator.hasNext (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>This pure virtual function returns true if there is at least one
 
125
more entry in the current directory (i.e., the iterator path is
 
126
valid and accessible, and the iterator has not reached the end of
 
127
the entry list).</p>
74
128
<p>See also <a href="qdiriterator.html#hasNext">QDirIterator.hasNext</a>().</p>
75
 
<a name="//apple_ref/cpp/instm/QAbstractFileEngineIterator/nameFilters" />
 
129
 
 
130
 
76
131
<h3 class="fn"><a name="nameFilters" />QStringList QAbstractFileEngineIterator.nameFilters (<i>self</i>)</h3><p>Returns the name filters for this iterator.</p>
77
 
<p>See also <a href="qdir.html#nameFilters">QDir.nameFilters</a>(), <a href="qabstractfileengineiterator.html#filters">filters</a>(), and <a href="qabstractfileengineiterator.html#path">path</a>().</p>
78
 
<a name="//apple_ref/cpp/instm/QAbstractFileEngineIterator/next" />
79
 
<h3 class="fn"><a name="next" />QString QAbstractFileEngineIterator.next (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>This pure virtual function advances the iterator to the next directory entry, and returns the file path to the current entry.</p>
80
 
<p>This function can optionally make use of <a href="qabstractfileengineiterator.html#nameFilters">nameFilters</a>() and <a href="qabstractfileengineiterator.html#filters">filters</a>() to optimize its performance.</p>
81
 
<p>Reimplement this function in a subclass to advance the iterator.</p>
 
132
<p>See also <a href="qdir.html#nameFilters">QDir.nameFilters</a>(), <a href="qabstractfileengineiterator.html#filters">filters</a>(), and
 
133
<a href="qabstractfileengineiterator.html#pathx">path</a>().</p>
 
134
 
 
135
 
 
136
<h3 class="fn"><a name="next" />QString QAbstractFileEngineIterator.next (<i>self</i>)</h3><p>This method is abstract and should be reimplemented in any sub-class.</p><p>This pure virtual function advances the iterator to the next
 
137
directory entry, and returns the file path to the current
 
138
entry.</p>
 
139
<p>This function can optionally make use of <a href="qabstractfileengineiterator.html#nameFilters">nameFilters</a>()
 
140
and <a href="qabstractfileengineiterator.html#filters">filters</a>() to
 
141
optimize its performance.</p>
 
142
<p>Reimplement this function in a subclass to advance the
 
143
iterator.</p>
82
144
<p>See also <a href="qdiriterator.html#next">QDirIterator.next</a>().</p>
83
 
<a name="//apple_ref/cpp/instm/QAbstractFileEngineIterator/path" />
84
 
<h3 class="fn"><a name="path" />QString QAbstractFileEngineIterator.path (<i>self</i>)</h3><p>Returns the path for this iterator. <a href="qdiriterator.html">QDirIterator</a> is responsible for assigning this path; it cannot change during the iterator's lifetime.</p>
85
 
<p>See also <a href="qabstractfileengineiterator.html#nameFilters">nameFilters</a>() and <a href="qabstractfileengineiterator.html#filters">filters</a>().</p>
86
 
<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.7 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.3</td></tr></table></div></address></body></html>
 
 
b'\\ No newline at end of file'
 
145
 
 
146
 
 
147
<h3 class="fn"><a name="path" />QString QAbstractFileEngineIterator.path (<i>self</i>)</h3><address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.8.1 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.7.0</td></tr></table></div></address></body></html>
 
 
b'\\ No newline at end of file'