File indexing completed on 2024-10-27 04:50:59
0001 /* 0002 SPDX-FileCopyrightText: 2019-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <QObject> 0010 namespace KPIMTextEdit 0011 { 0012 class RichTextComposer; 0013 } 0014 namespace PimCommon 0015 { 0016 class CustomToolsWidgetNg; 0017 } 0018 class KActionCollection; 0019 class KMailPluginGrammarEditorManagerInterface : public QObject 0020 { 0021 Q_OBJECT 0022 public: 0023 explicit KMailPluginGrammarEditorManagerInterface(QObject *parent = nullptr); 0024 ~KMailPluginGrammarEditorManagerInterface() override = default; 0025 0026 [[nodiscard]] KPIMTextEdit::RichTextComposer *richTextEditor() const; 0027 void setRichTextEditor(KPIMTextEdit::RichTextComposer *richTextEditor); 0028 0029 [[nodiscard]] QWidget *parentWidget() const; 0030 void setParentWidget(QWidget *parentWidget); 0031 0032 void initializePlugins(); 0033 [[nodiscard]] KActionCollection *actionCollection() const; 0034 void setActionCollection(KActionCollection *actionCollection); 0035 0036 [[nodiscard]] PimCommon::CustomToolsWidgetNg *customToolsWidget() const; 0037 void setCustomToolsWidget(PimCommon::CustomToolsWidgetNg *customToolsWidget); 0038 0039 private: 0040 KPIMTextEdit::RichTextComposer *mRichTextEditor = nullptr; 0041 PimCommon::CustomToolsWidgetNg *mCustomToolsWidget = nullptr; 0042 QWidget *mParentWidget = nullptr; 0043 KActionCollection *mActionCollection = nullptr; 0044 bool mWasInitialized = false; 0045 };