4#ifndef QFILESYSTEMMODEL_H
5#define QFILESYSTEMMODEL_H
7#include <QtGui/qtguiglobal.h>
8#include <QtCore/qabstractitemmodel.h>
9#include <QtCore/qpair.h>
10#include <QtCore/qdir.h>
11#include <QtGui/qicon.h>
12#include <QtCore/qdiriterator.h>
18class ExtendedInformation;
25 Q_PROPERTY(
bool resolveSymlinks READ resolveSymlinks WRITE setResolveSymlinks)
26 Q_PROPERTY(
bool readOnly READ isReadOnly WRITE setReadOnly)
27 Q_PROPERTY(
bool nameFilterDisables READ nameFilterDisables WRITE setNameFilterDisables)
45 DontWatchForChanges = 0x00000001,
46 DontResolveSymlinks = 0x00000002,
47 DontUseCustomDirectoryIcons = 0x00000004
87 QDir rootDirectory()
const;
92 void setFilter(QDir::Filters
filters);
93 QDir::Filters
filter()
const;
95 void setResolveSymlinks(
bool enable);
96 bool resolveSymlinks()
const;
98 void setReadOnly(
bool enable);
99 bool isReadOnly()
const;
101 void setNameFilterDisables(
bool enable);
102 bool nameFilterDisables()
const;
109 void setOptions(
Options options);
virtual Qt::DropActions supportedDropActions() const
Q_INVOKABLE int const QModelIndex & parent
Returns the parent of the model item with the given index.
virtual Q_INVOKABLE QVariant headerData(int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Returns the data for the given role and section in the header with the specified orientation.
virtual bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
Handles the data supplied by a drag and drop operation that ended with the given action.
virtual Q_INVOKABLE bool hasChildren(const QModelIndex &parent=QModelIndex()) const
Returns {true} if parent has any children; otherwise returns {false}.
virtual Q_INVOKABLE int rowCount(const QModelIndex &parent=QModelIndex()) const =0
Returns the number of rows under the given parent.
virtual Q_INVOKABLE void fetchMore(const QModelIndex &parent)
Fetches any available data for the items with the parent specified by the parent index.
virtual Q_INVOKABLE bool canFetchMore(const QModelIndex &parent) const
Returns {true} if there is more data available for parent; otherwise returns {false}.
virtual Q_INVOKABLE bool setData(const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
Sets the role data for the item at index to value.
virtual Q_INVOKABLE QModelIndex sibling(int row, int column, const QModelIndex &idx) const
Returns the sibling at row and column for the item at index, or an invalid QModelIndex if there is no...
virtual QHash< int, QByteArray > roleNames() const
virtual Q_INVOKABLE int columnCount(const QModelIndex &parent=QModelIndex()) const =0
Returns the number of columns for the children of the given parent.
virtual QStringList mimeTypes() const
Returns the list of allowed MIME types.
\inmodule QtCore\reentrant
\inmodule QtCore \reentrant
The QFileSystemModel class provides a data model for the local filesystem.
void fileRenamed(const QString &path, const QString &oldName, const QString &newName)
This signal is emitted whenever a file with the oldName is successfully renamed to newName.
QIcon fileIcon(const QModelIndex &index) const
Returns the icon for the item stored in the model under the given index.
void rootPathChanged(const QString &newPath)
This signal is emitted whenever the root path has been changed to a newPath.
~QFileSystemModel()
Destroys this file system model.
Roles
\value FileIconRole \value FilePathRole \value FileNameRole \value FilePermissions
void directoryLoaded(const QString &path)
The QIcon class provides scalable icons in different modes and states.
QVariant data(int role=Qt::DisplayRole) const
Returns the data for the given role for the item referred to by the index.
QObject * parent() const
Returns a pointer to the parent object.
virtual void timerEvent(QTimerEvent *event)
This event handler can be reimplemented in a subclass to receive timer events for the object.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Combined button and popup list for selecting options.
std::pair< T1, T2 > QPair
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
#define Q_DECLARE_FLAGS(Flags, Enum)
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLenum GLsizei void GLsizei void * column
GLsizei const GLchar *const * path
GLenum GLenum GLsizei void * row
GLfixed GLfixed GLint GLint order
#define QT_REQUIRE_CONFIG(feature)
settings remove("monkey")
dialog setNameFilters(filters)
const QStringList filters({"Image files (*.png *.xpm *.jpg)", "Text files (*.txt)", "Any files (*)" })
[6]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent