KFile
KDirSortFilterProxyModel Class Reference
Acts as proxy model for KDirModel to sort and filter KFileItems. More...
#include <kdirsortfilterproxymodel.h>

Public Member Functions | |
virtual bool | canFetchMore (const QModelIndex &parent) const |
virtual bool | hasChildren (const QModelIndex &parent=QModelIndex()) const |
KDirSortFilterProxyModel (QObject *parent=0) | |
virtual | ~KDirSortFilterProxyModel () |
Static Public Member Functions | |
static int | pointsForPermissions (const QFileInfo &info) |
Protected Member Functions | |
virtual bool | subSortLessThan (const QModelIndex &left, const QModelIndex &right) const |
Detailed Description
Acts as proxy model for KDirModel to sort and filter KFileItems.A natural sorting is done. This means that items like:
- item_10.png
- item_1.png
- item_2.png
are sorted like
- item_1.png
- item_2.png
- item_10.png
It is assured that directories are always sorted before files. Don't use it with non-KDirModel derivatives.
Definition at line 51 of file kdirsortfilterproxymodel.h.
Constructor & Destructor Documentation
KDirSortFilterProxyModel::KDirSortFilterProxyModel | ( | QObject * | parent = 0 |
) |
Definition at line 35 of file kdirsortfilterproxymodel.cpp.
KDirSortFilterProxyModel::~KDirSortFilterProxyModel | ( | ) | [virtual] |
Definition at line 47 of file kdirsortfilterproxymodel.cpp.
Member Function Documentation
bool KDirSortFilterProxyModel::canFetchMore | ( | const QModelIndex & | parent | ) | const [virtual] |
Reimplemented from QAbstractItemModel.
Returns true for 'empty' directories so they can be populated later.
Definition at line 57 of file kdirsortfilterproxymodel.cpp.
bool KDirSortFilterProxyModel::hasChildren | ( | const QModelIndex & | parent = QModelIndex() |
) | const [virtual] |
Reimplemented from QAbstractItemModel.
Returns true for directories.
Definition at line 51 of file kdirsortfilterproxymodel.cpp.
int KDirSortFilterProxyModel::pointsForPermissions | ( | const QFileInfo & | info | ) | [static] |
Returns the permissions in "points".
This is useful for sorting by permissions.
Definition at line 63 of file kdirsortfilterproxymodel.cpp.
bool KDirSortFilterProxyModel::subSortLessThan | ( | const QModelIndex & | left, | |
const QModelIndex & | right | |||
) | const [protected, virtual] |
Reimplemented from KCategorizedSortFilterProxyModel.
Definition at line 84 of file kdirsortfilterproxymodel.cpp.
The documentation for this class was generated from the following files: