1 /* 2 SPDX-FileCopyrightText: 2016-2021 Laurent Montel <montel@kde.org> 3 4 SPDX-License-Identifier: GPL-2.0-or-later 5 */ 6 7 #pragma once 8 9 #include <QObject> 10 11 namespace MessageComposer 12 { 13 class PluginEditorCheckBeforeSendInterface; 14 class PluginEditorCheckBeforeSendParams; 15 } 16 17 class KMailPluginEditorCheckBeforeSendManagerInterface : public QObject 18 { 19 Q_OBJECT 20 public: 21 explicit KMailPluginEditorCheckBeforeSendManagerInterface(QObject *parent = nullptr); 22 ~KMailPluginEditorCheckBeforeSendManagerInterface() override; 23 24 QWidget *parentWidget() const; 25 void setParentWidget(QWidget *parentWidget); 26 27 // TODO add Identity 28 // TODO add Emails 29 // TODO add body ? or editor 30 31 void initializePlugins(); 32 bool execute(const MessageComposer::PluginEditorCheckBeforeSendParams ¶ms) const; 33 34 private: 35 Q_DISABLE_COPY(KMailPluginEditorCheckBeforeSendManagerInterface) 36 QList<MessageComposer::PluginEditorCheckBeforeSendInterface *> mListPluginInterface; 37 QWidget *mParentWidget = nullptr; 38 }; 39 40