File indexing completed on 2024-12-22 05:01:05
0001 /* 0002 SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-only 0005 */ 0006 0007 #pragma once 0008 0009 #include <MessageComposer/RichTextComposerNg> 0010 class KMComposerWin; 0011 namespace KPIMTextEdit 0012 { 0013 class RichTextComposerEmailQuoteHighlighter; 0014 } 0015 class KMComposerEditorNg : public MessageComposer::RichTextComposerNg 0016 { 0017 Q_OBJECT 0018 public: 0019 explicit KMComposerEditorNg(KMComposerWin *win, QWidget *parent); 0020 ~KMComposerEditorNg() override; 0021 0022 [[nodiscard]] QString smartQuote(const QString &msg) override; 0023 0024 void setHighlighterColors(KPIMTextEdit::RichTextComposerEmailQuoteHighlighter *highlighter) override; 0025 0026 void showSpellConfigDialog(const QString &configFileName); 0027 0028 [[nodiscard]] MessageComposer::PluginEditorConvertTextInterface::ConvertTextStatus convertPlainText(MessageComposer::TextPart *textPart) override; 0029 Q_SIGNALS: 0030 void insertSnippet(); 0031 0032 protected: 0033 bool processModifyText(QKeyEvent *event) override; 0034 void addExtraMenuEntry(QMenu *menu, QPoint pos) override; 0035 bool canInsertFromMimeData(const QMimeData *source) const override; 0036 void insertFromMimeData(const QMimeData *source) override; 0037 0038 private: 0039 KMComposerWin *const mComposerWin; 0040 };