Qyoto
4.0.5
Qyoto is a C# language binding for Qt
|
The QFileSystemModel class provides a data model for the local filesystem. More...
Public Types | |
enum | Roles { FileIconRole = 1, FileNameRole = 34, FilePathRole = 33, FilePermissions = 35 } |
Public Member Functions | |
QFileSystemModel (QObject parent=null) | |
| |
override void | CreateProxy () |
override bool | CanFetchMore (QModelIndex parent) |
| |
new int | ColumnCount () |
| |
override int | ColumnCount (QModelIndex parent) |
| |
override object | Data (QModelIndex index, int role=(int) Qt.ItemDataRole.DisplayRole) |
| |
override bool | DropMimeData (QMimeData data, Qt.DropAction action, int row, int column, QModelIndex parent) |
| |
override bool | OnEvent (QEvent @event) |
| |
override void | FetchMore (QModelIndex parent) |
| |
new QIcon | FileIcon (QModelIndex index) |
| |
new QFileInfo | FileInfo (QModelIndex index) |
| |
new string | FileName (QModelIndex index) |
| |
new string | FilePath (QModelIndex index) |
| |
override Qt.ItemFlag | Flags (QModelIndex index) |
| |
new bool | HasChildren () |
| |
override bool | HasChildren (QModelIndex parent) |
| |
override object | HeaderData (int section, Qt.Orientation orientation, int role=(int) Qt.ItemDataRole.DisplayRole) |
| |
new QModelIndex | Index (string path, int column=0) |
| |
new QModelIndex | Index (int row, int column) |
| |
override QModelIndex | Index (int row, int column, QModelIndex parent) |
| |
new bool | IsDir (QModelIndex index) |
| |
new QDateTime | LastModified (QModelIndex index) |
| |
override QMimeData | MimeData (System.Collections.Generic.List< QModelIndex > indexes) |
| |
override System.Collections.Generic.List < string > | MimeTypes () |
| |
new QModelIndex | Mkdir (QModelIndex parent, string name) |
| |
new object | MyComputer (int role=(int) Qt.ItemDataRole.DisplayRole) |
| |
override QModelIndex | Parent (QModelIndex child) |
| |
new QFile.Permission | Permissions (QModelIndex index) |
| |
new bool | Remove (QModelIndex index) |
| |
new bool | Rmdir (QModelIndex index) |
| |
new QDir | RootDirectory () |
| |
new string | RootPath () |
| |
new int | RowCount () |
| |
override int | RowCount (QModelIndex parent) |
| |
override bool | SetData (QModelIndex index, object value, int role=(int) Qt.ItemDataRole.EditRole) |
| |
new QModelIndex | SetRootPath (string path) |
| |
new long | Size (QModelIndex index) |
| |
override void | Sort (int column, Qt.SortOrder order=Qt.SortOrder.AscendingOrder) |
| |
override Qt.DropAction | SupportedDropActions () |
| |
new string | Type (QModelIndex index) |
| |
new void | Dispose () |
Public Member Functions inherited from QtCore.QAbstractItemModel | |
QAbstractItemModel (QObject parent=null) | |
| |
virtual QModelIndex | Buddy (QModelIndex index) |
| |
new bool | HasChildren () |
| |
new bool | HasIndex (int row, int column) |
| |
new bool | HasIndex (int row, int column, QModelIndex parent) |
| |
new QModelIndex | Index (int row, int column) |
| |
new bool | InsertColumn (int column) |
| |
new bool | InsertColumn (int column, QModelIndex parent) |
| |
new bool | InsertColumns (int column, int count) |
| |
virtual bool | InsertColumns (int column, int count, QModelIndex parent) |
| |
new bool | InsertRow (int row) |
| |
new bool | InsertRow (int row, QModelIndex parent) |
| |
new bool | InsertRows (int row, int count) |
| |
virtual bool | InsertRows (int row, int count, QModelIndex parent) |
| |
virtual System.Collections.Generic.Dictionary < System.Int32, System.Object > | ItemData (QModelIndex index) |
| |
virtual System.Collections.Generic.List < QModelIndex > | Match (QModelIndex start, int role, object value, int hits=1, Qt.MatchFlag flags=Qt.MatchFlag.MatchStartsWith|Qt.MatchFlag.MatchWrap) |
| |
new QObject | Parent () |
| |
new bool | RemoveColumn (int column) |
| |
new bool | RemoveColumn (int column, QModelIndex parent) |
| |
new bool | RemoveColumns (int column, int count) |
| |
virtual bool | RemoveColumns (int column, int count, QModelIndex parent) |
| |
new bool | RemoveRow (int row) |
| |
new bool | RemoveRow (int row, QModelIndex parent) |
| |
new bool | RemoveRows (int row, int count) |
| |
virtual bool | RemoveRows (int row, int count, QModelIndex parent) |
| |
virtual void | Revert () |
| |
new System.Collections.Generic.Dictionary < System.Int32, QByteArray > | RoleNames () |
| |
new int | RowCount () |
| |
virtual bool | SetHeaderData (int section, Qt.Orientation orientation, object value, int role=(int) Qt.ItemDataRole.EditRole) |
| |
virtual bool | SetItemData (QModelIndex index, System.Collections.Generic.Dictionary< System.Int32, System.Object > roles) |
| |
new QModelIndex | Sibling (int row, int column, QModelIndex idx) |
| |
virtual QSize | Span (QModelIndex index) |
| |
virtual bool | Submit () |
| |
new void | Dispose () |
Public Member Functions inherited from QtCore.QObject | |
QObject (QObject parent=null) | |
| |
new bool | BlockSignals (bool b) |
| |
new System.Collections.Generic.List < QObject > | Children () |
| |
new bool | Connect (QObject sender, string signal, string member, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection) |
| |
new void | DeleteLater () |
| |
new bool | Disconnect (QObject receiver, string member=null) |
| |
new bool | Disconnect (string signal=null, QObject receiver=null, string member=null) |
| |
new void | DumpObjectInfo () |
| |
new void | DumpObjectTree () |
| |
new System.Collections.Generic.List < QByteArray > | DynamicPropertyNames () |
| |
virtual bool | OnEvent (QEvent arg1) |
| |
virtual bool | EventFilter (QObject arg1, QEvent arg2) |
| |
new bool | Inherits (string classname) |
| |
new void | InstallEventFilter (QObject arg1) |
| |
new bool | IsWidgetType () |
| |
new void | KillTimer (int id) |
| |
new object | Property (string name) |
| |
new void | RemoveEventFilter (QObject arg1) |
| |
new bool | SetProperty (string name, object value) |
| |
new void | SetUserData (uint id, QObjectUserData data) |
new bool | SignalsBlocked () |
| |
new int | StartTimer (int interval) |
| |
new QObjectUserData | UserData (uint id) |
new void | Dispose () |
Public Member Functions inherited from QtCore.Qt | |
delegate QTextStream | FuncQTextStreamQTextStream (QTextStream qTextStream) |
delegate string | FuncStringQByteArray (QByteArray qByteArray) |
delegate QByteArray | FuncQByteArrayString (string @string) |
delegate void | ActionQtMsgTypeString (QtMsgType qtMsgType, string @string) |
delegate QObject | FuncQObject () |
Static Public Member Functions | |
static string | Tr (string s, string c=null) |
static string | Tr (string s, string c, int n) |
static string | TrUtf8 (string s, string c=null) |
static string | TrUtf8 (string s, string c, int n) |
Static Public Member Functions inherited from QtCore.QAbstractItemModel | |
static string | Tr (string s, string c=null) |
static string | Tr (string s, string c, int n) |
static string | TrUtf8 (string s, string c=null) |
static string | TrUtf8 (string s, string c, int n) |
Static Public Member Functions inherited from QtCore.QObject | |
static bool | Connect (QObject sender, QMetaMethod signal, QObject receiver, QMetaMethod method, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection) |
| |
static bool | Connect (QObject sender, string signal, QObject receiver, string member, Qt.ConnectionType arg5=Qt.ConnectionType.AutoConnection) |
| |
static bool | Disconnect (QObject sender, QMetaMethod signal, QObject receiver, QMetaMethod member) |
| |
static bool | Disconnect (QObject sender, string signal, QObject receiver, string member) |
| |
static uint | RegisterUserData () |
static string | Tr (string s, string c=null) |
| |
static string | Tr (string s, string c, int n) |
| |
static string | TrUtf8 (string s, string c=null) |
| |
static string | TrUtf8 (string s, string c, int n) |
| |
Static Public Member Functions inherited from QtCore.Qt | |
static QDataStream | Write (QDataStream s, object p) |
static QDataStream | Write (QDataStream arg1, QSizeF arg2) |
static QTextStream | Write (QTextStream s, Qt.FuncQTextStreamQTextStream f) |
static QDataStream | Write (QDataStream arg1, QPoint arg2) |
static QDataStream | Write (QDataStream arg1, QLineF arg2) |
static QDataStream | Write (QDataStream arg1, QPointF arg2) |
static QDataStream | Write (QDataStream arg1, QChar arg2) |
static QDataStream | Write (QDataStream arg1, QByteArray arg2) |
static QDataStream | Write (QDataStream arg1, QEasingCurve arg2) |
static QDataStream | Write (QDataStream arg1, QRectF arg2) |
static QDataStream | Write (QDataStream arg1, QDateTime arg2) |
static QDataStream | Write (QDataStream arg1, QUrl arg2) |
static QDataStream | Write (QDataStream arg1, QTime arg2) |
static QDataStream | Write (QDataStream arg1, QLocale arg2) |
static QDataStream | Write (QDataStream arg1, QBitArray arg2) |
static QDataStream | Write (QDataStream arg1, QUuid arg2) |
static QDataStream | Write (QDataStream arg1, QLine arg2) |
static QDataStream | Write (QDataStream arg1, QDate arg2) |
static QDataStream | Write (QDataStream @out, QRegExp regExp) |
static QDataStream | Write (QDataStream arg1, QRect arg2) |
static QDataStream | Write (QDataStream arg1, QSize arg2) |
static QDataStream | Write (QDataStream s, QVariant.Type p) |
static QDataStream | Write (QDataStream arg1, string arg2) |
static QDataStream | Write (QDataStream @out, System.Collections.Generic.List< string > list) |
static QDataStream | Read (QDataStream arg1, QChar arg2) |
static QDataStream | Read (QDataStream arg1, QLocale arg2) |
static QDataStream | Read (QDataStream arg1, QRect arg2) |
static QDataStream | Read (QDataStream arg1, QEasingCurve arg2) |
static QDataStream | Read (QDataStream arg1, QDate arg2) |
static QDataStream | Read (QDataStream arg1, QUrl arg2) |
static QDataStream | Read (QDataStream arg1, QUuid arg2) |
static QTextStream | Read (QTextStream s, Qt.FuncQTextStreamQTextStream f) |
static QDataStream | Read (QDataStream arg1, QLineF arg2) |
static QDataStream | Read (QDataStream arg1, QRectF arg2) |
static QDataStream | Read (QDataStream arg1, QPointF arg2) |
static QDataStream | Read (QDataStream arg1, QLine arg2) |
static QDataStream | Read (QDataStream arg1, QBitArray arg2) |
static QDataStream | Read (QDataStream arg1, QSize arg2) |
static QDataStream | Read (QDataStream arg1, QDateTime arg2) |
static QDataStream | Read (QDataStream arg1, QTime arg2) |
static QDataStream | Read (QDataStream arg1, QPoint arg2) |
static QDataStream | Read (QDataStream @in, QRegExp regExp) |
static QDataStream | Read (QDataStream s, object p) |
static QDataStream | Read (QDataStream arg1, QByteArray arg2) |
static QDataStream | Read (QDataStream arg1, QSizeF arg2) |
static QDataStream | Read (QDataStream arg1, string arg2) |
static QDataStream | Read (QDataStream s, QVariant.Type p) |
static QDataStream | Read (QDataStream @in, System.Collections.Generic.List< string > list) |
static double | qAcos (double v) |
static void | qAddPostRoutine (System.Action arg1) |
static string | qAppName () |
static double | qAsin (double v) |
static double | qAtan (double v) |
static double | qAtan2 (double x, double y) |
static void | qBadAlloc () |
static int | qCeil (double v) |
static ushort | qChecksum (string s, uint len) |
static QByteArray | qCompress (QByteArray data) |
static QByteArray | qCompress (QByteArray data, int compressionLevel=-1) |
static QByteArray | qCompress (Pointer< byte > data, int nbytes) |
static QByteArray | qCompress (Pointer< byte > data, int nbytes, int compressionLevel=-1) |
static double | qCos (double v) |
static double | qExp (double v) |
static double | qFabs (double v) |
static double | qFastCos (double x) |
static double | qFastSin (double x) |
static string | qFlagLocation (string method) |
static int | qFloor (double v) |
static bool | qFuzzyCompare (double p1, double p2) |
static bool | qFuzzyCompare (float p1, float p2) |
static bool | qFuzzyIsNull (double d) |
static bool | qFuzzyIsNull (float f) |
static uint | qHash (QBitArray key) |
static uint | qHash (QChar key) |
static uint | qHash (QStringRef key) |
static uint | qHash (QUrl url) |
static uint | qHash (QPersistentModelIndex index) |
static uint | qHash (QByteArray key) |
static uint | qHash (QModelIndex index) |
static uint | qHash (uint key) |
static uint | qHash (sbyte key) |
static uint | qHash (byte key) |
static uint | qHash (short key) |
static uint | qHash (NativeLong key) |
static uint | qHash (ushort key) |
static uint | qHash (long key) |
static uint | qHash (ulong key) |
static uint | qHash (int key) |
static uint | qHash (string key) |
static uint | qHash (NativeULong key) |
static double | qInf () |
static Qt.ActionQtMsgTypeString | qInstallMsgHandler (Qt.ActionQtMsgTypeString arg1) |
static int | qIntCast (float f) |
static int | qIntCast (double f) |
static bool | qIsFinite (double d) |
static bool | qIsFinite (float f) |
static bool | qIsInf (float f) |
static bool | qIsInf (double d) |
static bool | qIsNaN (float f) |
static bool | qIsNaN (double d) |
static bool | qIsNull (float f) |
static bool | qIsNull (double d) |
static double | qLn (double v) |
static double | qPow (double x, double y) |
static double | qQNaN () |
static void | qRegisterStaticPluginInstanceFunction (Qt.FuncQObject function) |
static void | qRemovePostRoutine (System.Action arg1) |
static int | qRound (double d) |
static long | qRound64 (double d) |
static double | qSNaN () |
static bool | qSharedBuild () |
static double | qSin (double v) |
static double | qSqrt (double v) |
static bool | qStringComparisonHelper (QStringRef s1, string s2) |
static double | qTan (double v) |
static QByteArray | qUncompress (QByteArray data) |
static QByteArray | qUncompress (Pointer< byte > data, int nbytes) |
static string | qVersion () |
static void | Qbswap_helper (Pointer< byte > src, Pointer< byte > dest, int size) |
static QByteArray | Qgetenv (string varName) |
static bool | Qputenv (string varName, QByteArray value) |
static int | Qrand () |
static void | Qsrand (uint seed) |
static int | Qstrcmp (QByteArray str1, QByteArray str2) |
static int | Qstrcmp (QByteArray str1, string str2) |
static int | Qstrcmp (string str1, QByteArray str2) |
static int | Qstrcmp (string str1, string str2) |
static Pointer< sbyte > | Qstrcpy (Pointer< sbyte > dst, string src) |
static Pointer< sbyte > | Qstrdup (string arg1) |
static int | Qstricmp (string arg1, string arg2) |
static uint | Qstrlen (string str) |
static int | Qstrncmp (string str1, string str2, uint len) |
static Pointer< sbyte > | Qstrncpy (Pointer< sbyte > dst, string src, uint len) |
static int | Qstrnicmp (string arg1, string arg2, uint len) |
static uint | Qstrnlen (string str, uint maxlen) |
static string | QtTrId (string id, int n=-1) |
Protected Member Functions | |
QFileSystemModel (System.Type dummy) | |
new void | OnDirectoryLoaded (string path) |
| |
new void | OnFileRenamed (string path, string oldName, string newName) |
| |
new void | OnRootPathChanged (string newPath) |
| |
override void | OnTimerEvent (QTimerEvent @event) |
| |
Protected Member Functions inherited from QtCore.QAbstractItemModel | |
QAbstractItemModel (System.Type dummy) | |
new void | BeginInsertColumns (QModelIndex parent, int first, int last) |
| |
new void | BeginInsertRows (QModelIndex parent, int first, int last) |
| |
new bool | BeginMoveColumns (QModelIndex sourceParent, int sourceFirst, int sourceLast, QModelIndex destinationParent, int destinationColumn) |
| |
new bool | BeginMoveRows (QModelIndex sourceParent, int sourceFirst, int sourceLast, QModelIndex destinationParent, int destinationRow) |
| |
new void | BeginRemoveColumns (QModelIndex parent, int first, int last) |
| |
new void | BeginRemoveRows (QModelIndex parent, int first, int last) |
| |
new void | BeginResetModel () |
| |
new void | ChangePersistentIndex (QModelIndex from, QModelIndex to) |
| |
new void | ChangePersistentIndexList (System.Collections.Generic.List< QModelIndex > from, System.Collections.Generic.List< QModelIndex > to) |
| |
new QModelIndex | CreateIndex (int row, int column) |
| |
new QModelIndex | CreateIndex (int row, int column, int id) |
| |
new QModelIndex | CreateIndex (int row, int column, uint id) |
| |
new void | OnDataChanged (QModelIndex topLeft, QModelIndex bottomRight) |
| |
new bool | DecodeData (int row, int column, QModelIndex parent, QDataStream stream) |
new void | EncodeData (System.Collections.Generic.List< QModelIndex > indexes, QDataStream stream) |
new void | EndInsertColumns () |
| |
new void | EndInsertRows () |
| |
new void | EndMoveColumns () |
| |
new void | EndMoveRows () |
| |
new void | EndRemoveColumns () |
| |
new void | EndRemoveRows () |
| |
new void | EndResetModel () |
| |
new void | OnHeaderDataChanged (Qt.Orientation orientation, int first, int last) |
| |
new void | OnLayoutAboutToBeChanged () |
| |
new void | OnLayoutChanged () |
| |
new System.Collections.Generic.List < QModelIndex > | PersistentIndexList () |
| |
new void | Reset () |
| |
new void | ResetInternalData () |
| |
new void | SetRoleNames (System.Collections.Generic.Dictionary< System.Int32, QByteArray > roleNames) |
| |
Protected Member Functions inherited from QtCore.QObject | |
QObject (System.Type dummy) | |
virtual void | OnChildEvent (QChildEvent arg1) |
| |
virtual void | ConnectNotify (string signal) |
| |
virtual void | OnCustomEvent (QEvent arg1) |
| |
new void | OnDestroyed (QObject arg1=null) |
| |
virtual void | DisconnectNotify (string signal) |
| |
new int | Receivers (string signal) |
| |
new QObject | Sender () |
| |
new int | SenderSignalIndex () |
| |
virtual void | OnTimerEvent (QTimerEvent arg1) |
| |
Properties | |
Slot< System.String > | RootPathChanged |
| |
Slot< System.String, System.String, System.String > | FileRenamed |
| |
Slot< System.String > | DirectoryLoaded |
| |
new QDir.Filter | Filter [get, set] |
| |
new QFileIconProvider | IconProvider [get, set] |
| |
new System.Collections.Generic.List < string > | NameFilters [get, set] |
| |
new bool | ResolveSymlinks [get, set] |
| |
new bool | ReadOnly [get, set] |
| |
new bool | NameFilterDisables [get, set] |
| |
static new QMetaObject | StaticMetaObject [get] |
new IQFileSystemModelSignals | Emit [get] |
Properties inherited from QtCore.QAbstractItemModel | |
Slot< QModelIndex, QModelIndex > | DataChanged |
| |
Slot< Qt.Orientation, System.Int32, System.Int32 > | HeaderDataChanged |
| |
Slot | LayoutChanged |
| |
Slot | LayoutAboutToBeChanged |
| |
Slot< QModelIndex, System.Int32, System.Int32 > | RowsAboutToBeInserted |
Slot< QModelIndex, System.Int32, System.Int32 > | RowsInserted |
Slot< QModelIndex, System.Int32, System.Int32 > | RowsAboutToBeRemoved |
Slot< QModelIndex, System.Int32, System.Int32 > | RowsRemoved |
Slot< QModelIndex, System.Int32, System.Int32 > | ColumnsAboutToBeInserted |
Slot< QModelIndex, System.Int32, System.Int32 > | ColumnsInserted |
Slot< QModelIndex, System.Int32, System.Int32 > | ColumnsAboutToBeRemoved |
Slot< QModelIndex, System.Int32, System.Int32 > | ColumnsRemoved |
Slot | ModelAboutToBeReset |
Slot | ModelReset |
Slot< QModelIndex, System.Int32, System.Int32, QModelIndex, System.Int32 > | RowsAboutToBeMoved |
Slot< QModelIndex, System.Int32, System.Int32, QModelIndex, System.Int32 > | RowsMoved |
Slot< QModelIndex, System.Int32, System.Int32, QModelIndex, System.Int32 > | ColumnsAboutToBeMoved |
Slot< QModelIndex, System.Int32, System.Int32, QModelIndex, System.Int32 > | ColumnsMoved |
new Qt.DropAction | SupportedDragActions [get, set] |
| |
static new QMetaObject | StaticMetaObject [get] |
new IQAbstractItemModelSignals | Emit [get] |
Properties inherited from QtCore.QObject | |
virtual EventHandler < QEventArgs< QChildEvent > > | ChildEvent |
| |
virtual EventHandler < QEventArgs< QEvent > > | CustomEvent |
| |
virtual EventHandler < QEventArgs< QEvent > > | Event |
| |
virtual EventHandler < QEventArgs< QTimerEvent > > | TimerEvent |
| |
Slot< QObject > | DestroyedQObject |
Slot | Destroyed |
| |
new QObject | Parent [get, set] |
| |
virtual System.IntPtr | SmokeObject [get, set] |
new string | ObjectName [get, set] |
| |
static new QMetaObject | StaticMetaObject [get] |
| |
static new QMetaObject | StaticQtMetaObject [get] |
new IQObjectSignals | Emit [get] |
Additional Inherited Members | |
Protected Attributes inherited from QtCore.QObject | |
object | Q_EMIT = null |
SmokeInvocation | interceptor |
readonly List< QEventHandler > | eventFilters = new List<QEventHandler>() |
The QFileSystemModel class provides a data model for the local filesystem.
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.
QFileSystemModel can be accessed using the standard interface provided by QAbstractItemModel, but it also provides some convenience functions that are specific to a directory model. The fileInfo(), isDir(), name(), and path() functions provide information about the underlying files and directories related to items in the model. Directories can be created and removed using mkdir(), rmdir().
Note: QFileSystemModel requires an instance of a GUI application.
Example Usage
A directory model that displays the contents of a default directory is usually constructed with a parent object:
QFileSystemModel *model = new QFileSystemModel;
model->setRootPath(QDir::currentPath());
A tree view can be used to display the contents of the model
QTreeView *tree = new QTreeView(splitter);
tree->setModel(model);
and the contents of a particular directory can be displayed by setting the tree view's root index:
tree->setRootIndex(model->index(QDir::currentPath()));
The view's root index can be used to control how much of a hierarchical model is displayed. QDirModel(obsolete) provides a convenience function that returns a suitable model index for a path to a directory within the model.
Caching and Performance
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.
Unlike QDirModel(obsolete), 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 rowCount() will return 0 until the model populates a directory.
QFileSystemModel keeps a cache with file information. The cache is automatically kept up to date using the QFileSystemWatcher.
See also Model Classes.
|
protected |
QtGui.QFileSystemModel.QFileSystemModel | ( | QObject | parent = null | ) |
Constructs a file system model with the given parent.
|
virtual |
Reimplemented from QAbstractItemModel::canFetchMore().
Reimplemented from QtCore.QAbstractItemModel.
new int QtGui.QFileSystemModel.ColumnCount | ( | ) |
Reimplemented from QAbstractItemModel::columnCount().
override int QtGui.QFileSystemModel.ColumnCount | ( | QModelIndex | parent | ) |
Reimplemented from QAbstractItemModel::columnCount().
|
virtual |
Reimplemented from QtCore.QAbstractItemModel.
|
virtual |
Reimplemented from QAbstractItemModel::data().
See also setData().
Implements QtCore.QAbstractItemModel.
new void QtGui.QFileSystemModel.Dispose | ( | ) |
|
virtual |
Reimplemented from QAbstractItemModel::dropMimeData().
Handles the data supplied by a drag and drop operation that ended with the given action over the row in the model specified by the row and column and by the parent index.
See also supportedDropActions().
Reimplemented from QtCore.QAbstractItemModel.
|
virtual |
Reimplemented from QAbstractItemModel::fetchMore().
Reimplemented from QtCore.QAbstractItemModel.
new QIcon QtGui.QFileSystemModel.FileIcon | ( | QModelIndex | index | ) |
Returns the icon for the item stored in the model under the given index.
new QFileInfo QtGui.QFileSystemModel.FileInfo | ( | QModelIndex | index | ) |
Returns the QFileInfo for the item stored in the model under the given index.
new string QtGui.QFileSystemModel.FileName | ( | QModelIndex | index | ) |
Returns the file name for the item stored in the model under the given index.
new string QtGui.QFileSystemModel.FilePath | ( | QModelIndex | index | ) |
Returns the path of the item stored in the model under the index given.
|
virtual |
Reimplemented from QAbstractItemModel::flags().
Reimplemented from QtCore.QAbstractItemModel.
new bool QtGui.QFileSystemModel.HasChildren | ( | ) |
Reimplemented from QAbstractItemModel::hasChildren().
|
virtual |
Reimplemented from QAbstractItemModel::hasChildren().
Reimplemented from QtCore.QAbstractItemModel.
|
virtual |
Reimplemented from QAbstractItemModel::headerData().
Reimplemented from QtCore.QAbstractItemModel.
new QModelIndex QtGui.QFileSystemModel.Index | ( | string | path, |
int | column = 0 |
||
) |
This is an overloaded function.
Returns the model item index for the given path and column.
new QModelIndex QtGui.QFileSystemModel.Index | ( | int | row, |
int | column | ||
) |
Reimplemented from QAbstractItemModel::index().
|
virtual |
Reimplemented from QAbstractItemModel::index().
Implements QtCore.QAbstractItemModel.
new bool QtGui.QFileSystemModel.IsDir | ( | QModelIndex | index | ) |
Returns true if the model item index represents a directory; otherwise returns false.
new QDateTime QtGui.QFileSystemModel.LastModified | ( | QModelIndex | index | ) |
Returns the date and time when index was last modified.
|
virtual |
Reimplemented from QAbstractItemModel::mimeData().
Returns an object that contains a serialized description of the specified indexes. The format used to describe the items corresponding to the indexes is obtained from the mimeTypes() function.
If the list of indexes is empty, 0 is returned rather than a serialized empty list.
Reimplemented from QtCore.QAbstractItemModel.
|
virtual |
Reimplemented from QAbstractItemModel::mimeTypes().
Returns a list of MIME types that can be used to describe a list of items in the model.
Reimplemented from QtCore.QAbstractItemModel.
new QModelIndex QtGui.QFileSystemModel.Mkdir | ( | QModelIndex | parent, |
string | name | ||
) |
Create a directory with the name in the parent model index.
new object QtGui.QFileSystemModel.MyComputer | ( | int | role = (int) Qt.ItemDataRole.DisplayRole | ) |
Returns the data stored under the given role for the item "My Computer".
See also Qt::ItemDataRole.
|
protected |
This signal is emitted when the gatherer thread has finished to load the path.
This function was introduced in Qt 4.7.
override bool QtGui.QFileSystemModel.OnEvent | ( | QEvent @ | event | ) |
Reimplemented from QObject::event().
|
protected |
This signal is emitted whenever a file with the oldName is successfully renamed to newName. The file is located in in the directory path.
|
protected |
This signal is emitted whenever the root path has been changed to a newPath.
|
protected |
Reimplemented from QObject::timerEvent().
|
virtual |
Reimplemented from QAbstractItemModel::parent().
Implements QtCore.QAbstractItemModel.
new QFile.Permission QtGui.QFileSystemModel.Permissions | ( | QModelIndex | index | ) |
Returns the complete OR-ed together combination of QFile::Permission for the index.
new bool QtGui.QFileSystemModel.Remove | ( | QModelIndex | index | ) |
Removes the model item index from the file system model and deletes the corresponding file from the file system, returning true if successful. If the item cannot be removed, false is returned.
Warning: This function deletes files from the file system; it does not move them to a location where they can be recovered.
See also rmdir().
new bool QtGui.QFileSystemModel.Rmdir | ( | QModelIndex | index | ) |
Removes the directory corresponding to the model item index in the file system model and deletes the corresponding directory from the file system, returning true if successful. If the directory cannot be removed, false is returned.
Warning: This function deletes directories from the file system; it does not move them to a location where they can be recovered.
See also remove().
new QDir QtGui.QFileSystemModel.RootDirectory | ( | ) |
The currently set directory
See also rootPath().
new string QtGui.QFileSystemModel.RootPath | ( | ) |
The currently set root path
See also setRootPath() and rootDirectory().
new int QtGui.QFileSystemModel.RowCount | ( | ) |
Reimplemented from QAbstractItemModel::rowCount().
|
virtual |
Reimplemented from QAbstractItemModel::rowCount().
Implements QtCore.QAbstractItemModel.
|
virtual |
Reimplemented from QAbstractItemModel::setData().
See also data().
Reimplemented from QtCore.QAbstractItemModel.
new QModelIndex QtGui.QFileSystemModel.SetRootPath | ( | string | path | ) |
Sets the directory that is being watched by the model to newPath by installing a file system watcher on it. Any changes to files and directories within this directory will be reflected in the model.
If the path is changed, the rootPathChanged() signal will be emitted.
Note: 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 not changed to include only files and directories within the directory specified by newPath in the file system.
See also rootPath().
new long QtGui.QFileSystemModel.Size | ( | QModelIndex | index | ) |
Returns the size in bytes of index. If the file does not exist, 0 is returned.
|
virtual |
Reimplemented from QAbstractItemModel::sort().
Reimplemented from QtCore.QAbstractItemModel.
|
virtual |
Reimplemented from QAbstractItemModel::supportedDropActions().
Reimplemented from QtCore.QAbstractItemModel.
|
static |
|
static |
|
static |
|
static |
new string QtGui.QFileSystemModel.Type | ( | QModelIndex | index | ) |
Returns the type of file index such as "Directory" or "JPEG file".
|
addremove |
This signal is emitted when the gatherer thread has finished to load the path.
This function was introduced in Qt 4.7.
|
getprotected |
|
addremove |
This signal is emitted whenever a file with the oldName is successfully renamed to newName. The file is located in in the directory path.
|
getset |
Returns the filter specified for the directory model.
If a filter has not been set, the default filter is QDir::AllEntries | QDir::NoDotAndDotDot | QDir::AllDirs.
Sets the directory model's filter to that specified by filters.
Note that the filter you set should always include the QDir::AllDirs enum value, otherwise QFileSystemModel won't be able to read the directory structure.
|
getset |
Returns the file icon provider for this directory model.
Sets the provider of file icons for the directory model.
|
getset |
This property holds whether files that don't pass the name filter are hidden or disabled.
This property is true by default
|
getset |
Returns a list of filters applied to the names in the model.
Sets the name filters to apply against the existing files.
|
getset |
This property holds whether the directory model allows writing to the file system.
If this property is set to false, the directory model will allow renaming, copying and deleting of files and directories.
This property is true by default
|
getset |
This property holds whether the directory model should resolve symbolic links.
This is only relevant on operating systems that support symbolic links.
By default, this property is false.
|
addremove |
This signal is emitted whenever the root path has been changed to a newPath.
|
staticget |