LeechCraft  0.6.70-15082-g543737046d
Modular cross-platform feature rich live environment.
iwebbrowser.h
Go to the documentation of this file.
1 /**********************************************************************
2  * LeechCraft - modular cross-platform feature rich internet client.
3  * Copyright (C) 2006-2014 Georg Rudoy
4  *
5  * Distributed under the Boost Software License, Version 1.0.
6  * (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7  **********************************************************************/
8 
9 #pragma once
10 
11 #include <memory>
12 #include <QString>
13 #include <QWidget>
14 #include <QUrl>
15 #include <QtPlugin>
16 
23 class Q_DECL_EXPORT IWebWidget
24 {
25 public:
26  virtual ~IWebWidget () = default;
27 
34  virtual void Load (const QUrl& url) = 0;
35 
45  virtual void SetHtml (const QString& html, const QUrl& base = {}) = 0;
46 
54  virtual void SetNavBarVisible (bool visible) = 0;
55 
64  virtual void SetEverythingElseVisible (bool visible) = 0;
65 
70  virtual QWidget* GetQWidget () = 0;
71 
76  virtual void urlChanged (const QUrl&) = 0;
77 };
78 
79 class QWebView;
80 
83 class Q_DECL_EXPORT IWebBrowser
84 {
85 public:
86  virtual ~IWebBrowser () = default;
87 
93  virtual std::unique_ptr<IWebWidget> CreateWidget () const = 0;
94 };
95 
96 Q_DECLARE_INTERFACE (IWebWidget, "org.Deviant.LeechCraft.IWebWidget/1.0")
97 Q_DECLARE_INTERFACE (IWebBrowser, "org.Deviant.LeechCraft.IWebBrowser/1.0")
IWebWidget
Common interface for a web widget.
Definition: iwebbrowser.h:23
IWebBrowser
Base class for plugins that provide a web browser.
Definition: iwebbrowser.h:83