File: qfilesystemmodel.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 (137 lines) | stat: -rw-r--r-- 28,896 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<?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>QFileSystemModel 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">QFileSystemModel Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QFileSystemModel class provides a data model for the local filesystem. <a href="#details">More...</a></p>
<p>Inherits <a href="qabstractitemmodel.html">QAbstractItemModel</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qfilesystemmodel.html#Roles-enum">Roles</a></b> { FileIconRole, FilePathRole, FileNameRole, FilePermissions }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qfilesystemmodel.html#QFileSystemModel">__init__</a></b> (<i>self</i>, QObject&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" />bool <b><a href="qfilesystemmodel.html#canFetchMore">canFetchMore</a></b> (<i>self</i>, QModelIndex)</li><li><div class="fn" />int <b><a href="qfilesystemmodel.html#columnCount">columnCount</a></b> (<i>self</i>, QModelIndex&#160;<i>parent</i>&#160;=&#160;QModelIndex())</li><li><div class="fn" />QVariant <b><a href="qfilesystemmodel.html#data">data</a></b> (<i>self</i>, QModelIndex, int&#160;<i>role</i>&#160;=&#160;Qt.DisplayRole)</li><li><div class="fn" />bool <b><a href="qfilesystemmodel.html#dropMimeData">dropMimeData</a></b> (<i>self</i>, QMimeData, Qt.DropAction, int, int, QModelIndex)</li><li><div class="fn" />bool <b><a href="qfilesystemmodel.html#event">event</a></b> (<i>self</i>, QEvent)</li><li><div class="fn" /><b><a href="qfilesystemmodel.html#fetchMore">fetchMore</a></b> (<i>self</i>, QModelIndex)</li><li><div class="fn" />QIcon <b><a href="qfilesystemmodel.html#fileIcon">fileIcon</a></b> (<i>self</i>, QModelIndex)</li><li><div class="fn" />QFileInfo <b><a href="qfilesystemmodel.html#fileInfo">fileInfo</a></b> (<i>self</i>, QModelIndex)</li><li><div class="fn" />QString <b><a href="qfilesystemmodel.html#fileName">fileName</a></b> (<i>self</i>, QModelIndex)</li><li><div class="fn" />QString <b><a href="qfilesystemmodel.html#filePath">filePath</a></b> (<i>self</i>, QModelIndex)</li><li><div class="fn" />QDir.Filters <b><a href="qfilesystemmodel.html#filter">filter</a></b> (<i>self</i>)</li><li><div class="fn" />Qt.ItemFlags <b><a href="qfilesystemmodel.html#flags">flags</a></b> (<i>self</i>, QModelIndex)</li><li><div class="fn" />bool <b><a href="qfilesystemmodel.html#hasChildren">hasChildren</a></b> (<i>self</i>, QModelIndex&#160;<i>parent</i>&#160;=&#160;QModelIndex())</li><li><div class="fn" />QVariant <b><a href="qfilesystemmodel.html#headerData">headerData</a></b> (<i>self</i>, int, Qt.Orientation, int&#160;<i>role</i>&#160;=&#160;Qt.DisplayRole)</li><li><div class="fn" />QFileIconProvider <b><a href="qfilesystemmodel.html#iconProvider">iconProvider</a></b> (<i>self</i>)</li><li><div class="fn" />QModelIndex <b><a href="qfilesystemmodel.html#index">index</a></b> (<i>self</i>, int, int, QModelIndex&#160;<i>parent</i>&#160;=&#160;QModelIndex())</li><li><div class="fn" />QModelIndex <b><a href="qfilesystemmodel.html#index-2">index</a></b> (<i>self</i>, QString, int&#160;<i>column</i>&#160;=&#160;0)</li><li><div class="fn" />bool <b><a href="qfilesystemmodel.html#isDir">isDir</a></b> (<i>self</i>, QModelIndex)</li><li><div class="fn" />bool <b><a href="qfilesystemmodel.html#isReadOnly">isReadOnly</a></b> (<i>self</i>)</li><li><div class="fn" />QDateTime <b><a href="qfilesystemmodel.html#lastModified">lastModified</a></b> (<i>self</i>, QModelIndex)</li><li><div class="fn" />QMimeData <b><a href="qfilesystemmodel.html#mimeData">mimeData</a></b> (<i>self</i>, list-of-QModelIndex)</li><li><div class="fn" />QStringList <b><a href="qfilesystemmodel.html#mimeTypes">mimeTypes</a></b> (<i>self</i>)</li><li><div class="fn" />QModelIndex <b><a href="qfilesystemmodel.html#mkdir">mkdir</a></b> (<i>self</i>, QModelIndex, QString)</li><li><div class="fn" />QVariant <b><a href="qfilesystemmodel.html#myComputer">myComputer</a></b> (<i>self</i>, int&#160;<i>role</i>&#160;=&#160;Qt.DisplayRole)</li><li><div class="fn" />bool <b><a href="qfilesystemmodel.html#nameFilterDisables">nameFilterDisables</a></b> (<i>self</i>)</li><li><div class="fn" />QStringList <b><a href="qfilesystemmodel.html#nameFilters">nameFilters</a></b> (<i>self</i>)</li><li><div class="fn" />QModelIndex <b><a href="qfilesystemmodel.html#parent">parent</a></b> (<i>self</i>, QModelIndex)</li><li><div class="fn" />QFile.Permissions <b><a href="qfilesystemmodel.html#permissions">permissions</a></b> (<i>self</i>, QModelIndex)</li><li><div class="fn" />bool <b><a href="qfilesystemmodel.html#remove">remove</a></b> (<i>self</i>, QModelIndex)</li><li><div class="fn" />bool <b><a href="qfilesystemmodel.html#resolveSymlinks">resolveSymlinks</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qfilesystemmodel.html#rmdir">rmdir</a></b> (<i>self</i>, QModelIndex)</li><li><div class="fn" />QDir <b><a href="qfilesystemmodel.html#rootDirectory">rootDirectory</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qfilesystemmodel.html#rootPath">rootPath</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qfilesystemmodel.html#rowCount">rowCount</a></b> (<i>self</i>, QModelIndex&#160;<i>parent</i>&#160;=&#160;QModelIndex())</li><li><div class="fn" />bool <b><a href="qfilesystemmodel.html#setData">setData</a></b> (<i>self</i>, QModelIndex, QVariant, int&#160;<i>role</i>&#160;=&#160;Qt.EditRole)</li><li><div class="fn" /><b><a href="qfilesystemmodel.html#setFilter">setFilter</a></b> (<i>self</i>, QDir.Filters)</li><li><div class="fn" /><b><a href="qfilesystemmodel.html#setIconProvider">setIconProvider</a></b> (<i>self</i>, QFileIconProvider)</li><li><div class="fn" /><b><a href="qfilesystemmodel.html#setNameFilterDisables">setNameFilterDisables</a></b> (<i>self</i>, bool)</li><li><div class="fn" /><b><a href="qfilesystemmodel.html#setNameFilters">setNameFilters</a></b> (<i>self</i>, QStringList)</li><li><div class="fn" /><b><a href="qfilesystemmodel.html#setReadOnly">setReadOnly</a></b> (<i>self</i>, bool)</li><li><div class="fn" /><b><a href="qfilesystemmodel.html#setResolveSymlinks">setResolveSymlinks</a></b> (<i>self</i>, bool)</li><li><div class="fn" />QModelIndex <b><a href="qfilesystemmodel.html#setRootPath">setRootPath</a></b> (<i>self</i>, QString)</li><li><div class="fn" />int <b><a href="qfilesystemmodel.html#size">size</a></b> (<i>self</i>, QModelIndex)</li><li><div class="fn" /><b><a href="qfilesystemmodel.html#sort">sort</a></b> (<i>self</i>, int, Qt.SortOrder&#160;<i>order</i>&#160;=&#160;Qt.AscendingOrder)</li><li><div class="fn" />Qt.DropActions <b><a href="qfilesystemmodel.html#supportedDropActions">supportedDropActions</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qfilesystemmodel.html#timerEvent">timerEvent</a></b> (<i>self</i>, QTimerEvent)</li><li><div class="fn" />QString <b><a href="qfilesystemmodel.html#type">type</a></b> (<i>self</i>, QModelIndex)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qfilesystemmodel.html#fileRenamed">fileRenamed</a></b> (const QString&amp;,const QString&amp;,const QString&amp;)</li><li><div class="fn" />void <b><a href="qfilesystemmodel.html#rootPathChanged">rootPathChanged</a></b> (const QString&amp;)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QFileSystemModel class provides a data model for the local filesystem.</p>
<p>This class provides access to the local filesystem, providing functions for renaming and removing files and directories, and for creating new directories. In the simplest case, it can be used with a suitable display widget as part of a browser or filter.</p>
<p>QFileSystemModel will not fetch any files or directories until setRootPath is called. This will prevent any unnecessary querying on the file system until that point such as listing the drives on Windows.</p>
<p>Unlike the <a href="qdirmodel.html">QDirModel</a>, QFileSystemModel uses a separate thread to populate itself so it will not cause the main thread to hang as the file system is being queried. Calls to <a href="qfilesystemmodel.html#rowCount">rowCount</a>() will return 0 until the model populates a directory.</p>
<p>QFileSystemModel keeps a cache with file information. The cache is automatically kept up to date using the <a href="qfilesystemwatcher.html">QFileSystemWatcher</a>.</p>
<p>QFileSystemModel can be accessed using the standard interface provided by <a href="qabstractitemmodel.html">QAbstractItemModel</a>, but it also provides some convenience functions that are specific to a directory model. The <a href="qfilesystemmodel.html#fileInfo">fileInfo</a>(), <a href="qfilesystemmodel.html#isDir">isDir</a>(), <a class="compat" href="qobject-qt3.html#name">name</a>(), and path() functions provide information about the underlying files and directories related to items in the model. Directories can be created and removed using <a href="qfilesystemmodel.html#mkdir">mkdir</a>(), <a href="qfilesystemmodel.html#rmdir">rmdir</a>().</p>
<p><b>Note:</b> QFileSystemModel requires an instance of a GUI application.</p>
<p>See also <a href="model-view-model.html">Model Classes</a>.</p>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="Roles-enum" />QFileSystemModel.Roles</h3><p><table border="1" cellpadding="2" cellspacing="1" class="valuelist" width="40%">
<tr><th width="60%">Constant</th><th width="40%">Value</th></tr>
<tr><td valign="top"><tt>QFileSystemModel.FileIconRole</tt></td><td align="center" valign="top"><tt>Qt.DecorationRole</tt></td></tr>
<tr><td valign="top"><tt>QFileSystemModel.FilePathRole</tt></td><td align="center" valign="top"><tt>Qt.UserRole + 1</tt></td></tr>
<tr><td valign="top"><tt>QFileSystemModel.FileNameRole</tt></td><td align="center" valign="top"><tt>Qt.UserRole + 2</tt></td></tr>
<tr><td valign="top"><tt>QFileSystemModel.FilePermissions</tt></td><td align="center" valign="top"><tt>Qt.UserRole + 3</tt></td></tr>
</table></p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QFileSystemModel" />QFileSystemModel.__init__ (<i>self</i>, <a href="qobject.html">QObject</a>&#160;<i>parent</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a file system model with the given <i>parent</i>.</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/~QFileSystemModel" />
<h3 class="fn"><a name="canFetchMore" />bool QFileSystemModel.canFetchMore (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>)</h3><p>Reimplemented from <a href="qabstractitemmodel.html#canFetchMore">QAbstractItemModel.canFetchMore</a>().</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/columnCount" />
<h3 class="fn"><a name="columnCount" />int QFileSystemModel.columnCount (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>parent</i>&#160;=&#160;QModelIndex())</h3><p>Reimplemented from <a href="qabstractitemmodel.html#columnCount">QAbstractItemModel.columnCount</a>().</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/data" />
<h3 class="fn"><a name="data" />QVariant QFileSystemModel.data (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>, int&#160;<i>role</i>&#160;=&#160;Qt.DisplayRole)</h3><p>Reimplemented from <a href="qabstractitemmodel.html#data">QAbstractItemModel.data</a>().</p>
<p>See also <a href="qfilesystemmodel.html#setData">setData</a>().</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/dropMimeData" />
<h3 class="fn"><a name="dropMimeData" />bool QFileSystemModel.dropMimeData (<i>self</i>, <a href="qmimedata.html">QMimeData</a>, <a href="qt.html#DropAction-enum">Qt.DropAction</a>, int, int, <a href="qmodelindex.html">QModelIndex</a>)</h3><p>Reimplemented from <a href="qabstractitemmodel.html#dropMimeData">QAbstractItemModel.dropMimeData</a>().</p>
<p>Handles the <i>data</i> supplied by a drag and drop operation that ended with the given <i>action</i> over the row in the model specified by the <i>row</i> and <i>column</i> and by the <i>parent</i> index.</p>
<p>See also <a href="qfilesystemmodel.html#supportedDropActions">supportedDropActions</a>().</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/event" />
<h3 class="fn"><a name="event" />bool QFileSystemModel.event (<i>self</i>, <a href="qevent.html">QEvent</a>)</h3><p>Reimplemented from <a href="qobject.html#event">QObject.event</a>().</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/fetchMore" />
<h3 class="fn"><a name="fetchMore" />QFileSystemModel.fetchMore (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>)</h3><p>Reimplemented from <a href="qabstractitemmodel.html#fetchMore">QAbstractItemModel.fetchMore</a>().</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/fileIcon" />
<h3 class="fn"><a name="fileIcon" /><a href="qicon.html">QIcon</a> QFileSystemModel.fileIcon (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>)</h3><p>Returns the icon for the item stored in the model under the given <i>index</i>.</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/fileInfo" />
<h3 class="fn"><a name="fileInfo" /><a href="qfileinfo.html">QFileInfo</a> QFileSystemModel.fileInfo (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>)</h3><p>Returns the <a href="qfileinfo.html">QFileInfo</a> for the item stored in the model under the given <i>index</i>.</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/fileName" />
<h3 class="fn"><a name="fileName" />QString QFileSystemModel.fileName (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>)</h3><p>Returns the file name for the item stored in the model under the given <i>index</i>.</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/filePath" />
<h3 class="fn"><a name="filePath" />QString QFileSystemModel.filePath (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>)</h3><p>Returns the path of the item stored in the model under the <i>index</i> given.</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/fileRenamed" />
<h3 class="fn"><a name="filter" /><a href="qdir-filters.html">QDir.Filters</a> QFileSystemModel.filter (<i>self</i>)</h3><p>Returns the filter specified for the directory model.</p>
<p>If a filter has not been set, the default filter is <a href="qdir.html#Filter-enum">QDir.AllEntries</a> | <a href="qdir.html#Filter-enum">QDir.NoDotAndDotDot</a> | <a href="qdir.html#Filter-enum">QDir.AllDirs</a>.</p>
<p>See also <a href="qfilesystemmodel.html#setFilter">setFilter</a>() and <a href="qdir.html#Filter-enum">QDir.Filters</a>.</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/flags" />
<h3 class="fn"><a name="flags" /><a href="qt-itemflags.html">Qt.ItemFlags</a> QFileSystemModel.flags (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>)</h3><p>Reimplemented from <a href="qabstractitemmodel.html#flags">QAbstractItemModel.flags</a>().</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/hasChildren" />
<h3 class="fn"><a name="hasChildren" />bool QFileSystemModel.hasChildren (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>parent</i>&#160;=&#160;QModelIndex())</h3><p>Reimplemented from <a href="qabstractitemmodel.html#hasChildren">QAbstractItemModel.hasChildren</a>().</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/headerData" />
<h3 class="fn"><a name="headerData" />QVariant QFileSystemModel.headerData (<i>self</i>, int, <a href="qt.html#Orientation-enum">Qt.Orientation</a>, int&#160;<i>role</i>&#160;=&#160;Qt.DisplayRole)</h3><p>Reimplemented from <a href="qabstractitemmodel.html#headerData">QAbstractItemModel.headerData</a>().</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/iconProvider" />
<h3 class="fn"><a name="iconProvider" /><a href="qfileiconprovider.html">QFileIconProvider</a> QFileSystemModel.iconProvider (<i>self</i>)</h3><p>Returns the file icon provider for this directory model.</p>
<p>See also <a href="qfilesystemmodel.html#setIconProvider">setIconProvider</a>().</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/index" />
<h3 class="fn"><a name="index" /><a href="qmodelindex.html">QModelIndex</a> QFileSystemModel.index (<i>self</i>, int, int, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>parent</i>&#160;=&#160;QModelIndex())</h3><p>Reimplemented from <a href="qabstractitemmodel.html#index">QAbstractItemModel.index</a>().</p>
<h3 class="fn"><a name="index-2" /><a href="qmodelindex.html">QModelIndex</a> QFileSystemModel.index (<i>self</i>, QString, int&#160;<i>column</i>&#160;=&#160;0)</h3><p>This is an overloaded function.</p>
<p>Returns the model item index for the given <i>path</i> and <i>column</i>.</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/isDir" />
<h3 class="fn"><a name="isDir" />bool QFileSystemModel.isDir (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>)</h3><p>Returns true if the model item <i>index</i> represents a directory; otherwise returns false.</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/lastModified" />
<h3 class="fn"><a name="isReadOnly" />bool QFileSystemModel.isReadOnly (<i>self</i>)</h3><h3 class="fn"><a name="lastModified" /><a href="qdatetime.html">QDateTime</a> QFileSystemModel.lastModified (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>)</h3><p>Returns the date and time when <i>index</i> was last modified.</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/mimeData" />
<h3 class="fn"><a name="mimeData" /><a href="qmimedata.html">QMimeData</a> QFileSystemModel.mimeData (<i>self</i>, list-of-QModelIndex)</h3><p>Reimplemented from <a href="qabstractitemmodel.html#mimeData">QAbstractItemModel.mimeData</a>().</p>
<p>Returns an object that contains a serialized description of the specified <i>indexes</i>. The format used to describe the items corresponding to the indexes is obtained from the <a href="qfilesystemmodel.html#mimeTypes">mimeTypes</a>() function.</p>
<p>If the list of indexes is empty, 0 is returned rather than a serialized empty list.</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/mimeTypes" />
<h3 class="fn"><a name="mimeTypes" />QStringList QFileSystemModel.mimeTypes (<i>self</i>)</h3><p>Reimplemented from <a href="qabstractitemmodel.html#mimeTypes">QAbstractItemModel.mimeTypes</a>().</p>
<p>Returns a list of MIME types that can be used to describe a list of items in the model.</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/mkdir" />
<h3 class="fn"><a name="mkdir" /><a href="qmodelindex.html">QModelIndex</a> QFileSystemModel.mkdir (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>, QString)</h3><p>Create a directory with the <i>name</i> in the <i>parent</i> model index.</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/myComputer" />
<h3 class="fn"><a name="myComputer" />QVariant QFileSystemModel.myComputer (<i>self</i>, int&#160;<i>role</i>&#160;=&#160;Qt.DisplayRole)</h3><p>Returns the data stored under the given <i>role</i> for the item "My Computer".</p>
<p>See also <a href="qt.html#ItemDataRole-enum">Qt.ItemDataRole</a>.</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/nameFilters" />
<h3 class="fn"><a name="nameFilterDisables" />bool QFileSystemModel.nameFilterDisables (<i>self</i>)</h3><h3 class="fn"><a name="nameFilters" />QStringList QFileSystemModel.nameFilters (<i>self</i>)</h3><p>Returns a list of filters applied to the names in the model.</p>
<p>See also <a href="qfilesystemmodel.html#setNameFilters">setNameFilters</a>().</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/parent" />
<h3 class="fn"><a name="parent" /><a href="qmodelindex.html">QModelIndex</a> QFileSystemModel.parent (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>)</h3><p>Reimplemented from <a href="qabstractitemmodel.html#parent">QAbstractItemModel.parent</a>().</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/permissions" />
<h3 class="fn"><a name="permissions" /><a href="qfile-permissions.html">QFile.Permissions</a> QFileSystemModel.permissions (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>)</h3><p>Returns the complete OR-ed together combination of <a href="qfile.html#Permission-enum">QFile.Permission</a> for the <i>index</i>.</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/remove" />
<h3 class="fn"><a name="remove" />bool QFileSystemModel.remove (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>)</h3><p>Removes the model item <i>index</i> from the file system model and <b>deletes the corresponding file from the file system</b>, returning true if successful. If the item cannot be removed, false is returned.</p>
<p><b>Warning:</b> This function deletes files from the file system; it does <b>not</b> move them to a location where they can be recovered.</p>
<p>See also <a href="qfilesystemmodel.html#rmdir">rmdir</a>().</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/rmdir" />
<h3 class="fn"><a name="resolveSymlinks" />bool QFileSystemModel.resolveSymlinks (<i>self</i>)</h3><h3 class="fn"><a name="rmdir" />bool QFileSystemModel.rmdir (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>)</h3><p>Removes the directory corresponding to the model item <i>index</i> in the file system model and <b>deletes the corresponding directory from the file system</b>, returning true if successful. If the directory cannot be removed, false is returned.</p>
<p><b>Warning:</b> This function deletes directories from the file system; it does <b>not</b> move them to a location where they can be recovered.</p>
<p>See also <a href="qfilesystemmodel.html#remove">remove</a>().</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/rootDirectory" />
<h3 class="fn"><a name="rootDirectory" /><a href="qdir.html">QDir</a> QFileSystemModel.rootDirectory (<i>self</i>)</h3><p>The currently set directory</p>
<p>See also <a href="qfilesystemmodel.html#rootPath">rootPath</a>().</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/rootPath" />
<h3 class="fn"><a name="rootPath" />QString QFileSystemModel.rootPath (<i>self</i>)</h3><p>The currently set root path</p>
<p>See also <a href="qfilesystemmodel.html#setRootPath">setRootPath</a>() and <a href="qfilesystemmodel.html#rootDirectory">rootDirectory</a>().</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/rootPathChanged" />
<h3 class="fn"><a name="rowCount" />int QFileSystemModel.rowCount (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>parent</i>&#160;=&#160;QModelIndex())</h3><p>Reimplemented from <a href="qabstractitemmodel.html#rowCount">QAbstractItemModel.rowCount</a>().</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/setData" />
<h3 class="fn"><a name="setData" />bool QFileSystemModel.setData (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>, QVariant, int&#160;<i>role</i>&#160;=&#160;Qt.EditRole)</h3><p>Reimplemented from <a href="qabstractitemmodel.html#setData">QAbstractItemModel.setData</a>().</p>
<p>See also <a href="qfilesystemmodel.html#data">data</a>().</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/setFilter" />
<h3 class="fn"><a name="setFilter" />QFileSystemModel.setFilter (<i>self</i>, <a href="qdir-filters.html">QDir.Filters</a>)</h3><p>Sets the directory model's filter to that specified by <i>filters</i>.</p>
<p>Note that the filter you set should always include the <a href="qdir.html#Filter-enum">QDir.AllDirs</a> enum value, otherwise <a href="qfilesystemmodel.html">QFileSystemModel</a> won't be able to read the directory structure.</p>
<p>See also <a href="qfilesystemmodel.html#filter">filter</a>() and <a href="qdir.html#Filter-enum">QDir.Filters</a>.</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/setIconProvider" />
<h3 class="fn"><a name="setIconProvider" />QFileSystemModel.setIconProvider (<i>self</i>, <a href="qfileiconprovider.html">QFileIconProvider</a>)</h3><p>Sets the <i>provider</i> of file icons for the directory model.</p>
<p>See also <a href="qfilesystemmodel.html#iconProvider">iconProvider</a>().</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/setNameFilters" />
<h3 class="fn"><a name="setNameFilterDisables" />QFileSystemModel.setNameFilterDisables (<i>self</i>, bool)</h3><h3 class="fn"><a name="setNameFilters" />QFileSystemModel.setNameFilters (<i>self</i>, QStringList)</h3><p>Sets the name <i>filters</i> to apply against the existing files.</p>
<p>See also <a href="qfilesystemmodel.html#nameFilters">nameFilters</a>().</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/setRootPath" />
<h3 class="fn"><a name="setReadOnly" />QFileSystemModel.setReadOnly (<i>self</i>, bool)</h3><h3 class="fn"><a name="setResolveSymlinks" />QFileSystemModel.setResolveSymlinks (<i>self</i>, bool)</h3><h3 class="fn"><a name="setRootPath" /><a href="qmodelindex.html">QModelIndex</a> QFileSystemModel.setRootPath (<i>self</i>, QString)</h3><p>Sets the directory that is being watched by the model to <i>newPath</i> by installing a <a href="qfilesystemwatcher.html">file system watcher</a> on it. Any changes to files and directories within this directory will be reflected in the model.</p>
<p>If the path is changed, the <a href="qfilesystemmodel.html#rootPathChanged">rootPathChanged</a>() signal will be emitted.</p>
<p><b>Note:</b> This function does not change the structure of the model or modify the data available to views. In other words, the "root" of the model is <i>not</i> changed to include only files and directories within the directory specified by <i>newPath</i> in the file system.</p>
<p>See also <a href="qfilesystemmodel.html#rootPath">rootPath</a>().</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/size" />
<h3 class="fn"><a name="size" />int QFileSystemModel.size (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>)</h3><p>Returns the size in bytes of <i>index</i>. If the file does not exist, 0 is returned.</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/sort" />
<h3 class="fn"><a name="sort" />QFileSystemModel.sort (<i>self</i>, int, <a href="qt.html#SortOrder-enum">Qt.SortOrder</a>&#160;<i>order</i>&#160;=&#160;Qt.AscendingOrder)</h3><p>Reimplemented from <a href="qabstractitemmodel.html#sort">QAbstractItemModel.sort</a>().</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/supportedDropActions" />
<h3 class="fn"><a name="supportedDropActions" /><a href="qt-dropactions.html">Qt.DropActions</a> QFileSystemModel.supportedDropActions (<i>self</i>)</h3><p>Reimplemented from <a href="qabstractitemmodel.html#supportedDropActions">QAbstractItemModel.supportedDropActions</a>().</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/timerEvent" />
<h3 class="fn"><a name="timerEvent" />QFileSystemModel.timerEvent (<i>self</i>, <a href="qtimerevent.html">QTimerEvent</a>)</h3><p>Reimplemented from <a href="qobject.html#timerEvent">QObject.timerEvent</a>().</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/type" />
<h3 class="fn"><a name="type" />QString QFileSystemModel.type (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>)</h3><p>Returns the type of file <i>index</i> such as "Directory" or "JPEG file".</p>
<p /><hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="fileRenamed" />void fileRenamed (const QString&amp;,const QString&amp;,const QString&amp;)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever a file with the <i>oldName</i> is successfully renamed to <i>newName</i>. The file is located in in the directory <i>path</i>.</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/filter" />
<h3 class="fn"><a name="rootPathChanged" />void rootPathChanged (const QString&amp;)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted whenever the root path has been changed to a <i>newPath</i>.</p>
<a name="//apple_ref/cpp/instm/QFileSystemModel/rowCount" />
<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>