Messagelib

webengineexporthtmlpagejob.h
1 /*
2  SPDX-FileCopyrightText: 2016-2023 Laurent Montel <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #pragma once
8 
9 #include "webengineviewer_export.h"
10 #include <QObject>
11 class QWebEngineView;
12 namespace WebEngineViewer
13 {
14 /**
15  * @brief The WebEngineExportHtmlPageJob class
16  * @author Laurent Montel <[email protected]>
17  */
18 class WEBENGINEVIEWER_EXPORT WebEngineExportHtmlPageJob : public QObject
19 {
20  Q_OBJECT
21 public:
22  explicit WebEngineExportHtmlPageJob(QObject *parent = nullptr);
23  ~WebEngineExportHtmlPageJob() override;
24 
25  void start();
26 
27  Q_REQUIRED_RESULT QWebEngineView *engineView() const;
28  void setEngineView(QWebEngineView *engineView);
29 
30 Q_SIGNALS:
31  void failed();
32  void success(const QString &filename);
33 
34 private:
35  WEBENGINEVIEWER_NO_EXPORT void slotSaveHtmlToPage(const QString &text);
36  QWebEngineView *mEngineView = nullptr;
37 };
38 }
Q_SCRIPTABLE Q_NOREPLY void start()
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Sun Oct 1 2023 03:53:35 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.