1/*
2 Copyright (c) 2009 Tobias Koenig <tokoe@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#ifndef AKONADI_COLLECTIONCOMBOBOX_P_H
21#define AKONADI_COLLECTIONCOMBOBOX_P_H
22
23#include <QtCore/QObject>
24
25class QAbstractItemModel;
26class QEvent;
27
28namespace Akonadi {
29
30class CollectionComboBox;
31class CollectionFilterProxyModel;
32class EntityRightsFilterModel;
33
34class MobileEventHandler : public QObject
35{
36 Q_OBJECT
37
38public:
39 MobileEventHandler(CollectionComboBox *comboBox, CollectionFilterProxyModel *mimeTypeFilter,
40 EntityRightsFilterModel *accessRightsFilter, QAbstractItemModel *customModel);
41
42protected:
43 virtual bool eventFilter(QObject *object, QEvent *event);
44
45private Q_SLOTS:
46 void openDialog();
47
48private:
49 CollectionComboBox *mComboBox;
50 CollectionFilterProxyModel *mMimeTypeFilter;
51 EntityRightsFilterModel *mAccessRightsFilter;
52 QAbstractItemModel *mCustomModel;
53};
54
55}
56
57#endif
58