Marble

TinyWebBrowser.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2006-2007 Torsten Rahn <tackat@kde.org>
4// SPDX-FileCopyrightText: 2007 Inge Wallin <ingwa@kde.org>
5//
6
7#ifndef MARBLE_TINYWEBBROWSER_H
8#define MARBLE_TINYWEBBROWSER_H
9
10// Qt
11#include <QWebEngineView>
12
13// Marble
14#include "marble_export.h"
15
16class QString;
17class QUrl;
18
19namespace Marble
20{
21
22class TinyWebBrowserPrivate;
23
24/**
25 * This class provides a tiny web browser based on QWebEngineView (WebKit).
26 * It is different from QWebEngineView as it has the button "Open in new Window"
27 * disabled per default and instead opens every link in the default web
28 * browser of the user.
29 */
30class MARBLE_EXPORT TinyWebBrowser : public QWebEngineView
31{
32 Q_OBJECT
33
34public:
35 explicit TinyWebBrowser(QWidget *parent = nullptr);
36 ~TinyWebBrowser() override;
37
38public Q_SLOTS:
39 void setWikipediaPath(const QString &relativeUrl);
40 void print();
41
42Q_SIGNALS:
43 void statusMessage(const QString &);
44
45protected:
46 QWebEngineView *createWindow(QWebEnginePage::WebWindowType type) override;
47
48private Q_SLOTS:
49 void openExternalLink(const QUrl &);
50
51private:
52 TinyWebBrowserPrivate *const d;
53};
54
55}
56
57#endif
This class provides a tiny web browser based on QWebEngineView (WebKit).
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 8 2024 12:02:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.