KPimTextEdit

richtextcomposeremailquotedecorator.cpp
1/*
2 SPDX-FileCopyrightText: 2015-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#include "richtextcomposeremailquotedecorator.h"
8#include "richtextcomposer.h"
9using namespace KPIMTextEdit;
10
11class Q_DECL_HIDDEN RichTextComposerEmailQuoteDecorator::RichTextComposerEmailQuoteDecoratorPrivate
12{
13public:
14 RichTextComposerEmailQuoteDecoratorPrivate(RichTextComposer *textEdit)
15 : composerEditor(textEdit)
16 {
17 }
18
19 RichTextComposer *const composerEditor;
20};
21
22RichTextComposerEmailQuoteDecorator::RichTextComposerEmailQuoteDecorator(RichTextComposer *textEdit)
23 : Sonnet::SpellCheckDecorator(textEdit)
24 , d(new RichTextComposerEmailQuoteDecorator::RichTextComposerEmailQuoteDecoratorPrivate(textEdit))
25{
26}
27
28RichTextComposerEmailQuoteDecorator::~RichTextComposerEmailQuoteDecorator() = default;
29
30bool RichTextComposerEmailQuoteDecorator::isSpellCheckingEnabledForBlock(const QString &blockText) const
31{
32 return !d->composerEditor->isLineQuoted(blockText) && d->composerEditor->checkSpellingEnabled();
33}
34
35#include "moc_richtextcomposeremailquotedecorator.cpp"
The RichTextComposer class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 16:55:51 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.