Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 28b9e36e96ce34b2567ae5b47a27b2c5 > files > 676

python-qt4-doc-4.10.3-3.mga4.noarch.rpm

<?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="index.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&#160;<i>parent</i>)</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&#160;<i>index</i>, 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&#160;<i>data</i>, Qt.DropAction&#160;<i>action</i>, int&#160;<i>row</i>, int&#160;<i>column</i>, QModelIndex&#160;<i>parent</i>)</li><li><div class="fn" />bool <b><a href="qfilesystemmodel.html#event">event</a></b> (<i>self</i>, QEvent&#160;<i>event</i>)</li><li><div class="fn" /><b><a href="qfilesystemmodel.html#fetchMore">fetchMore</a></b> (<i>self</i>, QModelIndex&#160;<i>parent</i>)</li><li><div class="fn" />QIcon <b><a href="qfilesystemmodel.html#fileIcon">fileIcon</a></b> (<i>self</i>, QModelIndex&#160;<i>aindex</i>)</li><li><div class="fn" />QFileInfo <b><a href="qfilesystemmodel.html#fileInfo">fileInfo</a></b> (<i>self</i>, QModelIndex&#160;<i>aindex</i>)</li><li><div class="fn" />QString <b><a href="qfilesystemmodel.html#fileName">fileName</a></b> (<i>self</i>, QModelIndex&#160;<i>aindex</i>)</li><li><div class="fn" />QString <b><a href="qfilesystemmodel.html#filePath">filePath</a></b> (<i>self</i>, QModelIndex&#160;<i>index</i>)</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&#160;<i>index</i>)</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&#160;<i>section</i>, Qt.Orientation&#160;<i>orientation</i>, 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&#160;<i>row</i>, int&#160;<i>column</i>, 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&#160;<i>path</i>, 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&#160;<i>index</i>)</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&#160;<i>index</i>)</li><li><div class="fn" />QMimeData <b><a href="qfilesystemmodel.html#mimeData">mimeData</a></b> (<i>self</i>, list-of-QModelIndex&#160;<i>indexes</i>)</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&#160;<i>parent</i>, QString&#160;<i>name</i>)</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&#160;<i>child</i>)</li><li><div class="fn" />QFile.Permissions <b><a href="qfilesystemmodel.html#permissions">permissions</a></b> (<i>self</i>, QModelIndex&#160;<i>index</i>)</li><li><div class="fn" />bool <b><a href="qfilesystemmodel.html#remove">remove</a></b> (<i>self</i>, QModelIndex&#160;<i>aindex</i>)</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&#160;<i>aindex</i>)</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&#160;<i>idx</i>, QVariant&#160;<i>value</i>, 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&#160;<i>filters</i>)</li><li><div class="fn" /><b><a href="qfilesystemmodel.html#setIconProvider">setIconProvider</a></b> (<i>self</i>, QFileIconProvider&#160;<i>provider</i>)</li><li><div class="fn" /><b><a href="qfilesystemmodel.html#setNameFilterDisables">setNameFilterDisables</a></b> (<i>self</i>, bool&#160;<i>enable</i>)</li><li><div class="fn" /><b><a href="qfilesystemmodel.html#setNameFilters">setNameFilters</a></b> (<i>self</i>, QStringList&#160;<i>filters</i>)</li><li><div class="fn" /><b><a href="qfilesystemmodel.html#setReadOnly">setReadOnly</a></b> (<i>self</i>, bool&#160;<i>enable</i>)</li><li><div class="fn" /><b><a href="qfilesystemmodel.html#setResolveSymlinks">setResolveSymlinks</a></b> (<i>self</i>, bool&#160;<i>enable</i>)</li><li><div class="fn" />QModelIndex <b><a href="qfilesystemmodel.html#setRootPath">setRootPath</a></b> (<i>self</i>, QString&#160;<i>path</i>)</li><li><div class="fn" />int <b><a href="qfilesystemmodel.html#size">size</a></b> (<i>self</i>, QModelIndex&#160;<i>index</i>)</li><li><div class="fn" /><b><a href="qfilesystemmodel.html#sort">sort</a></b> (<i>self</i>, int&#160;<i>column</i>, 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&#160;<i>event</i>)</li><li><div class="fn" />QString <b><a href="qfilesystemmodel.html#type">type</a></b> (<i>self</i>, QModelIndex&#160;<i>index</i>)</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qfilesystemmodel.html#directoryLoaded">directoryLoaded</a></b> (const QString&amp;)</li><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 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>
<a id="example-usage" name="example-usage" />
<h3>Example Usage</h3>
<p>A directory model that displays the contents of a default
directory is usually constructed with a parent object:</p>
<pre class="cpp">
     <span class="type">QFileSystemModel</span> <span class="operator">*</span>model <span class="operator">=</span> <span class="keyword">new</span> <span class="type">QFileSystemModel</span>;
     model<span class="operator">-</span><span class="operator">&gt;</span>setRootPath(<span class="type"><a href="qdir.html">QDir</a></span><span class="operator">.</span>currentPath());
</pre>
<p>A tree view can be used to display the contents of the model</p>
<pre class="cpp">
     <span class="type"><a href="qtreeview.html">QTreeView</a></span> <span class="operator">*</span>tree <span class="operator">=</span> <span class="keyword">new</span> <span class="type"><a href="qtreeview.html">QTreeView</a></span>(splitter);
     tree<span class="operator">-</span><span class="operator">&gt;</span>setModel(model);
</pre>
<p>and the contents of a particular directory can be displayed by
setting the tree view's root index:</p>
<pre class="cpp">
     tree<span class="operator">-</span><span class="operator">&gt;</span>setRootIndex(model<span class="operator">-</span><span class="operator">&gt;</span>index(<span class="type"><a href="qdir.html">QDir</a></span><span class="operator">.</span>currentPath()));
</pre>
<p>The view's root index can be used to control how much of a
hierarchical model is displayed. <a class="obsolete" href="qdirmodel.html">QDirModel<sup>(obsolete)</sup></a> provides a
convenience function that returns a suitable model index for a path
to a directory within the model.</p>
<a id="caching-and-performance" name="caching-and-performance" />
<h3>Caching and Performance</h3>
<p>QFileSystemModel will not fetch any files or directories until
<a href="qfilesystemmodel.html#setRootPath">setRootPath</a>() 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 <a class="obsolete" href="qdirmodel.html">QDirModel<sup>(obsolete)</sup></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>
<hr /><h2>Type Documentation</h2><h3 class="fn"><a name="Roles-enum" />QFileSystemModel.Roles</h3><table class="valuelist">
<tr>
<th class="tblConst">Constant</th>
<th class="tblVal">Value</th>
</tr>
<tr>
<td class="topAlign"><tt>QFileSystemModel.FileIconRole</tt></td>
<td class="topAlign"><tt>Qt.DecorationRole</tt></td>
</tr>
<tr>
<td class="topAlign"><tt>QFileSystemModel.FilePathRole</tt></td>
<td class="topAlign"><tt>Qt.UserRole + 1</tt></td>
</tr>
<tr>
<td class="topAlign"><tt>QFileSystemModel.FileNameRole</tt></td>
<td class="topAlign"><tt>Qt.UserRole + 2</tt></td>
</tr>
<tr>
<td class="topAlign">
<tt>QFileSystemModel.FilePermissions</tt></td>
<td class="topAlign"><tt>Qt.UserRole + 3</tt></td>
</tr>
</table>
<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>


<h3 class="fn"><a name="canFetchMore" />bool QFileSystemModel.canFetchMore (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>parent</i>)</h3><p>Reimplemented from <a href="qabstractitemmodel.html#canFetchMore">QAbstractItemModel.canFetchMore</a>().</p>


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


<h3 class="fn"><a name="data" />QVariant QFileSystemModel.data (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>index</i>, int&#160;<i>role</i>&#160;=&#160;Qt.DisplayRole)</h3><p>Reimplemented from <a href="qabstractitemmodel.html#data">QAbstractItemModel.data</a>().</p>
<p><b>See also</b> <a href="qfilesystemmodel.html#setData">setData</a>().</p>


<h3 class="fn"><a name="dropMimeData" />bool QFileSystemModel.dropMimeData (<i>self</i>, <a href="qmimedata.html">QMimeData</a>&#160;<i>data</i>, <a href="qt.html#DropAction-enum">Qt.DropAction</a>&#160;<i>action</i>, int&#160;<i>row</i>, int&#160;<i>column</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>parent</i>)</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><b>See also</b> <a href="qfilesystemmodel.html#supportedDropActions">supportedDropActions</a>().</p>


<h3 class="fn"><a name="event" />bool QFileSystemModel.event (<i>self</i>, <a href="qevent.html">QEvent</a>&#160;<i>event</i>)</h3><p>Reimplemented from <a href="qobject.html#event">QObject.event</a>().</p>


<h3 class="fn"><a name="fetchMore" />QFileSystemModel.fetchMore (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>parent</i>)</h3><p>Reimplemented from <a href="qabstractitemmodel.html#fetchMore">QAbstractItemModel.fetchMore</a>().</p>


<h3 class="fn"><a name="fileIcon" /><a href="qicon.html">QIcon</a> QFileSystemModel.fileIcon (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>aindex</i>)</h3><p>Returns the icon for the item stored in the model under the
given <i>index</i>.</p>


<h3 class="fn"><a name="fileInfo" /><a href="qfileinfo.html">QFileInfo</a> QFileSystemModel.fileInfo (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>aindex</i>)</h3><p>Returns the <a href="qfileinfo.html">QFileInfo</a> for the item
stored in the model under the given <i>index</i>.</p>


<h3 class="fn"><a name="fileName" />QString QFileSystemModel.fileName (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>aindex</i>)</h3><p>Returns the file name for the item stored in the model under the
given <i>index</i>.</p>


<h3 class="fn"><a name="filePath" />QString QFileSystemModel.filePath (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>index</i>)</h3><p>Returns the path of the item stored in the model under the
<i>index</i> given.</p>


<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><b>See also</b> <a href="qfilesystemmodel.html#setFilter">setFilter</a>() and <a href="qdir.html#Filter-enum">QDir.Filters</a>.</p>


<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>&#160;<i>index</i>)</h3><p>Reimplemented from <a href="qabstractitemmodel.html#flags">QAbstractItemModel.flags</a>().</p>


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


<h3 class="fn"><a name="headerData" />QVariant QFileSystemModel.headerData (<i>self</i>, int&#160;<i>section</i>, <a href="qt.html#Orientation-enum">Qt.Orientation</a>&#160;<i>orientation</i>, int&#160;<i>role</i>&#160;=&#160;Qt.DisplayRole)</h3><p>Reimplemented from <a href="qabstractitemmodel.html#headerData">QAbstractItemModel.headerData</a>().</p>


<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><b>See also</b> <a href="qfilesystemmodel.html#setIconProvider">setIconProvider</a>().</p>


<h3 class="fn"><a name="index" /><a href="qmodelindex.html">QModelIndex</a> QFileSystemModel.index (<i>self</i>, int&#160;<i>row</i>, int&#160;<i>column</i>, <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&#160;<i>path</i>, 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>


<h3 class="fn"><a name="isDir" />bool QFileSystemModel.isDir (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>index</i>)</h3><p>Returns true if the model item <i>index</i> represents a
directory; otherwise returns false.</p>


<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>&#160;<i>index</i>)</h3><p>Returns the date and time when <i>index</i> was last
modified.</p>


<h3 class="fn"><a name="mimeData" /><a href="qmimedata.html">QMimeData</a> QFileSystemModel.mimeData (<i>self</i>, list-of-QModelIndex&#160;<i>indexes</i>)</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>


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


<h3 class="fn"><a name="mkdir" /><a href="qmodelindex.html">QModelIndex</a> QFileSystemModel.mkdir (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>parent</i>, QString&#160;<i>name</i>)</h3><p>Create a directory with the <i>name</i> in the <i>parent</i>
model index.</p>


<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><b>See also</b> <a href="qt.html#ItemDataRole-enum">Qt.ItemDataRole</a>.</p>


<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><b>See also</b> <a href="qfilesystemmodel.html#setNameFilters">setNameFilters</a>().</p>


<h3 class="fn"><a name="parent" /><a href="qmodelindex.html">QModelIndex</a> QFileSystemModel.parent (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>child</i>)</h3><p>Reimplemented from <a href="qabstractitemmodel.html#parent">QAbstractItemModel.parent</a>().</p>


<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>&#160;<i>index</i>)</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>


<h3 class="fn"><a name="remove" />bool QFileSystemModel.remove (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>aindex</i>)</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><b>See also</b> <a href="qfilesystemmodel.html#rmdir">rmdir</a>().</p>


<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>&#160;<i>aindex</i>)</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><b>See also</b> <a href="qfilesystemmodel.html#remove">remove</a>().</p>


<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><b>See also</b> <a href="qfilesystemmodel.html#rootPath">rootPath</a>().</p>


<h3 class="fn"><a name="rootPath" />QString QFileSystemModel.rootPath (<i>self</i>)</h3><p>The currently set root path</p>
<p><b>See also</b> <a href="qfilesystemmodel.html#setRootPath">setRootPath</a>() and <a href="qfilesystemmodel.html#rootDirectory">rootDirectory</a>().</p>


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


<h3 class="fn"><a name="setData" />bool QFileSystemModel.setData (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>idx</i>, QVariant&#160;<i>value</i>, int&#160;<i>role</i>&#160;=&#160;Qt.EditRole)</h3><p>Reimplemented from <a href="qabstractitemmodel.html#setData">QAbstractItemModel.setData</a>().</p>
<p><b>See also</b> <a href="qfilesystemmodel.html#data">data</a>().</p>


<h3 class="fn"><a name="setFilter" />QFileSystemModel.setFilter (<i>self</i>, <a href="qdir-filters.html">QDir.Filters</a>&#160;<i>filters</i>)</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><b>See also</b> <a href="qfilesystemmodel.html#filter">filter</a>() and <a href="qdir.html#Filter-enum">QDir.Filters</a>.</p>


<h3 class="fn"><a name="setIconProvider" />QFileSystemModel.setIconProvider (<i>self</i>, <a href="qfileiconprovider.html">QFileIconProvider</a>&#160;<i>provider</i>)</h3><p>Sets the <i>provider</i> of file icons for the directory
model.</p>
<p><b>See also</b> <a href="qfilesystemmodel.html#iconProvider">iconProvider</a>().</p>


<h3 class="fn"><a name="setNameFilterDisables" />QFileSystemModel.setNameFilterDisables (<i>self</i>, bool&#160;<i>enable</i>)</h3><h3 class="fn"><a name="setNameFilters" />QFileSystemModel.setNameFilters (<i>self</i>, QStringList&#160;<i>filters</i>)</h3><p>Sets the name <i>filters</i> to apply against the existing
files.</p>
<p><b>See also</b> <a href="qfilesystemmodel.html#nameFilters">nameFilters</a>().</p>


<h3 class="fn"><a name="setReadOnly" />QFileSystemModel.setReadOnly (<i>self</i>, bool&#160;<i>enable</i>)</h3><h3 class="fn"><a name="setResolveSymlinks" />QFileSystemModel.setResolveSymlinks (<i>self</i>, bool&#160;<i>enable</i>)</h3><h3 class="fn"><a name="setRootPath" /><a href="qmodelindex.html">QModelIndex</a> QFileSystemModel.setRootPath (<i>self</i>, QString&#160;<i>path</i>)</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><b>See also</b> <a href="qfilesystemmodel.html#rootPath">rootPath</a>().</p>


<h3 class="fn"><a name="size" />int QFileSystemModel.size (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>index</i>)</h3><p>Returns the size in bytes of <i>index</i>. If the file does not
exist, 0 is returned.</p>


<h3 class="fn"><a name="sort" />QFileSystemModel.sort (<i>self</i>, int&#160;<i>column</i>, <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>


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


<h3 class="fn"><a name="timerEvent" />QFileSystemModel.timerEvent (<i>self</i>, <a href="qtimerevent.html">QTimerEvent</a>&#160;<i>event</i>)</h3><p>Reimplemented from <a href="qobject.html#timerEvent">QObject.timerEvent</a>().</p>


<h3 class="fn"><a name="type" />QString QFileSystemModel.type (<i>self</i>, <a href="qmodelindex.html">QModelIndex</a>&#160;<i>index</i>)</h3><p>Returns the type of file <i>index</i> such as "Directory" or
"JPEG file".</p>
<hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="directoryLoaded" />void directoryLoaded (const QString&amp;)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the gatherer thread has finished to
load the <i>path</i>.</p>
<p>This function was introduced in Qt 4.7.</p>


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


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


<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.10.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> 2012</td><td align="right" width="25%">Qt&#160;4.8.5</td></tr></table></div></address></body></html>