Akonadi

recursivecollectionfilterproxymodel.h
1 /*
2  SPDX-FileCopyrightText: 2009 Stephen Kelly <[email protected]>
3  SPDX-FileCopyrightText: 2012-2020 Laurent Montel <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #ifndef AKONADI_RECURSIVECOLLECTIONFILTERPROXYMODEL_H
9 #define AKONADI_RECURSIVECOLLECTIONFILTERPROXYMODEL_H
10 
11 #include "akonadicore_export.h"
12 
13 #include <QSortFilterProxyModel>
14 
15 namespace Akonadi
16 {
17 
18 class RecursiveCollectionFilterProxyModelPrivate;
19 
27 {
28  Q_OBJECT
29 
30 public:
36  explicit RecursiveCollectionFilterProxyModel(QObject *parent = nullptr);
37 
42 
48  void addContentMimeTypeInclusionFilter(const QString &mimeType);
49 
55  void addContentMimeTypeInclusionFilters(const QStringList &mimeTypes);
56 
60  void clearFilters();
61 
67  void setContentMimeTypeInclusionFilters(const QStringList &mimeTypes);
68 
72  Q_REQUIRED_RESULT QStringList contentMimeTypeInclusionFilters() const;
73 
79  void setSearchPattern(const QString &pattern);
80 
86  void setIncludeCheckedOnly(bool checked);
87 
88 protected:
89  int columnCount(const QModelIndex &index) const override;
90  bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
91 protected:
92  RecursiveCollectionFilterProxyModelPrivate *const d_ptr;
93  Q_DECLARE_PRIVATE(RecursiveCollectionFilterProxyModel)
94 };
95 
96 }
97 
98 #endif
A model to filter out collections of non-matching content types.
Helper integration between Akonadi and Qt.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Jul 12 2020 23:16:57 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.