File indexing completed on 2024-10-27 04:50:58
0001 /* 0002 * This file is part of KMail. 0003 * SPDX-FileCopyrightText: 2009 Constantin Berzan <exit3219@gmail.com> 0004 * 0005 * Parts based on KMail code by: 0006 * Various authors. 0007 * 0008 * SPDX-License-Identifier: GPL-2.0-or-later 0009 */ 0010 0011 #pragma once 0012 0013 #include <Akonadi/Item> 0014 #include <MessageComposer/AttachmentControllerBase> 0015 class KMComposerWin; 0016 class QModelIndex; 0017 namespace MessageComposer 0018 { 0019 class AttachmentModel; 0020 } 0021 0022 namespace KMail 0023 { 0024 class AttachmentView; 0025 0026 class AttachmentController : public MessageComposer::AttachmentControllerBase 0027 { 0028 Q_OBJECT 0029 0030 public: 0031 explicit AttachmentController(MessageComposer::AttachmentModel *model, AttachmentView *view, KMComposerWin *composer); 0032 ~AttachmentController() override; 0033 0034 public Q_SLOTS: 0035 void attachMyPublicKey() override; 0036 0037 private: 0038 void identityChanged(); 0039 void slotActionsCreated(); 0040 void addAttachmentItems(const Akonadi::Item::List &items); 0041 void selectionChanged(); 0042 void onShowAttachment(KMime::Content *content, const QByteArray &charset); 0043 void doubleClicked(const QModelIndex &itemClicked); 0044 void slotSelectAllAttachment(); 0045 0046 KMComposerWin *const mComposer; 0047 AttachmentView *const mView; 0048 }; 0049 } // namespace KMail