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

- Class List
- Class Hierarchy
- Class Members

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

# QSortFilterProxyModel Class Reference

Search for all occurrences

## Detailed Description

Definition at line 61 of file qsortfilterproxymodel.h.

`#include <qsortfilterproxymodel.h>`

Inheritance diagram for QSortFilterProxyModel:
[legend]

List of all members.

## Public Slots
void | setFilterRegExp (const QString &pattern)
void | setFilterWildcard (const QString &pattern)
void | setFilterFixedString (const QString &pattern)
void | clear ()
void | invalidate ()
## Public Member Functions
| QSortFilterProxyModel (QObject *parent=0)
| ~QSortFilterProxyModel ()
void | setSourceModel (QAbstractItemModel *sourceModel)
QModelIndex | mapToSource (const QModelIndex &proxyIndex) const
QModelIndex | mapFromSource (const QModelIndex &sourceIndex) const
QItemSelection | mapSelectionToSource (const QItemSelection &proxySelection) const
QItemSelection | mapSelectionFromSource (const QItemSelection &sourceSelection) const
QRegExp | filterRegExp () const
void | setFilterRegExp (const QRegExp &regExp)
int | filterKeyColumn () const
void | setFilterKeyColumn (int column)
Qt::CaseSensitivity | filterCaseSensitivity () const
void | setFilterCaseSensitivity (Qt::CaseSensitivity cs)
Qt::CaseSensitivity | sortCaseSensitivity () const
void | setSortCaseSensitivity (Qt::CaseSensitivity cs)
bool | isSortLocaleAware () const
void | setSortLocaleAware (bool on)
int | sortColumn () const
Qt::SortOrder | sortOrder () const
bool | dynamicSortFilter () const
void | setDynamicSortFilter (bool enable)
int | sortRole () const
void | setSortRole (int role)
int | filterRole () const
void | setFilterRole (int role)
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
bool | hasChildren (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 | setHeaderData (int section, Qt::Orientation orientation, const QVariant &value, int role=Qt::EditRole)
QMimeData * | mimeData (const QModelIndexList &indexes) const
bool | dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
bool | insertRows (int row, int count, const QModelIndex &parent=QModelIndex())
bool | insertColumns (int column, int count, const QModelIndex &parent=QModelIndex())
bool | removeRows (int row, int count, const QModelIndex &parent=QModelIndex())
bool | removeColumns (int column, int count, const QModelIndex &parent=QModelIndex())
void | fetchMore (const QModelIndex &parent)
bool | canFetchMore (const QModelIndex &parent) const
Qt::ItemFlags | flags (const QModelIndex &index) const
QModelIndex | buddy (const QModelIndex &index) const
QModelIndexList | match (const QModelIndex &start, int role, const QVariant &value, int hits=1, Qt::MatchFlags flags=Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap)) const
QSize | span (const QModelIndex &index) const
void | sort (int column, Qt::SortOrder order=Qt::AscendingOrder)
QStringList | mimeTypes () const
Qt::DropActions | supportedDropActions () const
## Protected Member Functions
virtual bool | filterAcceptsRow (int source_row, const QModelIndex &source_parent) const
virtual bool | filterAcceptsColumn (int source_column, const QModelIndex &source_parent) const
virtual bool | lessThan (const QModelIndex &left, const QModelIndex &right) const
void | filterChanged ()
void | invalidateFilter ()
## Properties
QRegExp | filterRegExp
int | filterKeyColumn
bool | dynamicSortFilter
Qt::CaseSensitivity | filterCaseSensitivity
Qt::CaseSensitivity | sortCaseSensitivity
bool | isSortLocaleAware
int | sortRole
int | filterRole
## Friends
class | QSortFilterProxyModelLessThan
class | QSortFilterProxyModelGreaterThan

## Constructor & Destructor Documentation

QSortFilterProxyModel | ( | QObject * | parent = `0` | ) |

~QSortFilterProxyModel | ( |  | ) |

## Member Function Documentation

void setSourceModel | ( | QAbstractItemModel * | sourceModel | ) | `[virtual]`

Search for all occurrences

Reimplemented from QAbstractProxyModel.

QModelIndex mapToSource | ( | const QModelIndex & | proxyIndex | ) | const `[virtual]`

Search for all occurrences

Implements QAbstractProxyModel.

QModelIndex mapFromSource | ( | const QModelIndex & | sourceIndex | ) | const `[virtual]`

Search for all occurrences

Implements QAbstractProxyModel.

QItemSelection mapSelectionToSource | ( | const QItemSelection & | proxySelection | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QAbstractProxyModel.

QItemSelection mapSelectionFromSource | ( | const QItemSelection & | sourceSelection | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QAbstractProxyModel.

QRegExp filterRegExp | ( |  | ) | const

Search for all occurrences

void setFilterRegExp | ( | const QRegExp & | regExp | ) |

Search for all occurrences

int filterKeyColumn | ( |  | ) | const

Search for all occurrences

void setFilterKeyColumn | ( | int | column | ) |

Search for all occurrences

Qt::CaseSensitivity filterCaseSensitivity | ( |  | ) | const

Search for all occurrences

void setFilterCaseSensitivity | ( | Qt::CaseSensitivity | cs | ) |

Search for all occurrences

Qt::CaseSensitivity sortCaseSensitivity | ( |  | ) | const

Search for all occurrences

void setSortCaseSensitivity | ( | Qt::CaseSensitivity | cs | ) |

Search for all occurrences

bool isSortLocaleAware | ( |  | ) | const

Search for all occurrences

void setSortLocaleAware | ( | bool | on | ) |

Search for all occurrences

int sortColumn | ( |  | ) | const

Search for all occurrences

Qt::SortOrder sortOrder | ( |  | ) | const

Search for all occurrences

bool dynamicSortFilter | ( |  | ) | const

Search for all occurrences

void setDynamicSortFilter | ( | bool | enable | ) |

Search for all occurrences

int sortRole | ( |  | ) | const

Search for all occurrences

void setSortRole | ( | int | role | ) |

Search for all occurrences

int filterRole | ( |  | ) | const

Search for all occurrences

void setFilterRole | ( | int | role | ) |

Search for all occurrences

void setFilterRegExp | ( | const QString & | pattern | ) | `[slot]`

Search for all occurrences

void setFilterWildcard | ( | const QString & | pattern | ) | `[slot]`

Search for all occurrences

void setFilterFixedString | ( | const QString & | pattern | ) | `[slot]`

Search for all occurrences

void clear | ( |  | ) | `[slot]`

Search for all occurrences

void invalidate | ( |  | ) | `[slot]`

Search for all occurrences

virtual bool filterAcceptsRow | ( | int | source_row,
|  | const QModelIndex & | source_parent
| ) |  | const `[protected, virtual]`

Search for all occurrences

virtual bool filterAcceptsColumn | ( | int | source_column,
|  | const QModelIndex & | source_parent
| ) |  | const `[protected, virtual]`

Search for all occurrences

virtual bool lessThan | ( | const QModelIndex & | left,
|  | const QModelIndex & | right
| ) |  | const `[protected, virtual]`

Search for all occurrences

void filterChanged | ( |  | ) | `[protected]`

Search for all occurrences

void invalidateFilter | ( |  | ) | `[protected]`

Search for all occurrences

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.

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

Search for all occurrences

Reimplemented from QAbstractItemModel.

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

Search for all occurrences

Reimplemented from QAbstractProxyModel.

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

Search for all occurrences

Reimplemented from QAbstractProxyModel.

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

Search for all occurrences

Reimplemented from QAbstractProxyModel.

bool setHeaderData | ( | int | section,
|  | Qt::Orientation | orientation,
|  | const QVariant & | value,
|  | int | role = `Qt::EditRole`
| ) |  | `[virtual]`

Search for all occurrences

Reimplemented from QAbstractProxyModel.

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.

bool insertRows | ( | int | row,
|  | int | count,
|  | const QModelIndex & | parent = `QModelIndex()`
| ) |  | `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

bool insertColumns | ( | int | column,
|  | int | count,
|  | const QModelIndex & | parent = `QModelIndex()`
| ) |  | `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

bool removeRows | ( | int | row,
|  | int | count,
|  | const QModelIndex & | parent = `QModelIndex()`
| ) |  | `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

bool removeColumns | ( | int | column,
|  | int | count,
|  | const QModelIndex & | parent = `QModelIndex()`
| ) |  | `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

void fetchMore | ( | const QModelIndex & | parent | ) | `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

bool canFetchMore | ( | const QModelIndex & | parent | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

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

Search for all occurrences

Reimplemented from QAbstractProxyModel.

QModelIndex buddy | ( | const QModelIndex & | index | ) | const `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

QModelIndexList match | ( | const QModelIndex & | start,
|  | int | role,
|  | const QVariant & | value,
|  | int | hits = `1`,
|  | Qt::MatchFlags | flags = `Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap)`
| ) |  | const `[virtual]`

Search for all occurrences

Reimplemented from QAbstractItemModel.

QSize span | ( | 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.

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

Search for all occurrences

Reimplemented from QAbstractItemModel.

## Friends And Related Function Documentation

friend class QSortFilterProxyModelLessThan `[friend]`

Search for all occurrences

Definition at line 63 of file qsortfilterproxymodel.h.

friend class QSortFilterProxyModelGreaterThan `[friend]`

Search for all occurrences

Definition at line 64 of file qsortfilterproxymodel.h.

## Property Documentation

QRegExp filterRegExp `[read, write]`

Search for all occurrences

Definition at line 67 of file qsortfilterproxymodel.h.

int filterKeyColumn `[read, write]`

Search for all occurrences

Definition at line 68 of file qsortfilterproxymodel.h.

bool dynamicSortFilter `[read, write]`

Search for all occurrences

Definition at line 69 of file qsortfilterproxymodel.h.

Qt::CaseSensitivity filterCaseSensitivity `[read, write]`

Search for all occurrences

Definition at line 70 of file qsortfilterproxymodel.h.

Qt::CaseSensitivity sortCaseSensitivity `[read, write]`

Search for all occurrences

Definition at line 71 of file qsortfilterproxymodel.h.

bool isSortLocaleAware `[read, write]`

Search for all occurrences

Definition at line 72 of file qsortfilterproxymodel.h.

int sortRole `[read, write]`

Search for all occurrences

Definition at line 73 of file qsortfilterproxymodel.h.

int filterRole `[read, write]`

Search for all occurrences

Definition at line 74 of file qsortfilterproxymodel.h.

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

- QtGui/qsortfilterproxymodel.h

QSortFilterProxyModel QSortFilterProxyModel QSortFilterProxyModel QSortFilterProxyModel QSortFilterProxyModel QSortFilterProxyModel QSortFilterProxyModel QSortFilterProxyModel QSortFilterProxyModel QSortFilterProxyModel
QSortFilterProxyModel QSortFilterProxyModel QSortFilterProxyModel QSortFilterProxyModel QSortFilterProxyModel QSortFilterProxyModel QSortFilterProxyModel QSortFilterProxyModel QSortFilterProxyModel QSortFilterProxyModel