#include <TreeSortFilter.h>
Public Member Functions | |
| TreeSortFilter (QObject *parent) | |
Protected Member Functions | |
| virtual bool | filterAcceptsRow (int sourceRow, const QModelIndex &sourceParent) const |
| virtual bool | lessThan (const QModelIndex &left, const QModelIndex &right) const |
Features:
myFile-10 is sorted after myFile-9.
TreeSortFilter in action on a QTreeView.
Definition at line 36 of file TreeSortFilter.h.
| TreeSortFilter::TreeSortFilter | ( | QObject * | parent | ) |
Creates a TreeSortFilter.
| parent | the parent. Must not be null. |
Definition at line 21 of file TreeSortFilter.cpp.
| bool TreeSortFilter::filterAcceptsRow | ( | int | sourceRow, | |
| const QModelIndex & | sourceParent | |||
| ) | const [protected, virtual] |
Overriden to implement filtering.
Definition at line 68 of file TreeSortFilter.cpp.
| bool TreeSortFilter::lessThan | ( | const QModelIndex & | left, | |
| const QModelIndex & | right | |||
| ) | const [protected, virtual] |
Compares left and right. They are treated as QStrings.
Definition at line 26 of file TreeSortFilter.cpp.
1.5.1