KFile
kdirsortfilterproxymodel.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef KDIRSORTFILTERPROXYMODEL_H
00024 #define KDIRSORTFILTERPROXYMODEL_H
00025
00026 #include <QtCore/QFileInfo>
00027
00028 #include <kcategorizedsortfilterproxymodel.h>
00029
00030 #include <kfile_export.h>
00031
00050 class KFILE_EXPORT KDirSortFilterProxyModel
00051 : public KCategorizedSortFilterProxyModel
00052 {
00053 public:
00054 KDirSortFilterProxyModel(QObject* parent = 0);
00055 virtual ~KDirSortFilterProxyModel();
00056
00058 virtual bool hasChildren(const QModelIndex& parent = QModelIndex()) const;
00059
00064 virtual bool canFetchMore(const QModelIndex& parent) const;
00065
00070 static int pointsForPermissions(const QFileInfo &info);
00071
00076 void setSortFoldersFirst(bool foldersFirst);
00077
00082 bool sortFoldersFirst() const;
00083
00084 protected:
00088 virtual bool subSortLessThan(const QModelIndex& left,
00089 const QModelIndex& right) const;
00090
00091 private:
00092 class KDirSortFilterProxyModelPrivate;
00093 KDirSortFilterProxyModelPrivate* const d;
00094 };
00095
00096
00097 #endif