Messagelib

templateparserextracthtmlinfo.h
1 /*
2  SPDX-FileCopyrightText: 2017-2021 Laurent Montel <[email protected]>
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 
13 namespace TemplateParser
14 {
15 class TemplateExtractTextFromMail;
16 class TemplateExtractHtmlElementFromMail;
17 
18 class TEMPLATEPARSER_TESTS_EXPORT TemplateParserExtractHtmlInfo : public QObject
19 {
20  Q_OBJECT
21 public:
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 
30 Q_SIGNALS:
31  void finished(const TemplateParserExtractHtmlInfoResult &result);
32 
33 private:
34  void slotExtractHtmlElementFinished(bool success);
35  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 }
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Dec 5 2021 23:04:55 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.