Mailcommon

mailinterfaces.h
1 /*
2  SPDX-FileCopyrightText: 2010 Klarälvdalens Datakonsult AB, a KDAB Group company <[email protected]>
3  SPDX-FileCopyrightText: 2010 Andras Mantia <[email protected]>
4 
5  SPDX-License-Identifier: GPL-2.0-or-later
6 */
7 
8 #pragma once
9 
10 #include <Akonadi/Collection>
11 
12 #include <KSharedConfig>
13 
14 namespace MessageComposer
15 {
16 class MessageSender;
17 }
18 
19 namespace Akonadi
20 {
21 class ChangeRecorder;
22 class EntityMimeTypeFilterModel;
23 }
24 
25 namespace KIdentityManagement
26 {
27 class IdentityManager;
28 }
29 
30 namespace MailCommon
31 {
32 class FilterDialog;
33 class JobScheduler;
34 
35 /** Generic interface for mail kernels.*/
36 class IKernel
37 {
38 public:
39  /**
40  * Returns a model of all folders in KMail.
41  * This is basically the same as entityTreeModel(), but with items
42  * filtered out, the model contains only collections.
43  */
45 
46  /**
47  * Return the pointer to the identity manager.
48  */
50 
51  virtual KSharedConfig::Ptr config() = 0;
52  virtual void syncConfig() = 0;
53  virtual JobScheduler *jobScheduler() const = 0;
54  virtual Akonadi::ChangeRecorder *folderCollectionMonitor() const = 0;
55  virtual void updateSystemTray() = 0;
56  virtual MessageComposer::MessageSender *msgSender() = 0;
57  virtual void expunge(Akonadi::Collection::Id col, bool sync) = 0;
58 
59  virtual ~IKernel() = default;
60 };
61 
62 /** Filter related interface */
63 class IFilter
64 {
65 public:
66  virtual void openFilterDialog(bool createDummyFilter = true) = 0;
67  virtual void createFilter(const QByteArray &field, const QString &value) = 0;
68  virtual ~IFilter() = default;
69 };
70 
71 /** Interface to access some settings. */
72 class ISettings
73 {
74 public:
75  virtual bool showPopupAfterDnD() = 0;
76 
77  virtual bool excludeImportantMailFromExpiry() = 0;
78 
79  virtual qreal closeToQuotaThreshold() = 0;
80 
81  virtual Akonadi::Collection::Id lastSelectedFolder() = 0;
82  virtual void setLastSelectedFolder(Akonadi::Collection::Id col) = 0;
83 
84  virtual QStringList customTemplates() = 0;
85 
86  virtual ~ISettings() = default;
87 };
88 }
Interface to access some settings.
The unique JobScheduler instance (owned by kmkernel) implements "background processing" of folder ope...
Definition: jobscheduler.h:83
virtual KIdentityManagement::IdentityManager * identityManager()=0
Return the pointer to the identity manager.
virtual Akonadi::EntityMimeTypeFilterModel * collectionModel() const =0
Returns a model of all folders in KMail.
Filter related interface.
Generic interface for mail kernels.
The filter dialog.
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Sat Sep 24 2022 03:58:15 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.