Messagelib

templateparserextracthtmlinfo.h
1/*
2 SPDX-FileCopyrightText: 2017-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "templateparser_private_export.h"
10#include "templateparserextracthtmlinforesult.h"
11#include <QObject>
12
13namespace TemplateParser
14{
15class TemplateExtractTextFromMail;
16class TemplateExtractHtmlElementFromMail;
17
18class TEMPLATEPARSER_TESTS_EXPORT TemplateParserExtractHtmlInfo : public QObject
19{
20 Q_OBJECT
21public:
22 explicit TemplateParserExtractHtmlInfo(QObject *parent = nullptr);
23 ~TemplateParserExtractHtmlInfo() override;
24
25 void setHtmlForExtractingTextPlain(const QString &html);
26 void setHtmlForExtractionHeaderAndBody(const QString &html);
27 void setTemplate(const QString &str);
28 void start();
29
30Q_SIGNALS:
31 void finished(const TemplateParserExtractHtmlInfoResult &result);
32
33private:
34 TEMPLATEPARSER_NO_EXPORT void slotExtractHtmlElementFinished(bool success);
35 TEMPLATEPARSER_NO_EXPORT void slotExtractToPlainTextFinished(bool success);
36
37 TemplateParserExtractHtmlInfoResult mResult;
38
39 QString mHtmlForExtractingTextPlain;
40 QString mHtmlForExtractionHeaderAndBody;
41
42 QString mTemplateStr;
43
44 TemplateExtractTextFromMail *mTemplateWebEngineView = nullptr;
45 TemplateExtractHtmlElementFromMail *mExtractHtmlElementWebEngineView = nullptr;
46};
47}
Q_SCRIPTABLE Q_NOREPLY void start()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:33:26 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.