Marble

TinyWebBrowser.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2006-2007 Torsten Rahn <[email protected]>
4 // SPDX-FileCopyrightText: 2007 Inge Wallin <[email protected]>
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 
16 class QString;
17 class QUrl;
18 
19 namespace Marble
20 {
21 
22 class 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  */
30 class 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
Binds a QML item to a specific geodetic location in screen coordinates.
const QList< QKeySequence > & print()
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Sep 25 2023 03:50:20 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.