diff options
Diffstat (limited to 'src/webenginewidgets/api/qwebenginepage.h')
-rw-r--r-- | src/webenginewidgets/api/qwebenginepage.h | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/webenginewidgets/api/qwebenginepage.h b/src/webenginewidgets/api/qwebenginepage.h index e85f9b30e..bc5799aac 100644 --- a/src/webenginewidgets/api/qwebenginepage.h +++ b/src/webenginewidgets/api/qwebenginepage.h @@ -44,6 +44,7 @@ #include <QtWebEngineWidgets/qwebenginecertificateerror.h> #include <QtWebEngineWidgets/qwebenginedownloaditem.h> #include <QtWebEngineCore/qwebenginecallback.h> +#include <QtWebEngineCore/qwebenginehttprequest.h> #include <QtCore/qobject.h> #include <QtCore/qurl.h> @@ -54,9 +55,12 @@ QT_BEGIN_NAMESPACE class QMenu; +#if defined(QT_PRINTSUPPORT_LIB) #ifndef QT_NO_PRINTER class QPrinter; -#endif +#endif // QT_NO_PRINTER +#endif // QT_PRINTSUPPORT_LIB + class QWebChannel; class QWebEngineContextMenuData; class QWebEngineFullScreenRequest; @@ -69,13 +73,13 @@ class QWebEngineSettings; class QWEBENGINEWIDGETS_EXPORT QWebEnginePage : public QObject { Q_OBJECT - Q_PROPERTY(QString selectedText READ selectedText) - Q_PROPERTY(bool hasSelection READ hasSelection) + Q_PROPERTY(QString selectedText READ selectedText CONSTANT) + Q_PROPERTY(bool hasSelection READ hasSelection CONSTANT) // Ex-QWebFrame properties - Q_PROPERTY(QUrl requestedUrl READ requestedUrl) + Q_PROPERTY(QUrl requestedUrl READ requestedUrl CONSTANT) Q_PROPERTY(qreal zoomFactor READ zoomFactor WRITE setZoomFactor) - Q_PROPERTY(QString title READ title) + Q_PROPERTY(QString title READ title CONSTANT) Q_PROPERTY(QUrl url READ url WRITE setUrl) Q_PROPERTY(QUrl iconUrl READ iconUrl NOTIFY iconUrlChanged) Q_PROPERTY(QIcon icon READ icon NOTIFY iconChanged) @@ -224,8 +228,8 @@ public: void setFeaturePermission(const QUrl &securityOrigin, Feature feature, PermissionPolicy policy); - // Ex-QWebFrame methods void load(const QUrl &url); + void load(const QWebEngineHttpRequest &request); void setHtml(const QString &html, const QUrl &baseUrl = QUrl()); void setContent(const QByteArray &data, const QString &mimeType = QString(), const QUrl &baseUrl = QUrl()); @@ -282,6 +286,7 @@ public: void printToPdf(const QWebEngineCallback<const QByteArray&> &resultCallback, const QPageLayout &layout = QPageLayout(QPageSize(QPageSize::A4), QPageLayout::Portrait, QMarginsF())); #endif +#if defined(QT_PRINTSUPPORT_LIB) #ifndef QT_NO_PRINTER #ifdef Q_QDOC void print(QPrinter *printer, FunctorOrLambda resultCallback); @@ -289,6 +294,7 @@ public: void print(QPrinter *printer, const QWebEngineCallback<bool> &resultCallback); #endif // QDOC #endif // QT_NO_PRINTER +#endif // QT_PRINTSUPPORT_LIB const QWebEngineContextMenuData &contextMenuData() const; @@ -322,6 +328,8 @@ Q_SIGNALS: void audioMutedChanged(bool muted); void recentlyAudibleChanged(bool recentlyAudible); + void pdfPrintingFinished(const QString &filePath, bool success); + protected: virtual QWebEnginePage *createWindow(WebWindowType type); virtual QStringList chooseFiles(FileSelectionMode mode, const QStringList &oldFiles, const QStringList &acceptedMimeTypes); |