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

0001 /*
0002    SPDX-FileCopyrightText: 2017-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 <QObject>
0011 #include <memory>
0012 namespace KPIMTextEdit
0013 {
0014 class RichTextComposer;
0015 }
0016 
0017 namespace MessageComposer
0018 {
0019 class PluginEditorInitInterfacePrivate;
0020 /**
0021  * @brief The PluginEditorInitInterface class
0022  * @author Laurent Montel <montel@kde.org>
0023  */
0024 class MESSAGECOMPOSER_EXPORT PluginEditorInitInterface : public QObject
0025 {
0026     Q_OBJECT
0027 public:
0028     explicit PluginEditorInitInterface(QObject *parent = nullptr);
0029     ~PluginEditorInitInterface() override;
0030 
0031     virtual bool exec() = 0;
0032 
0033     void setParentWidget(QWidget *parent);
0034     [[nodiscard]] QWidget *parentWidget() const;
0035 
0036     [[nodiscard]] KPIMTextEdit::RichTextComposer *richTextEditor() const;
0037     void setRichTextEditor(KPIMTextEdit::RichTextComposer *richTextEditor);
0038 
0039 public Q_SLOTS:
0040     virtual void reloadConfig();
0041 
0042 private:
0043     std::unique_ptr<PluginEditorInitInterfacePrivate> const d;
0044 };
0045 }