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
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()) |
setSortFoldersFirst (self, bool foldersFirst) | |
bool | sortFoldersFirst (self) |
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.
setSortFoldersFirst | ( | self, | ||
bool | foldersFirst | |||
) |
Choose if files and folders are sorted separately (with folders first) or not.
- Since:
- 4.3
bool sortFoldersFirst | ( | self ) |
Returns if files and folders are sorted separately (with folders first) or not.
- Since:
- 4.3
bool subSortLessThan | ( | self, | ||
QModelIndex | left, | |||
QModelIndex | right | |||
) |
Reimplemented from KCategorizedSortFilterProxyModel.