File indexing completed on 2024-06-23 05:18:35

0001 /*
0002    SPDX-FileCopyrightText: 2016-2024 Laurent Montel <montel@kde.org>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include "messagecomposer_export.h"
0010 #include "plugineditorcheckbeforesendparams.h"
0011 #include <QObject>
0012 #include <memory>
0013 namespace MessageComposer
0014 {
0015 class PluginEditorCheckBeforeSendInterfacePrivate;
0016 class PluginEditorCheckBeforeSendParams;
0017 /**
0018  * @brief The PluginEditorCheckBeforeSendInterface class
0019  * @author Laurent Montel <montel@kde.org>
0020  */
0021 class MESSAGECOMPOSER_EXPORT PluginEditorCheckBeforeSendInterface : public QObject
0022 {
0023     Q_OBJECT
0024 public:
0025     explicit PluginEditorCheckBeforeSendInterface(QObject *parent = nullptr);
0026     ~PluginEditorCheckBeforeSendInterface() override;
0027 
0028     virtual bool exec(const MessageComposer::PluginEditorCheckBeforeSendParams &params) = 0;
0029 
0030     void setParentWidget(QWidget *parent);
0031     [[nodiscard]] QWidget *parentWidget() const;
0032 
0033     void setParameters(const MessageComposer::PluginEditorCheckBeforeSendParams &params);
0034     [[nodiscard]] MessageComposer::PluginEditorCheckBeforeSendParams parameters() const;
0035 
0036 public Q_SLOTS:
0037     virtual void reloadConfig();
0038 
0039 private:
0040     std::unique_ptr<PluginEditorCheckBeforeSendInterfacePrivate> const d;
0041 };
0042 }