akonadi
entityrightsfiltermodel.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef AKONADI_ENTITYRIGHTSFILTERMODEL_H
00021 #define AKONADI_ENTITYRIGHTSFILTERMODEL_H
00022
00023 #include "akonadi_export.h"
00024 #include "entitytreemodel.h"
00025
00026 #include "krecursivefilterproxymodel.h"
00027
00028 namespace Akonadi {
00029
00030 class EntityRightsFilterModelPrivate;
00031
00059 class EntityRightsFilterModel : public KRecursiveFilterProxyModel
00060 {
00061 Q_OBJECT
00062
00063 public:
00069 explicit EntityRightsFilterModel( QObject *parent = 0 );
00070
00074 virtual ~EntityRightsFilterModel();
00075
00081 void setAccessRights( Collection::Rights rights );
00082
00086 Collection::Rights accessRights() const;
00087
00091 virtual Qt::ItemFlags flags( const QModelIndex &index ) const;
00092
00093 virtual QModelIndexList match(const QModelIndex& start, int role, const QVariant& value, int hits = 1,
00094 Qt::MatchFlags flags = Qt::MatchFlags( Qt::MatchStartsWith | Qt::MatchWrap ) ) const;
00095
00096 protected:
00097 virtual bool acceptRow( int sourceRow, const QModelIndex &sourceParent ) const;
00098
00099 private:
00100
00101 Q_DECLARE_PRIVATE( EntityRightsFilterModel )
00102 EntityRightsFilterModelPrivate * const d_ptr;
00103
00104 };
00105
00106 }
00107
00108 #endif