1 /*
2    SPDX-FileCopyrightText: 2021 Laurent Montel <montel@kde.org>
3 
4    SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "messagecomposer_export.h"
10 #include <QObject>
11 #include <memory>
12 namespace MessageComposer
13 {
14 class PluginEditorBasePrivate;
15 /**
16  * @brief The PluginEditorBase class
17  * @author Laurent Montel <montel@kde.org>
18  */
19 class MESSAGECOMPOSER_EXPORT PluginEditorBase : public QObject
20 {
21     Q_OBJECT
22 public:
23     explicit PluginEditorBase(QObject *parent = nullptr);
24     ~PluginEditorBase() override;
25 
26     Q_REQUIRED_RESULT virtual bool hasConfigureDialog() const;
27 
28     virtual void showConfigureDialog(QWidget *parent = nullptr);
29 
30     void emitConfigChanged();
31 
32     Q_REQUIRED_RESULT virtual QString description() const;
33 
34     void setIsEnabled(bool enabled);
35     Q_REQUIRED_RESULT bool isEnabled() const;
36 
37 Q_SIGNALS:
38     void configChanged();
39 
40 private:
41     std::unique_ptr<PluginEditorBasePrivate> const d;
42 };
43 }
44