Messagelib

templateextracthtmlelementfrommail.h
1 /*
2  SPDX-FileCopyrightText: 2017-2023 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 <QObject>
11 #include <QString>
12 namespace TemplateParser
13 {
14 class TemplateWebEnginePage;
15 class TEMPLATEPARSER_TESTS_EXPORT TemplateExtractHtmlElementFromMail : public QObject
16 {
17  Q_OBJECT
18 public:
19  explicit TemplateExtractHtmlElementFromMail(QObject *parent = nullptr);
20  ~TemplateExtractHtmlElementFromMail() override;
21 
22  Q_REQUIRED_RESULT QString bodyElement() const;
23 
24  Q_REQUIRED_RESULT QString headerElement() const;
25 
26  Q_REQUIRED_RESULT QString htmlElement() const;
27 
28  void setHtmlContent(const QString &html);
29 
30 Q_SIGNALS:
31  void loadContentDone(bool success);
32 
33 private:
34  void clear();
35  void slotLoadFinished(bool success);
36  void handleHtmlInfo(const QVariant &result);
37 
38  QString mBodyElement;
39  QString mHeaderElement;
40  QString mHtmlElement;
41 
42  TemplateWebEnginePage *const mPage;
43 };
44 }
KGuiItem clear()
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Mar 22 2023 04:07:15 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.