Public Types | Signals | Public Member Functions | Protected Member Functions | Properties

QFileSystemModel Class Reference

Search for all occurrences

Detailed Description

Definition at line 63 of file qfilesystemmodel.h.

#include <qfilesystemmodel.h>

Inheritance diagram for QFileSystemModel:
Inheritance graph
[legend]

List of all members.

Public Types

enum   Roles { FileIconRole = Qt::DecorationRole, FilePathRole = Qt::UserRole + 1, FileNameRole = Qt::UserRole + 2, FilePermissions = Qt::UserRole + 3 }

Signals

void  rootPathChanged (const QString &newPath)
void  fileRenamed (const QString &path, const QString &oldName, const QString &newName)
void  directoryLoaded (const QString &path)

Public Member Functions

  QFileSystemModel (QObject *parent=0)
  ~QFileSystemModel ()
QModelIndex  index (int row, int column, const QModelIndex &parent=QModelIndex()) const
QModelIndex  index (const QString &path, int column=0) const
QModelIndex  parent (const QModelIndex &child) const
bool  hasChildren (const QModelIndex &parent=QModelIndex()) const
bool  canFetchMore (const QModelIndex &parent) const
void  fetchMore (const QModelIndex &parent)
int  rowCount (const QModelIndex &parent=QModelIndex()) const
int  columnCount (const QModelIndex &parent=QModelIndex()) const
QVariant  myComputer (int role=Qt::DisplayRole) const
QVariant  data (const QModelIndex &index, int role=Qt::DisplayRole) const
bool  setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
QVariant  headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
Qt::ItemFlags  flags (const QModelIndex &index) const
void  sort (int column, Qt::SortOrder order=Qt::AscendingOrder)
QStringList  mimeTypes () const
QMimeData mimeData (const QModelIndexList &indexes) const
bool  dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
Qt::DropActions  supportedDropActions () const
QModelIndex  setRootPath (const QString &path)
QString  rootPath () const
QDir  rootDirectory () const
void  setIconProvider (QFileIconProvider *provider)
QFileIconProvider iconProvider () const
void  setFilter (QDir::Filters filters)
QDir::Filters  filter () const
void  setResolveSymlinks (bool enable)
bool  resolveSymlinks () const
void  setReadOnly (bool enable)
bool  isReadOnly () const
void  setNameFilterDisables (bool enable)
bool  nameFilterDisables () const
void  setNameFilters (const QStringList &filters)
QStringList  nameFilters () const
QString  filePath (const QModelIndex &index) const
bool  isDir (const QModelIndex &index) const
qint64  size (const QModelIndex &index) const
QString  type (const QModelIndex &index) const
QDateTime  lastModified (const QModelIndex &index) const
QModelIndex  mkdir (const QModelIndex &parent, const QString &name)
bool  rmdir (const QModelIndex &index) const
QString  fileName (const QModelIndex &index) const
QIcon  fileIcon (const QModelIndex &index) const
QFile::Permissions  permissions (const QModelIndex &index) const
QFileInfo  fileInfo (const QModelIndex &index) const
bool  remove (const QModelIndex &index) const

Protected Member Functions

  QFileSystemModel (QFileSystemModelPrivate &, QObject *parent=0)
void  timerEvent (QTimerEvent *event)
bool  event (QEvent *event)

Properties

bool  resolveSymlinks
bool  readOnly
bool  nameFilterDisables

Member Enumeration Documentation

enum Roles

Constructor & Destructor Documentation

QFileSystemModel ( QObject parent = 0 ) [explicit]
QFileSystemModel ( QFileSystemModelPrivate &  ,
QObject parent = 0 
) [protected]

Member Function Documentation

void rootPathChanged ( const QString newPath ) [signal]
void fileRenamed ( const QString path,
const QString oldName,
const QString newName 
) [signal]
void directoryLoaded ( const QString path ) [signal]
QModelIndex index ( int  row,
int  column,
const QModelIndex parent = QModelIndex() 
) const [virtual]
QModelIndex index ( const QString path,
int  column = 0 
) const
QModelIndex parent ( const QModelIndex child ) const [virtual]
bool hasChildren ( const QModelIndex parent = QModelIndex() ) const [virtual]
bool canFetchMore ( const QModelIndex parent ) const [virtual]
void fetchMore ( const QModelIndex parent ) [virtual]
int rowCount ( const QModelIndex parent = QModelIndex() ) const [virtual]
int columnCount ( const QModelIndex parent = QModelIndex() ) const [virtual]
QVariant myComputer ( int  role = Qt::DisplayRole ) const
QVariant data ( const QModelIndex index,
int  role = Qt::DisplayRole 
) const [virtual]
bool setData ( const QModelIndex index,
const QVariant value,
int  role = Qt::EditRole 
) [virtual]
QVariant headerData ( int  section,
Qt::Orientation  orientation,
int  role = Qt::DisplayRole 
) const [virtual]
Qt::ItemFlags flags ( const QModelIndex index ) const [virtual]
void sort ( int  column,
Qt::SortOrder  order = Qt::AscendingOrder 
) [virtual]
QStringList mimeTypes ( ) const [virtual]
QMimeData* mimeData ( const QModelIndexList indexes ) const [virtual]
bool dropMimeData ( const QMimeData data,
Qt::DropAction  action,
int  row,
int  column,
const QModelIndex parent 
) [virtual]
Qt::DropActions supportedDropActions ( ) const [virtual]
QModelIndex setRootPath ( const QString path )
QString rootPath ( ) const
QDir rootDirectory ( ) const
void setIconProvider ( QFileIconProvider provider )
QFileIconProvider* iconProvider ( ) const
void setFilter ( QDir::Filters  filters )
QDir::Filters filter ( ) const
void setResolveSymlinks ( bool  enable )
bool resolveSymlinks ( ) const
void setReadOnly ( bool  enable )
bool isReadOnly ( ) const
void setNameFilterDisables ( bool  enable )
bool nameFilterDisables ( ) const
void setNameFilters ( const QStringList filters )
QStringList nameFilters ( ) const
QString filePath ( const QModelIndex index ) const
bool isDir ( const QModelIndex index ) const
qint64 size ( const QModelIndex index ) const
QString type ( const QModelIndex index ) const
QDateTime lastModified ( const QModelIndex index ) const
QModelIndex mkdir ( const QModelIndex parent,
const QString name 
)
bool rmdir ( const QModelIndex index ) const [inline]

Definition at line 166 of file qfilesystemmodel.h.

{ QDir dir; return dir.rmdir(filePath(aindex)); }
QString fileName ( const QModelIndex index ) const [inline]

Definition at line 168 of file qfilesystemmodel.h.

{ return aindex.data(Qt::DisplayRole).toString(); }
QIcon fileIcon ( const QModelIndex index ) const [inline]

Definition at line 170 of file qfilesystemmodel.h.

{ return qvariant_cast<QIcon>(aindex.data(Qt::DecorationRole)); }
QFile::Permissions permissions ( const QModelIndex index ) const
QFileInfo fileInfo ( const QModelIndex index ) const [inline]

Definition at line 172 of file qfilesystemmodel.h.

{ return QFileInfo(filePath(aindex)); }
bool remove ( const QModelIndex index ) const
void timerEvent ( QTimerEvent event ) [protected, virtual]

Reimplemented from QObject.

bool event ( QEvent event ) [protected, virtual]

Reimplemented from QObject.


Property Documentation

bool resolveSymlinks [read, write]

Definition at line 66 of file qfilesystemmodel.h.

bool readOnly [read, write]

Definition at line 67 of file qfilesystemmodel.h.

bool nameFilterDisables [read, write]

Definition at line 68 of file qfilesystemmodel.h.


The documentation for this class was generated from the following file:

QFileSystemModel QFileSystemModel QFileSystemModel QFileSystemModel QFileSystemModel QFileSystemModel QFileSystemModel QFileSystemModel QFileSystemModel QFileSystemModel
QFileSystemModel QFileSystemModel QFileSystemModel QFileSystemModel QFileSystemModel QFileSystemModel QFileSystemModel QFileSystemModel QFileSystemModel QFileSystemModel