Messagelib

webengineexportpdfpagejob.h
1 /*
2  SPDX-FileCopyrightText: 2020-2021 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 WebEngineExportPdfPageJob : public QObject
19 {
20  Q_OBJECT
21 public:
22  explicit WebEngineExportPdfPageJob(QObject *parent = nullptr);
23  ~WebEngineExportPdfPageJob() override;
24  void start();
25 
26  Q_REQUIRED_RESULT QWebEngineView *engineView() const;
27  void setEngineView(QWebEngineView *engineView);
28 
29  Q_REQUIRED_RESULT QString pdfPath() const;
30  void setPdfPath(const QString &pdfPath);
31 
32  Q_REQUIRED_RESULT bool canStart() const;
33 
34 Q_SIGNALS:
35  void exportPdfFailed();
36  void exportToPdfSuccess();
37 
38 private:
39  void slotPdfPrintingFinished(const QString &filePath, bool success);
40  QString mPdfPath;
41  QWebEngineView *mWebEngineView = nullptr;
42 };
43 }
44 
The WebEngineExportHtmlPageJob class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Thu Dec 2 2021 23:06:10 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.