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
34 public:
35 explicit TinyWebBrowser( QWidget* parent = nullptr );
36 ~TinyWebBrowser() override;
37
38 public Q_SLOTS:
39 void setWikipediaPath( const QString& relativeUrl );
40 void print();
41
42 Q_SIGNALS:
43 void statusMessage( const QString& );
44
45 protected:
46 QWebEngineView *createWindow( QWebEnginePage::WebWindowType type ) override;
47
48 private Q_SLOTS:
49 void openExternalLink( const QUrl& );
50
51 private:
52 TinyWebBrowserPrivate * const d;
53};
54
55}
56
57#endif
const QList< QKeySequence > & print()
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 Tue Mar 26 2024 11:18:17 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.