1 /* 2 * This file is part of KMail. 3 * SPDX-FileCopyrightText: 2009 Constantin Berzan <exit3219@gmail.com> 4 * 5 * Parts based on KMail code by: 6 * Various authors. 7 * 8 * SPDX-License-Identifier: GPL-2.0-or-later 9 */ 10 11 #pragma once 12 13 #include <Akonadi/Item> 14 #include <MessageComposer/AttachmentControllerBase> 15 class KMComposerWin; 16 class QModelIndex; 17 namespace MessageComposer 18 { 19 class AttachmentModel; 20 } 21 22 namespace KMail 23 { 24 class AttachmentView; 25 26 class AttachmentController : public MessageComposer::AttachmentControllerBase 27 { 28 Q_OBJECT 29 30 public: 31 explicit AttachmentController(MessageComposer::AttachmentModel *model, AttachmentView *view, KMComposerWin *composer); 32 ~AttachmentController() override; 33 34 public Q_SLOTS: 35 void attachMyPublicKey() override; 36 37 private: 38 void identityChanged(); 39 void slotActionsCreated(); 40 void addAttachmentItems(const Akonadi::Item::List &items); 41 void selectionChanged(); 42 void onShowAttachment(KMime::Content *content, const QByteArray &charset); 43 void doubleClicked(const QModelIndex &itemClicked); 44 void slotSelectAllAttachment(); 45 46 KMComposerWin *const mComposer; 47 AttachmentView *const mView; 48 }; 49 } // namespace KMail 50 51