Qyoto  4.0.7
Qyoto is a C# language binding for Qt
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Properties
QtGui.QDirModel Class Reference

The QDirModel class provides a data model for the local filesystem. More...

Inheritance diagram for QtGui.QDirModel:
Collaboration diagram for QtGui.QDirModel:

Public Types

enum  Roles { FileIconRole = 1, FileNameRole = 34, FilePathRole = 33 }
 

Public Member Functions

 QDirModel (QObject parent=null)
  More...
 
 QDirModel (System.Collections.Generic.List< string > nameFilters, QDir.Filter filters, QDir.SortFlag sort, QObject parent=null)
  More...
 
override void CreateProxy ()
 
new int ColumnCount ()
  More...
 
override int ColumnCount (QModelIndex parent)
  More...
 
override object Data (QModelIndex index, int role=(int) Qt.ItemDataRole.DisplayRole)
  More...
 
override bool DropMimeData (QMimeData data, Qt.DropAction action, int row, int column, QModelIndex parent)
  More...
 
new QIcon FileIcon (QModelIndex index)
  More...
 
new QFileInfo FileInfo (QModelIndex index)
  More...
 
new string FileName (QModelIndex index)
  More...
 
new string FilePath (QModelIndex index)
  More...
 
override Qt.ItemFlag Flags (QModelIndex index)
  More...
 
new bool HasChildren ()
  More...
 
override bool HasChildren (QModelIndex index)
  More...
 
override object HeaderData (int section, Qt.Orientation orientation, int role=(int) Qt.ItemDataRole.DisplayRole)
  More...
 
new QModelIndex Index (string path, int column=0)
  More...
 
new QModelIndex Index (int row, int column)
  More...
 
override QModelIndex Index (int row, int column, QModelIndex parent)
  More...
 
new bool IsDir (QModelIndex index)
  More...
 
override QMimeData MimeData (System.Collections.Generic.List< QModelIndex > indexes)
  More...
 
new QModelIndex Mkdir (QModelIndex parent, string name)
  More...
 
override QModelIndex Parent (QModelIndex child)
  More...
 
new void Refresh ()
  More...
 
new void Refresh (QModelIndex parent)
  More...
 
new bool Remove (QModelIndex index)
  More...
 
new bool Rmdir (QModelIndex index)
  More...
 
new int RowCount ()
  More...
 
override int RowCount (QModelIndex parent)
  More...
 
override bool SetData (QModelIndex index, object value, int role=(int) Qt.ItemDataRole.EditRole)
  More...
 
override void Sort (int column, Qt.SortOrder order=Qt.SortOrder.AscendingOrder)
  More...
 
new void Dispose ()
 
- Public Member Functions inherited from QtCore.QAbstractItemModel
 QAbstractItemModel (QObject parent=null)
  More...
 
virtual QModelIndex Buddy (QModelIndex index)
  More...
 
virtual bool CanFetchMore (QModelIndex parent)
  More...
 
virtual void FetchMore (QModelIndex parent)
  More...
 
new bool HasChildren ()
  More...
 
new bool HasIndex (int row, int column)
  More...
 
new bool HasIndex (int row, int column, QModelIndex parent)
  More...
 
new QModelIndex Index (int row, int column)
  More...
 
new bool InsertColumn (int column)
  More...
 
new bool InsertColumn (int column, QModelIndex parent)
  More...
 
new bool InsertColumns (int column, int count)
  More...
 
virtual bool InsertColumns (int column, int count, QModelIndex parent)
  More...
 
new bool InsertRow (int row)
  More...
 
new bool InsertRow (int row, QModelIndex parent)
  More...
 
new bool InsertRows (int row, int count)
  More...
 
virtual bool InsertRows (int row, int count, QModelIndex parent)
  More...
 
virtual
System.Collections.Generic.Dictionary
< System.Int32, System.Object > 
ItemData (QModelIndex index)
  More...
 
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)
  More...
 
new QObject Parent ()
 
new bool RemoveColumn (int column)
  More...
 
new bool RemoveColumn (int column, QModelIndex parent)
  More...
 
new bool RemoveColumns (int column, int count)
  More...
 
virtual bool RemoveColumns (int column, int count, QModelIndex parent)
  More...
 
new bool RemoveRow (int row)
  More...
 
new bool RemoveRow (int row, QModelIndex parent)
  More...
 
new bool RemoveRows (int row, int count)
  More...
 
virtual bool RemoveRows (int row, int count, QModelIndex parent)
  More...
 
virtual void Revert ()
  More...
 
new int RowCount ()
  More...
 
virtual bool SetHeaderData (int section, Qt.Orientation orientation, object value, int role=(int) Qt.ItemDataRole.EditRole)
  More...
 
virtual bool SetItemData (QModelIndex index, System.Collections.Generic.Dictionary< System.Int32, System.Object > roles)
  More...
 
new QModelIndex Sibling (int row, int column, QModelIndex idx)
  More...
 
virtual QSize Span (QModelIndex index)
  More...
 
virtual bool Submit ()
  More...
 
new void Dispose ()
 
- Public Member Functions inherited from QtCore.QObject
 QObject (QObject parent=null)
  More...
 
new bool BlockSignals (bool b)
  More...
 
new bool Connect (QObject sender, string signal, string member, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection)
  More...
 
new void DeleteLater ()
  More...
 
new bool Disconnect (QObject receiver, string member=null)
  More...
 
new bool Disconnect (string signal=null, QObject receiver=null, string member=null)
  More...
 
new void DumpObjectInfo ()
  More...
 
new void DumpObjectTree ()
  More...
 
virtual bool OnEvent (QEvent e)
  More...
 
virtual bool EventFilter (QObject watched, QEvent @event)
  More...
 
new bool Inherits (string classname)
  More...
 
new void InstallEventFilter (QObject filterObj)
  More...
 
new void KillTimer (int id)
  More...
 
new object Property (string name)
  More...
 
new void RemoveEventFilter (QObject obj)
  More...
 
new bool SetProperty (string name, object value)
  More...
 
new void SetUserData (uint id, QObjectUserData data)
 
new int StartTimer (int interval)
  More...
 
new QObjectUserData UserData (uint id)
 
new void Dispose ()
 
- Public Member Functions inherited from QtCore.Qt
delegate QTextStream FuncQTextStreamQTextStream (QTextStream qTextStream)
 
delegate void ActionQtMsgTypeString (QtMsgType qtMsgType, string @string)
 
delegate QObject FuncQObject ()
 
delegate string FuncStringQByteArray (QByteArray qByteArray)
 
delegate QByteArray FuncQByteArrayString (string @string)
 

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)
  More...
 
static bool Connect (QObject sender, string signal, QObject receiver, string member, Qt.ConnectionType type=Qt.ConnectionType.AutoConnection)
  More...
 
static bool Disconnect (QObject sender, QMetaMethod signal, QObject receiver, QMetaMethod member)
  More...
 
static bool Disconnect (QObject sender, string signal, QObject receiver, string member)
  More...
 
static string Tr (string s, string c=null)
  More...
 
static string Tr (string s, string c, int n)
  More...
 
static string TrUtf8 (string s, string c=null)
  More...
 
static string TrUtf8 (string s, string c, int n)
  More...
 
- Static Public Member Functions inherited from QtCore.Qt
static QDataStream Write (QDataStream s, object p)
 
static QDataStream Write (QDataStream stream, QSizeF size)
  More...
 
static QDataStream Write (QDataStream stream, QPoint point)
  More...
 
static QTextStream Write (QTextStream s, Qt.FuncQTextStreamQTextStream f)
 
static QDataStream Write (QDataStream stream, QLineF line)
  More...
 
static QDataStream Write (QDataStream stream, QPointF point)
  More...
 
static QDataStream Write (QDataStream @out, QChar chr)
  More...
 
static QDataStream Write (QDataStream @out, QByteArray ba)
  More...
 
static QDataStream Write (QDataStream stream, QEasingCurve easing)
  More...
 
static QDataStream Write (QDataStream stream, QRectF rectangle)
  More...
 
static QDataStream Write (QDataStream @out, QDateTime dateTime)
  More...
 
static QDataStream Write (QDataStream @out, QUrl url)
  More...
 
static QDataStream Write (QDataStream @out, QTime time)
  More...
 
static QDataStream Write (QDataStream arg1, QLocale arg2)
 
static QDataStream Write (QDataStream @out, QBitArray ba)
  More...
 
static QDataStream Write (QDataStream s, QUuid id)
  More...
 
static QDataStream Write (QDataStream stream, QLine line)
  More...
 
static QDataStream Write (QDataStream @out, QDate date)
  More...
 
static QDataStream Write (QDataStream @out, QRegExp regExp)
  More...
 
static QDataStream Write (QDataStream stream, QRect rectangle)
  More...
 
static QDataStream Write (QDataStream stream, QSize size)
  More...
 
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)
  More...
 
static QDataStream Read (QDataStream @in, QChar chr)
  More...
 
static QDataStream Read (QDataStream arg1, QLocale arg2)
 
static QDataStream Read (QDataStream stream, QRect rectangle)
  More...
 
static QDataStream Read (QDataStream arg1, QEasingCurve arg2)
 
static QDataStream Read (QDataStream @in, QDate date)
  More...
 
static QDataStream Read (QDataStream @in, QUrl url)
  More...
 
static QDataStream Read (QDataStream s, QUuid id)
  More...
 
static QTextStream Read (QTextStream s, Qt.FuncQTextStreamQTextStream f)
 
static QDataStream Read (QDataStream stream, QLineF line)
  More...
 
static QDataStream Read (QDataStream stream, QRectF rectangle)
  More...
 
static QDataStream Read (QDataStream stream, QPointF point)
  More...
 
static QDataStream Read (QDataStream stream, QLine line)
  More...
 
static QDataStream Read (QDataStream @in, QBitArray ba)
  More...
 
static QDataStream Read (QDataStream stream, QSize size)
  More...
 
static QDataStream Read (QDataStream @in, QDateTime dateTime)
  More...
 
static QDataStream Read (QDataStream @in, QTime time)
  More...
 
static QDataStream Read (QDataStream stream, QPoint point)
  More...
 
static QDataStream Read (QDataStream @in, QRegExp regExp)
  More...
 
static QDataStream Read (QDataStream s, object p)
 
static QDataStream Read (QDataStream @in, QByteArray ba)
  More...
 
static QDataStream Read (QDataStream stream, QSizeF size)
  More...
 
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)
  More...
 
static double QAcos (double v)
  More...
 
static void QAddPostRoutine (System.Action ptr)
  More...
 
static double QAsin (double v)
  More...
 
static double QAtan (double v)
  More...
 
static double QAtan2 (double x, double y)
  More...
 
static void QBadAlloc ()
 
static int QCeil (double v)
  More...
 
static ushort QChecksum (string s, uint len)
  More...
 
static QByteArray QCompress (QByteArray data, int compressionLevel=-1)
  More...
 
static QByteArray QCompress (Pointer< byte > data, int nbytes, int compressionLevel=-1)
  More...
 
static double QCos (double v)
  More...
 
static double QExp (double v)
  More...
 
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)
  More...
 
static bool QFuzzyCompare (double p1, double p2)
  More...
 
static bool QFuzzyCompare (float p1, float p2)
  More...
 
static bool QFuzzyIsNull (double d)
 
static bool QFuzzyIsNull (float f)
 
static uint QHash (QBitArray key)
  More...
 
static uint QHash (QChar key)
  More...
 
static uint QHash (QStringRef key)
 
static uint QHash (QUrl url)
  More...
 
static uint QHash (QPersistentModelIndex index)
 
static uint QHash (QByteArray key)
  More...
 
static uint QHash (QModelIndex index)
 
static uint QHash (uint key)
  More...
 
static uint QHash (char key)
  More...
 
static uint QHash (byte key)
  More...
 
static uint QHash (short key)
  More...
 
static uint QHash (NativeLong key)
  More...
 
static uint QHash (ushort key)
  More...
 
static uint QHash (long key)
  More...
 
static uint QHash (ulong key)
  More...
 
static uint QHash (int key)
  More...
 
static uint QHash (string key)
  More...
 
static uint QHash (NativeULong key)
  More...
 
static Qt.ActionQtMsgTypeString QInstallMsgHandler (Qt.ActionQtMsgTypeString handler)
  More...
 
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)
  More...
 
static double QPow (double x, double y)
  More...
 
static void QRegisterStaticPluginInstanceFunction (Qt.FuncQObject function)
  More...
 
static void QRemovePostRoutine (System.Action arg1)
 
static int QRound (double d)
  More...
 
static long QRound64 (double d)
  More...
 
static double QSin (double v)
  More...
 
static double QSqrt (double v)
  More...
 
static bool QStringComparisonHelper (QStringRef s1, string s2)
 
static double QTan (double v)
  More...
 
static QByteArray QUncompress (QByteArray data)
  More...
 
static QByteArray QUncompress (Pointer< byte > data, int nbytes)
  More...
 
static void Qbswap_helper (Pointer< byte > src, Pointer< byte > dest, int size)
 
static QByteArray Qgetenv (string varName)
  More...
 
static bool Qputenv (string varName, QByteArray value)
  More...
 
static void Qsrand (uint seed)
  More...
 
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)
  More...
 
static Pointer< sbyte > Qstrcpy (Pointer< sbyte > dst, string src)
  More...
 
static Pointer< sbyte > Qstrdup (string src)
  More...
 
static int Qstricmp (string str1, string str2)
  More...
 
static uint Qstrlen (string str)
  More...
 
static int Qstrncmp (string str1, string str2, uint len)
  More...
 
static Pointer< sbyte > Qstrncpy (Pointer< sbyte > dst, string src, uint len)
  More...
 
static int Qstrnicmp (string str1, string str2, uint len)
  More...
 
static uint Qstrnlen (string str, uint maxlen)
  More...
 

Protected Member Functions

 QDirModel (System.Type dummy)
 
- Protected Member Functions inherited from QtCore.QAbstractItemModel
 QAbstractItemModel (System.Type dummy)
 
new void BeginInsertColumns (QModelIndex parent, int first, int last)
  More...
 
new void BeginInsertRows (QModelIndex parent, int first, int last)
  More...
 
new bool BeginMoveColumns (QModelIndex sourceParent, int sourceFirst, int sourceLast, QModelIndex destinationParent, int destinationColumn)
  More...
 
new bool BeginMoveRows (QModelIndex sourceParent, int sourceFirst, int sourceLast, QModelIndex destinationParent, int destinationRow)
  More...
 
new void BeginRemoveColumns (QModelIndex parent, int first, int last)
  More...
 
new void BeginRemoveRows (QModelIndex parent, int first, int last)
  More...
 
new void BeginResetModel ()
  More...
 
new void ChangePersistentIndex (QModelIndex from, QModelIndex to)
  More...
 
new void ChangePersistentIndexList (System.Collections.Generic.List< QModelIndex > from, System.Collections.Generic.List< QModelIndex > to)
  More...
 
new QModelIndex CreateIndex (int row, int column)
  More...
 
new QModelIndex CreateIndex (int row, int column, int id)
  More...
 
new QModelIndex CreateIndex (int row, int column, uint id)
  More...
 
new void OnDataChanged (QModelIndex topLeft, QModelIndex bottomRight)
  More...
 
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 ()
  More...
 
new void EndInsertRows ()
  More...
 
new void EndMoveColumns ()
  More...
 
new void EndMoveRows ()
  More...
 
new void EndRemoveColumns ()
  More...
 
new void EndRemoveRows ()
  More...
 
new void EndResetModel ()
  More...
 
new void OnHeaderDataChanged (Qt.Orientation orientation, int first, int last)
  More...
 
new void OnLayoutAboutToBeChanged ()
  More...
 
new void OnLayoutChanged ()
  More...
 
new void Reset ()
  More...
 
new void ResetInternalData ()
  More...
 
- Protected Member Functions inherited from QtCore.QObject
 QObject (System.Type dummy)
 
virtual void OnChildEvent (QChildEvent @event)
  More...
 
virtual void ConnectNotify (string signal)
  More...
 
virtual void OnCustomEvent (QEvent @event)
  More...
 
new void OnDestroyed (QObject obj=null)
  More...
 
virtual void DisconnectNotify (string signal)
  More...
 
new int Receivers (string signal)
  More...
 
virtual void OnTimerEvent (QTimerEvent @event)
  More...
 

Properties

QDir.Filter Filter [get, set]
  More...
 
QFileIconProvider IconProvider [get, set]
  More...
 
System.Collections.Generic.List
< string > 
NameFilters [get, set]
  More...
 
QDir.SortFlag Sorting [get, set]
  More...
 
override
System.Collections.Generic.List
< string > 
MimeTypes [get]
  More...
 
QObject parent [get]
 
override Qt.DropAction SupportedDropActions [get]
  More...
 
new bool ResolveSymlinks [get, set]
  More...
 
new bool ReadOnly [get, set]
  More...
 
new bool LazyChildCount [get, set]
  More...
 
static new QMetaObject StaticMetaObject [get]
 
new IQDirModelSignals Emit [get]
 
- Properties inherited from QtCore.QAbstractItemModel
Slot< QModelIndex, QModelIndexDataChanged
  More...
 
Slot< Qt.Orientation,
System.Int32, System.Int32 > 
HeaderDataChanged
  More...
 
Slot LayoutChanged
  More...
 
Slot LayoutAboutToBeChanged
  More...
 
Slot< QModelIndex,
System.Int32, System.Int32 > 
RowsAboutToBeInserted
  More...
 
Slot< QModelIndex,
System.Int32, System.Int32 > 
RowsInserted
  More...
 
Slot< QModelIndex,
System.Int32, System.Int32 > 
RowsAboutToBeRemoved
  More...
 
Slot< QModelIndex,
System.Int32, System.Int32 > 
RowsRemoved
  More...
 
Slot< QModelIndex,
System.Int32, System.Int32 > 
ColumnsAboutToBeInserted
  More...
 
Slot< QModelIndex,
System.Int32, System.Int32 > 
ColumnsInserted
  More...
 
Slot< QModelIndex,
System.Int32, System.Int32 > 
ColumnsAboutToBeRemoved
  More...
 
Slot< QModelIndex,
System.Int32, System.Int32 > 
ColumnsRemoved
  More...
 
Slot ModelAboutToBeReset
  More...
 
Slot ModelReset
  More...
 
Slot< QModelIndex,
System.Int32, System.Int32,
QModelIndex, System.Int32 > 
RowsAboutToBeMoved
  More...
 
Slot< QModelIndex,
System.Int32, System.Int32,
QModelIndex, System.Int32 > 
RowsMoved
  More...
 
Slot< QModelIndex,
System.Int32, System.Int32,
QModelIndex, System.Int32 > 
ColumnsAboutToBeMoved
  More...
 
Slot< QModelIndex,
System.Int32, System.Int32,
QModelIndex, System.Int32 > 
ColumnsMoved
  More...
 
System.Collections.Generic.Dictionary
< System.Int32, QByteArray
RoleNames [get, set]
  More...
 
Qt.DropAction SupportedDragActions [get, set]
  More...
 
virtual
System.Collections.Generic.List
< string > 
MimeTypes [get]
  More...
 
System.Collections.Generic.List
< QModelIndex
PersistentIndexList [get]
  More...
 
virtual Qt.DropAction SupportedDropActions [get]
  More...
 
static new QMetaObject StaticMetaObject [get]
 
new IQAbstractItemModelSignals Emit [get]
 
- Properties inherited from QtCore.QObject
virtual EventHandler
< QEventArgs< QChildEvent > > 
ChildEvent
  More...
 
virtual EventHandler
< QEventArgs< QEvent > > 
CustomEvent
  More...
 
virtual EventHandler
< QEventArgs< QEvent > > 
Event
  More...
 
virtual EventHandler
< QEventArgs< QTimerEvent > > 
TimerEvent
  More...
 
Slot< QObjectDestroyedObj
  More...
 
Slot Destroyed
  More...
 
QObject Parent [get, set]
  More...
 
System.Collections.Generic.List
< QObject
Children [get]
  More...
 
System.Collections.Generic.List
< QByteArray
DynamicPropertyNames [get]
  More...
 
bool IsWidgetType [get]
  More...
 
static uint RegisterUserData [get]
 
QObject Sender [get]
  More...
 
int SenderSignalIndex [get]
  More...
 
bool SignalsBlocked [get]
  More...
 
virtual System.IntPtr SmokeObject [get, set]
 
new string ObjectName [get, set]
  More...
 
static new QMetaObject StaticMetaObject [get]
  More...
 
static new QMetaObject StaticQtMetaObject [get]
 
new IQObjectSignals Emit [get]
 
- Properties inherited from QtCore.Qt
static string QAppName [get]
 
static double QInf [get]
 
static double QQNaN [get]
 
static double QSNaN [get]
 
static bool QSharedBuild [get]
 
static string QVersion [get]
  More...
 
static int Qrand [get]
  More...
 

Additional Inherited Members

- Static Public Attributes inherited from QtCore.Qt
</para > *< para > Creating QM
files suitable for use with
this[SmokeMethod("qtTrId(const
char*, int)")] static strin 
QtTrId )(string id, int n=-1)
 
- Protected Attributes inherited from QtCore.QObject
object Q_EMIT = null
 
SmokeInvocation interceptor
 
readonly List< QEventHandler > eventFilters = new List<QEventHandler>()
 

Detailed Description

The QDirModel class provides a data model for the local filesystem.

The usage of QDirModel is not recommended anymore. The QFileSystemModel class is a more performant alternative.

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

QDirModel keeps a cache with file information. The cache needs to be updated with refresh().

QDirModel 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() and isDir() functions provide information about the underlying files and directories related to items in the model.

Directories can be created and removed using mkdir(), rmdir(), and the model will be automatically updated to take the changes into account.

Note: QDirModel requires an instance of a GUI application.

See also nameFilters(), setFilter(), filter(), QListView, QTreeView, QFileSystemModel, Dir View Example, and Model Classes.

Member Enumeration Documentation

Enumerator
FileIconRole 
FileNameRole 
FilePathRole 

Constructor & Destructor Documentation

QtGui.QDirModel.QDirModel ( System.Type  dummy)
protected
QtGui.QDirModel.QDirModel ( QObject  parent = null)

Constructs a directory model with the given parent.

Here is the call graph for this function:

QtGui.QDirModel.QDirModel ( System.Collections.Generic.List< string >  nameFilters,
QDir.Filter  filters,
QDir.SortFlag  sort,
QObject  parent = null 
)

Constructs a new directory model with the given parent. Only those files matching the nameFilters and the filters are included in the model. The sort order is given by the sort flags.

Here is the call graph for this function:

Member Function Documentation

new int QtGui.QDirModel.ColumnCount ( )

Reimplemented from QAbstractItemModel::columnCount().

Returns the number of columns in the parent model item.

override int QtGui.QDirModel.ColumnCount ( QModelIndex  parent)

Reimplemented from QAbstractItemModel::columnCount().

Returns the number of columns in the parent model item.

override void QtGui.QDirModel.CreateProxy ( )
virtual

Reimplemented from QtCore.QAbstractItemModel.

Here is the caller graph for this function:

override object QtGui.QDirModel.Data ( QModelIndex  index,
int  role = (int) Qt.ItemDataRole.DisplayRole 
)
virtual

Reimplemented from QAbstractItemModel::data().

Returns the data for the model item index with the given role.

See also setData().

Implements QtCore.QAbstractItemModel.

new void QtGui.QDirModel.Dispose ( )
override bool QtGui.QDirModel.DropMimeData ( QMimeData  data,
Qt.DropAction  action,
int  row,
int  column,
QModelIndex  parent 
)
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.

new QIcon QtGui.QDirModel.FileIcon ( QModelIndex  index)

Returns the icons for the item stored in the model under the given index.

new QFileInfo QtGui.QDirModel.FileInfo ( QModelIndex  index)

Returns the file information for the specified model index.

Note: If the model index represents a symbolic link in the underlying filing system, the file information returned will contain information about the symbolic link itself, regardless of whether resolveSymlinks is enabled or not.

See also QFileInfo::symLinkTarget().

new string QtGui.QDirModel.FileName ( QModelIndex  index)

Returns the name of the item stored in the model under the index given.

new string QtGui.QDirModel.FilePath ( QModelIndex  index)

Returns the path of the item stored in the model under the index given.

override Qt.ItemFlag QtGui.QDirModel.Flags ( QModelIndex  index)
virtual

Reimplemented from QAbstractItemModel::flags().

Returns the item flags for the given index in the model.

See also Qt::ItemFlags.

Reimplemented from QtCore.QAbstractItemModel.

new bool QtGui.QDirModel.HasChildren ( )

Reimplemented from QAbstractItemModel::hasChildren().

Returns true if the parent model item has children; otherwise returns false.

override bool QtGui.QDirModel.HasChildren ( QModelIndex  index)
virtual

Reimplemented from QAbstractItemModel::hasChildren().

Returns true if the parent model item has children; otherwise returns false.

Reimplemented from QtCore.QAbstractItemModel.

override object QtGui.QDirModel.HeaderData ( int  section,
Qt.Orientation  orientation,
int  role = (int) Qt.ItemDataRole.DisplayRole 
)
virtual

Reimplemented from QAbstractItemModel::headerData().

Returns the data stored under the given role for the specified section of the header with the given orientation.

Reimplemented from QtCore.QAbstractItemModel.

new QModelIndex QtGui.QDirModel.Index ( string  path,
int  column = 0 
)

This is an overloaded function.

Returns the model item index for the given path.

new QModelIndex QtGui.QDirModel.Index ( int  row,
int  column 
)

Reimplemented from QAbstractItemModel::index().

Returns the model item index for the item in the parent with the given row and column.

override QModelIndex QtGui.QDirModel.Index ( int  row,
int  column,
QModelIndex  parent 
)
virtual

Reimplemented from QAbstractItemModel::index().

Returns the model item index for the item in the parent with the given row and column.

Implements QtCore.QAbstractItemModel.

new bool QtGui.QDirModel.IsDir ( QModelIndex  index)

Returns true if the model item index represents a directory; otherwise returns false.

override QMimeData QtGui.QDirModel.MimeData ( System.Collections.Generic.List< QModelIndex indexes)
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.

new QModelIndex QtGui.QDirModel.Mkdir ( QModelIndex  parent,
string  name 
)

Create a directory with the name in the parent model item.

override QModelIndex QtGui.QDirModel.Parent ( QModelIndex  child)
virtual

Reimplemented from QAbstractItemModel::parent().

Return the parent of the given child model item.

Implements QtCore.QAbstractItemModel.

new void QtGui.QDirModel.Refresh ( )

QDirModel caches file information. This function updates the cache. The parent parameter is the directory from which the model is updated; the default value will update the model from root directory of the file system (the entire model).

new void QtGui.QDirModel.Refresh ( QModelIndex  parent)

QDirModel caches file information. This function updates the cache. The parent parameter is the directory from which the model is updated; the default value will update the model from root directory of the file system (the entire model).

new bool QtGui.QDirModel.Remove ( QModelIndex  index)

Removes the model item index from the directory 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.QDirModel.Rmdir ( QModelIndex  index)

Removes the directory corresponding to the model item index in the directory 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 int QtGui.QDirModel.RowCount ( )

Reimplemented from QAbstractItemModel::rowCount().

Returns the number of rows in the parent model item.

override int QtGui.QDirModel.RowCount ( QModelIndex  parent)
virtual

Reimplemented from QAbstractItemModel::rowCount().

Returns the number of rows in the parent model item.

Implements QtCore.QAbstractItemModel.

override bool QtGui.QDirModel.SetData ( QModelIndex  index,
object  value,
int  role = (int) Qt.ItemDataRole.EditRole 
)
virtual

Reimplemented from QAbstractItemModel::setData().

Sets the data for the model item index with the given role to the data referenced by the value. Returns true if successful; otherwise returns false.

See also data() and Qt::ItemDataRole.

Reimplemented from QtCore.QAbstractItemModel.

override void QtGui.QDirModel.Sort ( int  column,
Qt.SortOrder  order = Qt.SortOrder.AscendingOrder 
)
virtual

Reimplemented from QAbstractItemModel::sort().

Sort the model items in the column using the order given. The order is a value defined in Qt::SortOrder.

Reimplemented from QtCore.QAbstractItemModel.

static string QtGui.QDirModel.Tr ( string  s,
string  c = null 
)
static
static string QtGui.QDirModel.Tr ( string  s,
string  c,
int  n 
)
static
static string QtGui.QDirModel.TrUtf8 ( string  s,
string  c = null 
)
static
static string QtGui.QDirModel.TrUtf8 ( string  s,
string  c,
int  n 
)
static

Property Documentation

new IQDirModelSignals QtGui.QDirModel.Emit
getprotected
QDir.Filter QtGui.QDirModel.Filter
getset

Returns the filter specification for the directory model.

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 QDirModel won't be able to read the directory structure.

QFileIconProvider QtGui.QDirModel.IconProvider
getset

Returns the file icon provider for this directory model.

Sets the provider of file icons for the directory model.

new bool QtGui.QDirModel.LazyChildCount
getset

This property holds whether the directory model optimizes the hasChildren function to only check if the item is a directory.

If this property is set to false, the directory model will make sure that a directory actually containes any files before reporting that it has children. Otherwise the directory model will report that an item has children if the item is a directory.

This property is false by default

override System.Collections.Generic.List<string> QtGui.QDirModel.MimeTypes
get

Reimplemented from QAbstractItemModel::mimeTypes().

Returns a list of MIME types that can be used to describe a list of items in the model.

System.Collections.Generic.List<string> QtGui.QDirModel.NameFilters
getset

Returns a list of filters applied to the names in the model.

Sets the name filters for the directory model.

QObject QtGui.QDirModel.parent
get
new bool QtGui.QDirModel.ReadOnly
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

new bool QtGui.QDirModel.ResolveSymlinks
getset

This property holds whether the directory model should resolve symbolic links.

This is only relevant on operating systems that support symbolic links.

QDir.SortFlag QtGui.QDirModel.Sorting
getset

Returns the sorting method used for the directory model.

Sets the directory model's sorting order to that specified by sort.

new QMetaObject QtGui.QDirModel.StaticMetaObject
staticget
override Qt.DropAction QtGui.QDirModel.SupportedDropActions
get

Reimplemented from QAbstractItemModel::supportedDropActions().

Returns the drop actions supported by this model.

See also Qt::DropActions.