Messagelib

webengineexportpdfpagejob.h
1/*
2 SPDX-FileCopyrightText: 2020-2025 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{
21public:
22 explicit WebEngineExportPdfPageJob(QObject *parent = nullptr);
23 ~WebEngineExportPdfPageJob() override;
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
35 void exportPdfFailed();
36 void exportToPdfSuccess();
37
38private:
39 WEBENGINEVIEWER_NO_EXPORT void slotExportPdfFinished(const QString &filePath, bool success);
40 QString mPdfPath;
41 QWebEngineView *mWebEngineView = nullptr;
42};
43}
Q_SCRIPTABLE Q_NOREPLY void start()
QObject(QObject *parent)
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 31 2025 12:05:42 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.