KDirSortFilterProxyModel Class Reference
from PyKDE4.kio import *
Inherits: KCategorizedSortFilterProxyModel → QSortFilterProxyModel → QAbstractProxyModel → QAbstractItemModel → QObject
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.
Methods | |
__init__ (self, QObject parent=0) | |
bool | canFetchMore (self, QModelIndex parent) |
bool | hasChildren (self, QModelIndex parent=QModelIndex()) |
bool | subSortLessThan (self, QModelIndex left, QModelIndex right) |
Static Methods | |
int | pointsForPermissions (QFileInfo info) |
Method Documentation
__init__ | ( | self, | ||
QObject | parent=0 | |||
) |
bool canFetchMore | ( | self, | ||
QModelIndex | parent | |||
) |
Reimplemented from QAbstractItemModel. Returns true for 'empty' directories so they can be populated later.
bool hasChildren | ( | self, | ||
QModelIndex | parent=QModelIndex() | |||
) |
Reimplemented from QAbstractItemModel. Returns true for directories.
int pointsForPermissions | ( | QFileInfo | info | |
) |
Returns the permissions in "points". This is useful for sorting by permissions.
bool subSortLessThan | ( | self, | ||
QModelIndex | left, | |||
QModelIndex | right | |||
) |
Reimplemented from KCategorizedSortFilterProxyModel.