# class KDirSortFilterProxyModel

###

Module | kio
Namespace |
Class | KDirSortFilterProxyModel
Inherits | KCategorizedSortFilterProxyModel

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.

Author Dominic Battre, Martin Pool and Peter Penz

### methods

- KDirSortFilterProxyModel (parent)

  returns ctor

  Argument | Type | Default
  --- | --- | ---
  parent | QObject | 0

- canFetchMore (parent)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  parent | QModelIndex |

  Reimplemented from QAbstractItemModel. Returns true for 'empty' directories so they can be populated later.

- hasChildren (parent)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  parent | QModelIndex | QModelIndex()

  Reimplemented from QAbstractItemModel. Returns true for directories.

- pointsForPermissions (info)

  returns int
  static

  Argument | Type | Default
  --- | --- | ---
  info | QFileInfo |

  Returns the permissions in "points". This is useful for sorting by permissions.

- subSortLessThan (left, right)

  returns bool

  Argument | Type | Default
  --- | --- | ---
  left | QModelIndex |
  right | QModelIndex |

  Reimplemented from KCategorizedSortFilterProxyModel.