- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Slots | Public Member Functions | Protected Member Functions | Properties | Friends

# QDirModel Class Reference

Search for all occurrences

## Detailed Description

Definition at line 59 of file qdirmodel.h.

`#include <qdirmodel.h>`

Inheritance diagram for QDirModel:
[legend]

List of all members.

## Public Types
enum | Roles { FileIconRole = Qt::DecorationRole, FilePathRole = Qt::UserRole + 1, FileNameRole }
## Public Slots
void | refresh (const QModelIndex &parent=QModelIndex())
## Public Member Functions
| QDirModel (const QStringList &nameFilters, QDir::Filters filters, QDir::SortFlags sort, QObject *parent=0)
| QDirModel (QObject *parent=0)
| ~QDirModel ()
QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const
QModelIndex | parent (const QModelIndex &child) const
int | rowCount (const QModelIndex &parent=QModelIndex()) const
int | columnCount (const QModelIndex &parent=QModelIndex()) 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
bool | hasChildren (const QModelIndex &index=QModelIndex()) 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
void | setIconProvider (QFileIconProvider *provider)
QFileIconProvider * | iconProvider () const
void | setNameFilters (const QStringList &filters)
QStringList | nameFilters () const
void | setFilter (QDir::Filters filters)
QDir::Filters | filter () const
void | setSorting (QDir::SortFlags sort)
QDir::SortFlags | sorting () const
void | setResolveSymlinks (bool enable)
bool | resolveSymlinks () const
void | setReadOnly (bool enable)
bool | isReadOnly () const
void | setLazyChildCount (bool enable)
bool | lazyChildCount () const
QModelIndex | index (const QString &path, int column=0) const
bool | isDir (const QModelIndex &index) const
QModelIndex | mkdir (const QModelIndex &parent, const QString &name)
bool | rmdir (const QModelIndex &index)
bool | remove (const QModelIndex &index)
QString | filePath (const QModelIndex &index) const
QString | fileName (const QModelIndex &index) const
QIcon | fileIcon (const QModelIndex &index) const
QFileInfo | fileInfo (const QModelIndex &index) const
## Protected Member Functions
| QDirModel (QDirModelPrivate &, QObject *parent=0)
## Properties
bool | resolveSymlinks
bool | readOnly
bool | lazyChildCount
## Friends
class | QFileDialogPrivate

## Member Enumeration Documentation

enum Roles

Search for all occurrences

Enumerator:

  FileIconRole | Search for all occurrences
  FilePathRole | Search for all occurrences
  FileNameRole | Search for all occurrences

Definition at line 67 of file qdirmodel.h.

                   {
            FileIconRole = Qt::DecorationRole,
            FilePathRole = Qt::UserRole + 1,
            FileNameRole
        };

## Constructor & Destructor Documentation

QDirModel | ( | const QStringList & | nameFilters,
|  | QDir::Filters | filters,
|  | QDir::SortFlags | sort,
|  | QObject * | parent = `0`
| ) |  |

QDirModel | ( | QObject * | parent = `0` | ) | `[explicit]`

~QDirModel | ( |  | ) |

QDirModel | ( | QDirModelPrivate & | ,
|  | QObject * | parent = `0`
| ) |  | `[protected]`

## Member Function Documentation

QModelIndex index | ( | int | row,
|  | int | column,
|  | const QModelIndex & | parent = `QModelIndex()`
| ) |  | const `[virtual]`

Search for all occurrences

Implements QAbstractItemModel.

QModelIndex parent | ( | const QModelIndex & | child | ) | const `[virtual]`

Search for all occurrences

Implements QAbstractItemModel.

int rowCount | ( | const QModelIndex & | parent = `QModelIndex()` | ) | const `[virtual]`

Search for all occurrences

Implements QAbstractItemModel.

int columnCount | ( | const QModelIndex & | parent = `QModelIndex()` | ) | const `[virtual]`

Search for all occurrences

Implements QAbstractItemModel.

QVariant data | ( | const QModelIndex & | index,
|  | int | role = `Qt::DisplayRole`
| ) |  | const `[virtual]`

Search for all occurrences

Implements QAbstractItemModel.

bool setData | ( | const QModelIndex & | index,
|  | const QVariant & | value,
|  | int | role = `Qt::EditRole`
| ) |  | `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

QVariant headerData | ( | int | section,
|  | Qt::Orientation | orientation,
|  | int | role = `Qt::DisplayRole`
| ) |  | const `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

bool hasChildren | ( | const QModelIndex & | index = `QModelIndex()` | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

Qt::ItemFlags flags | ( | const QModelIndex & | index | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

void sort | ( | int | column,
|  | Qt::SortOrder | order = `Qt::AscendingOrder`
| ) |  | `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

QStringList mimeTypes | ( |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

QMimeData* mimeData | ( | const QModelIndexList & | indexes | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

bool dropMimeData | ( | const QMimeData * | data,
|  | Qt::DropAction | action,
|  | int | row,
|  | int | column,
|  | const QModelIndex & | parent
| ) |  | `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

Qt::DropActions supportedDropActions | ( |  | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

void setIconProvider | ( | QFileIconProvider * | provider | ) |

Search for all occurrences

QFileIconProvider* iconProvider | ( |  | ) | const

Search for all occurrences

void setNameFilters | ( | const QStringList & | filters | ) |

Search for all occurrences

QStringList nameFilters | ( |  | ) | const

Search for all occurrences

void setFilter | ( | QDir::Filters | filters | ) |

Search for all occurrences

QDir::Filters filter | ( |  | ) | const

Search for all occurrences

void setSorting | ( | QDir::SortFlags | sort | ) |

Search for all occurrences

QDir::SortFlags sorting | ( |  | ) | const

Search for all occurrences

void setResolveSymlinks | ( | bool | enable | ) |

Search for all occurrences

bool resolveSymlinks | ( |  | ) | const

Search for all occurrences

void setReadOnly | ( | bool | enable | ) |

Search for all occurrences

bool isReadOnly | ( |  | ) | const

Search for all occurrences

void setLazyChildCount | ( | bool | enable | ) |

Search for all occurrences

bool lazyChildCount | ( |  | ) | const

Search for all occurrences

QModelIndex index | ( | const QString & | path,
|  | int | column = `0`
| ) |  | const

Search for all occurrences

bool isDir | ( | const QModelIndex & | index | ) | const

Search for all occurrences

QModelIndex mkdir | ( | const QModelIndex & | parent,
|  | const QString & | name
| ) |  |

Search for all occurrences

bool rmdir | ( | const QModelIndex & | index | ) |

Search for all occurrences

bool remove | ( | const QModelIndex & | index | ) |

Search for all occurrences

QString filePath | ( | const QModelIndex & | index | ) | const

Search for all occurrences

QString fileName | ( | const QModelIndex & | index | ) | const

Search for all occurrences

QIcon fileIcon | ( | const QModelIndex & | index | ) | const

Search for all occurrences

QFileInfo fileInfo | ( | const QModelIndex & | index | ) | const

Search for all occurrences

void refresh | ( | const QModelIndex & | parent = `QModelIndex()` | ) | `[slot]`

Search for all occurrences

## Friends And Related Function Documentation

friend class QFileDialogPrivate `[friend]`

Search for all occurrences

Definition at line 146 of file qdirmodel.h.

## Property Documentation

bool resolveSymlinks `[read, write]`

Search for all occurrences

Definition at line 62 of file qdirmodel.h.

bool readOnly `[read, write]`

Search for all occurrences

Definition at line 63 of file qdirmodel.h.

bool lazyChildCount `[read, write]`

Search for all occurrences

Definition at line 64 of file qdirmodel.h.

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

- QtGui/qdirmodel.h

QDirModel QDirModel QDirModel QDirModel QDirModel QDirModel QDirModel QDirModel QDirModel QDirModel
QDirModel QDirModel QDirModel QDirModel QDirModel QDirModel QDirModel QDirModel QDirModel QDirModel