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  [[nodiscard]] QString bodyElement() const;
23 
24  [[nodiscard]] QString headerElement() const;
25 
26  [[nodiscard]] 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 }
QAction * clear(const QObject *recvr, const char *slot, QObject *parent)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Dec 3 2023 03:57:07 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.