• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.11.3 API Reference
  • KDE Home
  • Contact Us
 

akonadi

  • akonadi
entitymimetypefiltermodel.h
1 /*
2  Copyright (c) 2007 Bruno Virlet <bruno.virlet@gmail.com>
3  Copyright (c) 2009 Stephen Kelly <steveire@gmail.com>
4 
5  This library is free software; you can redistribute it and/or modify it
6  under the terms of the GNU Library General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or (at your
8  option) any later version.
9 
10  This library is distributed in the hope that it will be useful, but WITHOUT
11  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12  FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13  License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to the
17  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18  02110-1301, USA.
19 */
20 
21 #ifndef AKONADI_ENTITYMIMETYPEFILTERMODEL_H
22 #define AKONADI_ENTITYMIMETYPEFILTERMODEL_H
23 
24 #include "akonadi_export.h"
25 #include "entitytreemodel.h"
26 
27 #include <QSortFilterProxyModel>
28 
29 namespace Akonadi {
30 
31 class EntityMimeTypeFilterModelPrivate;
32 
61 class AKONADI_EXPORT EntityMimeTypeFilterModel : public QSortFilterProxyModel
62 {
63  Q_OBJECT
64 
65  public:
71  explicit EntityMimeTypeFilterModel( QObject *parent = 0 );
72 
76  virtual ~EntityMimeTypeFilterModel();
77 
83  void addMimeTypeInclusionFilters( const QStringList &mimeTypes );
84 
90  void addMimeTypeExclusionFilters( const QStringList &mimeTypes );
91 
97  void addMimeTypeInclusionFilter( const QString &mimeType );
98 
104  void addMimeTypeExclusionFilter( const QString &mimeType );
105 
109  QStringList mimeTypeInclusionFilters() const;
110 
114  QStringList mimeTypeExclusionFilters() const;
115 
119  void clearFilters();
120 
126  void setHeaderGroup( EntityTreeModel::HeaderGroup headerGroup );
127 
128  virtual QVariant headerData( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
129 
130  virtual bool hasChildren(const QModelIndex& parent = QModelIndex()) const;
131 
132  virtual bool canFetchMore(const QModelIndex &parent) const;
133 
134  virtual QModelIndexList match( const QModelIndex& start, int role, const QVariant& value, int hits = 1, Qt::MatchFlags flags = Qt::MatchFlags( Qt::MatchStartsWith | Qt::MatchWrap ) ) const;
135 
136  virtual int columnCount(const QModelIndex& parent = QModelIndex()) const;
137 
138  protected:
139  virtual bool filterAcceptsRow( int sourceRow, const QModelIndex &sourceParent ) const;
140  virtual bool filterAcceptsColumn(int sourceColumn, const QModelIndex& sourceParent) const;
141 
142  private:
143  //@cond PRIVATE
144  Q_DECLARE_PRIVATE( EntityMimeTypeFilterModel )
145  EntityMimeTypeFilterModelPrivate * const d_ptr;
146  //@endcond
147 };
148 
149 }
150 
151 #endif
Akonadi::EntityMimeTypeFilterModel
A proxy model that filters entities by mime type.
Definition: entitymimetypefiltermodel.h:61
Akonadi::EntityTreeModel::HeaderGroup
HeaderGroup
Describes what header information the model shall return.
Definition: entitytreemodel.h:381
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Nov 26 2013 09:03:17 by doxygen 1.8.5 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

akonadi

Skip menu "akonadi"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Modules
  • Related Pages

kdepimlibs-4.11.3 API Reference

Skip menu "kdepimlibs-4.11.3 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal