Akonadi

entityrightsfiltermodel.h
1 /*
2  SPDX-FileCopyrightText: 2009 Tobias Koenig <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #ifndef AKONADI_ENTITYRIGHTSFILTERMODEL_H
8 #define AKONADI_ENTITYRIGHTSFILTERMODEL_H
9 
10 #include "akonadicore_export.h"
11 #include "entitytreemodel.h"
12 
13 #include <QSortFilterProxyModel>
14 
15 namespace Akonadi
16 {
17 
18 class EntityRightsFilterModelPrivate;
19 
47 class AKONADICORE_EXPORT EntityRightsFilterModel : public QSortFilterProxyModel
48 {
49  Q_OBJECT
50 
51 public:
57  explicit EntityRightsFilterModel(QObject *parent = nullptr);
58 
62  ~EntityRightsFilterModel() override;
63 
70  void setAccessRights(Collection::Rights rights);
71 
75  Q_REQUIRED_RESULT Collection::Rights accessRights() const;
76 
80  Q_REQUIRED_RESULT Qt::ItemFlags flags(const QModelIndex &index) const override;
81 
85  Q_REQUIRED_RESULT QModelIndexList match(const QModelIndex &start, int role, const QVariant &value, int hits = 1,
87 
88 protected:
89  bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
90 
91 private:
92  //@cond PRIVATE
93  Q_DECLARE_PRIVATE(EntityRightsFilterModel)
94  EntityRightsFilterModelPrivate *const d_ptr;
95  //@endcond
96 };
97 
98 }
99 
100 #endif
typedef MatchFlags
A proxy model that filters entities by access rights.
Helper integration between Akonadi and Qt.
typedef ItemFlags
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sat Dec 5 2020 23:17:15 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.