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) | |
void | setSortFoldersFirst (bool foldersFirst) |
bool | sortFoldersFirst () const |
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
Don't use it with non-KDirModel derivatives.
Definition at line 50 of file kdirsortfilterproxymodel.h.
Constructor & Destructor Documentation
KDirSortFilterProxyModel::KDirSortFilterProxyModel | ( | QObject * | parent = 0 |
) |
Definition at line 43 of file kdirsortfilterproxymodel.cpp.
KDirSortFilterProxyModel::~KDirSortFilterProxyModel | ( | ) | [virtual] |
Definition at line 55 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 66 of file kdirsortfilterproxymodel.cpp.
bool KDirSortFilterProxyModel::hasChildren | ( | const QModelIndex & | parent = QModelIndex() |
) | const [virtual] |
Reimplemented from QAbstractItemModel.
Returns true for directories.
Definition at line 60 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 72 of file kdirsortfilterproxymodel.cpp.
void KDirSortFilterProxyModel::setSortFoldersFirst | ( | bool | foldersFirst | ) |
Choose if files and folders are sorted separately (with folders first) or not.
- Since:
- 4.3
Definition at line 93 of file kdirsortfilterproxymodel.cpp.
bool KDirSortFilterProxyModel::sortFoldersFirst | ( | ) | const |
Returns if files and folders are sorted separately (with folders first) or not.
- Since:
- 4.3
Definition at line 98 of file kdirsortfilterproxymodel.cpp.
bool KDirSortFilterProxyModel::subSortLessThan | ( | const QModelIndex & | left, | |
const QModelIndex & | right | |||
) | const [protected, virtual] |
Reimplemented from KCategorizedSortFilterProxyModel.
Reimplemented from KCategorizedSortFilterProxyModel.
Definition at line 103 of file kdirsortfilterproxymodel.cpp.
The documentation for this class was generated from the following files: