WebEngineViewer::WebEnginePage Class
The WebEnginePage class Author: Laurent Montel <montel@kde.org>. More...
| Header: | #include <WebEngineViewer/WebEnginePage> |
| CMake: | find_package(KPim6WebEngineViewer REQUIRED)target_link_libraries(mytarget PRIVATE KPim6::WebEngineViewer) |
Public Functions
| WebEnginePage(QObject *parent = nullptr) | |
| virtual | ~WebEnginePage() override |
| WebEngineViewer::WebHitTest * | hitTestContent(const QPoint &pos) |
| QPoint | mapToViewport(const QPoint &pos) const |
| void | saveHtml(QWebEngineDownloadRequest *download) |
Signals
| void | showConsoleMessage(const QString &message) |
| void | urlClicked(const QUrl &url) |
Protected Functions
| QString | refreshCssVariablesScript() |
Reimplemented Protected Functions
| virtual bool | acceptNavigationRequest(const QUrl &url, QWebEnginePage::NavigationType type, bool isMainFrame) override |
| virtual bool | eventFilter(QObject *obj, QEvent *event) override |
| virtual void | javaScriptConsoleMessage(QWebEnginePage::JavaScriptConsoleMessageLevel level, const QString &message, int lineNumber, const QString &sourceID) override |
Detailed Description
Member Function Documentation
[explicit] WebEnginePage::WebEnginePage(QObject *parent = nullptr)
Constructor.
A private QWebEngineProfile, only applying to this QWebEnginePage, will be created to implement browser settings. It can be accessed via \ profile(), but it should not be shared or reused unless care is taken that the profile is not deleted until all of the QWebEnginePage's belonging to it are deleted first.
parent The parent object
[override virtual noexcept] WebEnginePage::~WebEnginePage()
Destructor. If there is a private QWebEngineProfile then it will also be destroyed.
[override virtual protected] bool WebEnginePage::acceptNavigationRequest(const QUrl &url, QWebEnginePage::NavigationType type, bool isMainFrame)
Accepts or rejects a navigation request.
[override virtual protected] bool WebEnginePage::eventFilter(QObject *obj, QEvent *event)
Filters events for the object.
WebEngineViewer::WebHitTest *WebEnginePage::hitTestContent(const QPoint &pos)
Performs a hit test on the content at the specified position.
[override virtual protected] void WebEnginePage::javaScriptConsoleMessage(QWebEnginePage::JavaScriptConsoleMessageLevel level, const QString &message, int lineNumber, const QString &sourceID)
Handles JavaScript console messages.
QPoint WebEnginePage::mapToViewport(const QPoint &pos) const
Maps the given point to the viewport.
[protected] QString WebEnginePage::refreshCssVariablesScript()
Returns a script to refresh CSS variables.
void WebEnginePage::saveHtml(QWebEngineDownloadRequest *download)
Saves the HTML content to the specified download request.
[signal] void WebEnginePage::showConsoleMessage(const QString &message)
Emitted when a console message should be displayed.
[signal] void WebEnginePage::urlClicked(const QUrl &url)
Emitted when a URL is clicked.