2
This file is part of KMail, the KDE mail client.
3
2
Copyright (c) 2010 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
4
3
Copyright (c) 2010 Andras Mantia <andras@kdab.com>
6
KMail is free software; you can redistribute it and/or modify it
5
This program is free software; you can redistribute it and/or modify it
7
6
under the terms of the GNU General Public License, version 2, as
8
7
published by the Free Software Foundation.
10
KMail is distributed in the hope that it will be useful, but
9
This program is distributed in the hope that it will be useful, but
11
10
WITHOUT ANY WARRANTY; without even the implied warranty of
12
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
12
General Public License for more details.
17
16
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20
#ifndef MAILCOMMON_INTERFACES_H
21
#define MAILCOMMON_INTERFACES_H
19
#ifndef MAILCOMMON_MAILINTERFACES_H
20
#define MAILCOMMON_MAILINTERFACES_H
22
#include <Akonadi/Collection>
23
24
#include <KSharedConfig>
25
#include <akonadi/collection.h>
27
26
class MessageSender;
29
28
namespace Akonadi {
40
39
class FilterDialog;
41
40
class JobScheduler;
43
42
/** Generic interface for mail kernels.*/
47
* Returns a model of all folders in KMail. This is basically the same as entityTreeModel(),
48
* but with items filtered out, the model contains only collections.
50
virtual Akonadi::EntityMimeTypeFilterModel *collectionModel() const = 0;
52
/** return the pointer to the identity manager */
53
virtual KPIMIdentities::IdentityManager *identityManager() = 0;
55
virtual KSharedConfig::Ptr config() = 0;
56
virtual void syncConfig() = 0;
57
virtual JobScheduler* jobScheduler() const = 0;
58
virtual Akonadi::ChangeRecorder *folderCollectionMonitor() const = 0;
59
virtual void updateSystemTray() = 0;
60
virtual MessageSender *msgSender() = 0;
62
virtual ~IKernel() {};
47
* Returns a model of all folders in KMail.
48
* This is basically the same as entityTreeModel(), but with items
49
* filtered out, the model contains only collections.
51
virtual Akonadi::EntityMimeTypeFilterModel *collectionModel() const = 0;
54
* Return the pointer to the identity manager.
56
virtual KPIMIdentities::IdentityManager *identityManager() = 0;
58
virtual KSharedConfig::Ptr config() = 0;
59
virtual void syncConfig() = 0;
60
virtual JobScheduler *jobScheduler() const = 0;
61
virtual Akonadi::ChangeRecorder *folderCollectionMonitor() const = 0;
62
virtual void updateSystemTray() = 0;
63
virtual MessageSender *msgSender() = 0;
65
70
/** Filter related interface */
68
virtual void openFilterDialog( bool createDummyFilter = true ) = 0;
69
virtual void createFilter( const QByteArray & field, const QString & value ) = 0;
70
virtual ~IFilter() {};
74
virtual void openFilterDialog( bool createDummyFilter = true ) = 0;
75
virtual void createFilter( const QByteArray & field, const QString &value ) = 0;
73
81
/** Interface to access some settings. */
76
virtual bool showPopupAfterDnD() = 0;
78
virtual bool excludeImportantMailFromExpiry()= 0;
80
virtual qreal closeToQuotaThreshold() = 0;
82
virtual Akonadi::Collection::Id lastSelectedFolder() = 0;
83
virtual void setLastSelectedFolder( const Akonadi::Collection::Id &col ) = 0;
85
virtual QStringList customTemplates() = 0;
87
virtual ~ISettings() {};
85
virtual bool showPopupAfterDnD() = 0;
87
virtual bool excludeImportantMailFromExpiry() = 0;
89
virtual qreal closeToQuotaThreshold() = 0;
91
virtual Akonadi::Collection::Id lastSelectedFolder() = 0;
92
virtual void setLastSelectedFolder( const Akonadi::Collection::Id &col ) = 0;
94
virtual QStringList customTemplates() = 0;