File indexing completed on 2024-12-22 05:00:50
0001 /* 0002 SPDX-FileCopyrightText: 2012-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <MailCommon/MailInterfaces> 0010 0011 namespace Akonadi 0012 { 0013 class EntityTreeModel; 0014 class EntityMimeTypeFilterModel; 0015 } 0016 0017 namespace MailCommon 0018 { 0019 class FolderCollectionMonitor; 0020 class JobScheduler; 0021 } 0022 0023 class ArchiveMailKernel : public QObject, public MailCommon::IKernel, public MailCommon::ISettings 0024 { 0025 Q_OBJECT 0026 public: 0027 explicit ArchiveMailKernel(QObject *parent = nullptr); 0028 0029 static ArchiveMailKernel *self(); 0030 0031 KIdentityManagementCore::IdentityManager *identityManager() override; 0032 MessageComposer::MessageSender *msgSender() override; 0033 0034 Akonadi::EntityMimeTypeFilterModel *collectionModel() const override; 0035 KSharedConfig::Ptr config() override; 0036 void syncConfig() override; 0037 MailCommon::JobScheduler *jobScheduler() const override; 0038 Akonadi::ChangeRecorder *folderCollectionMonitor() const override; 0039 void updateSystemTray() override; 0040 0041 [[nodiscard]] qreal closeToQuotaThreshold() override; 0042 [[nodiscard]] bool excludeImportantMailFromExpiry() override; 0043 [[nodiscard]] QStringList customTemplates() override; 0044 [[nodiscard]] Akonadi::Collection::Id lastSelectedFolder() override; 0045 void setLastSelectedFolder(Akonadi::Collection::Id col) override; 0046 [[nodiscard]] bool showPopupAfterDnD() override; 0047 void expunge(Akonadi::Collection::Id col, bool sync) override; 0048 0049 private: 0050 Q_DISABLE_COPY(ArchiveMailKernel) 0051 KIdentityManagementCore::IdentityManager *mIdentityManager = nullptr; 0052 MailCommon::FolderCollectionMonitor *mFolderCollectionMonitor = nullptr; 0053 Akonadi::EntityTreeModel *mEntityTreeModel = nullptr; 0054 Akonadi::EntityMimeTypeFilterModel *mCollectionModel = nullptr; 0055 MailCommon::JobScheduler *mJobScheduler = nullptr; 0056 };