Remove unneeded include.
[kdepim.git] / akonadi_next / kcheckableproxymodel.h
blob4494defb7361b107ace75cc7e0879bb43143f0ed
1 /*
2 This file is part of Akonadi.
4 Copyright (c) 2010 Stephen Kelly <steveire@gmail.com>
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
19 USA.
22 #ifndef KCHECKABLEPROXYMODEL_H
23 #define KCHECKABLEPROXYMODEL_H
26 #include "akonadi_next_export.h"
28 #include <QItemSelection>
29 #include <QSortFilterProxyModel>
31 namespace Future
34 class KCheckableProxyModelPrivate;
36 class AKONADI_NEXT_EXPORT KCheckableProxyModel : public QSortFilterProxyModel
38 Q_OBJECT
39 public:
40 KCheckableProxyModel(QObject* parent = 0);
41 ~KCheckableProxyModel();
43 QItemSelectionModel *selectionModel() const;
44 void setSelectionModel(QItemSelectionModel *itemSelectionModel);
46 /* reimp */ Qt::ItemFlags flags(const QModelIndex& index) const;
48 /* reimp */ QVariant data(const QModelIndex& index, int role = Qt::DisplayRole) const;
50 /* reimp */ bool setData(const QModelIndex& index, const QVariant& value, int role = Qt::EditRole);
52 /* reimp */ void setSourceModel(QAbstractItemModel* sourceModel);
54 protected:
55 virtual bool select( const QItemSelection &selection, QItemSelectionModel::SelectionFlags command );
57 private:
58 Q_DECLARE_PRIVATE(KCheckableProxyModel )
59 KCheckableProxyModelPrivate * const d_ptr;
61 Q_PRIVATE_SLOT(d_func(), void selectionChanged(const QItemSelection &, const QItemSelection &) )
66 #endif