Messagelib

webengineexportpdfpagejob.h
1/*
2 SPDX-FileCopyrightText: 2020-2024 Laurent Montel <montel@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "webengineviewer_export.h"
10#include <QObject>
11class QWebEngineView;
12namespace WebEngineViewer
13{
14/**
15 * @brief The WebEngineExportHtmlPageJob class
16 * @author Laurent Montel <montel@kde.org>
17 */
18class WEBENGINEVIEWER_EXPORT WebEngineExportPdfPageJob : public QObject
19{
20 Q_OBJECT
21public:
22 explicit WebEngineExportPdfPageJob(QObject *parent = nullptr);
24 void start();
25
26 [[nodiscard]] QWebEngineView *engineView() const;
27 void setEngineView(QWebEngineView *engineView);
28
29 [[nodiscard]] QString pdfPath() const;
30 void setPdfPath(const QString &pdfPath);
31
32 [[nodiscard]] bool canStart() const;
33
34Q_SIGNALS:
35 void exportPdfFailed();
36 void exportToPdfSuccess();
37
38private:
39 WEBENGINEVIEWER_NO_EXPORT void slotPdfPrintingFinished(const QString &filePath, bool success);
40 QString mPdfPath;
41 QWebEngineView *mWebEngineView = nullptr;
42};
43}
The WebEngineExportHtmlPageJob class.
Q_SCRIPTABLE Q_NOREPLY void start()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sun Feb 25 2024 18:37:31 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.